ti,keystone-devctrl: Convert to DT schema and DTS cleanups
Subsystems (3)
v3 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 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 | 84 ++++++++++++++++++++++ .../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, 100 insertions(+), 35 deletions(-)
---
base-commit: cee9395acd8043be0644b25c34bfa86623f2b935
change-id: 20260813-ti-keystone-devctrl-6e49212fe35d
Best regards,
Signature · 1 line
Bhargav
PATCH v3 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
@@ -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
@@ -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
@@ -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
@@ -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
@@ -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
PATCH v3 2/2 dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema
In reply to Bhargav JoshiConvert 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 | 84 ++++++++++++++++++++++ .../bindings/mfd/ti-keystone-devctrl.txt | 19 ----- 2 files changed, 84 insertions(+), 19 deletions(-)
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +84 -0
@@ -0,0 +1,84 @@ +# 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 + + "^interrupt-controller@[0-9a-f]+$": + type: object + description: Keystone DSP to ARM interrupt controller + + "^reset-controller@[0-9a-f]+$": + type: object + description: Keystone reset controller + +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
@@ -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
[email protected]
AI reviewRe: [PATCH v3 1/2] ARM: dts: ti: keystone: Align devctrl child node names with dtschema
In reply to Bhargav JoshiSashiko 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.
- Changekeystone_irqto interrupt-controller
- Changekeystone_dsp_gpioto gpioSigned-off-by Bhargav Joshi <[email protected]>
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
[email protected]
AI reviewRe: [PATCH v3 2/2] dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema
In reply to Bhargav JoshiThank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider: - [Low] Compilation Error: Unresolved phandles `&devctrl` and `&pllctrl` in DT schema example. --
Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] Compilation Error: Unresolved phandles &devctrl and &pllctrl in DT schema example. --
commit 739cbb745f8880f754c15be8b7a4abc126a091dc
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. During the conversion, bus properties were added and child nodes were documented.
Quoted 5 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +0
-0
[ ... ]
Quoted 8 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +8
-0+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>;
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml line 74
Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +10
-0+ #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]
Does this reference to &devctrl cause a compilation error during dt_binding_check? The devctrl label from the original text binding seems to have been dropped from the parent device-state-control node above.
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml line 80
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]
Will this reference to &pllctrl also trigger a build error? It looks like the pllctrl label is completely missing from the example.
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
Rob Herring
maintainerRe: [PATCH v3 2/2] dt-bindings: mfd: ti,keystone-devctrl: Convert to DT schema
In reply to Bhargav JoshiQuoted 49 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.Signed-off-by Bhargav Joshi <[email protected]>--- .../bindings/mfd/ti,keystone-devctrl.yaml | 84 ++++++++++++++++++++++ .../bindings/mfd/ti-keystone-devctrl.txt | 19 ----- 2 files changed, 84 insertions(+), 19 deletions(-)Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +28
-0@@ -0,0 +1,84 @@ +# 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
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml line 38
Quoted 10 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +10
-0+ + "#size-cells": + const: 1 + + ranges: true + +patternProperties: + "^gpio@[0-9a-f]+$": + type: object + description: Keystone DSP GPIO controller
required:
- compatible
And on the other 2 child nodes.
Quoted 8 lines
Documentation/devicetree/bindings/mfd/ti,keystone-devctrl.yaml new file +8
-0+ + "^interrupt-controller@[0-9a-f]+$": + type: object + description: Keystone DSP to ARM interrupt controller + + "^reset-controller@[0-9a-f]+$": + type: object + description: Keystone reset controller