Skip to contentSkip to conversation

dt-bindings: arm: hisilicon,cpuctrl: Merge "hisilicon,hix5hd2-clock" into parent binding

PATCH Applied Rob Herring 3 participants 3 messages Jul 7, 2023 – Jul 19, 2023

Subsystems (2)
lore
Share & tools
lore

Rob Herring

author maintainer
#0 lore raw

PATCH 1/1 dt-bindings: arm: hisilicon,cpuctrl: Merge "hisilicon,hix5hd2-clock" into parent binding

The "hisilicon,hix5hd2-clock" is simple enough to just add it into its parent node binding, "hisilicon,cpuctrl".

This fixes a warning that "hisilicon,hix5hd2-clock" is missing a schema.

---
 .../arm/hisilicon/controller/cpuctrl.yaml     | 20 +++++++++++++
 .../bindings/clock/hix5hd2-clock.txt          | 30 -------------------
 2 files changed, 20 insertions(+), 30 deletions(-)
 delete mode 100644 Documentation/devicetree/bindings/clock/hix5hd2-clock.txt
Documentation/devicetree/bindings/arm/hisilicon/controller/cpuctrl.yaml +20 -0
index 528dad4cde3c..4fc208d3995e 100644
@@ -29,6 +29,26 @@ properties:
 
   ranges: true
 
+patternProperties:
+  "^clock@[0-9a-f]+$":
+    type: object
+    additionalProperties: false
+
+    properties:
+      compatible:
+        const: hisilicon,hix5hd2-clock
+
+      reg:
+        maxItems: 1
+
+      "#clock-cells":
+        const: 1
+
+    required:
+      - compatible
+      - reg
+      - "#clock-cells"
+
 required:
   - compatible
   - reg
Documentation/devicetree/bindings/clock/hix5hd2-clock.txt deleted +0 -30
deleted file mode 100644
index 4733e58e491b..000000000000
@@ -1,30 +0,0 @@
-* Hisilicon Hix5hd2 Clock Controller
-
-The hix5hd2 clock controller generates and supplies clock to various
-controllers within the hix5hd2 SoC.
-
-Required Properties:
-
-- compatible: should be "hisilicon,hix5hd2-clock"
-- reg: Address and length of the register set
-- #clock-cells: Should be <1>
-
-Each clock is assigned an identifier and client nodes use this identifier
-to specify the clock which they consume.
-
-All these identifier could be found in <dt-bindings/clock/hix5hd2-clock.h>.
-
-Examples:
-	clock: clock@f8a22000 {
-		compatible = "hisilicon,hix5hd2-clock";
-		reg = <0xf8a22000 0x1000>;
-		#clock-cells = <1>;
-	};
-
-	uart0: uart@f8b00000 {
-		compatible = "arm,pl011", "arm,primecell";
-		reg = <0xf8b00000 0x1000>;
-		interrupts = <0 49 4>;
-		clocks = <&clock HIX5HD2_FIXED_83M>;
-		clock-names = "apb_pclk";
-	};
Signature · 1 line
2.40.1
Reviewed-by on v1 1/1
#1 lore raw

Documentation/devicetree/bindings/clock/hix5hd2-clock.txt line 15

Quoted 4 lines · Rob Herring
Documentation/devicetree/bindings/clock/hix5hd2-clock.txt deleted +0 -3
-Each clock is assigned an identifier and client nodes use this identifier
-to specify the clock which they consume.
 
-All these identifier could be found in <dt-bindings/clock/hix5hd2-clock.h>.

Might've been nice to preserve the reference to the header containing the defines?

Either way, this seems to have sat for a bit so,

Cheers,
Conor.

maintainer Applied
#2 lore raw
In reply to Rob Herring

Quoting Rob Herring (2023-07-07 14:07:00)

Quoted 7 lines

The "hisilicon,hix5hd2-clock" is simple enough to just add it into its parent node binding, "hisilicon,cpuctrl".

This fixes a warning that "hisilicon,hix5hd2-clock" is missing a schema.

---

Applied to clk-next