dt-bindings: clock: amlogic: convert amlogic,gxbb-clkc.txt to dt-schema
authorNeil Armstrong <neil.armstrong@linaro.org>
Thu, 6 Jul 2023 14:52:32 +0000 (16:52 +0200)
committerJerome Brunet <jbrunet@baylibre.com>
Tue, 8 Aug 2023 14:06:46 +0000 (16:06 +0200)
Convert the Amlogic Clock Controller bindings to dt-schema.

Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
Link: https://lore.kernel.org/r/20230706-b4-amlogic-bindings-convert-take2-v3-1-f63de6f12dcc@linaro.org
Signed-off-by: Jerome Brunet <jbrunet@baylibre.com>
Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt [deleted file]
Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml [new file with mode: 0644]

diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.txt
deleted file mode 100644 (file)
index 7ccecd5..0000000
+++ /dev/null
@@ -1,53 +0,0 @@
-* Amlogic GXBB Clock and Reset Unit
-
-The Amlogic GXBB clock controller generates and supplies clock to various
-controllers within the SoC.
-
-Required Properties:
-
-- compatible: should be:
-               "amlogic,gxbb-clkc" for GXBB SoC,
-               "amlogic,gxl-clkc" for GXL and GXM SoC,
-               "amlogic,axg-clkc" for AXG SoC.
-               "amlogic,g12a-clkc" for G12A SoC.
-               "amlogic,g12b-clkc" for G12B SoC.
-               "amlogic,sm1-clkc" for SM1 SoC.
-- clocks : list of clock phandle, one for each entry clock-names.
-- clock-names : should contain the following:
-  * "xtal": the platform xtal
-
-- #clock-cells: should be 1.
-
-Each clock is assigned an identifier and client nodes can use this identifier
-to specify the clock which they consume. All available clocks are defined as
-preprocessor macros in the dt-bindings/clock/gxbb-clkc.h header and can be
-used in device tree sources.
-
-Parent node should have the following properties :
-- compatible: "syscon", "simple-mfd, and "amlogic,meson-gx-hhi-sysctrl" or
-              "amlogic,meson-axg-hhi-sysctrl"
-- reg: base address and size of the HHI system control register space.
-
-Example: Clock controller node:
-
-sysctrl: system-controller@0 {
-       compatible = "amlogic,meson-gx-hhi-sysctrl", "syscon", "simple-mfd";
-       reg = <0 0 0 0x400>;
-
-       clkc: clock-controller {
-               #clock-cells = <1>;
-               compatible = "amlogic,gxbb-clkc";
-               clocks = <&xtal>;
-               clock-names = "xtal";
-       };
-};
-
-Example: UART controller node that consumes the clock generated by the clock
-  controller:
-
-       uart_AO: serial@c81004c0 {
-               compatible = "amlogic,meson-uart";
-               reg = <0xc81004c0 0x14>;
-               interrupts = <0 90 1>;
-               clocks = <&clkc CLKID_CLK81>;
-       };
diff --git a/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml b/Documentation/devicetree/bindings/clock/amlogic,gxbb-clkc.yaml
new file mode 100644 (file)
index 0000000..63246f1
--- /dev/null
@@ -0,0 +1,37 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/amlogic,gxbb-clkc.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Amlogic Clock Controller
+
+maintainers:
+  - Neil Armstrong <neil.armstrong@linaro.org>
+
+properties:
+  compatible:
+    enum:
+      - amlogic,gxbb-clkc
+      - amlogic,gxl-clkc
+      - amlogic,axg-clkc
+      - amlogic,g12a-clkc
+      - amlogic,g12b-clkc
+      - amlogic,sm1-clkc
+
+  clocks:
+    maxItems: 1
+
+  clock-names:
+    const: xtal
+
+  '#clock-cells':
+    const: 1
+
+required:
+  - compatible
+  - clocks
+  - clock-names
+  - '#clock-cells'
+
+additionalProperties: false