Devicetree
 help / color / mirror / Atom feed
* [PATCH v3 00/10] clk: qcom: Add PDM GP_MN fractional clock divider driver and DT support
@ 2026-11-23 19:51 Taniya Das
  2026-11-23 19:51 ` [PATCH v3 01/10] dt-bindings: clock: qcom: Add bindings for PDM GP_MN clock divider Taniya Das
                   ` (9 more replies)
  0 siblings, 10 replies; 19+ messages in thread
From: Taniya Das @ 2026-11-23 19:51 UTC (permalink / raw)
  To: Bjorn Andersson, Abel Vesa, Stephen Boyd, Brian Masney,
	Jerome Brunet, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Bartosz Golaszewski, Linus Walleij, Richard Cochran,
	Konrad Dybcio
  Cc: Ajit Pandey, Imran Shaik, Jagadeesh Kona, linux-arm-msm,
	linux-clk, devicetree, linux-kernel, linux-gpio, netdev,
	Taniya Das, Krzysztof Kozlowski, Abel Vesa

The Peripheral Web PDM block on several Qualcomm SoCs contains a GP_MN
fractional divider that generates a clock output from the PDM XO4 clock.
The output can be routed to a dedicated GPIO pin for use as an external
reference clock.

This series adds the binding, a runtime PM-aware GP_MN divider driver,
and the GCC and DT support needed on QCS615, QCS8300, SA8775P, SC7280,
SM8750, and Shikra. GP_MN controller nodes are disabled by default so
boards must explicitly opt in before the output pin is muxed.

The DT nodes added here mux the GP_MN output onto a TLMM pin using the
gp_mn pinmux function. That function is added to the QCS8300, SA8775P,
SC7280, QCS615, SM8750, and Shikra pin control drivers by a separate pin
control series, which this series depends on:

  https://lore.kernel.org/all/20261118-gp_mn_tlmm_support-v1-0-703f7badd194@oss.qualcomm.com/

Changes in v3:
- Add configurable PDM XO4 divider clock, its public clock ID, and a
  GP_MN controller DT node for SM8750 and Shikra.
- Set the GP_MN assigned-clock-rate to 4.8 MHz (TCXO4 divided by 4) on
  all targets.
- Drop the per-SoC gp_mn pinmux patches; the gp_mn pin control function
  is now added by the separate pin control series linked above, which
  this series depends on.
- Rename the binding to qcom,sc7280-gp-mnd.yaml and its $id to match the
  fallback compatible. [#Krzysztof Kozlowski]
- Drop the redundant _clk suffix from clock-names (pdm/ahb).
  [#Krzysztof Kozlowski]
- Drop assigned-clocks/assigned-clock-rates from the binding; they
  describe the parent clock and are out of scope. Document the supported
  XO4 input rates (19.2 MHz down to 1.2 MHz) on the clocks description
  instead. [#Krzysztof Kozlowski, #Konrad Dybcio]
- Sort the fallback-compatible enum and drop the unused label from the
  binding example. [#sashiko-bot]
- Treat an unconfigured (power-on M = 0) divider as rate 0 in
  recalc_rate() so a bogus N is no longer decoded and the default 50%
  duty cycle stays valid. [#sashiko-bot]
- Use 64-bit division in set_duty_cycle() to fix the 32-bit build.
  [#kernel test robot]
- Order pinctrl-0 before pinctrl-names in the GP_MN DT nodes. [#Abel Vesa]
- Link to v2: https://lore.kernel.org/r/20261026-b4-pdm_clk_gp_mnd_v2-v2-0-ff8e4bc8d567@oss.qualcomm.com

Changes in v2:
- Add SoC-specific compatible strings with a qcom,sc7280-gp-mnd
  fallback, map the 0x1000-byte register region, and document the PDM
  source rates. [#Konrad Dybcio]
- Use runtime PM and pm_clk for AHB register-access clock management,
  rely on the pinctrl core's default-state selection, and generate the
  output-clock name. [#Dmitry Baryshkov]
- Enforce valid GP_MN duty-cycle constraints and report high-phase duty
  cycles through the common clock framework.
- Add and register configurable PDM XO4 divider clocks and their public
  IDs for all supported SoCs, allowing the source rate to be configured.
- Split the pinctrl changes by SoC, retain Reviewed-by tags, and combine
  each SoC's pin state and controller node into one DTS patch.
  [#Konrad Dybcio]
- Correct the SC7280 output to gpio60 and disable every GP_MN controller
  node by default. Add QCS615 support as well. [#Luca Weiss]
- Link[v1]: https://lore.kernel.org/lkml/20260602-pdm_clk_gp_mnd_v1-v1-0-1522662b6c53@oss.qualcomm.com/

The series is organized as follows:

  1. DT binding for the PDM GP_MN divider
  2. GCC PDM XO4 divider clock IDs
  3. PDM GP_MN divider driver
  4. GCC PDM XO4 divider clocks
  5-10. GP_MN DT support for QCS8300, SA8775P, SC7280, QCS615, SM8750,
        and Shikra

Signed-off-by: Taniya Das <taniya.das@oss.qualcomm.com>
---
Taniya Das (10):
      dt-bindings: clock: qcom: Add bindings for PDM GP_MN clock divider
      dt-bindings: clock: qcom: Add PDM XO4 divider clock IDs
      clk: qcom: Add a driver for PDM GP_MN fractional clock divider
      clk: qcom: gcc: Add configurable PDM XO4 div clocks across targets
      arm64: dts: qcom: qcs8300: Add GP M/N clock controller
      arm64: dts: qcom: sa8775p: Add GP M/N clock controller
      arm64: dts: qcom: sc7280: Add GP M/N clock controller
      arm64: dts: qcom: qcs615: Add GP M/N clock controller
      arm64: dts: qcom: sm8750: Add GP M/N clock controller
      arm64: dts: qcom: shikra: Add GP M/N clock controller

 .../bindings/clock/qcom,sc7280-gp-mnd.yaml         |  92 ++++++
 arch/arm64/boot/dts/qcom/kodiak.dtsi               |  21 ++
 arch/arm64/boot/dts/qcom/lemans-embedded.dtsi      |  21 ++
 arch/arm64/boot/dts/qcom/monaco.dtsi               |  21 ++
 arch/arm64/boot/dts/qcom/shikra.dtsi               |  21 ++
 arch/arm64/boot/dts/qcom/sm8750.dtsi               |  21 ++
 arch/arm64/boot/dts/qcom/talos.dtsi                |  21 ++
 drivers/clk/qcom/Kconfig                           |  15 +
 drivers/clk/qcom/Makefile                          |   1 +
 drivers/clk/qcom/clk-gp-mnd.c                      | 342 +++++++++++++++++++++
 drivers/clk/qcom/gcc-qcs615.c                      |  20 ++
 drivers/clk/qcom/gcc-qcs8300.c                     |  20 ++
 drivers/clk/qcom/gcc-sa8775p.c                     |  20 ++
 drivers/clk/qcom/gcc-sc7280.c                      |  20 ++
 drivers/clk/qcom/gcc-shikra.c                      |  20 ++
 drivers/clk/qcom/gcc-sm8750.c                      |  20 ++
 include/dt-bindings/clock/qcom,gcc-sc7280.h        |   1 +
 include/dt-bindings/clock/qcom,qcs615-gcc.h        |   2 +
 include/dt-bindings/clock/qcom,qcs8300-gcc.h       |   1 +
 include/dt-bindings/clock/qcom,sa8775p-gcc.h       |   1 +
 include/dt-bindings/clock/qcom,shikra-gcc.h        |   1 +
 include/dt-bindings/clock/qcom,sm8750-gcc.h        |   1 +
 22 files changed, 703 insertions(+)
---
base-commit: 96d7c30c51c0582a83806abba4c74e2c1344b324
change-id: 20261013-b4-pdm_clk_gp_mnd_v2-993396fc6cac

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


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

end of thread, other threads:[~2026-11-24 19:53 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-23 19:51 [PATCH v3 00/10] clk: qcom: Add PDM GP_MN fractional clock divider driver and DT support Taniya Das
2026-11-23 19:51 ` [PATCH v3 01/10] dt-bindings: clock: qcom: Add bindings for PDM GP_MN clock divider Taniya Das
2026-11-24 19:53   ` sashiko-bot
2026-11-23 19:51 ` [PATCH v3 02/10] dt-bindings: clock: qcom: Add PDM XO4 divider clock IDs Taniya Das
2026-11-23 19:51 ` [PATCH v3 03/10] clk: qcom: Add a driver for PDM GP_MN fractional clock divider Taniya Das
2026-11-24  5:54   ` Abel Vesa
2026-11-23 19:51 ` [PATCH v3 04/10] clk: qcom: gcc: Add configurable PDM XO4 div clocks across targets Taniya Das
2026-11-23 19:51 ` [PATCH v3 05/10] arm64: dts: qcom: qcs8300: Add GP M/N clock controller Taniya Das
2026-11-24 19:53   ` sashiko-bot
2026-11-23 19:51 ` [PATCH v3 06/10] arm64: dts: qcom: sa8775p: " Taniya Das
2026-11-24 19:53   ` sashiko-bot
2026-11-23 19:51 ` [PATCH v3 07/10] arm64: dts: qcom: sc7280: " Taniya Das
2026-11-24 19:53   ` sashiko-bot
2026-11-23 19:51 ` [PATCH v3 08/10] arm64: dts: qcom: qcs615: " Taniya Das
2026-11-24 19:53   ` sashiko-bot
2026-11-23 19:51 ` [PATCH v3 09/10] arm64: dts: qcom: sm8750: " Taniya Das
2026-11-24 19:53   ` sashiko-bot
2026-11-23 19:51 ` [PATCH v3 10/10] arm64: dts: qcom: shikra: " Taniya Das
2026-11-24 19:53   ` sashiko-bot

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