linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board
@ 2019-06-21 18:00 Katsuhiro Suzuki
  2019-06-22  8:33 ` Heiko Stuebner
  0 siblings, 1 reply; 6+ messages in thread
From: Katsuhiro Suzuki @ 2019-06-21 18:00 UTC (permalink / raw)
  To: Heiko Stuebner, linux-rockchip
  Cc: linux-arm-kernel, devicetree, linux-kernel, Katsuhiro Suzuki

This patch adds missing mdio and ethernet PHY nodes for rk3328 ASUS
tinker board.

Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
---
 arch/arm/boot/dts/rk3288-tinker.dtsi | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
index 293576869546..3190817e8d5d 100644
--- a/arch/arm/boot/dts/rk3288-tinker.dtsi
+++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
@@ -117,6 +117,7 @@
 	assigned-clocks = <&cru SCLK_MAC>;
 	assigned-clock-parents = <&ext_gmac>;
 	clock_in_out = "input";
+	phy-handle = <&phy0>;
 	phy-mode = "rgmii";
 	phy-supply = <&vcc33_lan>;
 	pinctrl-names = "default";
@@ -127,6 +128,17 @@
 	tx_delay = <0x30>;
 	rx_delay = <0x10>;
 	status = "ok";
+
+	mdio0 {
+		compatible = "snps,dwmac-mdio";
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		phy0: ethernet-phy@0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+		};
+	};
 };
 
 &gpu {
-- 
2.20.1


^ permalink raw reply related	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board
  2019-06-21 18:00 [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board Katsuhiro Suzuki
@ 2019-06-22  8:33 ` Heiko Stuebner
  2019-06-22 14:50   ` Katsuhiro Suzuki
  0 siblings, 1 reply; 6+ messages in thread
From: Heiko Stuebner @ 2019-06-22  8:33 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: linux-rockchip, linux-arm-kernel, devicetree, linux-kernel

Hi,

Am Freitag, 21. Juni 2019, 20:00:17 CEST schrieb Katsuhiro Suzuki:
> This patch adds missing mdio and ethernet PHY nodes for rk3328 ASUS
> tinker board.
> 
> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>

just for my understanding, which problem does this solve?
Normally the gmac can establish connections just fine on
the rk3288 by probing the phy in the automatic way.

And I also don't see any additional properties like phy
interrupt line below.


Thanks
Heiko

> ---
>  arch/arm/boot/dts/rk3288-tinker.dtsi | 12 ++++++++++++
>  1 file changed, 12 insertions(+)
> 
> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
> index 293576869546..3190817e8d5d 100644
> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
> @@ -117,6 +117,7 @@
>  	assigned-clocks = <&cru SCLK_MAC>;
>  	assigned-clock-parents = <&ext_gmac>;
>  	clock_in_out = "input";
> +	phy-handle = <&phy0>;
>  	phy-mode = "rgmii";
>  	phy-supply = <&vcc33_lan>;
>  	pinctrl-names = "default";
> @@ -127,6 +128,17 @@
>  	tx_delay = <0x30>;
>  	rx_delay = <0x10>;
>  	status = "ok";
> +
> +	mdio0 {
> +		compatible = "snps,dwmac-mdio";
> +		#address-cells = <1>;
> +		#size-cells = <0>;
> +
> +		phy0: ethernet-phy@0 {
> +			compatible = "ethernet-phy-ieee802.3-c22";
> +			reg = <0>;
> +		};
> +	};
>  };
>  
>  &gpu {
> 





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board
  2019-06-22  8:33 ` Heiko Stuebner
@ 2019-06-22 14:50   ` Katsuhiro Suzuki
  2019-06-22 15:15     ` Heiko Stuebner
  2019-06-22 17:55     ` Andrew Lunn
  0 siblings, 2 replies; 6+ messages in thread
From: Katsuhiro Suzuki @ 2019-06-22 14:50 UTC (permalink / raw)
  To: Heiko Stuebner; +Cc: linux-rockchip, linux-arm-kernel, devicetree, linux-kernel

Hello,

Current linux-next on my environment, 'ifconfig eth0 up' does not
work correctly with following message...

-----
root@linaro-alip:~# ifconfig eth0 up
[  105.028916] rk_gmac-dwmac ff290000.ethernet eth0: stmmac_open: Cannot 
attach to PHY (error: -19)
SIOCSIFFLAGS: No such device
-----

I checked drivers/net/ethernet/stmicro/stmmac/stmmac_main.c and found
stmmac_init_phy() is going to fail if ethernet device node does not
have following property:
   - phy-handle
   - phy
   - phy-device

I salvaged old version of linux-next kernel (5.2.0-rc1-20190523),
network device of my Tinker Board worked correctly if use it.

I have not bisect commit of root cause yet... Is it better to bisect
and find problem instead of sending this patch?

Best Regards,
---
Katsuhiro Suzuki


On 2019/06/22 17:33, Heiko Stuebner wrote:
> Hi,
> 
> Am Freitag, 21. Juni 2019, 20:00:17 CEST schrieb Katsuhiro Suzuki:
>> This patch adds missing mdio and ethernet PHY nodes for rk3328 ASUS
>> tinker board.
>>
>> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> 
> just for my understanding, which problem does this solve?
> Normally the gmac can establish connections just fine on
> the rk3288 by probing the phy in the automatic way.
> 
> And I also don't see any additional properties like phy
> interrupt line below.
> 
> 
> Thanks
> Heiko
> 
>> ---
>>   arch/arm/boot/dts/rk3288-tinker.dtsi | 12 ++++++++++++
>>   1 file changed, 12 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
>> index 293576869546..3190817e8d5d 100644
>> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
>> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
>> @@ -117,6 +117,7 @@
>>   	assigned-clocks = <&cru SCLK_MAC>;
>>   	assigned-clock-parents = <&ext_gmac>;
>>   	clock_in_out = "input";
>> +	phy-handle = <&phy0>;
>>   	phy-mode = "rgmii";
>>   	phy-supply = <&vcc33_lan>;
>>   	pinctrl-names = "default";
>> @@ -127,6 +128,17 @@
>>   	tx_delay = <0x30>;
>>   	rx_delay = <0x10>;
>>   	status = "ok";
>> +
>> +	mdio0 {
>> +		compatible = "snps,dwmac-mdio";
>> +		#address-cells = <1>;
>> +		#size-cells = <0>;
>> +
>> +		phy0: ethernet-phy@0 {
>> +			compatible = "ethernet-phy-ieee802.3-c22";
>> +			reg = <0>;
>> +		};
>> +	};
>>   };
>>   
>>   &gpu {
>>
> 
> 
> 
> 
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board
  2019-06-22 14:50   ` Katsuhiro Suzuki
@ 2019-06-22 15:15     ` Heiko Stuebner
  2019-06-22 17:55     ` Andrew Lunn
  1 sibling, 0 replies; 6+ messages in thread
From: Heiko Stuebner @ 2019-06-22 15:15 UTC (permalink / raw)
  To: Katsuhiro Suzuki
  Cc: linux-rockchip, linux-arm-kernel, devicetree, linux-kernel

Hi Katsuhiro,

Am Samstag, 22. Juni 2019, 16:50:10 CEST schrieb Katsuhiro Suzuki:
> Current linux-next on my environment, 'ifconfig eth0 up' does not
> work correctly with following message...
> 
> -----
> root@linaro-alip:~# ifconfig eth0 up
> [  105.028916] rk_gmac-dwmac ff290000.ethernet eth0: stmmac_open: Cannot 
> attach to PHY (error: -19)
> SIOCSIFFLAGS: No such device
> -----
> 
> I checked drivers/net/ethernet/stmicro/stmmac/stmmac_main.c and found
> stmmac_init_phy() is going to fail if ethernet device node does not
> have following property:
>    - phy-handle
>    - phy
>    - phy-device
> 
> I salvaged old version of linux-next kernel (5.2.0-rc1-20190523),
> network device of my Tinker Board worked correctly if use it.
>
> I have not bisect commit of root cause yet... Is it better to bisect
> and find problem instead of sending this patch?

That is clearly a regression (even recent) a newer kernel should
not break old devicetrees and the mdio subnode creating a
mdio bus is already marked as optional.

So this will likely affect a lot more boards than the tinker board.

So if you can find the time you could try to find the offending
commit first, so that ideally the network maintainers can fix that
up.


Thanks
Heiko

> On 2019/06/22 17:33, Heiko Stuebner wrote:
> > Hi,
> > 
> > Am Freitag, 21. Juni 2019, 20:00:17 CEST schrieb Katsuhiro Suzuki:
> >> This patch adds missing mdio and ethernet PHY nodes for rk3328 ASUS
> >> tinker board.
> >>
> >> Signed-off-by: Katsuhiro Suzuki <katsuhiro@katsuster.net>
> > 
> > just for my understanding, which problem does this solve?
> > Normally the gmac can establish connections just fine on
> > the rk3288 by probing the phy in the automatic way.
> > 
> > And I also don't see any additional properties like phy
> > interrupt line below.
> > 
> > 
> > Thanks
> > Heiko
> > 
> >> ---
> >>   arch/arm/boot/dts/rk3288-tinker.dtsi | 12 ++++++++++++
> >>   1 file changed, 12 insertions(+)
> >>
> >> diff --git a/arch/arm/boot/dts/rk3288-tinker.dtsi b/arch/arm/boot/dts/rk3288-tinker.dtsi
> >> index 293576869546..3190817e8d5d 100644
> >> --- a/arch/arm/boot/dts/rk3288-tinker.dtsi
> >> +++ b/arch/arm/boot/dts/rk3288-tinker.dtsi
> >> @@ -117,6 +117,7 @@
> >>   	assigned-clocks = <&cru SCLK_MAC>;
> >>   	assigned-clock-parents = <&ext_gmac>;
> >>   	clock_in_out = "input";
> >> +	phy-handle = <&phy0>;
> >>   	phy-mode = "rgmii";
> >>   	phy-supply = <&vcc33_lan>;
> >>   	pinctrl-names = "default";
> >> @@ -127,6 +128,17 @@
> >>   	tx_delay = <0x30>;
> >>   	rx_delay = <0x10>;
> >>   	status = "ok";
> >> +
> >> +	mdio0 {
> >> +		compatible = "snps,dwmac-mdio";
> >> +		#address-cells = <1>;
> >> +		#size-cells = <0>;
> >> +
> >> +		phy0: ethernet-phy@0 {
> >> +			compatible = "ethernet-phy-ieee802.3-c22";
> >> +			reg = <0>;
> >> +		};
> >> +	};
> >>   };
> >>   
> >>   &gpu {
> >>
> > 
> > 
> > 
> > 
> > 
> 
> 





^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board
  2019-06-22 14:50   ` Katsuhiro Suzuki
  2019-06-22 15:15     ` Heiko Stuebner
@ 2019-06-22 17:55     ` Andrew Lunn
  2019-06-23 13:31       ` Katsuhiro Suzuki
  1 sibling, 1 reply; 6+ messages in thread
From: Andrew Lunn @ 2019-06-22 17:55 UTC (permalink / raw)
  To: Katsuhiro Suzuki, Jose Abreu
  Cc: Heiko Stuebner, linux-rockchip, linux-kernel, linux-arm-kernel,
	devicetree

On Sat, Jun 22, 2019 at 11:50:10PM +0900, Katsuhiro Suzuki wrote:
> Hello,

Hi Katsuhiro

Please also report this to netdev, and the stmmac maintainers.

./scripts/get_maintainer.pl -f drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
Giuseppe Cavallaro <peppe.cavallaro@st.com> (supporter:STMMAC ETHERNET DRIVER)
Alexandre Torgue <alexandre.torgue@st.com> (supporter:STMMAC ETHERNET DRIVER)
Jose Abreu <joabreu@synopsys.com> (supporter:STMMAC ETHERNET DRIVER)
"David S. Miller" <davem@davemloft.net> (odd fixer:NETWORKING DRIVERS)
Maxime Coquelin <mcoquelin.stm32@gmail.com> (maintainer:ARM/STM32 ARCHITECTURE)
netdev@vger.kernel.org (open list:STMMAC ETHERNET DRIVER)
linux-stm32@st-md-mailman.stormreply.com (moderated list:ARM/STM32 ARCHITECTURE)
linux-arm-kernel@lists.infradead.org (moderated list:ARM/STM32 ARCHITECTURE)
linux-kernel@vger.kernel.org (open list)

> I have not bisect commit of root cause yet... Is it better to bisect
> and find problem instead of sending this patch?

My guess is that it is one of these three which broken it:

74371272f97f net: stmmac: Convert to phylink and remove phylib logic
eeef2f6b9f6e net: stmmac: Start adding phylink support
9ad372fc5aaf net: stmmac: Prepare to convert to phylink

	     Andrew

^ permalink raw reply	[flat|nested] 6+ messages in thread

* Re: [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board
  2019-06-22 17:55     ` Andrew Lunn
@ 2019-06-23 13:31       ` Katsuhiro Suzuki
  0 siblings, 0 replies; 6+ messages in thread
From: Katsuhiro Suzuki @ 2019-06-23 13:31 UTC (permalink / raw)
  To: Andrew Lunn, Jose Abreu
  Cc: Heiko Stuebner, linux-rockchip, linux-kernel, linux-arm-kernel,
	devicetree

Hello Heiko, Andrew,

Thank you for comments. I found the commit that has regression:
   74371272f97f net: stmmac: Convert to phylink and remove phylib logic

So I'll report it to netdev and stmmac guys.

Best Regards,
---
Katsuhiro Suzuki


On 2019/06/23 2:55, Andrew Lunn wrote:
> On Sat, Jun 22, 2019 at 11:50:10PM +0900, Katsuhiro Suzuki wrote:
>> Hello,
> 
> Hi Katsuhiro
> 
> Please also report this to netdev, and the stmmac maintainers.
> 
> ./scripts/get_maintainer.pl -f drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> Giuseppe Cavallaro <peppe.cavallaro@st.com> (supporter:STMMAC ETHERNET DRIVER)
> Alexandre Torgue <alexandre.torgue@st.com> (supporter:STMMAC ETHERNET DRIVER)
> Jose Abreu <joabreu@synopsys.com> (supporter:STMMAC ETHERNET DRIVER)
> "David S. Miller" <davem@davemloft.net> (odd fixer:NETWORKING DRIVERS)
> Maxime Coquelin <mcoquelin.stm32@gmail.com> (maintainer:ARM/STM32 ARCHITECTURE)
> netdev@vger.kernel.org (open list:STMMAC ETHERNET DRIVER)
> linux-stm32@st-md-mailman.stormreply.com (moderated list:ARM/STM32 ARCHITECTURE)
> linux-arm-kernel@lists.infradead.org (moderated list:ARM/STM32 ARCHITECTURE)
> linux-kernel@vger.kernel.org (open list)
> 
>> I have not bisect commit of root cause yet... Is it better to bisect
>> and find problem instead of sending this patch?
> 
> My guess is that it is one of these three which broken it:
> 
> 74371272f97f net: stmmac: Convert to phylink and remove phylib logic
> eeef2f6b9f6e net: stmmac: Start adding phylink support
> 9ad372fc5aaf net: stmmac: Prepare to convert to phylink
> 
> 	     Andrew
> 


^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-06-23 13:32 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-06-21 18:00 [PATCH] ARM: dts: rockchip: add ethernet phy node for tinker board Katsuhiro Suzuki
2019-06-22  8:33 ` Heiko Stuebner
2019-06-22 14:50   ` Katsuhiro Suzuki
2019-06-22 15:15     ` Heiko Stuebner
2019-06-22 17:55     ` Andrew Lunn
2019-06-23 13:31       ` Katsuhiro Suzuki

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).