sunxi: Fix A20-OLinuXino-MICRO dts for LAN8710
Subsystems (2)
PATCH 1/1 sunxi: Fix A20-OLinuXino-MICRO dts for LAN8710
From revision J the board uses new phy chip LAN8710. Compared with RTL8201, RA17 pin is TXERR. It has pullup which causes phy not to work. To fix this PA17 is muxed with GMAC function. This makes the pin output-low.
--- arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)
arch/arm/dts/sun7i-a20-olinuxino-micro.dts +8 -1
@@ -95,7 +95,7 @@ &gmac { pinctrl-names = "default"; - pinctrl-0 = <&gmac_pins_mii_a>; + pinctrl-0 = <&gmac_pins_mii_a>,<&gmac_txerr>; phy = <&phy1>; phy-mode = "mii"; status = "okay";
@@ -226,6 +226,13 @@ }; &pio { + gmac_txerr: gmac_txerr at 0 { + allwinner,pins = "PA17"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; + mmc3_cd_pin_olinuxinom: mmc3_cd_pin at 0 { allwinner,pins = "PH11"; allwinner,function = "gpio_in";
Signature · 1 line
2.7.4
PATCH 1/1 sunxi: Fix A20-OLinuXino-MICRO dts for LAN8710
Hi Stefan,
You should also put Jagan Teki as recipients.
Quoted 24 lines · Stefan Mavrodiev
From revision J the board uses new phy chip LAN8710. Compared with RTL8201, RA17 pin is TXERR. It has pullup which causes phy not to work. To fix this PA17 is muxed with GMAC function. This makes the pin output-low.
Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)arch/arm/dts/sun7i-a20-olinuxino-micro.dts +1
-1@@ -95,7 +95,7 @@ &gmac { pinctrl-names = "default"; - pinctrl-0 = <&gmac_pins_mii_a>; + pinctrl-0 = <&gmac_pins_mii_a>,<&gmac_txerr>; phy = <&phy1>; phy-mode = "mii"; status = "okay";
arch/arm/dts/sun7i-a20-olinuxino-micro.dts line 235
Quoted 10 lines
arch/arm/dts/sun7i-a20-olinuxino-micro.dts +7
-0@@ -226,6 +226,13 @@ }; &pio { + gmac_txerr: gmac_txerr at 0 { + allwinner,pins = "PA17"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +
There's two issues with that patch:
- In general we try to sync the DT with Linux when we can, and the patch that ended up in Linux wasn't this one.
- And we don't have any pinctrl support in U-Boot, that patch will basically do nothing
The code that changes the muxing is here:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/sunxi/gmac.c#l34
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170927/d2dccb30/attachment.sig>
PATCH 1/1 sunxi: Fix A20-OLinuXino-MICRO dts for LAN8710
Quoted 31 lines · Maxime Ripard
Hi Stefan,
You should also put Jagan Teki as recipients.
Quoted 26 lines · Stefan Mavrodiev
From revision J the board uses new phy chip LAN8710. Compared
with RTL8201, RA17 pin is TXERR. It has pullup which causes phy not to work. To fix this PA17 is muxed with GMAC function. This makes the pin output-low.Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)arch/arm/dts/sun7i-a20-olinuxino-micro.dts +1
-1@@ -95,7 +95,7 @@ &gmac { pinctrl-names = "default"; - pinctrl-0 = <&gmac_pins_mii_a>; + pinctrl-0 = <&gmac_pins_mii_a>,<&gmac_txerr>; phy = <&phy1>; phy-mode = "mii"; status = "okay";@@ -226,6 +226,13 @@ };
Quoted 11 lines
arch/arm/dts/sun7i-a20-olinuxino-micro.dts line 235
Quoted 8 lines
arch/arm/dts/sun7i-a20-olinuxino-micro.dts +7
-0&pio { + gmac_txerr: gmac_txerr at 0 { + allwinner,pins = "PA17"; + allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +There's two issues with that patch:
- In general we try to sync the DT with Linux when we can, and the patch that ended up in Linux wasn't this one.
I'm little confused. If I sync the DT with the one from mainline linux, doesn't this counts as dangerous? I mean it will be the only one that is synced.
This could corrupt building if sun7i-a20.dtsi is not synced for example.
Quoted 5 lines
- And we don't have any pinctrl support in U-Boot, that patch will basically do nothing
The code that changes the muxing is here:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/sunxi/gmac.c#l34
Again, since this is common for all boards, doesn't it counts as dangerous? This is feature only on our board.
Quoted 2 lines
Maxime
Best regards,
Stefan Mavrodiev
PATCH 1/1 sunxi: Fix A20-OLinuXino-MICRO dts for LAN8710
Hi,
Quoted 42 lines · Stefan Mavrodiev
Quoted 32 lines · Maxime Ripard
Hi Stefan,
You should also put Jagan Teki as recipients.
Quoted 27 lines · Stefan Mavrodiev
From revision J the board uses new phy chip LAN8710. Compared
with RTL8201, RA17 pin is TXERR. It has pullup which causes phy not to work. To fix this PA17 is muxed with GMAC function. This makes the pin output-low.Signed-off-by Stefan Mavrodiev <[email protected]>--- arch/arm/dts/sun7i-a20-olinuxino-micro.dts | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-)arch/arm/dts/sun7i-a20-olinuxino-micro.dts +3
-1@@ -95,7 +95,7 @@ &gmac { pinctrl-names = "default"; - pinctrl-0 = <&gmac_pins_mii_a>; + pinctrl-0 = <&gmac_pins_mii_a>,<&gmac_txerr>; phy = <&phy1>; phy-mode = "mii"; status = "okay";@@ -226,6 +226,13 @@ }; &pio { + gmac_txerr: gmac_txerr at 0 { + allwinner,pins = "PA17";Quoted 8 lines
arch/arm/dts/sun7i-a20-olinuxino-micro.dts line 235
Quoted 5 lines
arch/arm/dts/sun7i-a20-olinuxino-micro.dts +5
-0+ allwinner,function = "gpio_out"; + allwinner,drive = <SUN4I_PINCTRL_10_MA>; + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; + }; +There's two issues with that patch:
- In general we try to sync the DT with Linux when we can, and the patch that ended up in Linux wasn't this one.
Quoted 4 lines
I'm little confused. If I sync the DT with the one from mainline linux, doesn't this counts as dangerous? I mean it will be the only one that is synced.
This could corrupt building ifsun7i-a20.dtsiis not synced for example.
I'm not sure what's dangerous about this. If the device tree is working in Linux, it should be working in U-Boot, right?
Quoted 8 lines
Quoted 5 lines
- And we don't have any pinctrl support in U-Boot, that patch will basically do nothing
The code that changes the muxing is here:
http://git.denx.de/?p=u-boot.git;a=blob;f=board/sunxi/gmac.c#l34Again, since this is common for all boards, doesn't it counts as dangerous? This is feature only on our board.
We can probably solve this through a Kconfig option.
But then, if it's working in u-boot right now, I'm not really sure what it's trying to fix?
Maxime
Signature · 10 lines
Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 801 bytes Desc: not available URL: <http://lists.denx.de/pipermail/u-boot/attachments/20170928/b5ad1538/attachment.sig>