Skip to content

Commit

Permalink
ARM: dts: imx: Fix the AR803X phy-mode
Browse files Browse the repository at this point in the history
Commit 6d4cd04 ("net: phy: at803x: disable delay only for RGMII mode")
exposed an issue on imx DTS files using AR8031/AR8035 PHYs.

The end result is that the boards can no longer obtain an IP address
via UDHCP, for example.

Quoting Andrew Lunn:

"The problem here is, all the DTs were broken since day 0. However,
because the PHY driver was also broken, nobody noticed and it
worked. Now that the PHY driver has been fixed, all the bugs in the
DTs now become an issue"

To fix this problem, the phy-mode property needs to be "rgmii-id",  which
has the following meaning as per
Documentation/devicetree/bindings/net/ethernet.txt:

"RGMII with internal RX and TX delays provided by the PHY, the MAC should
not add the RX or TX delays in this case)"

Tested on imx6-sabresd, imx6sx-sdb and imx7d-pico boards with
successfully restored networking.

Based on the initial submission from Steve Twiss for the
imx6qdl-sabresd.

Signed-off-by: Fabio Estevam <[email protected]>
Tested-by: Baruch Siach <[email protected]>
Tested-by: Soeren Moch <[email protected]>
Tested-by: Steve Twiss <[email protected]>
Tested-by: Adam Thomson <[email protected]>
Signed-off-by: Steve Twiss <[email protected]>
Tested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Shawn Guo <[email protected]>
  • Loading branch information
fabioestevam authored and Shawn Guo committed Apr 11, 2019
1 parent 507aaee commit 0672d22
Show file tree
Hide file tree
Showing 13 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6-logicpd-baseboard.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-duration = <10>;
phy-reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
phy-supply = <&reg_enet>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6dl-riotboard.dts
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6q-ba16.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
status = "okay";
};

Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6q-marsboard.dts
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio3 31 GPIO_ACTIVE_LOW>;
status = "okay";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6q-tbs2910.dts
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
status = "okay";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6qdl-apf6.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-duration = <10>;
phy-reset-gpios = <&gpio1 24 GPIO_ACTIVE_LOW>;
status = "okay";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6qdl-sabreauto.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -292,7 +292,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
fsl,err006687-workaround-present;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6qdl-sabresd.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio1 25 GPIO_ACTIVE_LOW>;
status = "okay";
};
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6qdl-sr-som.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_microsom_enet_ar8035>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-duration = <2>;
phy-reset-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
status = "okay";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6qdl-wandboard.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -224,7 +224,7 @@
&fec {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-reset-gpios = <&gpio3 29 GPIO_ACTIVE_LOW>;
interrupts-extended = <&gpio1 6 IRQ_TYPE_LEVEL_HIGH>,
<&intc 0 119 IRQ_TYPE_LEVEL_HIGH>;
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6sx-sabreauto.dts
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@
&fec1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-handle = <&ethphy1>;
fsl,magic-packet;
status = "okay";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx6sx-sdb.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_enet1>;
phy-supply = <&reg_enet_3v3>;
phy-mode = "rgmii";
phy-mode = "rgmii-id";
phy-handle = <&ethphy1>;
phy-reset-gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
status = "okay";
Expand Down
2 changes: 1 addition & 1 deletion arch/arm/boot/dts/imx7d-pico.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,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;
phy-reset-gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
Expand Down

0 comments on commit 0672d22

Please sign in to comment.