Skip to contentSkip to conversation

ARM: dts: dove.dtsi: Move ethphy to fix schema error

PATCH In review Michał Grzelak 3 participants 3 messages Dec 29, 2022 – Jan 31, 2023 Device tree bindings

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 ARM: dts: dove.dtsi: Move ethphy to fix schema error

Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml gives following warnings:
mdio-bus@72004: Unevaluated properties are not allowed ('ethernet-phy' was unexpected)

	arch/arm/boot/dts/dove-cubox.dtb
	arch/arm/boot/dts/dove-cubox-es.dtb
	arch/arm/boot/dts/dove-d2plug.dtb
	arch/arm/boot/dts/dove-d2plug.dtb
	arch/arm/boot/dts/dove-dove-db.dtb
	arch/arm/boot/dts/dove-d3plug.dtb
	arch/arm/boot/dts/dove-sbc-a510.dtb

As every subnode of mdio is expected to have an @X, ethernet-phy subnode in dove.dtsi doesn't have one. Fix these errors by moving ethernet-phy into relevant .dts files with correct @<reg address>.

---
Changelog:
v2->v3
- edit commit message according to
https://lore.kernel.org/all/[email protected]/

v1->v2
- remove patternProperties: from .yaml
- move ethphy from dove.dtsi into relevant .dts files

 arch/arm/boot/dts/dove-cm-a510.dtsi | 14 +++++++++++---
 arch/arm/boot/dts/dove-cubox.dts    | 15 +++++++++++----
 arch/arm/boot/dts/dove.dtsi         |  5 -----
 3 files changed, 22 insertions(+), 12 deletions(-)
arch/arm/boot/dts/dove-cm-a510.dtsi +11 -3
index 9b9dfbe07be4..2f2f0a4bf004 100644
@@ -124,9 +124,17 @@ wifi_power: regulator@1 {
 };
 
 /* Optional RTL8211D GbE PHY on SMI address 0x03 */
-&ethphy {
-	reg = <3>;
-	status = "disabled";
+&mdio {
+	ethphy: ethernet-phy@3 {
+		reg = <3>;
+		status = "disabled";
+	};
+};
+
+&eth {
+	ethernet-port@0 {
+		phy-handle = <&ethphy>;
+	};
 };
 
 &i2c0 {
arch/arm/boot/dts/dove-cubox.dts +11 -4
index 2639b9fe0ab4..170c14d7f5c8 100644
@@ -72,11 +72,18 @@ gpu-subsystem {
 &uart0 { status = "okay"; };
 &sata0 { status = "okay"; };
 &mdio { status = "okay"; };
-&eth { status = "okay"; };
+&eth {
+	status = "okay";
+	ethernet-port@0 {
+		phy-handle = <&ethphy>;
+	};
+};
 
-&ethphy {
-	compatible = "marvell,88e1310";
-	reg = <1>;
+&mdio {
+	ethphy: ethernet-phy@1 {
+		compatible = "marvell,88e1310";
+		reg = <1>;
+	};
 };
 
 &gpu {
arch/arm/boot/dts/dove.dtsi +0 -5
index 00a36fba2fd2..c7a3fa33c56e 100644
@@ -382,7 +382,6 @@ ethernet-port@0 {
 					interrupts = <29>;
 					/* overwrite MAC address in bootloader */
 					local-mac-address = [00 00 00 00 00 00];
-					phy-handle = <&ethphy>;
 				};
 			};
 
@@ -394,10 +393,6 @@ mdio: mdio-bus@72004 {
 				interrupts = <30>;
 				clocks = <&gate_clk 2>;
 				status = "disabled";
-
-				ethphy: ethernet-phy {
-					/* set phy address in board file */
-				};
 			};
 
 			sdio0: sdio-host@92000 {
Signature · 1 line
2.34.1
Reviewed-by on v3 1/1
#1 lore raw
Quoted 11 lines · Michał Grzelak

Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml gives following warnings:
mdio-bus@72004: Unevaluated properties are not allowed ('ethernet-phy' was unexpected)

	arch/arm/boot/dts/dove-cubox.dtb
	arch/arm/boot/dts/dove-cubox-es.dtb
	arch/arm/boot/dts/dove-d2plug.dtb
	arch/arm/boot/dts/dove-d2plug.dtb
	arch/arm/boot/dts/dove-dove-db.dtb
	arch/arm/boot/dts/dove-d3plug.dtb
	arch/arm/boot/dts/dove-sbc-a510.dtb
Quoted 5 lines

As every subnode of mdio is expected to have an @X, ethernet-phy subnode in dove.dtsi doesn't have one. Fix these errors by moving ethernet-phy into relevant .dts files with correct @<reg address>.

Andrew

#2 lore raw
In reply to Michał Grzelak
Quoted 11 lines · Michał Grzelak

Running 'make dtbs_check' with schema in net/marvell,orion-mdio.yaml gives following warnings:
mdio-bus@72004: Unevaluated properties are not allowed ('ethernet-phy' was unexpected)

	arch/arm/boot/dts/dove-cubox.dtb
	arch/arm/boot/dts/dove-cubox-es.dtb
	arch/arm/boot/dts/dove-d2plug.dtb
	arch/arm/boot/dts/dove-d2plug.dtb
	arch/arm/boot/dts/dove-dove-db.dtb
	arch/arm/boot/dts/dove-d3plug.dtb
	arch/arm/boot/dts/dove-sbc-a510.dtb
Quoted 5 lines

As every subnode of mdio is expected to have an @X, ethernet-phy subnode in dove.dtsi doesn't have one. Fix these errors by moving ethernet-phy into relevant .dts files with correct @<reg address>.

Applied on mvebu/dt

Thanks,

Gregory

Quoted 93 lines

---
Changelog:
v2->v3
- edit commit message according to
https://lore.kernel.org/all/[email protected]/

v1->v2
- remove patternProperties: from .yaml
- move ethphy from dove.dtsi into relevant .dts files

 arch/arm/boot/dts/dove-cm-a510.dtsi | 14 +++++++++++---
 arch/arm/boot/dts/dove-cubox.dts    | 15 +++++++++++----
 arch/arm/boot/dts/dove.dtsi         |  5 -----
 3 files changed, 22 insertions(+), 12 deletions(-)
arch/arm/boot/dts/dove-cm-a510.dtsi +11 -3
index 9b9dfbe07be4..2f2f0a4bf004 100644
@@ -124,9 +124,17 @@ wifi_power: regulator@1 {
 };
 
 /* Optional RTL8211D GbE PHY on SMI address 0x03 */
-&ethphy {
-	reg = <3>;
-	status = "disabled";
+&mdio {
+	ethphy: ethernet-phy@3 {
+		reg = <3>;
+		status = "disabled";
+	};
+};
+
+&eth {
+	ethernet-port@0 {
+		phy-handle = <&ethphy>;
+	};
 };
 
 &i2c0 {
arch/arm/boot/dts/dove-cubox.dts +11 -4
index 2639b9fe0ab4..170c14d7f5c8 100644
@@ -72,11 +72,18 @@ gpu-subsystem {
 &uart0 { status = "okay"; };
 &sata0 { status = "okay"; };
 &mdio { status = "okay"; };
-&eth { status = "okay"; };
+&eth {
+	status = "okay";
+	ethernet-port@0 {
+		phy-handle = <&ethphy>;
+	};
+};
 
-&ethphy {
-	compatible = "marvell,88e1310";
-	reg = <1>;
+&mdio {
+	ethphy: ethernet-phy@1 {
+		compatible = "marvell,88e1310";
+		reg = <1>;
+	};
 };
 
 &gpu {
arch/arm/boot/dts/dove.dtsi +0 -5
index 00a36fba2fd2..c7a3fa33c56e 100644
@@ -382,7 +382,6 @@ ethernet-port@0 {
 					interrupts = <29>;
 					/* overwrite MAC address in bootloader */
 					local-mac-address = [00 00 00 00 00 00];
-					phy-handle = <&ethphy>;
 				};
 			};
 
@@ -394,10 +393,6 @@ mdio: mdio-bus@72004 {
 				interrupts = <30>;
 				clocks = <&gate_clk 2>;
 				status = "disabled";
-
-				ethphy: ethernet-phy {
-					/* set phy address in board file */
-				};
 			};
 
 			sdio0: sdio-host@92000 {
Signature · 1 line
2.34.1
Signature · 3 lines
Gregory Clement, Bootlin
Embedded Linux and Kernel engineering
http://bootlin.com