Re: [PATCH v2 2/5] arm64: dts: meson: fix PHY deassert timing requirements

2020-12-05 Thread Martin Blumenstingl
On Tue, Dec 1, 2020 at 2:21 PM Stefan Agner  wrote:
>
> According to the datasheet (Rev. 1.9) the RTL8211F requires at least
> 72ms "for internal circuits settling time" before accessing the PHY
> egisters. This fixes an issue seen on ODROID-C2 where the Ethernet
> link doesn't come up when using ip link set down/up:
>   [ 6630.714855] meson8b-dwmac c941.ethernet eth0: Link is Down
>   [ 6630.785775] meson8b-dwmac c941.ethernet eth0: PHY [stmmac-0:00] 
> driver [RTL8211F Gigabit Ethernet] (irq=36)
>   [ 6630.893071] meson8b-dwmac c941.ethernet: Failed to reset the dma
>   [ 6630.893800] meson8b-dwmac c941.ethernet eth0: stmmac_hw_setup: DMA 
> engine initialization failed
>   [ 6630.902835] meson8b-dwmac c941.ethernet eth0: stmmac_open: Hw setup 
> failed
>
> Fixes: f29cabf240ed ("arm64: dts: meson: use the generic Ethernet PHY reset 
> GPIO bindings")
> Signed-off-by: Stefan Agner 
with the "registers" typo above fixed:
Reviewed-by: Martin Blumenstingl 


[PATCH v2 2/5] arm64: dts: meson: fix PHY deassert timing requirements

2020-12-01 Thread Stefan Agner
According to the datasheet (Rev. 1.9) the RTL8211F requires at least
72ms "for internal circuits settling time" before accessing the PHY
egisters. This fixes an issue seen on ODROID-C2 where the Ethernet
link doesn't come up when using ip link set down/up:
  [ 6630.714855] meson8b-dwmac c941.ethernet eth0: Link is Down
  [ 6630.785775] meson8b-dwmac c941.ethernet eth0: PHY [stmmac-0:00] driver 
[RTL8211F Gigabit Ethernet] (irq=36)
  [ 6630.893071] meson8b-dwmac c941.ethernet: Failed to reset the dma
  [ 6630.893800] meson8b-dwmac c941.ethernet eth0: stmmac_hw_setup: DMA 
engine initialization failed
  [ 6630.902835] meson8b-dwmac c941.ethernet eth0: stmmac_open: Hw setup 
failed

Fixes: f29cabf240ed ("arm64: dts: meson: use the generic Ethernet PHY reset 
GPIO bindings")
Signed-off-by: Stefan Agner 
---
 arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts   | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts  | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxm-nexbox-a1.dts   | 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxm-q200.dts| 2 +-
 arch/arm64/boot/dts/amlogic/meson-gxm-rbox-pro.dts| 2 +-
 9 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
index 7be3e354093b..de27beafe9db 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-nanopi-k2.dts
@@ -165,7 +165,7 @@ eth_phy0: ethernet-phy@0 {
reg = <0>;
 
reset-assert-us = <1>;
-   reset-deassert-us = <3>;
+   reset-deassert-us = <8>;
reset-gpios = < GPIOZ_14 GPIO_ACTIVE_LOW>;
 
interrupt-parent = <_intc>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
index 70fcfb7b0683..50de1d01e565 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-odroidc2.dts
@@ -200,7 +200,7 @@ eth_phy0: ethernet-phy@0 {
reg = <0>;
 
reset-assert-us = <1>;
-   reset-deassert-us = <3>;
+   reset-deassert-us = <8>;
reset-gpios = < GPIOZ_14 GPIO_ACTIVE_LOW>;
 
interrupt-parent = <_intc>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
index 222ee8069cfa..9b0b81f191f1 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-vega-s95.dtsi
@@ -126,7 +126,7 @@ eth_phy0: ethernet-phy@0 {
reg = <0>;
 
reset-assert-us = <1>;
-   reset-deassert-us = <3>;
+   reset-deassert-us = <8>;
reset-gpios = < GPIOZ_14 GPIO_ACTIVE_LOW>;
 
interrupt-parent = <_intc>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi 
b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
index ad812854a107..a350fee1264d 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
+++ b/arch/arm64/boot/dts/amlogic/meson-gxbb-wetek.dtsi
@@ -147,7 +147,7 @@ eth_phy0: ethernet-phy@0 {
reg = <0>;
 
reset-assert-us = <1>;
-   reset-deassert-us = <3>;
+   reset-deassert-us = <8>;
reset-gpios = < GPIOZ_14 GPIO_ACTIVE_LOW>;
 
interrupt-parent = <_intc>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
index b08c4537f260..b2ab05c22090 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxl-s905d-p230.dts
@@ -82,7 +82,7 @@ external_phy: ethernet-phy@0 {
 
/* External PHY reset is shared with internal PHY Led signal */
reset-assert-us = <1>;
-   reset-deassert-us = <3>;
+   reset-deassert-us = <8>;
reset-gpios = < GPIOZ_14 GPIO_ACTIVE_LOW>;
 
interrupt-parent = <_intc>;
diff --git a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts 
b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
index bff8ec2c1c70..e38d9e50caa7 100644
--- a/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
+++ b/arch/arm64/boot/dts/amlogic/meson-gxm-khadas-vim2.dts
@@ -194,7 +194,7 @@ external_phy: ethernet-phy@0 {