Skip to contentSkip to conversation

ARM: dts: imx7d: cl-som-imx7: make ethernet work again

PATCH Applied André Draszik 2 participants 2 messages Aug 9, 2019 – Aug 19, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 ARM: dts: imx7d: cl-som-imx7: make ethernet work again

Recent changes to the atheros at803x driver caused ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode") and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode") fix the AR8031 driver to configure the phy's (RX/TX) delays as per the 'phy-mode' in the device tree.

This now prevents ethernet from working on this board.

It used to work before those commits, because the AR8031 comes out of reset with RX delay enabled, and the at803x driver didn't touch the delay configuration at all when "rgmii" mode was selected, and because arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup() unconditionally enables TX delay.

Since above commits ar8031_phy_fixup() also has no effect anymore, and the end-result is that all delays are disabled in the phy, no ethernet.

Update the device tree to restore functionality.

CC Ilya Ledvich <[email protected]>
CC Igor Grinberg <[email protected]>
CC Rob Herring <[email protected]>
CC Mark Rutland <[email protected]>
CC Shawn Guo <[email protected]>
CC Sascha Hauer <[email protected]>
CC Pengutronix Kernel Team <[email protected]>
CC Fabio Estevam <[email protected]>
CC NXP Linux Team <[email protected]>
---
 arch/arm/boot/dts/imx7d-cl-som-imx7.dts | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx7d-cl-som-imx7.dts +2 -2
index e61567437d73..62d5e9a4a781 100644
@@ -44,7 +44,7 @@
 			  <&clks IMX7D_ENET1_TIME_ROOT_CLK>;
 	assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
 	assigned-clock-rates = <0>, <100000000>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy0>;
 	fsl,magic-packet;
 	status = "okay";
@@ -70,7 +70,7 @@
 			  <&clks IMX7D_ENET2_TIME_ROOT_CLK>;
 	assigned-clock-parents = <&clks IMX7D_PLL_ENET_MAIN_100M_CLK>;
 	assigned-clock-rates = <0>, <100000000>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ethphy1>;
 	fsl,magic-packet;
 	status = "okay";
Signature · 1 line
2.20.1
Applied
#1 lore raw
Quoted 24 lines · André Draszik

Recent changes to the atheros at803x driver caused ethernet to stop working on this board.
In particular commit 6d4cd041f0af
("net: phy: at803x: disable delay only for RGMII mode") and commit cd28d1d6e52e
("net: phy: at803x: Disable phy delay for RGMII mode") fix the AR8031 driver to configure the phy's (RX/TX) delays as per the 'phy-mode' in the device tree.

This now prevents ethernet from working on this board.

It used to work before those commits, because the AR8031 comes out of reset with RX delay enabled, and the at803x driver didn't touch the delay configuration at all when "rgmii" mode was selected, and because arch/arm/mach-imx/mach-imx7d.c:ar8031_phy_fixup() unconditionally enables TX delay.

Since above commits ar8031_phy_fixup() also has no effect anymore, and the end-result is that all delays are disabled in the phy, no ethernet.

Update the device tree to restore functionality.

Quoted 12 lines
CC Ilya Ledvich <[email protected]>
CC Igor Grinberg <[email protected]>
CC Rob Herring <[email protected]>
CC Mark Rutland <[email protected]>
CC Shawn Guo <[email protected]>
CC Sascha Hauer <[email protected]>
CC Pengutronix Kernel Team <[email protected]>
CC Fabio Estevam <[email protected]>
CC NXP Linux Team <[email protected]>

Applied, thanks.