[PATCH v1] riscv: dts: renesas: clean up dtbs_check W=1 warning due to empty phy node

Conor Dooley conor.dooley at microchip.com
Wed Jul 12 01:14:44 PDT 2023


dtbs_check w/ W=1 complains:
Warning (unit_address_vs_reg): /soc/ethernet at 11c20000/ethernet-phy at 7: node has a unit name, but no reg or ranges property
Warning (avoid_unnecessary_addr_size): /soc/ethernet at 11c20000: unnecessary #address-cells/#size-cells without "ranges" or child "reg" property

The ethernet at 11c20000 node is guarded by an `#if (!SW_ET0_EN_N)` in
rzg2ul-smarc-som.dtsi, where the phy child node is added. In
rzfive-smarc-som.dtsi, the ethernet node is marked disabled & the
interrupt properties are deleted from the phy child node. As a result,
the produced dts looks like:
	ethernet at 11c20000 {
		compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
		/* snip */
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "disabled";

		ethernet-phy at 7 {
		};
	};

Adding a corresponding `#if (!SW_ET0_EN_N)` around the node in
rzfive-smarc-som.dtsi avoids the complaint, as the empty child node is
not added:
	ethernet at 11c20000 {
		compatible = "renesas,r9a07g043-gbeth\0renesas,rzg2l-gbeth";
		/* snip */
		#address-cells = <0x01>;
		#size-cells = <0x00>;
		status = "disabled";
	};

Signed-off-by: Conor Dooley <conor.dooley at microchip.com>
---
CC: Geert Uytterhoeven <geert+renesas at glider.be>
CC: Magnus Damm <magnus.damm at gmail.com>
CC: Prabhakar Mahadev Lad <prabhakar.mahadev-lad.rj at bp.renesas.com>
CC: Rob Herring <robh+dt at kernel.org>
CC: Krzysztof Kozlowski <krzysztof.kozlowski+dt at linaro.org>
CC: Conor Dooley <conor+dt at kernel.org>
CC: linux-renesas-soc at vger.kernel.org
CC: devicetree at vger.kernel.org
CC: linux-riscv at lists.infradead.org
CC: linux-kernel at vger.kernel.org
---
 arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi b/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi
index d6f18754eb5d..c62debc7ca7e 100644
--- a/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi
+++ b/arch/riscv/boot/dts/renesas/rzfive-smarc-som.dtsi
@@ -22,6 +22,7 @@ &dmac {
 	status = "disabled";
 };
 
+#if (!SW_ET0_EN_N)
 &eth0 {
 	status = "disabled";
 
@@ -30,6 +31,7 @@ phy0: ethernet-phy at 7 {
 		/delete-property/ interrupts;
 	};
 };
+#endif
 
 &eth1 {
 	status = "disabled";
-- 
2.40.1




More information about the linux-riscv mailing list