Skip to contentSkip to conversation

colibri_vf: fix ethernet by adding explicit phy node

PATCH Superseded Marcel Ziswiler 4 participants 4 messages Mar 28, 2019 – Apr 26, 2019 Arm (32-bit)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 colibri_vf: fix ethernet by adding explicit phy node

From: Marcel Ziswiler <[email protected]>

The implicit fallback mechanism for searching the whole MDIO bus for at least one PHY has been gone with the following commit b882005a18de ("drivers/net/fec: phy_init: remove redundant logic"). This lead to the Ethernet driver erroring out as follows:

Net:   Could not get PHY for FEC0: addr -19
eth-1: fec at 400d1000

Colibri VFxx # dhcp
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
No ethernet found.
Could not get PHY for FEC0: addr -19
Colibri VFxx #

This commit adds an explicit PHY node which makes it work again.

---

 arch/arm/dts/vf-colibri.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/vf-colibri.dtsi +13 -0
index 5ce17076e9..91ca4e4ddd 100644
@@ -60,11 +60,24 @@
 	status = "okay";
 };
 
+/* Ethernet */
 &fec1 {
 	phy-mode = "rmii";
+	phy-handle = <&ethphy1>;
 	pinctrl-names = "default";
 	pinctrl-0 = <&pinctrl_fec1>;
 	status = "okay";
+
+	mdio {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		ethphy1: ethernet-phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			max-speed = <100>;
+			reg = <1>;
+		};
+	};
 };
 
 &i2c0 {
Signature · 1 line
2.20.1
#1 lore raw

PATCH 1/1 colibri_vf: fix ethernet by adding explicit phy node

Marcel Ziswiler <[email protected]> schrieb am 28.03.2019 23:24:50:

Quoted 3 lines

Von: Marcel Ziswiler <[email protected]>
An: u-boot at lists.denx.de
Kopie: Hannes Schmelzer <[email protected]>, Marcel

Ziswiler

Quoted 1 line

<[email protected]>, Albert Aribaud

<[email protected]>,

Quoted 22 lines

Stefan Agner <[email protected]>
Datum: 28.03.2019 23:25
Betreff: [PATCH v1] colibri_vf: fix ethernet by adding explicit phy node

From: Marcel Ziswiler <[email protected]>

The implicit fallback mechanism for searching the whole MDIO bus for at least one PHY has been gone with the following commit b882005a18de ("drivers/net/fec: phy_init: remove redundant logic"). This lead to the Ethernet driver erroring out as follows:

Net:   Could not get PHY for FEC0: addr -19
eth-1: fec at 400d1000

Colibri VFxx # dhcp
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
No ethernet found.
Could not get PHY for FEC0: addr -19
Colibri VFxx #

Quoted 5 lines

This commit adds an explicit PHY node which makes it work again.

---

Looks good to me,
now the hardware is fully defined, which should be the normal case.

I will provide today a patch which "brings back" the fallback mechanism within the
"phy-subsystem". This should be the starting point for the disussion if we need such
fallback or if we want describe our hardware.

#2 lore raw

PATCH 1/1 colibri_vf: fix ethernet by adding explicit phy node

In reply to Marcel Ziswiler
Quoted 64 lines · Marcel Ziswiler

From: Marcel Ziswiler <[email protected]>

The implicit fallback mechanism for searching the whole MDIO bus for at least one PHY has been gone with the following commit b882005a18de ("drivers/net/fec: phy_init: remove redundant logic"). This lead to the Ethernet driver erroring out as follows:

Net:   Could not get PHY for FEC0: addr -19
eth-1: fec at 400d1000

Colibri VFxx # dhcp
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
No ethernet found.
Could not get PHY for FEC0: addr -19
Colibri VFxx #

This commit adds an explicit PHY node which makes it work again.

---

 arch/arm/dts/vf-colibri.dtsi | 13 +++++++++++++
 1 file changed, 13 insertions(+)
arch/arm/dts/vf-colibri.dtsi +13 -1
index 5ce17076e9..91ca4e4ddd 100644
@@ -60,11 +60,24 @@
        status = "okay";
 };
 
+/* Ethernet */
 &fec1 {
        phy-mode = "rmii";
+       phy-handle = <&ethphy1>;
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_fec1>;
        status = "okay";
+
+       mdio {
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               ethphy1: ethernet-phy at 1 {
+                       compatible = "ethernet-phy-ieee802.3-c22";
+                       max-speed = <100>;
+                       reg = <1>;
+               };
+       };
 };
 
 &i2c0 {
--

2.20.1

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
https://lists.denx.de/listinfo/u-boot

#3 lore raw

PATCH 1/1 colibri_vf: fix ethernet by adding explicit phy node

In reply to Marcel Ziswiler
Quoted 16 lines

From: Marcel Ziswiler <[email protected]>
The implicit fallback mechanism for searching the whole MDIO bus for at least one PHY has been gone with the following commit b882005a18de ("drivers/net/fec: phy_init: remove redundant logic"). This lead to the Ethernet driver erroring out as follows:

Net:   Could not get PHY for FEC0: addr -19
eth-1: fec at 400d1000

Colibri VFxx # dhcp
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
Could not get PHY for FEC0: addr -19
No ethernet found.
Could not get PHY for FEC0: addr -19
Colibri VFxx #
This commit adds an explicit PHY node which makes it work again.

Quoted 3 lines

Applied to u-boot-imx, master, thanks !

Best regards,
Stefano Babic

Signature · 5 lines
=====================================================================
DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: +49-8142-66989-53 Fax: +49-8142-66989-80 Email: sbabic at denx.de
=====================================================================