mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 1/2] dt-bindings: clock: rockchip: add clk-out
@ 2026-11-21 10:58 ZhuXiangyu
  2026-11-21 11:02 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 2+ messages in thread
From: ZhuXiangyu @ 2026-11-21 10:58 UTC (permalink / raw)
  To: Stephen Boyd, Heiko Stuebner
  Cc: Brian Masney, Jerome Brunet, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, linux-clk, linux-arm-kernel, linux-rockchip,
	devicetree, linux-kernel, ZhuXiangyu

Document the Rockchip clock output/input switch, a single GRF-
controlled gate used for signals such as the SAI MCLK output.

Signed-off-by: ZhuXiangyu <1194781887@qq.com>
---
 .../bindings/clock/rockchip,clk-out.yaml      | 81 +++++++++++++++++++
 1 file changed, 81 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/rockchip,clk-out.yaml

diff --git a/Documentation/devicetree/bindings/clock/rockchip,clk-out.yaml b/Documentation/devicetree/bindings/clock/rockchip,clk-out.yaml
new file mode 100644
index 00000000..bf2a9b8a
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/rockchip,clk-out.yaml
@@ -0,0 +1,81 @@
+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/rockchip,clk-out.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Rockchip Clock Output/Input Switch
+
+maintainers:
+  - Heiko Stuebner <heiko@sntech.de>
+
+description: |
+  Some Rockchip SoCs route a clock between an internal clock and a pin
+  through a GRF bit, for example the SAI MCLK input/output switch. This
+  driver exposes that single bit as a gate clock.
+
+properties:
+  compatible:
+    const: rockchip,clk-out
+
+  reg:
+    maxItems: 1
+
+  "#clock-cells":
+    const: 0
+
+  clocks:
+    maxItems: 1
+    description: Parent clock.
+
+  power-domains:
+    maxItems: 1
+
+  clock-output-names:
+    maxItems: 1
+
+  rockchip,bit-shift:
+    $ref: /schemas/types.yaml#/definitions/uint32
+    description: Bit position of the output enable in the register.
+
+  rockchip,bit-set-to-disable:
+    type: boolean
+    description: |
+      By default the clock is enabled by setting the bit at
+      rockchip,bit-shift. When this property is present the polarity is
+      inverted: setting the bit disables the clock and clearing it
+      enables the clock.
+
+required:
+  - compatible
+  - reg
+  - clocks
+  - "#clock-cells"
+  - clock-output-names
+  - rockchip,bit-shift
+
+additionalProperties: false
+
+examples:
+  - |
+    clkout_parent: clock {
+        compatible = "fixed-clock";
+        #clock-cells = <0>;
+        clock-frequency = <12288000>;
+    };
+
+    clkout: clock@ff910004 {
+        compatible = "rockchip,clk-out";
+        reg = <0xff910004 0x4>;
+        clocks = <&clkout_parent>;
+        #clock-cells = <0>;
+        clock-output-names = "mclk_sai0_to_io";
+        rockchip,bit-shift = <8>;
+    };
+
+    audio-codec {
+        clocks = <&clkout>;
+        clock-names = "mclk";
+    };
+
+...
-- 
2.47.3


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

end of thread, other threads:[~2026-11-21 11:02 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-11-21 10:58 [PATCH 1/2] dt-bindings: clock: rockchip: add clk-out ZhuXiangyu
2026-11-21 11:02 ` Krzysztof Kozlowski

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®