From: Jerome Brunet <jbrunet@baylibre.com>
To: Neil Armstrong <neil.armstrong@linaro.org>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh+dt@kernel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>,
Conor Dooley <conor+dt@kernel.org>,
Kevin Hilman <khilman@baylibre.com>,
Martin Blumenstingl <martin.blumenstingl@googlemail.com>,
David Airlie <airlied@gmail.com>, Daniel Vetter <daniel@ffwll.ch>,
Jagan Teki <jagan@amarulasolutions.com>,
Nicolas Belin <nbelin@baylibre.com>
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 [thread overview]
Message-ID: <1j1qgjp1im.fsf@starbuckisacylon.baylibre.com> (raw)
In-Reply-To: <20230803-amlogic-v6-4-upstream-dsi-ccf-vim3-v7-2-762219fc5b28@linaro.org>
On Thu 03 Aug 2023 at 14:03, Neil Armstrong <neil.armstrong@linaro.org> 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 <neil.armstrong@linaro.org>
> ---
> 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,
next prev parent reply other threads:[~2023-08-04 10:04 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-03 12:03 [PATCH v7 0/9] drm/meson: add support for MIPI DSI Display Neil Armstrong
2023-08-03 12:03 ` [PATCH v7 1/9] dt-bindings: clk: g12a-clkc: add CTS_ENCL clock ids Neil Armstrong
2023-08-03 12:03 ` [PATCH v7 2/9] clk: meson: g12a: add CTS_ENCL & CTS_ENCL_SEL clocks Neil Armstrong
2023-08-04 9:59 ` Jerome Brunet [this message]
2023-08-04 10:05 ` Neil Armstrong
2023-08-03 12:03 ` [PATCH v7 3/9] clk: meson: add vclk driver Neil Armstrong
2023-08-04 7:33 ` Jerome Brunet
2023-08-04 8:46 ` Neil Armstrong
2023-08-03 12:03 ` [PATCH v7 4/9] clk: meson: g12a: make VCLK2 and ENCL clock path configurable by CCF Neil Armstrong
2023-08-04 10:04 ` Jerome Brunet
2023-08-03 12:03 ` [PATCH v7 5/9] drm/meson: gate px_clk when setting rate Neil Armstrong
2023-08-03 12:04 ` [PATCH v7 6/9] arm64: meson: g12-common: add the MIPI DSI nodes Neil Armstrong
2023-08-03 12:04 ` [PATCH v7 7/9] DONOTMERGE: arm64: meson: khadas-vim3l: add DSI panel Neil Armstrong
2023-08-03 12:04 ` [PATCH v7 8/9] dt-bindings: arm: amlogic: Document the MNT Reform 2 CM4 adapter with a BPI-CM4 Module Neil Armstrong
2023-08-03 12:04 ` [PATCH v7 9/9] arm64: dts: amlogic: meson-g12b-bananapi-cm4: add support for MNT Reform2 with CM4 adaper Neil Armstrong
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1j1qgjp1im.fsf@starbuckisacylon.baylibre.com \
--to=jbrunet@baylibre.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jagan@amarulasolutions.com \
--cc=khilman@baylibre.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-amlogic@lists.infradead.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=martin.blumenstingl@googlemail.com \
--cc=mturquette@baylibre.com \
--cc=nbelin@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=robh+dt@kernel.org \
--cc=sboyd@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox