[PATCH 1/5] dt-bindings: clock: qcom: Add bindings for PDM GP_MN clock divider
From: Taniya Das
Date: Tue Jun 02 2026 - 11:22:33 EST
Add device tree bindings for the Qualcomm Peripheral Web's PDM GP_MN
clock divider. The hardware generates a fractional output frequency
from a fixed input clock (typically TCXO4) using the relation
Fout = Fin * (M / N), with duty cycle controlled by a separate D
register. The clock output is routed over a gpio controlled pin.
Signed-off-by: Taniya Das <taniya.das@xxxxxxxxxxxxxxxx>
---
.../devicetree/bindings/clock/qcom,clk-gp-mnd.yaml | 105 +++++++++++++++++++++
1 file changed, 105 insertions(+)
diff --git a/Documentation/devicetree/bindings/clock/qcom,clk-gp-mnd.yaml b/Documentation/devicetree/bindings/clock/qcom,clk-gp-mnd.yaml
new file mode 100644
index 0000000000000000000000000000000000000000..c1688bb3d68d8d476a8d498aa2774606b8b26018
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/qcom,clk-gp-mnd.yaml
@@ -0,0 +1,105 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/qcom,clk-gp-mnd.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm Peripheral Web's PDM GP_MN Clock Divider
+
+maintainers:
+ - Taniya Das <taniya.das@xxxxxxxxxxxxxxxx>
+
+description: |
+ The Peripheral Web's PDM GP_MN clock divider receives an input clock
+ (TCXO4) with frequency Fin and generates an output clock with
+ frequency Fout = Fin * (M / N) and a duty cycle controlled by D
+ and routed over a gpio pin.
+
+ The divider is configured using three registers:
+
+ - GP_MN_CLK_MDIV: holds the M value.
+ - GP_MN_CLK_NDIV: holds the ones complement of (N - M).
+ - GP_MN_CLK_DUTY: holds the D value.
+
+ For every N input clock cycles the GP_MN produces M output clock
+ cycles. D is the number of native clock cycles in which the GP_MN
+ output is low, counted over 2^13 native clock cycles.
+
+ Hardware constraints:
+
+ M <= 511
+ N <= 8191
+ N > 2 * M
+ M < D < (N - M)
+ M and N must be coprime (no common divisor)
+
+properties:
+ compatible:
+ const: qcom,clk-gp-mnd
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: PDM XO4 source clock
+ - description: PDM AHB bus clock for register access
+
+ clock-names:
+ items:
+ - const: pdm_clk
+ - const: ahb_clk
+
+ '#clock-cells':
+ const: 0
+
+ clock-output-names:
+ maxItems: 1
+
+ pinctrl-0:
+ description: Pin configuration for the GP_MN output in the active state.
+
+ pinctrl-names:
+ items:
+ - const: active
+
+ assigned-clocks:
+ maxItems: 1
+ description: Parent clock phandle used to set the input frequency.
+
+ assigned-clock-rates:
+ maxItems: 1
+ description: |
+ Rate for the parent clock in Hz.
+ Supported rates: 19200000, 9600000, 6400000, 4800000.
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - '#clock-cells'
+ - clock-output-names
+ - pinctrl-0
+ - pinctrl-names
+ - assigned-clocks
+ - assigned-clock-rates
+
+additionalProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/clock/qcom,gcc-sdm845.h>
+ gp_mn: clock-controller@88d3000 {
+ compatible = "qcom,clk-gp-mnd";
+ reg = <0x88d3000 0xc>;
+ clocks = <&gcc GCC_PDM_XO4_CLK>,
+ <&gcc GCC_PDM_AHB_CLK>;
+ clock-names = "pdm_clk", "ahb_clk";
+ clock-output-names = "gp_mn_clk";
+ pinctrl-0 = <&gp_mn_pin_active>;
+ pinctrl-names = "active";
+ assigned-clocks = <&gcc GCC_PDM_XO4_CLK>;
+ assigned-clock-rates = <4800000>;
+ #clock-cells = <0>;
+ };
--
2.34.1