Skip to contentSkip to conversation

arm64: dts: k3: Resolve remaining dtbs_check warnings

PATCH Superseded Jan Kiszka 2 participants 7 messages Aug 13, 2024 – Aug 14, 2024

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore

Jan Kiszka

author
#0 lore raw

v3 cover arm64: dts: k3: Resolve remaining dtbs_check warnings

Changes in v3:
- convert mux-controller from patternProperties to regular one
- dropped k3-j72xx-mcu-wakeup patch after simple-bus conversion

Changes in v2:
- reference reg-mux.yaml in am654-system-controller child node
- base on top of dedicated am654-serdes-ctrl schema patch

This goes on top of
https://patchwork.kernel.org/project/linux-arm-kernel/cover/[email protected]/

As we are working in this area, having a zero-warning baseline helps a lot finding own issues quicker. Maybe not all of the suggested resolutions are optimal, open for feedback, just want to have them all fixed now soon.

Jan

Jan Kiszka (3):
arm64: dts: ti: k3-am642-evm: Silence schema warning
dt-bindings: soc: ti: am645-system-controller: add child nodes used by
main domain
arm64: dts: ti: k3-am65-main: add system controller compatible

 .../soc/ti/ti,am654-system-controller.yaml    | 25 +++++++++++++++++++
 arch/arm64/boot/dts/ti/k3-am642-evm.dts       |  4 +++
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi      |  2 +-
 3 files changed, 30 insertions(+), 1 deletion(-)
Signature · 1 line
2.43.0
author
#1 lore raw

PATCH v3 1/3 arm64: dts: ti: k3-am642-evm: Silence schema warning

From: Jan Kiszka <[email protected]>

The resolves

k3-am642-evm.dtb: adc: 'ti,adc-channels' is a required property
from schema $id: http://devicetree.org/schemas/iio/adc/ti,am3359-adc.yaml#

As the adc is reserved, thus not used by Linux, this has no practical impact.

---
 arch/arm64/boot/dts/ti/k3-am642-evm.dts | 4 ++++
 1 file changed, 4 insertions(+)
arch/arm64/boot/dts/ti/k3-am642-evm.dts +4 -0
index 6bb1ad2e56ec..42015a55e0d3 100644
@@ -646,6 +646,10 @@ cpsw3g_phy0: ethernet-phy@0 {
 &tscadc0 {
 	/* ADC is reserved for R5 usage */
 	status = "reserved";
+
+	adc {
+		ti,adc-channels = <0 1 2 3 4 5 6 7>;
+	};
 };
 
 &ospi0 {
Signature · 1 line
2.43.0
author
#2 lore raw

PATCH v3 2/3 dt-bindings: soc: ti: am645-system-controller: add child nodes used by main domain

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

Expand bindings to cover both the MCU and the main usage of the AM654 system controller.

---
 .../soc/ti/ti,am654-system-controller.yaml    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +25 -0
index e79803e586ca..5a689ec3c5c9 100644
@@ -29,11 +29,36 @@ properties:
 
   ranges: true
 
+  mux-controller:
+    type: object
+    ref: /schemas/mux/reg-mux.yaml#
+    description:
+      This is the SERDES lane control mux.
+
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     $ref: /schemas/phy/ti,phy-gmii-sel.yaml#
 
+  "^clock@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/soc/ti/ti,am654-serdes-ctrl.yaml#
+
+  "^dss-oldi-io-ctrl@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/mfd/syscon.yaml#
+    properties:
+      compatible:
+        items:
+          - const: ti,am654-dss-oldi-io-ctrl
+          - const: syscon
+
+  "^clock-controller@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+    description:
+      Clock provider for TI EHRPWM nodes.
+
 required:
   - compatible
   - reg
Signature · 1 line
2.43.0
#3 lore raw

Re: [PATCH v3 2/3] dt-bindings: soc: ti: am645-system-controller: add child nodes used by main domain

Quoted 20 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Expand bindings to cover both the MCU and the main usage of the AM654 system controller.

---
 .../soc/ti/ti,am654-system-controller.yaml    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +2 -0
index e79803e586ca..5a689ec3c5c9 100644
@@ -29,11 +29,36 @@ properties:
 
   ranges: true
 
+  mux-controller:
+    type: object

Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml properties: · line 43

Quoted 10 lines
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +5 -0
+    ref: /schemas/mux/reg-mux.yaml#
+    description:
+      This is the SERDES lane control mux.
+
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     $ref: /schemas/phy/ti,phy-gmii-sel.yaml#
 
+  "^clock@[0-9a-f]+$":

Could you explain to me why these are all patternProperties? Why are the addresses of these things not fixed for an am654?

Quoted 24 lines
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +18 -0
+    type: object
+    $ref: /schemas/soc/ti/ti,am654-serdes-ctrl.yaml#
+
+  "^dss-oldi-io-ctrl@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/mfd/syscon.yaml#
+    properties:
+      compatible:
+        items:
+          - const: ti,am654-dss-oldi-io-ctrl
+          - const: syscon
+
+  "^clock-controller@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+    description:
+      Clock provider for TI EHRPWM nodes.
+
 required:
   - compatible
   - reg
Signature · 1 line
2.43.0
author
#4 lore raw

Re: [PATCH v3 2/3] dt-bindings: soc: ti: am645-system-controller: add child nodes used by main domain

Quoted 30 lines · Conor Dooley
Quoted 29 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Expand bindings to cover both the MCU and the main usage of the AM654 system controller.

---
 .../soc/ti/ti,am654-system-controller.yaml    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +6 -0
index e79803e586ca..5a689ec3c5c9 100644
@@ -29,11 +29,36 @@ properties:
 
   ranges: true
 
+  mux-controller:
+    type: object
+    ref: /schemas/mux/reg-mux.yaml#
+    description:
+      This is the SERDES lane control mux.
+
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     $ref: /schemas/phy/ti,phy-gmii-sel.yaml#
 
Quoted 5 lines

Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml properties: · line 43

Quoted 1 line
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +1 -0
+  "^clock@[0-9a-f]+$":

Could you explain to me why these are all patternProperties? Why are the addresses of these things not fixed for an am654?

I could indeed spell out dss-oldi-io-ctrl@41e0 and clock-controller@4140, and their addresses are likely fixed, indeed. But there are also clock@4080 and clock@4090 - should I duplicate their object descriptions while moving them to the regular properties?

Jan

Quoted 24 lines
Quoted 24 lines
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +18 -0
+    type: object
+    $ref: /schemas/soc/ti/ti,am654-serdes-ctrl.yaml#
+
+  "^dss-oldi-io-ctrl@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/mfd/syscon.yaml#
+    properties:
+      compatible:
+        items:
+          - const: ti,am654-dss-oldi-io-ctrl
+          - const: syscon
+
+  "^clock-controller@[0-9a-f]+$":
+    type: object
+    $ref: /schemas/clock/ti,am654-ehrpwm-tbclk.yaml#
+    description:
+      Clock provider for TI EHRPWM nodes.
+
 required:
   - compatible
   - reg
Signature · 1 line
2.43.0
Signature · 2 lines
Siemens AG, Technology
Linux Expert Center
#5 lore raw

Re: [PATCH v3 2/3] dt-bindings: soc: ti: am645-system-controller: add child nodes used by main domain

Quoted 37 lines · Jan Kiszka
Quoted 30 lines · Conor Dooley
Quoted 29 lines · Jan Kiszka

From: Jan Kiszka <[email protected]>

Expand bindings to cover both the MCU and the main usage of the AM654 system controller.

---
 .../soc/ti/ti,am654-system-controller.yaml    | 25 +++++++++++++++++++
 1 file changed, 25 insertions(+)
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +6 -0
index e79803e586ca..5a689ec3c5c9 100644
@@ -29,11 +29,36 @@ properties:
 
   ranges: true
 
+  mux-controller:
+    type: object
+    ref: /schemas/mux/reg-mux.yaml#
+    description:
+      This is the SERDES lane control mux.
+
 patternProperties:
   "^phy@[0-9a-f]+$":
     type: object
     $ref: /schemas/phy/ti,phy-gmii-sel.yaml#
 
Quoted 5 lines

Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml properties: · line 43

Quoted 1 line
Documentation/devicetree/bindings/soc/ti/ti,am654-system-controller.yaml +1 -0
+  "^clock@[0-9a-f]+$":

Could you explain to me why these are all patternProperties? Why are the addresses of these things not fixed for an am654?

Quoted 4 lines

I could indeed spell out dss-oldi-io-ctrl@41e0 and clock-controller@4140, and their addresses are likely fixed, indeed. But there are also clock@4080 and clock@4090 - should I duplicate their object descriptions while moving them to the regular properties?

If you're going to itemise the 3 clocks, I think you should mention what's different about each of them. Otherwise, if they're all identical, leave them as a patternProperty.

author
#6 lore raw

PATCH v3 3/3 arm64: dts: ti: k3-am65-main: add system controller compatible

In reply to Jan Kiszka

From: Jan Kiszka <[email protected]>

Now that the TI K3 AM654 system controller bindings also cover the usage in the main domain, add its compatible to address dtbs_check complaints:

k3-am654-base-board.dtb: scm-conf@100000: compatible: ['syscon', 'simple-mfd'] is too short

---
 arch/arm64/boot/dts/ti/k3-am65-main.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/ti/k3-am65-main.dtsi +1 -1
index 06ed74197f89..a8664b246795 100644
@@ -471,7 +471,7 @@ sdhci1: mmc@4fa0000 {
 	};
 
 	scm_conf: scm-conf@100000 {
-		compatible = "syscon", "simple-mfd";
+		compatible = "ti,am654-system-controller", "syscon", "simple-mfd";
 		reg = <0 0x00100000 0 0x1c000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
Signature · 1 line
2.43.0