Received: by 2002:a05:6358:700f:b0:131:369:b2a3 with SMTP id 15csp3360176rwo; Fri, 4 Aug 2023 03:51:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IEOIr3eQu8FphcOfIxCfgXxYSqIpWbswbLgtc2kOrlU1aYIXvoIn5PsNUzv+cDdjnEATO5T X-Received: by 2002:a05:6a00:14cc:b0:687:536a:2e5b with SMTP id w12-20020a056a0014cc00b00687536a2e5bmr1318069pfu.26.1691146301789; Fri, 04 Aug 2023 03:51:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691146301; cv=none; d=google.com; s=arc-20160816; b=IOqmk6ABNvU4gfQmGYr+d+QrOoz75mzdW+1bC0w3Yy4PZEk3ZKeqiAr6Xr1v/7uQd3 +lKA1nb7wagZWSN5ofDSoP2WSDNSYiqvVo+OMbYkmbZJF52UJolha4BbG0O6bbuIy2N1 FZ73DSPVrJzbCYActaNYn+i/lt6oRWsJDvBmeUCNIS7SUidD3IQcVxOZDDw+hqKoLIEo +48WfwzOiX9b6LnaWwx4n06DABaDZuyiE1qfVekrsy8unwQ6R27FH2VuqzspeoQ3ITv0 GaZwC10YZkUvDELhBORd/CYeRP5iKJRbXH0TdLT0CXU4aOt/yr3zGDrTlfzFDMrzZSif LfkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:message-id:in-reply-to:date:subject :cc:to:from:user-agent:references:dkim-signature; bh=wRmmMJ0HPgLCCnErClqViv0JGVjCSwWzjpmp9XzOBvQ=; fh=f/Kncm+X8u3RbIty+aBZsmDmMXhq0otoR+XYiCgM4LI=; b=WS/5m19jBWrglkPMKgzbujVSITFPcmqBPJZA90d2eyORZB84c4XZXEuZ7GA2PdgONc 3fM3ZQnnC32VWLMe8T7cvs2dSCdxkwU7zwaIE3j4a+AjCm8M1LeA0Qe0Rjea/AIXTa1V buIjaoTjfpQLBNcB33Pw2qJcuB0G57wEm7YdMWcSG9TYOov2nqGDAJ1AoIxxK/twW0pi a+C7bw3G8q23gbLmsNFzIYWdlc6uSJXWDIfpDt+ro9cXJ6W5LE1uKDiQ7eBNJ3Q9V2cK qNpkF7CYB+Xj7NPb1ffl7ci7iIjbqy1QIipwzFydPgBkvjdul/1e5PTrpLFu/Flq/bT3 nT/w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=IEpr2nCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id b20-20020a056a000cd400b0064d3e917a90si1634876pfv.180.2023.08.04.03.51.30; Fri, 04 Aug 2023 03:51:41 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@baylibre-com.20221208.gappssmtp.com header.s=20221208 header.b=IEpr2nCR; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230045AbjHDKEJ (ORCPT + 99 others); Fri, 4 Aug 2023 06:04:09 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55664 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229797AbjHDKEH (ORCPT ); Fri, 4 Aug 2023 06:04:07 -0400 Received: from mail-wr1-x434.google.com (mail-wr1-x434.google.com [IPv6:2a00:1450:4864:20::434]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E284546B2 for ; Fri, 4 Aug 2023 03:04:04 -0700 (PDT) Received: by mail-wr1-x434.google.com with SMTP id ffacd0b85a97d-31768ce2e81so1713966f8f.1 for ; Fri, 04 Aug 2023 03:04:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=baylibre-com.20221208.gappssmtp.com; s=20221208; t=1691143443; x=1691748243; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:from:to:cc:subject:date:message-id:reply-to; bh=wRmmMJ0HPgLCCnErClqViv0JGVjCSwWzjpmp9XzOBvQ=; b=IEpr2nCRcjfsHIjC0h14j9bNjpY/hRdpQWYa0wF+DpLvhSmBJE8J9SHNKA9hLanAzT XrZUGyDjmYSVEPKz9+knyknq78bLuEE9Ha7f2/VuGs25I3YJpyiRKKThMrcGslgtTYQP Dcb7wzJkdJB4YBBQYYOrJWTZ7lb/winmygvMmTC9C13bDNhromkfZOxxNJmQr3w7R1lA KEetBoEffX+8/5wgkOPyb4/WIPp+H8Gq7phV5HIzTvPGQ65Z7Cd8/kMYpH/d3/U4rmNJ iewqIMyp9eHKHr28OGydZTWptKA1bYhxkMU9umInOYcGB7BAqFi6JYtfe8cgq26q0RiP 5pMw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1691143443; x=1691748243; h=mime-version:message-id:in-reply-to:date:subject:cc:to:from :user-agent:references:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=wRmmMJ0HPgLCCnErClqViv0JGVjCSwWzjpmp9XzOBvQ=; b=Lup+DSHSSkzqVW8NMFu3iw4x3y/dSpUHrj04mXH1KERFWUSIQuHQtF12oYp2rUevXF qH5A2n2ppPu0nGdZSmCWjCro4ADoxgz3UPUoM5WKceXW0a3+G2DlMRpIXE9/OuLq1Ncs 9d+8zuTwXcOHs3c7eHzf31NLtI0y5DxMMcLW2ZGXmFg5CA5YLBeK0JGy7wEXh/MB85FH x06H+kEFvISXe//p9VAd7JI+Sr0mtvuBl4AJl3WGn968Q08IfQBM38PyGTWa/Ev3ncHv U5YvQjRX6Y6tCUN326MfM84Ejc62rPKMy0V5Q+cDg4DonTr1Wvj/2Eb6QiusUutDgdrI o/Fw== X-Gm-Message-State: AOJu0YyaS2ae3j7AaR671E+P/XWaqKWQa0G3nfvHXUbstCQmpgVCW4e8 VBvJNTH4txuLHZpM2x5IUi5B6g== X-Received: by 2002:a5d:4447:0:b0:317:3d36:b2cd with SMTP id x7-20020a5d4447000000b003173d36b2cdmr810107wrr.71.1691143443322; Fri, 04 Aug 2023 03:04:03 -0700 (PDT) Received: from localhost ([2a01:e0a:3c5:5fb1:aeaf:609a:5eef:39a8]) by smtp.gmail.com with ESMTPSA id z13-20020a5d640d000000b003176053506fsm2104960wru.99.2023.08.04.03.04.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Aug 2023 03:04:02 -0700 (PDT) References: <20230803-amlogic-v6-4-upstream-dsi-ccf-vim3-v7-0-762219fc5b28@linaro.org> <20230803-amlogic-v6-4-upstream-dsi-ccf-vim3-v7-2-762219fc5b28@linaro.org> User-agent: mu4e 1.8.13; emacs 28.2 From: Jerome Brunet To: Neil Armstrong , Michael Turquette , Stephen Boyd , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Kevin Hilman , Martin Blumenstingl , David Airlie , Daniel Vetter , Jagan Teki , Nicolas Belin Cc: linux-clk@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-amlogic@lists.infradead.org, linux-arm-kernel@lists.infradead.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v7 2/9] clk: meson: g12a: add CTS_ENCL & CTS_ENCL_SEL clocks Date: Fri, 04 Aug 2023 11:59:21 +0200 In-reply-to: <20230803-amlogic-v6-4-upstream-dsi-ccf-vim3-v7-2-762219fc5b28@linaro.org> Message-ID: <1j1qgjp1im.fsf@starbuckisacylon.baylibre.com> MIME-Version: 1.0 Content-Type: text/plain X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_BLOCKED,SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Thu 03 Aug 2023 at 14:03, Neil Armstrong wrote: > Add new CTS_ENCL & CTS_ENCL_SEL clocks for the G12A compatible > SoCs, they are used to feed the VPU LCD Pixel encoder used for > DSI display purposes. > > Signed-off-by: Neil Armstrong > --- > drivers/clk/meson/g12a.c | 40 ++++++++++++++++++++++++++++++++++++++++ > 1 file changed, 40 insertions(+) > > diff --git a/drivers/clk/meson/g12a.c b/drivers/clk/meson/g12a.c > index ceabd5f4b2ac..5d62134335c1 100644 > --- a/drivers/clk/meson/g12a.c > +++ b/drivers/clk/meson/g12a.c > @@ -3549,6 +3549,22 @@ static struct clk_regmap g12a_cts_encp_sel = { > }, > }; > > +static struct clk_regmap g12a_cts_encl_sel = { > + .data = &(struct clk_regmap_mux_data){ > + .offset = HHI_VIID_CLK_DIV, > + .mask = 0xf, > + .shift = 12, > + .table = mux_table_cts_sel, > + }, > + .hw.init = &(struct clk_init_data){ > + .name = "cts_encl_sel", > + .ops = &clk_regmap_mux_ops, > + .parent_hws = g12a_cts_parent_hws, > + .num_parents = ARRAY_SIZE(g12a_cts_parent_hws), > + .flags = CLK_SET_RATE_NO_REPARENT | CLK_GET_RATE_NOCACHE, Why nocache ? This is usually used when the consumer driver is poking around behind CCF back. Any chance this can use assigned-parent or CCF directly ? > + }, > +}; > + > static struct clk_regmap g12a_cts_vdac_sel = { > .data = &(struct clk_regmap_mux_data){ > .offset = HHI_VIID_CLK_DIV, > @@ -3628,6 +3644,22 @@ static struct clk_regmap g12a_cts_encp = { > }, > }; > > +static struct clk_regmap g12a_cts_encl = { > + .data = &(struct clk_regmap_gate_data){ > + .offset = HHI_VID_CLK_CNTL2, > + .bit_idx = 3, > + }, > + .hw.init = &(struct clk_init_data) { > + .name = "cts_encl", > + .ops = &clk_regmap_gate_ops, > + .parent_hws = (const struct clk_hw *[]) { > + &g12a_cts_encl_sel.hw > + }, > + .num_parents = 1, > + .flags = CLK_SET_RATE_PARENT | CLK_IGNORE_UNUSED, What is the reason for IGNORE_UNUSED ? If you need to keep the clock on while the driver comes up, please document it here. > + }, > +}; > + > static struct clk_regmap g12a_cts_vdac = { > .data = &(struct clk_regmap_gate_data){ > .offset = HHI_VID_CLK_CNTL2, > @@ -4407,10 +4439,12 @@ static struct clk_hw *g12a_hw_clks[] = { > [CLKID_VCLK2_DIV12] = &g12a_vclk2_div12.hw, > [CLKID_CTS_ENCI_SEL] = &g12a_cts_enci_sel.hw, > [CLKID_CTS_ENCP_SEL] = &g12a_cts_encp_sel.hw, > + [CLKID_CTS_ENCL_SEL] = &g12a_cts_encl_sel.hw, > [CLKID_CTS_VDAC_SEL] = &g12a_cts_vdac_sel.hw, > [CLKID_HDMI_TX_SEL] = &g12a_hdmi_tx_sel.hw, > [CLKID_CTS_ENCI] = &g12a_cts_enci.hw, > [CLKID_CTS_ENCP] = &g12a_cts_encp.hw, > + [CLKID_CTS_ENCL] = &g12a_cts_encl.hw, > [CLKID_CTS_VDAC] = &g12a_cts_vdac.hw, > [CLKID_HDMI_TX] = &g12a_hdmi_tx.hw, > [CLKID_HDMI_SEL] = &g12a_hdmi_sel.hw, > @@ -4632,10 +4666,12 @@ static struct clk_hw *g12b_hw_clks[] = { > [CLKID_VCLK2_DIV12] = &g12a_vclk2_div12.hw, > [CLKID_CTS_ENCI_SEL] = &g12a_cts_enci_sel.hw, > [CLKID_CTS_ENCP_SEL] = &g12a_cts_encp_sel.hw, > + [CLKID_CTS_ENCL_SEL] = &g12a_cts_encl_sel.hw, > [CLKID_CTS_VDAC_SEL] = &g12a_cts_vdac_sel.hw, > [CLKID_HDMI_TX_SEL] = &g12a_hdmi_tx_sel.hw, > [CLKID_CTS_ENCI] = &g12a_cts_enci.hw, > [CLKID_CTS_ENCP] = &g12a_cts_encp.hw, > + [CLKID_CTS_ENCL] = &g12a_cts_encl.hw, > [CLKID_CTS_VDAC] = &g12a_cts_vdac.hw, > [CLKID_HDMI_TX] = &g12a_hdmi_tx.hw, > [CLKID_HDMI_SEL] = &g12a_hdmi_sel.hw, > @@ -4892,10 +4928,12 @@ static struct clk_hw *sm1_hw_clks[] = { > [CLKID_VCLK2_DIV12] = &g12a_vclk2_div12.hw, > [CLKID_CTS_ENCI_SEL] = &g12a_cts_enci_sel.hw, > [CLKID_CTS_ENCP_SEL] = &g12a_cts_encp_sel.hw, > + [CLKID_CTS_ENCL_SEL] = &g12a_cts_encl_sel.hw, > [CLKID_CTS_VDAC_SEL] = &g12a_cts_vdac_sel.hw, > [CLKID_HDMI_TX_SEL] = &g12a_hdmi_tx_sel.hw, > [CLKID_CTS_ENCI] = &g12a_cts_enci.hw, > [CLKID_CTS_ENCP] = &g12a_cts_encp.hw, > + [CLKID_CTS_ENCL] = &g12a_cts_encl.hw, > [CLKID_CTS_VDAC] = &g12a_cts_vdac.hw, > [CLKID_HDMI_TX] = &g12a_hdmi_tx.hw, > [CLKID_HDMI_SEL] = &g12a_hdmi_sel.hw, > @@ -5123,10 +5161,12 @@ static struct clk_regmap *const g12a_clk_regmaps[] = { > &g12a_vclk2_div12_en, > &g12a_cts_enci_sel, > &g12a_cts_encp_sel, > + &g12a_cts_encl_sel, > &g12a_cts_vdac_sel, > &g12a_hdmi_tx_sel, > &g12a_cts_enci, > &g12a_cts_encp, > + &g12a_cts_encl, > &g12a_cts_vdac, > &g12a_hdmi_tx, > &g12a_hdmi_sel,