Skip to contentSkip to conversation

dt-bindings: clock: ti,clockdomain: Convert to DT schema

PATCH Superseded Bhargav Joshi 2 participants 3 messages Jun 22 – Jun 30

Subsystems (2)

v2 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 dt-bindings: clock: ti,clockdomain: Convert to DT schema

Convert TI clockdomain to yaml DT schema. Drop '#clock-cells' from the required list as this binding doesn't define a new clock binding type, it is used to group existing clock nodes under hardware hierarchy. Most existing dts omit '#clock-cells'.

Update the reference to the old legacy text binding in the description of bindings/clock/ti/ti,gate-clock.yaml to point to the new YAML file.

---
Changes in v2:
- updating the stale reference to the legacy .txt file inside bindings/clock/ti/ti,gate-clock.yaml to fix make refcheckdocs error
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../devicetree/bindings/clock/ti/clockdomain.txt   | 25 -------------
 .../bindings/clock/ti/ti,clockdomain.yaml          | 41 ++++++++++++++++++++++
 .../bindings/clock/ti/ti,gate-clock.yaml           |  2 +-
 3 files changed, 42 insertions(+), 26 deletions(-)
Documentation/devicetree/bindings/clock/ti/clockdomain.txt deleted +0 -25
deleted file mode 100644
index edf0b5d42768..000000000000
@@ -1,25 +0,0 @@
-Binding for Texas Instruments clockdomain.
-
-This binding uses the common clock binding[1] in consumer role.
-Every clock on TI SoC belongs to one clockdomain, but software
-only needs this information for specific clocks which require
-their parent clockdomain to be controlled when the clock is
-enabled/disabled. This binding doesn't define a new clock
-binding type, it is used to group existing clock nodes under
-hardware hierarchy.
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-Required properties:
-- compatible : shall be "ti,clockdomain"
-- #clock-cells : from common clock binding; shall be set to 0.
-- clocks : link phandles of clocks within this domain
-
-Optional properties:
-- clock-output-names : from common clock binding.
-
-Examples:
-	dss_clkdm: dss_clkdm {
-		compatible = "ti,clockdomain";
-		clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
-	};
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +41 -0

41 lines not on this page · raw message

Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml +1 -1
index eaa727ab0d7f..438e190d1067 100644
@@ -19,7 +19,7 @@ description: |
   that is used.
 
   [1] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
-  [2] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
+  [2] Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
 
 properties:
   compatible:

---
base-commit: acb7500801e98639f6d8c2d796ed9f64cba83d3a
change-id: 20260610-ti-clockdomain-a27dd0fa1ad5

Best regards,

Signature · 1 line
Bhargav
maintainer
#1 lore raw
Quoted 73 lines · Bhargav Joshi

Convert TI clockdomain to yaml DT schema. Drop '#clock-cells' from the required list as this binding doesn't define a new clock binding type, it is used to group existing clock nodes under hardware hierarchy. Most existing dts omit '#clock-cells'.

Update the reference to the old legacy text binding in the description of bindings/clock/ti/ti,gate-clock.yaml to point to the new YAML file.

---
Changes in v2:
- updating the stale reference to the legacy .txt file inside bindings/clock/ti/ti,gate-clock.yaml to fix make refcheckdocs error
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../devicetree/bindings/clock/ti/clockdomain.txt   | 25 -------------
 .../bindings/clock/ti/ti,clockdomain.yaml          | 41 ++++++++++++++++++++++
 .../bindings/clock/ti/ti,gate-clock.yaml           |  2 +-
 3 files changed, 42 insertions(+), 26 deletions(-)
Documentation/devicetree/bindings/clock/ti/clockdomain.txt deleted +0 -25
deleted file mode 100644
index edf0b5d42768..000000000000
@@ -1,25 +0,0 @@
-Binding for Texas Instruments clockdomain.
-
-This binding uses the common clock binding[1] in consumer role.
-Every clock on TI SoC belongs to one clockdomain, but software
-only needs this information for specific clocks which require
-their parent clockdomain to be controlled when the clock is
-enabled/disabled. This binding doesn't define a new clock
-binding type, it is used to group existing clock nodes under
-hardware hierarchy.
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-Required properties:
-- compatible : shall be "ti,clockdomain"
-- #clock-cells : from common clock binding; shall be set to 0.
-- clocks : link phandles of clocks within this domain
-
-Optional properties:
-- clock-output-names : from common clock binding.
-
-Examples:
-	dss_clkdm: dss_clkdm {
-		compatible = "ti,clockdomain";
-		clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
-	};
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +16 -0
new file mode 100644
index 000000000000..9494cbb1a942
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/ti/ti,clockdomain.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments clockdomain
+
+maintainers:
+  - Tero Kristo <[email protected]>
+
+description:
+  This binding uses the common clock binding in consumer role. Every clock on TI
+  SoC belongs to one clockdomain, but software only needs this information for
+  specific clocks which require their parent clockdomain to be controlled when
+  the clock is enabled/disabled. This binding doesn't define a new clock binding

Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml line 26

Quoted 10 lines
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +10 -0
+  type, it is used to group existing clock nodes under hardware hierarchy.
+
+properties:
+  compatible:
+    const: ti,clockdomain
+
+  "#clock-cells":
+    const: 0
+
+  clocks: true

At least put some range of number of clocks.

Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml line 28

Quoted 2 lines
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +2 -0
+
+  clock-output-names: true

If #clock-cells is 0, then this can only have 1 entry (maxItems: 1).

Quoted 36 lines
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +13 -0
+
+required:
+  - compatible
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    dss_clkdm {
+        compatible = "ti,clockdomain";
+        clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
+    };
Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml +1 -2
index eaa727ab0d7f..438e190d1067 100644
@@ -19,7 +19,7 @@ description: |
   that is used.
 
   [1] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
-  [2] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
+  [2] Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
 
 properties:
   compatible:
 
---

base-commit: acb7500801e98639f6d8c2d796ed9f64cba83d3a
change-id: 20260610-ti-clockdomain-a27dd0fa1ad5

Best regards,

Signature · 1 line
Bhargav
#2 lore raw
Quoted 79 lines · Rob Herring
Quoted 77 lines · Bhargav Joshi

Convert TI clockdomain to yaml DT schema. Drop '#clock-cells' from the required list as this binding doesn't define a new clock binding type, it is used to group existing clock nodes under hardware hierarchy. Most existing dts omit '#clock-cells'.

Update the reference to the old legacy text binding in the description of bindings/clock/ti/ti,gate-clock.yaml to point to the new YAML file.

---
Changes in v2:
- updating the stale reference to the legacy .txt file inside bindings/clock/ti/ti,gate-clock.yaml to fix make refcheckdocs error
- Link to v1: https://lore.kernel.org/r/[email protected]

---
 .../devicetree/bindings/clock/ti/clockdomain.txt   | 25 -------------
 .../bindings/clock/ti/ti,clockdomain.yaml          | 41 ++++++++++++++++++++++
 .../bindings/clock/ti/ti,gate-clock.yaml           |  2 +-
 3 files changed, 42 insertions(+), 26 deletions(-)
Documentation/devicetree/bindings/clock/ti/clockdomain.txt deleted +0 -25
deleted file mode 100644
index edf0b5d42768..000000000000
@@ -1,25 +0,0 @@
-Binding for Texas Instruments clockdomain.
-
-This binding uses the common clock binding[1] in consumer role.
-Every clock on TI SoC belongs to one clockdomain, but software
-only needs this information for specific clocks which require
-their parent clockdomain to be controlled when the clock is
-enabled/disabled. This binding doesn't define a new clock
-binding type, it is used to group existing clock nodes under
-hardware hierarchy.
-
-[1] Documentation/devicetree/bindings/clock/clock-bindings.txt
-
-Required properties:
-- compatible : shall be "ti,clockdomain"
-- #clock-cells : from common clock binding; shall be set to 0.
-- clocks : link phandles of clocks within this domain
-
-Optional properties:
-- clock-output-names : from common clock binding.
-
-Examples:
-     dss_clkdm: dss_clkdm {
-             compatible = "ti,clockdomain";
-             clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
-     };
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +20 -0
new file mode 100644
index 000000000000..9494cbb1a942
@@ -0,0 +1,41 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/clock/ti/ti,clockdomain.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments clockdomain
+
+maintainers:
+  - Tero Kristo <[email protected]>
+
+description:
+  This binding uses the common clock binding in consumer role. Every clock on TI
+  SoC belongs to one clockdomain, but software only needs this information for
+  specific clocks which require their parent clockdomain to be controlled when
+  the clock is enabled/disabled. This binding doesn't define a new clock binding
+  type, it is used to group existing clock nodes under hardware hierarchy.
+
+properties:
+  compatible:
Quoted 8 lines

Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml line 26

Quoted 6 lines
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +6 -0
+    const: ti,clockdomain
+
+  "#clock-cells":
+    const: 0
+
+  clocks: true

At least put some range of number of clocks.

There is no specific bound for the number of clocks per domain nor does the driver enforce it so I left it as 'true'. In existing DTS files, the largest is am35xx's core_l3_clkdm with 39 clocks. No fixed bound otherwise. So should I keep it as 'true' or you'd prefer a specific cap?

Quoted 5 lines

Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml line 28

Quoted 3 lines
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +2 -0
+
+  clock-output-names: true

If #clock-cells is 0, then this can only have 1 entry (maxItems: 1).

sure I will fix this.

Quoted 32 lines
Quoted 32 lines
Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml new file +13 -0
+
+required:
+  - compatible
+  - clocks
+
+additionalProperties: false
+
+examples:
+  - |
+    dss_clkdm {
+        compatible = "ti,clockdomain";
+        clocks = <&dss1_alwon_fck_3430es2>, <&dss_ick_3430es2>;
+    };
Documentation/devicetree/bindings/clock/ti/ti,gate-clock.yaml +1 -2
index eaa727ab0d7f..438e190d1067 100644
@@ -19,7 +19,7 @@ description: |
   that is used.
 
   [1] Documentation/devicetree/bindings/clock/gpio-gate-clock.yaml
-  [2] Documentation/devicetree/bindings/clock/ti/clockdomain.txt
+  [2] Documentation/devicetree/bindings/clock/ti/ti,clockdomain.yaml
 
 properties:
   compatible:
 
---

base-commit: acb7500801e98639f6d8c2d796ed9f64cba83d3a
change-id: 20260610-ti-clockdomain-a27dd0fa1ad5

Quoted 5 lines
Quoted 5 lines

Best regards,
--
Bhargav

Best regards,
Bhargav