Skip to contentSkip to conversation

arm64: xilinx: Tune DTSes to remove warnings from make W=1 dtbs

PATCH Applied Michal Simek 2 participants 14 messages Sep 18, 2023 – Oct 16, 2023

Subsystems (2)
lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

cover arm64: xilinx: Tune DTSes to remove warnings from make W=1 dtbs

Hi,

make W=1 dtbs is reporting couple of issues which this series is going to address. There is also one more changes related to removing additional compatible string which is reported by dtbs_check.

Thanks,
Michal

Michal Simek (6):
arm64: xilinx: Do not use '_' in DT node names
arm64: xilinx: Use lower case for partition address
arm64: xilinx: Remove mt25qu512a compatible string from SOM
arm64: xilinx: Put ethernet phys to mdio node
arm64: xilinx: Remove address/size-cells from flash node
arm64: xilinx: Remove address/size-cells from gem nodes

 .../boot/dts/xilinx/zynqmp-sm-k26-revA.dts    |  8 +++---
 .../dts/xilinx/zynqmp-zc1751-xm015-dc1.dts    |  8 ++++--
 .../dts/xilinx/zynqmp-zc1751-xm016-dc2.dts    | 16 +++++++-----
 .../dts/xilinx/zynqmp-zc1751-xm017-dc3.dts    |  8 ++++--
 .../dts/xilinx/zynqmp-zc1751-xm018-dc4.dts    | 26 +++++++++++--------
 .../dts/xilinx/zynqmp-zc1751-xm019-dc5.dts    |  8 ++++--
 .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    |  4 +--
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi        | 14 +++-------
 8 files changed, 51 insertions(+), 41 deletions(-)
Signature · 1 line
2.36.1
author maintainer
#1 lore raw

PATCH 1/6 arm64: xilinx: Do not use '_' in DT node names

Character '_' not recommended in node name. Use '-' instead. Pretty much run seds below for node names. s/zynqmp_ipi/zynqmp-ipi/ s/nvmem_firmware/nvmem-firmware/ s/soc_revision/soc-revision/
s/si5335_/si5335-/

---

 arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 4 ++--
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi            | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts +2 -2
index d0091d3cb764..52f998c22538 100644
@@ -123,13 +123,13 @@ ina226 {
 		io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
 	};
 
-	si5335_0: si5335_0 { /* clk0_usb - u23 */
+	si5335_0: si5335-0 { /* clk0_usb - u23 */
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <26000000>;
 	};
 
-	si5335_1: si5335_1 { /* clk1_dp - u23 */
+	si5335_1: si5335-1 { /* clk1_dp - u23 */
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <27000000>;
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +3 -3
index b61fc99cd911..e50e95cbe817 100644
@@ -129,7 +129,7 @@ rproc_1_fw_image: memory@3ef00000 {
 		};
 	};
 
-	zynqmp_ipi: zynqmp_ipi {
+	zynqmp_ipi: zynqmp-ipi {
 		bootph-all;
 		compatible = "xlnx,zynqmp-ipi-mailbox";
 		interrupt-parent = <&gic>;
@@ -194,12 +194,12 @@ zynqmp_power: zynqmp-power {
 				mbox-names = "tx", "rx";
 			};
 
-			nvmem_firmware {
+			nvmem-firmware {
 				compatible = "xlnx,zynqmp-nvmem-fw";
 				#address-cells = <1>;
 				#size-cells = <1>;
 
-				soc_revision: soc_revision@0 {
+				soc_revision: soc-revision@0 {
 					reg = <0x0 0x4>;
 				};
 			};
Signature · 1 line
2.36.1
#2 lore raw

Re: [PATCH 1/6] arm64: xilinx: Do not use '_' in DT node names

Hi Michal,

Thank you for the patch.

Quoted 8 lines · Michal Simek

Character '_' not recommended in node name. Use '-' instead. Pretty much run seds below for node names. s/zynqmp_ipi/zynqmp-ipi/ s/nvmem_firmware/nvmem-firmware/ s/soc_revision/soc-revision/
s/si5335_/si5335-/

The si5335 nodes may be better named after the clock name instead of the component type, but that's nitpicking.

Quoted 41 lines

---

 arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 4 ++--
 arch/arm64/boot/dts/xilinx/zynqmp.dtsi            | 6 +++---
 2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts +2 -2
index d0091d3cb764..52f998c22538 100644
@@ -123,13 +123,13 @@ ina226 {
 		io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
 	};
 
-	si5335_0: si5335_0 { /* clk0_usb - u23 */
+	si5335_0: si5335-0 { /* clk0_usb - u23 */
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <26000000>;
 	};
 
-	si5335_1: si5335_1 { /* clk1_dp - u23 */
+	si5335_1: si5335-1 { /* clk1_dp - u23 */
 		compatible = "fixed-clock";
 		#clock-cells = <0>;
 		clock-frequency = <27000000>;
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +1 -1
index b61fc99cd911..e50e95cbe817 100644
@@ -129,7 +129,7 @@ rproc_1_fw_image: memory@3ef00000 {
 		};
 	};
 
-	zynqmp_ipi: zynqmp_ipi {
+	zynqmp_ipi: zynqmp-ipi {
 		bootph-all;
 		compatible = "xlnx,zynqmp-ipi-mailbox";
 		interrupt-parent = <&gic>;
@@ -194,12 +194,12 @@ zynqmp_power: zynqmp-power {
 				mbox-names = "tx", "rx";

arch/arm64/boot/dts/xilinx/zynqmp.dtsi zynqmp_power: zynqmp-power { · line 202

Quoted 10 lines
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
 			};
 
-			nvmem_firmware {
+			nvmem-firmware {
 				compatible = "xlnx,zynqmp-nvmem-fw";
 				#address-cells = <1>;
 				#size-cells = <1>;
 
-				soc_revision: soc_revision@0 {
+				soc_revision: soc-revision@0 {

Unless I'm mistaken, this will change the userspace API, as it changes the nvmem cell name. Is it an issue ?

Quoted 3 lines
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +0 -0
 					reg = <0x0 0x4>;
 				};
 			};
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#3 lore raw

Re: [PATCH 1/6] arm64: xilinx: Do not use '_' in DT node names

Quoted 12 lines · Laurent Pinchart

Hi Michal,

Thank you for the patch.

Quoted 7 lines · Michal Simek

Character '_' not recommended in node name. Use '-' instead. Pretty much run seds below for node names. s/zynqmp_ipi/zynqmp-ipi/ s/nvmem_firmware/nvmem-firmware/ s/soc_revision/soc-revision/
s/si5335_/si5335-/

Quoted 4 lines
Quoted 1 line

The si5335 nodes may be better named after the clock name instead of the component type, but that's nitpicking.

I don't know what's the guidance on this. fixed-clock.yaml is using generic "clock" name. I have no problem to do it if this is recommended way to go.

Quoted 49 lines
Quoted 49 lines

---

  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 4 ++--
  arch/arm64/boot/dts/xilinx/zynqmp.dtsi            | 6 +++---
  2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts +2 -2
index d0091d3cb764..52f998c22538 100644
@@ -123,13 +123,13 @@ ina226 {
  		io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
  	};
 
-	si5335_0: si5335_0 { /* clk0_usb - u23 */
+	si5335_0: si5335-0 { /* clk0_usb - u23 */
  		compatible = "fixed-clock";
  		#clock-cells = <0>;
  		clock-frequency = <26000000>;
  	};
 
-	si5335_1: si5335_1 { /* clk1_dp - u23 */
+	si5335_1: si5335-1 { /* clk1_dp - u23 */
  		compatible = "fixed-clock";
  		#clock-cells = <0>;
  		clock-frequency = <27000000>;
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
index b61fc99cd911..e50e95cbe817 100644
@@ -129,7 +129,7 @@ rproc_1_fw_image: memory@3ef00000 {
  		};
  	};
 
-	zynqmp_ipi: zynqmp_ipi {
+	zynqmp_ipi: zynqmp-ipi {
  		bootph-all;
  		compatible = "xlnx,zynqmp-ipi-mailbox";
  		interrupt-parent = <&gic>;
@@ -194,12 +194,12 @@ zynqmp_power: zynqmp-power {
  				mbox-names = "tx", "rx";
  			};
 
-			nvmem_firmware {
+			nvmem-firmware {
  				compatible = "xlnx,zynqmp-nvmem-fw";
  				#address-cells = <1>;
  				#size-cells = <1>;
 
Quoted 5 lines

arch/arm64/boot/dts/xilinx/zynqmp.dtsi zynqmp_power: zynqmp-power { · line 202

Quoted 2 lines
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +1 -1
-				soc_revision: soc_revision@0 {
+				soc_revision: soc-revision@0 {

Unless I'm mistaken, this will change the userspace API, as it changes the nvmem cell name. Is it an issue ?

Based on
https://docs.kernel.org/driver-api/nvmem.html#userspace-binary-interface

The only interface to user space is via nvmem file which has all of them together. And reference to this node is the same if used inside kernel itself. That's why I think there is no change in connection to user space API from nvmem side. Of course entry is listed differently if you parse DT names.

Thanks,
Michal

#4 lore raw

Re: [PATCH 1/6] arm64: xilinx: Do not use '_' in DT node names

Quoted 79 lines · Michal Simek
Quoted 12 lines · Laurent Pinchart

Hi Michal,

Thank you for the patch.

Quoted 7 lines · Michal Simek

Character '_' not recommended in node name. Use '-' instead. Pretty much run seds below for node names. s/zynqmp_ipi/zynqmp-ipi/ s/nvmem_firmware/nvmem-firmware/ s/soc_revision/soc-revision/
s/si5335_/si5335-/

Quoted 4 lines
Quoted 1 line

The si5335 nodes may be better named after the clock name instead of the component type, but that's nitpicking.

I don't know what's the guidance on this. fixed-clock.yaml is using generic "clock" name. I have no problem to do it if this is recommended way to go.

Quoted 49 lines
Quoted 49 lines

---

  arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts | 4 ++--
  arch/arm64/boot/dts/xilinx/zynqmp.dtsi            | 6 +++---
  2 files changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-zcu100-revC.dts +2 -2
index d0091d3cb764..52f998c22538 100644
@@ -123,13 +123,13 @@ ina226 {
  		io-channels = <&u35 0>, <&u35 1>, <&u35 2>, <&u35 3>;
  	};
 
-	si5335_0: si5335_0 { /* clk0_usb - u23 */
+	si5335_0: si5335-0 { /* clk0_usb - u23 */
  		compatible = "fixed-clock";
  		#clock-cells = <0>;
  		clock-frequency = <26000000>;
  	};
 
-	si5335_1: si5335_1 { /* clk1_dp - u23 */
+	si5335_1: si5335-1 { /* clk1_dp - u23 */
  		compatible = "fixed-clock";
  		#clock-cells = <0>;
  		clock-frequency = <27000000>;
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +2 -2
index b61fc99cd911..e50e95cbe817 100644
@@ -129,7 +129,7 @@ rproc_1_fw_image: memory@3ef00000 {
  		};
  	};
 
-	zynqmp_ipi: zynqmp_ipi {
+	zynqmp_ipi: zynqmp-ipi {
  		bootph-all;
  		compatible = "xlnx,zynqmp-ipi-mailbox";
  		interrupt-parent = <&gic>;
@@ -194,12 +194,12 @@ zynqmp_power: zynqmp-power {
  				mbox-names = "tx", "rx";
  			};
 
-			nvmem_firmware {
+			nvmem-firmware {
  				compatible = "xlnx,zynqmp-nvmem-fw";
  				#address-cells = <1>;
  				#size-cells = <1>;
 
Quoted 5 lines

arch/arm64/boot/dts/xilinx/zynqmp.dtsi zynqmp_power: zynqmp-power { · line 202

Quoted 2 lines
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +1 -1
-				soc_revision: soc_revision@0 {
+				soc_revision: soc-revision@0 {

Unless I'm mistaken, this will change the userspace API, as it changes the nvmem cell name. Is it an issue ?

Quoted 7 lines

Based on
https://docs.kernel.org/driver-api/nvmem.html#userspace-binary-interface

The only interface to user space is via nvmem file which has all of them together. And reference to this node is the same if used inside kernel itself. That's why I think there is no change in connection to user space API from nvmem side. Of course entry is listed differently if you parse DT names.

Ah my bad. It should be fine then, as long as nobody in the kernel calls nvmem_cell_get("soc_revision"), which I didn't find any occurrence of.

Signature · 3 lines
Regards,

Laurent Pinchart
author maintainer
#5 lore raw

PATCH 2/6 arm64: xilinx: Use lower case for partition address

In reply to Michal Simek

Lower case should be used for register address. Issue is reported as:
flash@0: partitions: Unevaluated properties are not allowed ('partition@22A0000' was unexpected)

---

 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +2 -2
index c4774a42d5fc..157dcb4a27a8 100644
@@ -222,9 +222,9 @@ partition@2280000 {
 				label = "Secure OS Storage";
 				reg = <0x2280000 0x20000>; /* 128KB */
 			};
-			partition@22A0000 {
+			partition@22a0000 {
 				label = "User";
-				reg = <0x22A0000 0x1d60000>; /* 29.375 MB */
+				reg = <0x22a0000 0x1d60000>; /* 29.375 MB */
 			};
 		};
 	};
Signature · 1 line
2.36.1
Reviewed-by on v1 2/6
#6 lore raw

Re: [PATCH 2/6] arm64: xilinx: Use lower case for partition address

Hi Michal,

Thank you for the patch.

Quoted 6 lines · Michal Simek

Lower case should be used for register address. Issue is reported as:
flash@0: partitions: Unevaluated properties are not allowed ('partition@22A0000' was unexpected)

Quoted 21 lines

---

 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +2 -2
index c4774a42d5fc..157dcb4a27a8 100644
@@ -222,9 +222,9 @@ partition@2280000 {
 				label = "Secure OS Storage";
 				reg = <0x2280000 0x20000>; /* 128KB */
 			};
-			partition@22A0000 {
+			partition@22a0000 {
 				label = "User";
-				reg = <0x22A0000 0x1d60000>; /* 29.375 MB */
+				reg = <0x22a0000 0x1d60000>; /* 29.375 MB */
 			};
 		};
 	};
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#7 lore raw

PATCH 3/6 arm64: xilinx: Remove mt25qu512a compatible string from SOM

In reply to Michal Simek

mt25qu512a is not documented in DT binding that's why remove it.

---

 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +1 -1
index 157dcb4a27a8..cd5cd7f3b5ce 100644
@@ -131,7 +131,7 @@ mux {
 &qspi { /* MIO 0-5 - U143 */
 	status = "okay";
 	spi_flash: flash@0 { /* MT25QU512A */
-		compatible = "mt25qu512a", "jedec,spi-nor"; /* 64MB */
+		compatible = "jedec,spi-nor"; /* 64MB */
 		#address-cells = <1>;
 		#size-cells = <1>;
 		reg = <0>;
Signature · 1 line
2.36.1
#8 lore raw

Re: [PATCH 3/6] arm64: xilinx: Remove mt25qu512a compatible string from SOM

Hi Michal,

Thank you for the patch.

Quoted 1 line · Michal Simek

mt25qu512a is not documented in DT binding that's why remove it.

How about adding the compatible string to the bindings instead ?

Quoted 19 lines

---

 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +1 -1
index 157dcb4a27a8..cd5cd7f3b5ce 100644
@@ -131,7 +131,7 @@ mux {
 &qspi { /* MIO 0-5 - U143 */
 	status = "okay";
 	spi_flash: flash@0 { /* MT25QU512A */
-		compatible = "mt25qu512a", "jedec,spi-nor"; /* 64MB */
+		compatible = "jedec,spi-nor"; /* 64MB */
 		#address-cells = <1>;
 		#size-cells = <1>;
 		reg = <0>;
Signature · 8 lines
Regards,

Laurent Pinchart

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
author maintainer
#9 lore raw

Re: [PATCH 3/6] arm64: xilinx: Remove mt25qu512a compatible string from SOM

Hi Laurent,

Quoted 15 lines · Laurent Pinchart

Hi Michal,

Thank you for the patch.

Quoted 1 line · Michal Simek

mt25qu512a is not documented in DT binding that's why remove it.

How about adding the compatible string to the bindings instead ?

Quoted 6 lines

---

  arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
Quoted 14 lines

arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts mux { · line 137

Quoted 13 lines
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +1 -1
index 157dcb4a27a8..cd5cd7f3b5ce 100644
@@ -131,7 +131,7 @@ mux {
  &qspi { /* MIO 0-5 - U143 */
  	status = "okay";
  	spi_flash: flash@0 { /* MT25QU512A */
-		compatible = "mt25qu512a", "jedec,spi-nor"; /* 64MB */
+		compatible = "jedec,spi-nor"; /* 64MB */
  		#address-cells = <1>;
  		#size-cells = <1>;
  		reg = <0>;

arch/arm64/boot/dts/freescale/fsl-ls1046a-frwy.dts is using only jedec,spi-nor

Renesas and our SOM are using it.

arch/arm64/boot/dts/renesas/rzg2l-smarc-som.dtsi:310:           compatible = "micron,mt25qu512a", "jedec,spi-nor";
arch/arm64/boot/dts/renesas/rzg2lc-smarc-som.dtsi:239:          compatible = "micron,mt25qu512a", "jedec,spi-nor";
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts:136:          compatible = "micron,mt25qu512a", "jedec,spi-nor"; /* 64MB */

Rob/Krzysztof/Conor: What's the recommendation? I see 02g variant listed and micron-st also has 256a/512a variants.

Thanks,
Michal

author maintainer
#10 lore raw

PATCH 4/6 arm64: xilinx: Put ethernet phys to mdio node

In reply to Michal Simek

All zynqmp boards have been already described via mdio node that's why also convert zc1751. With using mdio node there is an option to add reset property for the whole mdio bus.

---

 .../dts/xilinx/zynqmp-zc1751-xm015-dc1.dts    |  8 ++++--
 .../dts/xilinx/zynqmp-zc1751-xm016-dc2.dts    | 16 +++++++-----
 .../dts/xilinx/zynqmp-zc1751-xm017-dc3.dts    |  8 ++++--
 .../dts/xilinx/zynqmp-zc1751-xm018-dc4.dts    | 26 +++++++++++--------
 .../dts/xilinx/zynqmp-zc1751-xm019-dc5.dts    |  8 ++++--
 5 files changed, 43 insertions(+), 23 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm015-dc1.dts +6 -2
index e821d55d8d5a..73491626e01e 100644
@@ -98,8 +98,12 @@ &gem3 {
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gem3_default>;
-	phy0: ethernet-phy@0 {
-		reg = <0>;
+	mdio: mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		phy0: ethernet-phy@0 {
+			reg = <0>;
+		};
 	};
 };
 
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm016-dc2.dts +10 -6
index b59e11316b4b..f767708fb50d 100644
@@ -91,12 +91,16 @@ &gem2 {
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gem2_default>;
-	phy0: ethernet-phy@5 {
-		reg = <5>;
-		ti,rx-internal-delay = <0x8>;
-		ti,tx-internal-delay = <0xa>;
-		ti,fifo-depth = <0x1>;
-		ti,dp83867-rxctrl-strap-quirk;
+	mdio: mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		phy0: ethernet-phy@5 {
+			reg = <5>;
+			ti,rx-internal-delay = <0x8>;
+			ti,tx-internal-delay = <0xa>;
+			ti,fifo-depth = <0x1>;
+			ti,dp83867-rxctrl-strap-quirk;
+		};
 	};
 };
 
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm017-dc3.dts +6 -2
index 38b0a312171b..f553b317e6b2 100644
@@ -88,8 +88,12 @@ &gem0 {
 	status = "okay";
 	phy-handle = <&phy0>;
 	phy-mode = "rgmii-id";
-	phy0: ethernet-phy@0 { /* VSC8211 */
-		reg = <0>;
+	mdio: mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		phy0: ethernet-phy@0 { /* VSC8211 */
+			reg = <0>;
+		};
 	};
 };
 
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm018-dc4.dts +15 -11
index 6636e76545a5..6ec1d9813973 100644
@@ -116,17 +116,21 @@ &gem0 {
 	status = "okay";
 	phy-mode = "rgmii-id";
 	phy-handle = <&ethernet_phy0>;
-	ethernet_phy0: ethernet-phy@0 { /* Marvell 88e1512 */
-		reg = <0>;
-	};
-	ethernet_phy7: ethernet-phy@7 { /* Vitesse VSC8211 */
-		reg = <7>;
-	};
-	ethernet_phy3: ethernet-phy@3 { /* Realtek RTL8211DN */
-		reg = <3>;
-	};
-	ethernet_phy8: ethernet-phy@8 { /* Vitesse VSC8211 */
-		reg = <8>;
+	mdio: mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		ethernet_phy0: ethernet-phy@0 { /* Marvell 88e1512 */
+			reg = <0>;
+		};
+		ethernet_phy7: ethernet-phy@7 { /* Vitesse VSC8211 */
+			reg = <7>;
+		};
+		ethernet_phy3: ethernet-phy@3 { /* Realtek RTL8211DN */
+			reg = <3>;
+		};
+		ethernet_phy8: ethernet-phy@8 { /* Vitesse VSC8211 */
+			reg = <8>;
+		};
 	};
 };
 
arch/arm64/boot/dts/xilinx/zynqmp-zc1751-xm019-dc5.dts +6 -2
index 0d2ea9c09a0a..b1857e17ab7e 100644
@@ -77,8 +77,12 @@ &gem1 {
 	phy-mode = "rgmii-id";
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_gem1_default>;
-	phy0: ethernet-phy@0 {
-		reg = <0>;
+	mdio: mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		phy0: ethernet-phy@0 {
+			reg = <0>;
+		};
 	};
 };
 
Signature · 1 line
2.36.1
author maintainer
#11 lore raw

PATCH 5/6 arm64: xilinx: Remove address/size-cells from flash node

In reply to Michal Simek

Partitions are described via fixed-partitions that's why there is no need to have address/size-cells in flash node.

---

 arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts | 2 --
 1 file changed, 2 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp-sm-k26-revA.dts +0 -2
index cd5cd7f3b5ce..51622896b1b1 100644
@@ -132,8 +132,6 @@ &qspi { /* MIO 0-5 - U143 */
 	status = "okay";
 	spi_flash: flash@0 { /* MT25QU512A */
 		compatible = "jedec,spi-nor"; /* 64MB */
-		#address-cells = <1>;
-		#size-cells = <1>;
 		reg = <0>;
 		spi-tx-bus-width = <4>;
 		spi-rx-bus-width = <4>;
Signature · 1 line
2.36.1
author maintainer
#12 lore raw

PATCH 6/6 arm64: xilinx: Remove address/size-cells from gem nodes

In reply to Michal Simek

Some boards are using one mdio bus which holds multiple phys and also boards are using mdio node for bus description. That's why there are cases where address/size-cells are unnecessary which is also reported by make W=1 dtbs. That's why remove them from zynqmp.dtsi and let board DTSes to handle it based on used description.

Error log:
/axi/ethernet@ff0e0000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

---

 arch/arm64/boot/dts/xilinx/zynqmp.dtsi | 8 --------
 1 file changed, 8 deletions(-)
arch/arm64/boot/dts/xilinx/zynqmp.dtsi +0 -8
index e50e95cbe817..f5e1eb8cb3b7 100644
@@ -584,8 +584,6 @@ gem0: ethernet@ff0b0000 {
 				     <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
 			reg = <0x0 0xff0b0000 0x0 0x1000>;
 			clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
-			#address-cells = <1>;
-			#size-cells = <0>;
 			iommus = <&smmu 0x874>;
 			power-domains = <&zynqmp_firmware PD_ETH_0>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM0>;
@@ -600,8 +598,6 @@ gem1: ethernet@ff0c0000 {
 				     <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
 			reg = <0x0 0xff0c0000 0x0 0x1000>;
 			clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
-			#address-cells = <1>;
-			#size-cells = <0>;
 			iommus = <&smmu 0x875>;
 			power-domains = <&zynqmp_firmware PD_ETH_1>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM1>;
@@ -616,8 +612,6 @@ gem2: ethernet@ff0d0000 {
 				     <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
 			reg = <0x0 0xff0d0000 0x0 0x1000>;
 			clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
-			#address-cells = <1>;
-			#size-cells = <0>;
 			iommus = <&smmu 0x876>;
 			power-domains = <&zynqmp_firmware PD_ETH_2>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM2>;
@@ -632,8 +626,6 @@ gem3: ethernet@ff0e0000 {
 				     <GIC_SPI 63 IRQ_TYPE_LEVEL_HIGH>;
 			reg = <0x0 0xff0e0000 0x0 0x1000>;
 			clock-names = "pclk", "hclk", "tx_clk", "rx_clk", "tsu_clk";
-			#address-cells = <1>;
-			#size-cells = <0>;
 			iommus = <&smmu 0x877>;
 			power-domains = <&zynqmp_firmware PD_ETH_3>;
 			resets = <&zynqmp_reset ZYNQMP_RESET_GEM3>;
Signature · 1 line
2.36.1
author maintainer Applied
#13 lore raw
In reply to Michal Simek
Quoted 18 lines · Michal Simek

Hi,

make W=1 dtbs is reporting couple of issues which this series is going to address. There is also one more changes related to removing additional compatible string which is reported by dtbs_check.

Thanks,
Michal

Michal Simek (6):
arm64: xilinx: Do not use '_' in DT node names
arm64: xilinx: Use lower case for partition address
arm64: xilinx: Remove mt25qu512a compatible string from SOM
arm64: xilinx: Put ethernet phys to mdio node
arm64: xilinx: Remove address/size-cells from flash node
arm64: xilinx: Remove address/size-cells from gem nodes

Quoted 10 lines
  .../boot/dts/xilinx/zynqmp-sm-k26-revA.dts    |  8 +++---
  .../dts/xilinx/zynqmp-zc1751-xm015-dc1.dts    |  8 ++++--
  .../dts/xilinx/zynqmp-zc1751-xm016-dc2.dts    | 16 +++++++-----
  .../dts/xilinx/zynqmp-zc1751-xm017-dc3.dts    |  8 ++++--
  .../dts/xilinx/zynqmp-zc1751-xm018-dc4.dts    | 26 +++++++++++--------
  .../dts/xilinx/zynqmp-zc1751-xm019-dc5.dts    |  8 ++++--
  .../boot/dts/xilinx/zynqmp-zcu100-revC.dts    |  4 +--
  arch/arm64/boot/dts/xilinx/zynqmp.dtsi        | 14 +++-------
  8 files changed, 51 insertions(+), 41 deletions(-)

Applied.
M