dt-bindings: arm: omap: Convert L4 interconnect to DT schema
PATCH 1/1 dt-bindings: arm: omap: Convert L4 interconnect to DT schema
Convert the Texas Instruments OMAP L4 interconnect bus bindings to DT schema.
During the conversion, several updates were made:
- Defined the compatible property as an array to require the TI-specific string first, followed by either 'simple-bus' or 'simple-pm-bus'.
- Added a 'select' block to ensure this schema is only applied to TI-specific nodes, preventing duplicate schema warnings against the core simple-pm-bus.yaml.
- Made 'reg' and 'reg-names' optional.
--- .../devicetree/bindings/arm/omap/l4.txt | 37 -------- .../bindings/arm/omap/ti,omap-l4.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 37 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/omap/l4.txt create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml
Documentation/devicetree/bindings/arm/omap/l4.txt deleted +0 -37
@@ -1,37 +0,0 @@ -L4 interconnect bindings - -These bindings describe the OMAP SoCs L4 interconnect bus. - -Required properties: -- compatible : Should be "ti,omap2-l4" for OMAP2 family l4 core bus - Should be "ti,omap2-l4-wkup" for OMAP2 family l4 wkup bus - Should be "ti,omap3-l4-core" for OMAP3 family l4 core bus - Should be "ti,omap4-l4-cfg" for OMAP4 family l4 cfg bus - Should be "ti,omap4-l4-per" for OMAP4 family l4 per bus - Should be "ti,omap4-l4-wkup" for OMAP4 family l4 wkup bus - Should be "ti,omap5-l4-cfg" for OMAP5 family l4 cfg bus - Should be "ti,omap5-l4-wkup" for OMAP5 family l4 wkup bus - Should be "ti,dra7-l4-cfg" for DRA7 family l4 cfg bus - Should be "ti,dra7-l4-wkup" for DRA7 family l4 wkup bus - Should be "ti,am3-l4-wkup" for AM33xx family l4 wkup bus - Should be "ti,am4-l4-wkup" for AM43xx family l4 wkup bus -- ranges : contains the IO map range for the bus -- reg : registers link agent and interconnect agent and access protection -- reg-names : "la" for link agent, "ia0" to "ia3" for one to three - interconnect agent instances, "ap" for access if it exists - -Examples: - -l4: interconnect@48000000 { - compatible "ti,omap4-l4-per", "simple-bus"; - reg = <0x48000000 0x800>, - <0x48000800 0x800>, - <0x48001000 0x400>, - <0x48001400 0x400>, - <0x48001800 0x400>, - <0x48001c00 0x400>; - reg-names = "ap", "la", "ia0", "ia1", "ia2", "ia3"; - #address-cells = <1>; - #size-cells = <1>; - ranges = <0 0x48000000 0x100000>; -};
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml new file +93 -0
93 lines not on this page · raw message
Signature · 1 line
2.43.0
[email protected]
AI reviewThank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
New issues:
- [Medium] Top-level additionalProperties: true disables validation of mis-typed or undocumented properties.
Pre-existing issues:
- [Medium] The schema enum omits multiple actively used compatibles and carries over a typo from the text binding. --
--- Patch [1]: [PATCH] dt-bindings: arm: omap: Convert L4 interconnect to DT schema --- commit 1d2037651b45f654606d66d4cc1b50eca85740dc
Author: Eduard Bostina <[email protected]>
dt-bindings: arm: omap: Convert L4 interconnect to DT schema
This commit converts the Texas Instruments OMAP L4 interconnect bus bindings from text to YAML schema. It defines the compatible property as an array and adds a select block to restrict the schema to TI-specific nodes.
Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml new file +0
-0
[ ... ]
Quoted 6 lines
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml new file +6
-0+select: + properties: + compatible: + contains: + enum: + - ti,omap2-l4
[ ... ]
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml line 33
Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml new file +5
-0+ - ti,dra7-l4-wkup + - ti,am3-l4-wkup + - ti,am4-l4-wkup + required: + - compatible
[Severity: Medium]
This is a pre-existing issue carried over from the text binding, but the schema enum omits multiple actively used compatibles like ti,am33xx-l4-fw, ti,am4-l4-fast, and ti,dra7-l4-per1.
Does this also carry over a typo in the am33xx name, specifying ti,am3-l4-wkup instead of ti,am33xx-l4-wkup?
Because the custom select block strictly filters on this enum, device tree nodes using the missing compatibles will silently bypass this schema entirely during validation.
[ ... ]
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml line 77
Quoted 5 lines
Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml new file +5
-0+required: + - compatible + - ranges + +additionalProperties: true
[Severity: Medium]
Does setting additionalProperties to true defeat a primary benefit of the schema conversion?
This globally disables strict property validation for the node. If a property is misspelled (like reg-name instead of reg-names) or undocumented, the schema will silently accept it.
Should this bus node instead use a $ref to simple-bus.yaml or simple-pm-bus.yaml and set unevaluatedProperties to false?
Signature · 1 line
Sashiko AI review · https://sashiko.dev/#/patchset/[email protected]?part=1
Rob Herring (Arm)
maintainerQuoted 12 lines · Eduard Bostina
Convert the Texas Instruments OMAP L4 interconnect bus bindings to DT schema.
During the conversion, several updates were made:
- Defined the compatible property as an array to require the TI-specific string first, followed by either 'simple-bus' or 'simple-pm-bus'.
- Added a 'select' block to ensure this schema is only applied to TI-specific nodes, preventing duplicate schema warnings against the coresimple-pm-bus.yaml.
- Made 'reg' and 'reg-names' optional.
Quoted 8 lines
Signed-off-by Eduard Bostina <[email protected]>--- .../devicetree/bindings/arm/omap/l4.txt | 37 -------- .../bindings/arm/omap/ti,omap-l4.yaml | 93 +++++++++++++++++++ 2 files changed, 93 insertions(+), 37 deletions(-) delete mode 100644 Documentation/devicetree/bindings/arm/omap/l4.txt create mode 100644 Documentation/devicetree/bindings/arm/omap/ti,omap-l4.yaml
My bot found errors running 'make dt_binding_check' on your patch:
yamllint warnings/errors:
dtschema/dtc warnings/errors:
/builds/robherring/dt-review-ci/linux/Documentation/devicetree/bindings/arm/omap/ti,omap-l4.example.dtb: interconnect@48000000 (ti,omap4-l4-per): $nodename:0: 'interconnect@48000000' does not match '^([a-z][a-z0-9\\-]+-bus|bus|localbus|soc|axi|ahb|apb)(@.+)?$'
from schema $id: http://devicetree.org/schemas/simple-bus.yaml
doc reference errors (make refcheckdocs):
See https://patchwork.kernel.org/project/devicetree/patch/[email protected]
The base for the series is generally the latest rc1. A different dependency should be noted in *this* patch.
If you already ran 'make dt_binding_check' and didn't see the above error(s), then make sure 'yamllint' is installed and dt-schema is up to date:
pip3 install dtschema --upgrade
Please check and re-submit after running the above command yourself. Note that DT_SCHEMA_FILES can be set to your schema file to speed up checking your schema. However, it must be unset to test all examples with your schema.