diff mbox series

[1/3] dt-bindings: clock: Add thead th1520 clock

Message ID 20230515054402.27633-2-frank.li@vivo.com
State New
Headers show
Series [1/3] dt-bindings: clock: Add thead th1520 clock | expand

Commit Message

李扬韬 May 15, 2023, 5:43 a.m. UTC
Add devicetree binding document and related header file
for the T-HEAD TH1520 clock.

Cc: Icenowy Zheng <uwu@icenowy.me>
Cc: Wei Fu <wefu@redhat.com>
Cc: Jisheng Zhang <jszhang@kernel.org>
Signed-off-by: Yangtao Li <frank.li@vivo.com>
---
 .../bindings/clock/thead,th1520-ccu.yaml      | 60 +++++++++++++++++++
 1 file changed, 60 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/clock/thead,th1520-ccu.yaml
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/clock/thead,th1520-ccu.yaml b/Documentation/devicetree/bindings/clock/thead,th1520-ccu.yaml
new file mode 100644
index 000000000000..c3e2d8c7efa6
--- /dev/null
+++ b/Documentation/devicetree/bindings/clock/thead,th1520-ccu.yaml
@@ -0,0 +1,60 @@ 
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/thead,th1520-ccu.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: T-HEAD Clock Control Unit
+
+maintainers:
+  - Jisheng Zhang <jszhang@kernel.org>
+  - Wei Fu <wefu@redhat.com>
+  - Yangtao Li <frank.li@vivo.com>
+
+
+properties:
+  "#clock-cells":
+    const: 1
+
+  "#reset-cells":
+    const: 1
+
+  compatible:
+    enum:
+      - thead,th1520-ccu
+
+  reg:
+    maxItems: 1
+
+  clocks:
+    const: 2
+    items:
+      - description: High Frequency Oscillator (usually at 24MHz)
+      - description: Low Frequency Oscillator (usually at 32kHz)
+
+  clock-names:
+    const: 2
+    items:
+      - const: hosc
+      - const: losc
+
+required:
+  - "#clock-cells"
+  - compatible
+  - reg
+  - clocks
+  - clock-names
+
+additionalProperties: false
+
+examples:
+  - |
+    clk: clock-controller@ffef010000 {
+      compatible = "thead,th1520-ccu";
+      reg = <0xff 0xef010000 0x0 0x1000>;
+      clocks = <&osc32k>, <&osc24m>;
+      clock-names = "losc", "hosc";
+      #clock-cells = <1>;
+    };
+
+...