Skip to contentSkip to conversation

ti,keystone-devctrl: Convert to DT schema and DTS cleanups

PATCH Applied Bhargav Joshi 5 participants 8 messages Aug 31 – Sep 23

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

v4 cover ti,keystone-devctrl: Convert to DT schema and DTS cleanups

Series converts Texas Instruments Keystone Device State Control binding to DT schema and aligns the existing dt files with standard naming conventions.

Patch 1 aligns the legacy child node names with standard names. Patch 2 converts the ti,keystone-devctrl binding to YAML schema.

---
Changes in v4:
- add compatible as required for child node
- Link to v3: https://lore.kernel.org/r/[email protected]

Changes in v3:
- Rebased to latest mailine 7.3-rc1
- Removed note in patch 2 as dependency is already merged into mainline
and there are no more warnings.
- Link to v2: https://lore.kernel.org/r/[email protected]

Changes in v2:
- Fix legacy node names containing underscores in existing .dtsi files.
- Dropped 'minItems: 2' and the conditional block. Made 'simple-mfd' and
bus properties strictly required, as all in-tree dts uses it.
- Updated patternProperties to strictly enforce standard node names
- Link to v1: https://lore.kernel.org/r/[email protected]

---
Bhargav Joshi (2):
ARM: dts: ti: keystone: Align devctrl child node names with dtschema
dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

 .../bindings/mfd/ti,keystone-devctrl.yaml          | 90 ++++++++++++++++++++++
 .../bindings/mfd/ti-keystone-devctrl.txt           | 19 -----
 arch/arm/boot/dts/ti/keystone/keystone-k2e.dtsi    |  2 +-
 arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi    |  4 +-
 arch/arm/boot/dts/ti/keystone/keystone-k2hk.dtsi   | 16 ++--
 arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi    |  8 +-
 arch/arm/boot/dts/ti/keystone/keystone.dtsi        |  2 +-
 7 files changed, 106 insertions(+), 35 deletions(-)

---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260813-ti-keystone-devctrl-6e49212fe35d

Best regards,

Signature · 1 line
Bhargav
#1 lore raw

PATCH v4 1/2 ARM: dts: ti: keystone: Align devctrl child node names with dtschema

Align TI Keystone device state control child node names with standard naming conventions.
- Change keystone_irq to interrupt-controller
- Change keystone_dsp_gpio to gpio

---
 arch/arm/boot/dts/ti/keystone/keystone-k2e.dtsi  |  2 +-
 arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi  |  4 ++--
 arch/arm/boot/dts/ti/keystone/keystone-k2hk.dtsi | 16 ++++++++--------
 arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi  |  8 ++++----
 arch/arm/boot/dts/ti/keystone/keystone.dtsi      |  2 +-
 5 files changed, 16 insertions(+), 16 deletions(-)
arch/arm/boot/dts/ti/keystone/keystone-k2e.dtsi +1 -1
index 662aa33cba11..083c94b62fc7 100644
@@ -110,7 +110,7 @@ pscrst: reset-controller {
 		};
 
 		devctrl: device-state-control@2620000 {
-			dspgpio0: keystone_dsp_gpio@240 {
+			dspgpio0: gpio@240 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x240 0x4>;
 				gpio-controller;
arch/arm/boot/dts/ti/keystone/keystone-k2g.dtsi +2 -2
index dafe485dfe19..11b27663503a 100644
@@ -121,7 +121,7 @@ devctrl: device-state-control@2620000 {
 			#size-cells = <1>;
 			ranges = <0x0 0x02620000 0x1000>;
 
-			kirq0: keystone_irq@2a0 {
+			kirq0: interrupt-controller@2a0 {
 				compatible = "ti,keystone-irq";
 				reg = <0x2a0 0x10>;
 				interrupts = <GIC_SPI 1 IRQ_TYPE_EDGE_RISING>;
@@ -130,7 +130,7 @@ kirq0: keystone_irq@2a0 {
 				ti,syscon-dev = <&devctrl 0x2a0>;
 			};
 
-			dspgpio0: keystone_dsp_gpio@240 {
+			dspgpio0: gpio@240 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x240 0x4>;
 				gpio-controller;
arch/arm/boot/dts/ti/keystone/keystone-k2hk.dtsi +8 -8
index 4fdf4b30384f..b7a9fbd6d59d 100644
@@ -88,7 +88,7 @@ pscrst: reset-controller {
 		};
 
 		devctrl: device-state-control@2620000 {
-			dspgpio0: keystone_dsp_gpio@240 {
+			dspgpio0: gpio@240 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x240 0x4>;
 				gpio-controller;
@@ -96,7 +96,7 @@ dspgpio0: keystone_dsp_gpio@240 {
 				gpio,syscon-dev = <&devctrl 0x240>;
 			};
 
-			dspgpio1: keystone_dsp_gpio@244 {
+			dspgpio1: gpio@244 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x244 0x4>;
 				gpio-controller;
@@ -104,7 +104,7 @@ dspgpio1: keystone_dsp_gpio@244 {
 				gpio,syscon-dev = <&devctrl 0x244>;
 			};
 
-			dspgpio2: keystone_dsp_gpio@248 {
+			dspgpio2: gpio@248 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x248 0x4>;
 				gpio-controller;
@@ -112,7 +112,7 @@ dspgpio2: keystone_dsp_gpio@248 {
 				gpio,syscon-dev = <&devctrl 0x248>;
 			};
 
-			dspgpio3: keystone_dsp_gpio@24c {
+			dspgpio3: gpio@24c {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x24c 0x4>;
 				gpio-controller;
@@ -120,7 +120,7 @@ dspgpio3: keystone_dsp_gpio@24c {
 				gpio,syscon-dev = <&devctrl 0x24c>;
 			};
 
-			dspgpio4: keystone_dsp_gpio@250 {
+			dspgpio4: gpio@250 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x250 0x4>;
 				gpio-controller;
@@ -128,7 +128,7 @@ dspgpio4: keystone_dsp_gpio@250 {
 				gpio,syscon-dev = <&devctrl 0x250>;
 			};
 
-			dspgpio5: keystone_dsp_gpio@254 {
+			dspgpio5: gpio@254 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x254 0x4>;
 				gpio-controller;
@@ -136,7 +136,7 @@ dspgpio5: keystone_dsp_gpio@254 {
 				gpio,syscon-dev = <&devctrl 0x254>;
 			};
 
-			dspgpio6: keystone_dsp_gpio@258 {
+			dspgpio6: gpio@258 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x258 0x4>;
 				gpio-controller;
@@ -144,7 +144,7 @@ dspgpio6: keystone_dsp_gpio@258 {
 				gpio,syscon-dev = <&devctrl 0x258>;
 			};
 
-			dspgpio7: keystone_dsp_gpio@25c {
+			dspgpio7: gpio@25c {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x25c 0x4>;
 				gpio-controller;
arch/arm/boot/dts/ti/keystone/keystone-k2l.dtsi +4 -4
index 330b437b667f..4678454c0eb3 100644
@@ -290,7 +290,7 @@ osr: sram@70000000 {
 		};
 
 		devctrl: device-state-control@2620000 {
-			dspgpio0: keystone_dsp_gpio@240 {
+			dspgpio0: gpio@240 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x240 0x4>;
 				gpio-controller;
@@ -298,7 +298,7 @@ dspgpio0: keystone_dsp_gpio@240 {
 				gpio,syscon-dev = <&devctrl 0x240>;
 			};
 
-			dspgpio1: keystone_dsp_gpio@244 {
+			dspgpio1: gpio@244 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x244 0x4>;
 				gpio-controller;
@@ -306,7 +306,7 @@ dspgpio1: keystone_dsp_gpio@244 {
 				gpio,syscon-dev = <&devctrl 0x244>;
 			};
 
-			dspgpio2: keystone_dsp_gpio@248 {
+			dspgpio2: gpio@248 {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x248 0x4>;
 				gpio-controller;
@@ -314,7 +314,7 @@ dspgpio2: keystone_dsp_gpio@248 {
 				gpio,syscon-dev = <&devctrl 0x248>;
 			};
 
-			dspgpio3: keystone_dsp_gpio@24c {
+			dspgpio3: gpio@24c {
 				compatible = "ti,keystone-dsp-gpio";
 				reg = <0x24c 0x4>;
 				gpio-controller;
arch/arm/boot/dts/ti/keystone/keystone.dtsi +1 -1
index ff16428860a9..20596fa446b9 100644
@@ -93,7 +93,7 @@ devctrl: device-state-control@2620000 {
 			#size-cells = <1>;
 			ranges = <0x0 0x02620000 0x1000>;
 
-			kirq0: keystone_irq@2a0 {
+			kirq0: interrupt-controller@2a0 {
 				compatible = "ti,keystone-irq";
 				reg = <0x2a0 0x4>;
 				interrupts = <GIC_SPI 4 IRQ_TYPE_EDGE_RISING>;
Signature · 1 line
2.55.0
#2 lore raw

Re: [PATCH v4 1/2] ARM: dts: ti: keystone: Align devctrl child node names with dtschema

Sashiko has reviewed this patch and found no issues. It looks great!
Quoted 6 lines

Align TI Keystone device state control child node names with standard naming conventions.
- Change keystone_irq to interrupt-controller
- Change keystone_dsp_gpio to gpio

Sashiko has reviewed this patch and found no issues. It looks great!

Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
#3 lore raw

PATCH v4 2/2 dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

In reply to Bhargav Joshi

Convert the Texas Instruments Keystone Device State Control binding from legacy text format to DT schema.

During the conversion, the following updates were made:
- Add "simple-mfd" to compatibles matching existing dts usage.
- Add required bus properties #address-cells, #size-cells, and ranges which were missing in text binding.
- Document child nodes gpio, interrupt-controller, and reset-controller.

---
 .../bindings/mfd/ti,keystone-devctrl.yaml          | 90 ++++++++++++++++++++++
 .../bindings/mfd/ti-keystone-devctrl.txt           | 19 -----
 2 files changed, 90 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +90 -0
new file mode 100644
index 000000000000..564dfc8a731f
@@ -0,0 +1,90 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/mfd/ti,keystone-devctrl.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Texas Instruments Keystone Device State Control
+
+maintainers:
+  - Ivan Khoronzhuk <[email protected]>
+
+description:
+  The Keystone II devices have a set of registers that are used to control the
+  status of its peripherals. This node is intended to allow access to this
+  functionality.
+
+properties:
+  compatible:
+    items:
+      - const: ti,keystone-devctrl
+      - const: syscon
+      - const: simple-mfd
+
+  reg:
+    maxItems: 1
+
+  "#address-cells":
+    const: 1
+
+  "#size-cells":
+    const: 1
+
+  ranges: true
+
+patternProperties:
+  "^gpio@[0-9a-f]+$":
+    type: object
+    description: Keystone DSP GPIO controller
+    required:
+      - compatible
+
+  "^interrupt-controller@[0-9a-f]+$":
+    type: object
+    description: Keystone DSP to ARM interrupt controller
+    required:
+      - compatible
+
+  "^reset-controller@[0-9a-f]+$":
+    type: object
+    description: Keystone reset controller
+    required:
+      - compatible
+
+required:
+  - compatible
+  - reg
+  - "#address-cells"
+  - "#size-cells"
+  - ranges
+
+additionalProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    device-state-control@2620000 {
+        compatible = "ti,keystone-devctrl", "syscon", "simple-mfd";
+        reg = <0x02620000 0x1000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x02620000 0x1000>;
+
+        interrupt-controller@2a0 {
+            compatible = "ti,keystone-irq";
+            reg = <0x2a0 0x4>;
+            interrupts = <GIC_SPI 4 IRQ_TYPE_EDGE_RISING>;
+            interrupt-controller;
+            #interrupt-cells = <1>;
+            ti,syscon-dev = <&devctrl 0x2a0>;
+        };
+
+        reset-controller@328 {
+            compatible = "ti,keystone-reset";
+            reg = <0x328 0x10>;
+            ti,syscon-pll = <&pllctrl 0xe4>;
+            ti,syscon-dev = <&devctrl 0x328>;
+            ti,wdt-list = <0>;
+        };
+    };
Documentation/devicetree/bindings/mfd/ti-keystone-devctrl.txt deleted +0 -19
deleted file mode 100644
index 71a1f5963936..000000000000
@@ -1,19 +0,0 @@
-* Device tree bindings for Texas Instruments keystone device state control
-
-The Keystone II devices have a set of registers that are used to control
-the status of its peripherals. This node is intended to allow access to
-this functionality.
-
-Required properties:
-
-- compatible:		"ti,keystone-devctrl", "syscon"
-
-- reg:			contains offset/length value for device state control
-			registers space.
-
-Example:
-
-devctrl: device-state-control@02620000 {
-	compatible = "ti,keystone-devctrl", "syscon";
-	reg = <0x02620000 0x1000>;
-};
Signature · 1 line
2.55.0
#4 lore raw

Re: [PATCH v4 2/2] dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] The YAML example block contains phandle references to labels that are not defined, causing…

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] The YAML example block contains phandle references to labels that are not defined, causing dt_binding_check to fail compilation. --

commit afa65fa8e16c9a7e5fce2efb40236086a0eed689
Author: Bhargav Joshi <[email protected]>

dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

Convert the Texas Instruments Keystone Device State Control binding from legacy text format to DT schema.

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +0 -0
new file mode 100644
index 0000000000000..564dfc8a731f2

[ ... ]

Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml line 67

Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +5 -0
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+
+    device-state-control@2620000 {

[Severity: Low]
Does omitting the devctrl: label from this node cause compilation to fail?

When make dt_binding_check is run, it extracts the examples block in Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml into a standalone .dts file and compiles it. Without the label, subsequent references to &devctrl in the child nodes cannot be resolved by dtc.

Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml line 80

Quoted 13 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +13 -0
+        compatible = "ti,keystone-devctrl", "syscon", "simple-mfd";
+        reg = <0x02620000 0x1000>;
+        #address-cells = <1>;
+        #size-cells = <1>;
+        ranges = <0x0 0x02620000 0x1000>;
+
+        interrupt-controller@2a0 {
+            compatible = "ti,keystone-irq";
+            reg = <0x2a0 0x4>;
+            interrupts = <GIC_SPI 4 IRQ_TYPE_EDGE_RISING>;
+            interrupt-controller;
+            #interrupt-cells = <1>;
+            ti,syscon-dev = <&devctrl 0x2a0>;

[Severity: Low]
Can this use the &devctrl phandle since the label wasn't defined on the parent node?

Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml line 86

Quoted 6 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +6 -0
+        };
+
+        reset-controller@328 {
+            compatible = "ti,keystone-reset";
+            reg = <0x328 0x10>;
+            ti,syscon-pll = <&pllctrl 0xe4>;

[Severity: Low]
Is the &pllctrl phandle defined anywhere in this example?

Because the examples block is compiled independently during dt_binding_check, referencing an undefined &pllctrl phandle will cause dtc compilation to fail. A dummy pllctrl node might be required here.

Quoted 4 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +4 -0
+            ti,syscon-dev = <&devctrl 0x328>;
+            ti,wdt-list = <0>;
+        };
+    };
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=2
maintainer Reviewed-by on v4 2/2
#5 lore raw

Re: [PATCH v4 2/2] dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

In reply to Bhargav Joshi
Quoted 9 lines · Bhargav Joshi

Convert the Texas Instruments Keystone Device State Control binding from legacy text format to DT schema.

During the conversion, the following updates were made:
- Add "simple-mfd" to compatibles matching existing dts usage.
- Add required bus properties #address-cells, #size-cells, and ranges which were missing in text binding.
- Document child nodes gpio, interrupt-controller, and reset-controller.

Quoted 6 lines
---
 .../bindings/mfd/ti,keystone-devctrl.yaml          | 90 ++++++++++++++++++++++
 .../bindings/mfd/ti-keystone-devctrl.txt           | 19 -----
 2 files changed, 90 insertions(+), 19 deletions(-)
maintainer Applied
#6 lore raw

Re: (subset) [PATCH v4 2/2] dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

In reply to Bhargav Joshi
Quoted 10 lines · Bhargav Joshi

Convert the Texas Instruments Keystone Device State Control binding from legacy text format to DT schema.

During the conversion, the following updates were made:
- Add "simple-mfd" to compatibles matching existing dts usage.
- Add required bus properties #address-cells, #size-cells, and ranges which were missing in text binding.
- Document child nodes gpio, interrupt-controller, and reset-controller.

[...]

Applied, thanks!

[2/2] dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema

      commit: e3513583cdb959bbf1370edcbaf3c0b014077742

--
Lee Jones [李琼斯]

maintainer Applied
#7 lore raw

Re: (subset) [PATCH v4 0/2] ti,keystone-devctrl: Convert to DT schema and DTS cleanups

In reply to Bhargav Joshi

Hi Bhargav Joshi,

Quoted 8 lines · Bhargav Joshi

Series converts Texas Instruments Keystone Device State Control binding to DT schema and aligns the existing dt files with standard naming conventions.

Patch 1 aligns the legacy child node names with standard names. Patch 2 converts the ti,keystone-devctrl binding to YAML schema.

[...]

Please note: Bindings need to go through appropriate maintainers.

I have applied the following to branch ti-keystone-dts-next on [1]. Thank you!

[1/2] ARM: dts: ti: keystone: Align devctrl child node names with dtschema

      commit: 386cccc12a856a376da20ac9e93827ecd49352e7

All being well this means that it will be integrated into the linux-next tree (usually sometime in the next 24 hours) and sent up the chain during the next merge window (or sooner if it is a relevant bug fix), however if problems are discovered then the patch may be dropped or reverted.

You may get further e-mails resulting from automated or manual testing and review of the tree, please engage with people reporting problems and send followup patches addressing any issues that are reported if needed.

If any updates are required or you are submitting further changes they should be sent as incremental updates against current git, existing patches will not be replaced.

Please add any relevant lists and maintainers to the CCs when replying to this mail.

[1] https://git.kernel.org/pub/scm/linux/kernel/git/ti/linux.git

Signature · 4 lines
Regards,
Nishanth Menon
Key (0xDDB5849D1736249D) / Fingerprint: F8A2 8693 54EB 8232 17A3  1A34 DDB5 849D 1736 249D
https://ti.com/opensource