mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] clk: qcom: gcc-shikra: add PWM XO512 source clock
@ 2026-11-16  5:27 Taniya Das
  2026-11-16  5:27 ` [PATCH 1/2] dt-bindings: clock: qcom: add Shikra " Taniya Das
  2026-11-16  5:27 ` [PATCH 2/2] clk: qcom: gcc-shikra: add " Taniya Das
  0 siblings, 2 replies; 5+ messages in thread
From: Taniya Das @ 2026-11-16  5:27 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Ajit Pandey, Imran Shaik, Jagadeesh Kona, linux-arm-msm,
	linux-clk, devicetree, linux-kernel, Taniya Das

The PWM controller on Qualcomm Shikra SoCs is fed by the GCC PWM XO512
clock, which derives its rate from a programmable divider sitting
between the TCXO and the PWM core output. Model that divider as a
dedicated source clock so the full TCXO -> divider -> PWM output path
is described and the PWM core rate can be configured at runtime.

Add the clock-ID binding and the gcc-shikra divider clock implementing
the source, with the existing PWM output branch reparented onto it.

Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
---
Taniya Das (2):
      dt-bindings: clock: qcom: add Shikra PWM XO512 source clock
      clk: qcom: gcc-shikra: add PWM XO512 source clock

 drivers/clk/qcom/gcc-shikra.c               | 21 +++++++++++++++++++++
 include/dt-bindings/clock/qcom,shikra-gcc.h |  1 +
 2 files changed, 22 insertions(+)
---
base-commit: 84abb955b1015477aa11a96e2f3ac1b938b77f48
change-id: 20261116-pwm_clocks_shikra-13081b11413c

Best regards,
-- 
Taniya Das <taniya.das@oss.qualcomm.com>


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 1/2] dt-bindings: clock: qcom: add Shikra PWM XO512 source clock
  2026-11-16  5:27 [PATCH 0/2] clk: qcom: gcc-shikra: add PWM XO512 source clock Taniya Das
@ 2026-11-16  5:27 ` Taniya Das
  2026-11-16  5:27 ` [PATCH 2/2] clk: qcom: gcc-shikra: add " Taniya Das
  1 sibling, 0 replies; 5+ messages in thread
From: Taniya Das @ 2026-11-16  5:27 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Ajit Pandey, Imran Shaik, Jagadeesh Kona, linux-arm-msm,
	linux-clk, devicetree, linux-kernel, Taniya Das

Export the GCC PWM XO512 source clock ID so the Shikra PWM controller
can describe and configure its complete clock path.

Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
---
 include/dt-bindings/clock/qcom,shikra-gcc.h | 1 +
 1 file changed, 1 insertion(+)

diff --git a/include/dt-bindings/clock/qcom,shikra-gcc.h b/include/dt-bindings/clock/qcom,shikra-gcc.h
index 656c959c7e1251ed9af8fd04285fe616dfe9ecdc..b86f122e7a9ba0d10c84aac954626eb9caaf0788 100644
--- a/include/dt-bindings/clock/qcom,shikra-gcc.h
+++ b/include/dt-bindings/clock/qcom,shikra-gcc.h
@@ -222,6 +222,7 @@
 #define GCC_VIDEO_VENUS_CLK_SRC					212
 #define GCC_VIDEO_VENUS_CTL_CLK					213
 #define GCC_VIDEO_XO_CLK					214
+#define GCC_PWM0_XO512_CLK_SRC					215
 
 /* GCC power domains */
 #define GCC_CAMSS_TOP_GDSC					0

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* [PATCH 2/2] clk: qcom: gcc-shikra: add PWM XO512 source clock
  2026-11-16  5:27 [PATCH 0/2] clk: qcom: gcc-shikra: add PWM XO512 source clock Taniya Das
  2026-11-16  5:27 ` [PATCH 1/2] dt-bindings: clock: qcom: add Shikra " Taniya Das
@ 2026-11-16  5:27 ` Taniya Das
  2026-11-20 10:23   ` Abel Vesa
  2026-11-20 10:28   ` Imran Shaik
  1 sibling, 2 replies; 5+ messages in thread
From: Taniya Das @ 2026-11-16  5:27 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley
  Cc: Ajit Pandey, Imran Shaik, Jagadeesh Kona, linux-arm-msm,
	linux-clk, devicetree, linux-kernel, Taniya Das

Add the programmable PWM XO512 divider sourced from bi_tcxo and make
GCC_PWM0_XO512_CLK its child. This permits PWM consumers to select their
PWM core rate through the common clock framework.

Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
---
 drivers/clk/qcom/gcc-shikra.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/clk/qcom/gcc-shikra.c b/drivers/clk/qcom/gcc-shikra.c
index 13c99a883e29877d9a929f26ca0b3b04b1ea0b11..93df784ba14376ecf2b60c5eb37e6d0b5cef9501 100644
--- a/drivers/clk/qcom/gcc-shikra.c
+++ b/drivers/clk/qcom/gcc-shikra.c
@@ -1888,6 +1888,21 @@ static struct clk_regmap_div gcc_usb30_prim_mock_utmi_postdiv_clk_src = {
 	},
 };
 
+static struct clk_regmap_div gcc_pwm0_xo512_clk_src = {
+	.reg = 0x20030,
+	.shift = 0,
+	.width = 9,
+	.clkr.hw.init = &(const struct clk_init_data) {
+		.name = "gcc_pwm0_xo512_clk_src",
+		.parent_data = &(const struct clk_parent_data) {
+			.index = DT_BI_TCXO
+		},
+		.num_parents = 1,
+		.flags = CLK_SET_RATE_PARENT,
+		.ops = &clk_regmap_div_ops,
+	},
+};
+
 static struct clk_branch gcc_ahb2phy_csi_clk = {
 	.halt_reg = 0x1d004,
 	.halt_check = BRANCH_HALT_DELAY,
@@ -3212,6 +3227,11 @@ static struct clk_branch gcc_pwm0_xo512_clk = {
 		.enable_mask = BIT(0),
 		.hw.init = &(const struct clk_init_data) {
 			.name = "gcc_pwm0_xo512_clk",
+			.parent_hws = (const struct clk_hw*[]) {
+				&gcc_pwm0_xo512_clk_src.clkr.hw,
+			},
+			.num_parents = 1,
+			.flags = CLK_SET_RATE_PARENT,
 			.ops = &clk_branch2_ops,
 		},
 	},
@@ -4294,6 +4314,7 @@ static struct clk_regmap *gcc_shikra_clocks[] = {
 	[GPLL8_OUT_MAIN] = &gpll8_out_main.clkr,
 	[GPLL9] = &gpll9.clkr,
 	[GPLL9_OUT_MAIN] = &gpll9_out_main.clkr,
+	[GCC_PWM0_XO512_CLK_SRC] = &gcc_pwm0_xo512_clk_src.clkr,
 };
 
 static struct gdsc *gcc_shikra_gdscs[] = {

-- 
2.34.1


^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] clk: qcom: gcc-shikra: add PWM XO512 source clock
  2026-11-16  5:27 ` [PATCH 2/2] clk: qcom: gcc-shikra: add " Taniya Das
@ 2026-11-20 10:23   ` Abel Vesa
  2026-11-20 10:28   ` Imran Shaik
  1 sibling, 0 replies; 5+ messages in thread
From: Abel Vesa @ 2026-11-20 10:23 UTC (permalink / raw)
  To: Taniya Das
  Cc: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Ajit Pandey, Imran Shaik, Jagadeesh Kona, linux-arm-msm,
	linux-clk, devicetree, linux-kernel

On 26-11-16 10:57:45, Taniya Das wrote:
> Add the programmable PWM XO512 divider sourced from bi_tcxo and make
> GCC_PWM0_XO512_CLK its child. This permits PWM consumers to select their
> PWM core rate through the common clock framework.
> 
> Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>

Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com>

^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: [PATCH 2/2] clk: qcom: gcc-shikra: add PWM XO512 source clock
  2026-11-16  5:27 ` [PATCH 2/2] clk: qcom: gcc-shikra: add " Taniya Das
  2026-11-20 10:23   ` Abel Vesa
@ 2026-11-20 10:28   ` Imran Shaik
  1 sibling, 0 replies; 5+ messages in thread
From: Imran Shaik @ 2026-11-20 10:28 UTC (permalink / raw)
  To: Taniya Das, Bjorn Andersson, Abel Vesa, Stephen Boyd,
	Brian Masney, Jerome Brunet, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley
  Cc: Ajit Pandey, Jagadeesh Kona, linux-arm-msm, linux-clk,
	devicetree, linux-kernel



On 16-11-2026 10:57 am, Taniya Das wrote:
> Add the programmable PWM XO512 divider sourced from bi_tcxo and make
> GCC_PWM0_XO512_CLK its child. This permits PWM consumers to select their
> PWM core rate through the common clock framework.
> 
> Signed-off-by: Taniya Das<taniya.das@oss.qualcomm.com>
> ---
>   drivers/clk/qcom/gcc-shikra.c | 21 +++++++++++++++++++++
>   1 file changed, 21 insertions(+)


Reviewed-by: Imran Shaik <imran.shaik@oss.qualcomm.com>

Thanks,
Imran

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-11-20 10:28 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-16  5:27 [PATCH 0/2] clk: qcom: gcc-shikra: add PWM XO512 source clock Taniya Das
2026-11-16  5:27 ` [PATCH 1/2] dt-bindings: clock: qcom: add Shikra " Taniya Das
2026-11-16  5:27 ` [PATCH 2/2] clk: qcom: gcc-shikra: add " Taniya Das
2026-11-20 10:23   ` Abel Vesa
2026-11-20 10:28   ` Imran Shaik

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®