[PATCH 01/10] Revert "arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high"

46 views
Skip to first unread message

Chen-Yu Tsai

unread,
Oct 24, 2020, 12:26:03 PM10/24/20
to Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
From: Chen-Yu Tsai <we...@csie.org>

This reverts commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2.

Turns out the activity and link LEDs on the RJ45 port are active low,
just like on the Orange Pi PC.

Revert the commit that says otherwise.

Fixes: 75ee680cbd2e ("arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs to active high")
Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
---
If you have this board, please help test it.

For me, the correct lighting of the LEDs is both LEDs should be lit
when connected at 100 Mbps.
---
arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts | 5 -----
1 file changed, 5 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
index 71fb73208939..babf4cf1b2f6 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-pc-plus.dts
@@ -53,11 +53,6 @@ aliases {
};
};

-&emac {
- /* LEDs changed to active high on the plus */
- /delete-property/ allwinner,leds-active-low;
-};
-
&mmc1 {
vmmc-supply = <&reg_vcc3v3>;
bus-width = <4>;
--
2.28.0

Chen-Yu Tsai

unread,
Oct 24, 2020, 12:26:13 PM10/24/20
to Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
From: Chen-Yu Tsai <we...@csie.org>

The Ethernet PHY on the Bananapi M64 has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
index 3ea5182ca489..e5e840b9fbb4 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-bananapi-m64.dts
@@ -105,7 +105,7 @@ &ehci1 {
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <&reg_dc1sw>;
status = "okay";
--
2.28.0

Chen-Yu Tsai

unread,
Oct 24, 2020, 12:26:13 PM10/24/20
to Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
From: Chen-Yu Tsai <we...@csie.org>

The Ethernet PHY on the Cubieboard 4 and A80 Optimus have the RX
and TX delays enabled on the PHY, using pull-ups on the RXDLY and
TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 98048143b7f8 ("ARM: dts: sun9i: cubieboard4: Enable GMAC")
Fixes: bc9bd03a44f9 ("ARM: dts: sun9i: a80-optimus: Enable GMAC")
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
---
arch/arm/boot/dts/sun9i-a80-cubieboard4.dts | 2 +-
arch/arm/boot/dts/sun9i-a80-optimus.dts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
index d3b337b043a1..484b93df20cb 100644
--- a/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
+++ b/arch/arm/boot/dts/sun9i-a80-cubieboard4.dts
@@ -129,7 +129,7 @@ &gmac {
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy-handle = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_cldo1>;
status = "okay";
};
diff --git a/arch/arm/boot/dts/sun9i-a80-optimus.dts b/arch/arm/boot/dts/sun9i-a80-optimus.dts
index bbc6335e5631..5c3580d712e4 100644
--- a/arch/arm/boot/dts/sun9i-a80-optimus.dts
+++ b/arch/arm/boot/dts/sun9i-a80-optimus.dts
@@ -124,7 +124,7 @@ &gmac {
pinctrl-names = "default";
pinctrl-0 = <&gmac_rgmii_pins>;
phy-handle = <&phy1>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
phy-supply = <&reg_cldo1>;

Chen-Yu Tsai

unread,
Oct 24, 2020, 12:26:14 PM10/24/20
to Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
From: Chen-Yu Tsai <we...@csie.org>

The Ethernet PHY on the Bananapi M3 and Cubietruck Plus have the RX
and TX delays enabled on the PHY, using pull-ups on the RXDLY and
TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 039359948a4b ("ARM: dts: sun8i: a83t: Enable Ethernet on two boards")
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
---
arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts | 2 +-
arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
index 9d34eabba121..431f70234d36 100644
--- a/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
@@ -131,7 +131,7 @@ &emac {
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_sw>;
phy-handle = <&rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
allwinner,rx-delay-ps = <700>;
allwinner,tx-delay-ps = <700>;
status = "okay";
diff --git a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
index d9be511f054f..d8326a5c681d 100644
--- a/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
+++ b/arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts
@@ -183,7 +183,7 @@ &emac {
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_dldo4>;
phy-handle = <&rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";

Chen-Yu Tsai

unread,
Oct 24, 2020, 12:26:14 PM10/24/20
to Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
From: Chen-Yu Tsai <we...@csie.org>

The Ethernet PHY on the Libre Computer ALL-H5-CC has the RX and TX
delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 60d0426d7603 ("arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-CC H5 board")
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
---
arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts
index df1b9263ad0e..6e30a564c87f 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-libretech-all-h5-cc.dts
@@ -36,7 +36,7 @@ &emac {
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";
/delete-property/ allwinner,leds-active-low;

Chen-Yu Tsai

unread,
Oct 24, 2020, 12:26:14 PM10/24/20
to Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
From: Chen-Yu Tsai <we...@csie.org>

The Ethernet PHY on the Bananapi M2+ has the RX and TX delays
enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.

Fix the phy-mode description to correct reflect this so that the
implementation doesn't reconfigure the delays incorrectly. This
happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
rx/tx delay config").

Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i")
Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
Fixes: aa8fee415f46 ("ARM: dts: sun8i: h3: Split out non-SoC-specific parts of Bananapi M2 Plus")
Signed-off-by: Chen-Yu Tsai <we...@csie.org>
---
arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
index 39263e74fbb5..8e5cb3b3fd68 100644
--- a/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
+++ b/arch/arm/boot/dts/sunxi-bananapi-m2-plus.dtsi
@@ -126,7 +126,7 @@ &emac {
pinctrl-0 = <&emac_rgmii_pins>;
phy-supply = <&reg_gmac_3v3>;
phy-handle = <&ext_rgmii_phy>;
- phy-mode = "rgmii";
+ phy-mode = "rgmii-id";

Corentin Labbe

unread,
Oct 24, 2020, 3:58:09 PM10/24/20
to Chen-Yu Tsai, Maxime Ripard, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Tested-by: Corentin Labbe <clabbe....@gmail.com>

Thanks

Jernej Škrabec

unread,
Oct 25, 2020, 3:29:57 AM10/25/20
to Maxime Ripard, Chen-Yu Tsai, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Dne sobota, 24. oktober 2020 ob 18:25:06 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <we...@csie.org>
>
> This reverts commit 75ee680cbd2e4d0156b94f9fec50076361ab12f2.
>
> Turns out the activity and link LEDs on the RJ45 port are active low,
> just like on the Orange Pi PC.
>
> Revert the commit that says otherwise.
>
> Fixes: 75ee680cbd2e ("arm: sun8i: orangepi-pc-plus: Set EMAC activity LEDs
to active high")
> Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
> Signed-off-by: Chen-Yu Tsai <we...@csie.org>
> ---
> If you have this board, please help test it.
>
> For me, the correct lighting of the LEDs is both LEDs should be lit
> when connected at 100 Mbps.

Tested-by: Jernej Skrabec <jernej....@siol.net>
Acked-by: Jernej Skrabec <jernej....@siol.net>

Best regards,
Jernej


Jernej Škrabec

unread,
Oct 25, 2020, 3:56:08 AM10/25/20
to Maxime Ripard, Chen-Yu Tsai, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Dne sobota, 24. oktober 2020 ob 18:25:13 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <we...@csie.org>
>
> The Ethernet PHY on the Bananapi M2+ has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
>
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
>
> Fixes: 8c7ba536e709 ("ARM: sun8i: bananapi-m2-plus: Enable dwmac-sun8i")
> Fixes: 4904337fe34f ("ARM: dts: sunxi: Restore EMAC changes (boards)")
> Fixes: aa8fee415f46 ("ARM: dts: sun8i: h3: Split out non-SoC-specific parts
of Bananapi M2 Plus")
> Signed-off-by: Chen-Yu Tsai <we...@csie.org>

Jernej Škrabec

unread,
Oct 25, 2020, 4:28:58 AM10/25/20
to Chen-Yu Tsai, Corentin Labbe, Maxime Ripard, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Dne sobota, 24. oktober 2020 ob 21:58:03 CET je Corentin Labbe napisal(a):

Jernej Škrabec

unread,
Oct 25, 2020, 4:34:51 AM10/25/20
to Maxime Ripard, Chen-Yu Tsai, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Dne sobota, 24. oktober 2020 ob 18:25:12 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <we...@csie.org>
>
> The Ethernet PHY on the Cubieboard 4 and A80 Optimus have the RX
> and TX delays enabled on the PHY, using pull-ups on the RXDLY and
> TXDLY pins.
>
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
>
> Fixes: 98048143b7f8 ("ARM: dts: sun9i: cubieboard4: Enable GMAC")
> Fixes: bc9bd03a44f9 ("ARM: dts: sun9i: a80-optimus: Enable GMAC")
> Signed-off-by: Chen-Yu Tsai <we...@csie.org>

Jernej Škrabec

unread,
Oct 25, 2020, 4:43:32 AM10/25/20
to Maxime Ripard, Chen-Yu Tsai, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Dne sobota, 24. oktober 2020 ob 18:25:11 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <we...@csie.org>
>
> The Ethernet PHY on the Bananapi M3 and Cubietruck Plus have the RX
> and TX delays enabled on the PHY, using pull-ups on the RXDLY and
> TXDLY pins.
>
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
>
> Fixes: 039359948a4b ("ARM: dts: sun8i: a83t: Enable Ethernet on two boards")
> Signed-off-by: Chen-Yu Tsai <we...@csie.org>

Jernej Škrabec

unread,
Oct 25, 2020, 4:56:55 AM10/25/20
to Maxime Ripard, Chen-Yu Tsai, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
Dne sobota, 24. oktober 2020 ob 18:25:14 CET je Chen-Yu Tsai napisal(a):
> From: Chen-Yu Tsai <we...@csie.org>
>
> The Ethernet PHY on the Libre Computer ALL-H5-CC has the RX and TX
> delays enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
>
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
>
> Fixes: 60d0426d7603 ("arm64: dts: allwinner: h5: Add Libre Computer ALL-H5-
CC H5 board")
> Signed-off-by: Chen-Yu Tsai <we...@csie.org>

Was this board ever in production? I can't find anything relevant about it on
the internet.

Anyway:

Maxime Ripard

unread,
Oct 26, 2020, 6:24:39 AM10/26/20
to Chen-Yu Tsai, Jernej Skrabec, linux...@googlegroups.com, Chen-Yu Tsai, devic...@vger.kernel.org, linux-ar...@lists.infradead.org, linux-...@vger.kernel.org
On Sun, Oct 25, 2020 at 12:25:15AM +0800, Chen-Yu Tsai wrote:
> From: Chen-Yu Tsai <we...@csie.org>
>
> The Ethernet PHY on the Bananapi M64 has the RX and TX delays
> enabled on the PHY, using pull-ups on the RXDLY and TXDLY pins.
>
> Fix the phy-mode description to correct reflect this so that the
> implementation doesn't reconfigure the delays incorrectly. This
> happened with commit bbc4d71d6354 ("net: phy: realtek: fix rtl8211e
> rx/tx delay config").
>
> Fixes: e7295499903d ("arm64: allwinner: bananapi-m64: Enable dwmac-sun8i")
> Fixes: 94f442886711 ("arm64: dts: allwinner: A64: Restore EMAC changes")
> Signed-off-by: Chen-Yu Tsai <we...@csie.org>

Applied all the patches, thanks!
Maxime
signature.asc
Reply all
Reply to author
Forward
0 new messages