Skip to contentSkip to conversation

ARM: dts: at91-sama5d27_som1: fix phy address to 7

PATCH In review [email protected] 3 participants 4 messages Feb 17, 2021 – Mar 23, 2021

Subsystems (3)
lore
Share & tools
lore

[email protected]

author maintainer
#0 lore raw

PATCH 1/1 ARM: dts: at91-sama5d27_som1: fix phy address to 7

From: Claudiu Beznea <[email protected]>

Fix the phy address to 7 for Ethernet PHY on SAMA5D27 SOM1. No connection established if phy address 0 is used.

The board uses the 24 pins version of the KSZ8081RNA part, KSZ8081RNA pin 16 REFCLK as PHYAD bit [2] has weak internal pull-down. But at reset, connected to PD09 of the MPU it's connected with an internal pull-up forming PHYAD[2:0] = 7.

Fixes 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
Cc Ludovic Desroches <[email protected]>
Cc <[email protected]> # 4.14+
---
 arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91-sama5d27_som1.dtsi +2 -2
index 1b1163858b1d..e3251f3e3eaa 100644
@@ -84,8 +84,8 @@ macb0: ethernet@f8008000 {
 				pinctrl-0 = <&pinctrl_macb0_default>;
 				phy-mode = "rmii";
 
-				ethernet-phy@0 {
-					reg = <0x0>;
+				ethernet-phy@7 {
+					reg = <0x7>;
 					interrupt-parent = <&pioA>;
 					interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
 					pinctrl-names = "default";
Signature · 1 line
2.30.0
Tested-by on v1 1/1
#1 lore raw

Hei hei,

I could not get ethernet to work on SAMA5D27-SOM1-EK1 with kernels v5.10 and v5.11 built by a recent ptxdist based DistroKit BSP, while it used to work with an older v4.19 kernel. Just applying this patch to the tree made ethernet working again, thus:

Not sure why it worked with that older kernel, though.

I added Ahmad to Cc, he added board support to DistroKit for that board, and might want to know. And I added the devicetree list to Cc, I wondered why the patch was not there and get_maintainers.pl proposed it.

Thanks for fixing this and greetings
Alex

Quoted 45 lines

[email protected] hat am 17.02.2021 12:38 geschrieben:

From: Claudiu Beznea <[email protected]>

Fix the phy address to 7 for Ethernet PHY on SAMA5D27 SOM1. No connection established if phy address 0 is used.

The board uses the 24 pins version of the KSZ8081RNA part, KSZ8081RNA pin 16 REFCLK as PHYAD bit [2] has weak internal pull-down. But at reset, connected to PD09 of the MPU it's connected with an internal pull-up forming PHYAD[2:0] = 7.

Fixes 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
Cc Ludovic Desroches <[email protected]>
Cc <[email protected]> # 4.14+
---
 arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91-sama5d27_som1.dtsi +2 -2
index 1b1163858b1d..e3251f3e3eaa 100644
@@ -84,8 +84,8 @@ macb0: ethernet@f8008000 {
 				pinctrl-0 = <&pinctrl_macb0_default>;
 				phy-mode = "rmii";
 
-				ethernet-phy@0 {
-					reg = <0x0>;
+				ethernet-phy@7 {
+					reg = <0x7>;
 					interrupt-parent = <&pioA>;
 					interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
 					pinctrl-names = "default";
Signature · 7 lines
2.30.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Reviewed-by
#2 lore raw

Hello Alexander,

Quoted 7 lines · Alexander Dahl

Hei hei,

I could not get ethernet to work on SAMA5D27-SOM1-EK1 with kernels v5.10 and v5.11 built by a recent ptxdist based DistroKit BSP, while it used to work with an older v4.19 kernel. Just applying this patch to the tree made ethernet working again, thus:

Not sure why it worked with that older kernel, though.

Thanks for investigating! Seems that somehow PHY broadcast worked on this board with older kernels (and current barebox), but no longer does with newer kernels.

A bisection could shed some light onto what broke this.

As the KSZ8081 driver disables broadcast in the phy config init, this change looks appropriate regardless. The fixes tag doesn't refer to an upstream commit though. This should probably read:

Fixes af690fa37e39 ("ARM: dts: at91: at91-sama5d27_som1: add sama5d27 SoM1 support")

With this addressed:

You could send a proper patch and stick your S-o-b under it.

Cheers,
Ahmad

Quoted 52 lines

I added Ahmad to Cc, he added board support to DistroKit for that board, and might want to know. And I added the devicetree list to Cc, I wondered why the patch was not there and get_maintainers.pl proposed it.

Thanks for fixing this and greetings
Alex

Quoted 45 lines

[email protected] hat am 17.02.2021 12:38 geschrieben:

From: Claudiu Beznea <[email protected]>

Fix the phy address to 7 for Ethernet PHY on SAMA5D27 SOM1. No connection established if phy address 0 is used.

The board uses the 24 pins version of the KSZ8081RNA part, KSZ8081RNA pin 16 REFCLK as PHYAD bit [2] has weak internal pull-down. But at reset, connected to PD09 of the MPU it's connected with an internal pull-up forming PHYAD[2:0] = 7.

Fixes 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
Cc Ludovic Desroches <[email protected]>
Cc <[email protected]> # 4.14+
---
 arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91-sama5d27_som1.dtsi +2 -2
index 1b1163858b1d..e3251f3e3eaa 100644
@@ -84,8 +84,8 @@ macb0: ethernet@f8008000 {
 				pinctrl-0 = <&pinctrl_macb0_default>;
 				phy-mode = "rmii";
 
-				ethernet-phy@0 {
-					reg = <0x0>;
+				ethernet-phy@7 {
+					reg = <0x7>;
 					interrupt-parent = <&pioA>;
 					interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
 					pinctrl-names = "default";
Signature · 7 lines
2.30.0


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 4 lines
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
author maintainer
#3 lore raw

Alexander, Ahmad,

Quoted 15 lines · Ahmad Fatoum

Hello Alexander,

Quoted 7 lines · Alexander Dahl

Hei hei,

I could not get ethernet to work on SAMA5D27-SOM1-EK1 with kernels v5.10 and v5.11 built by a recent ptxdist based DistroKit BSP, while it used to work with an older v4.19 kernel. Just applying this patch to the tree made ethernet working again, thus:

Not sure why it worked with that older kernel, though.

Thanks for investigating! Seems that somehow PHY broadcast worked on this board with older kernels (and current barebox), but no longer does with newer kernels.

Quoted 6 lines

A bisection could shed some light onto what broke this.

As the KSZ8081 driver disables broadcast in the phy config init, this change looks appropriate regardless. The fixes tag doesn't refer to an upstream commit though. This should probably read:

Fixes af690fa37e39 ("ARM: dts: at91: at91-sama5d27_som1: add sama5d27 SoM1 support")

I didn't noticed that on my side.

Quoted 3 lines

With this addressed:

Thanks a lot for your feedback.

Quoted 1 line

You could send a proper patch and stick your S-o-b under it.

Actually this patch is already in arm-soc tree here:

https://git.kernel.org/pub/scm/linux/kernel/git/soc/soc.git/commit/?h=arm/fixes&id=221c3a09ddf70a0a51715e6c2878d8305e95c558

So I cannot add tags anymore to it, sorry.

Best regards,
Nicolas

Quoted 58 lines
Quoted 46 lines

I added Ahmad to Cc, he added board support to DistroKit for that board, and might want to know. And I added the devicetree list to Cc, I wondered why the patch was not there and get_maintainers.pl proposed it.

Thanks for fixing this and greetings
Alex

Quoted 41 lines

[email protected] hat am 17.02.2021 12:38 geschrieben:

From: Claudiu Beznea <[email protected]>

Fix the phy address to 7 for Ethernet PHY on SAMA5D27 SOM1. No connection established if phy address 0 is used.

The board uses the 24 pins version of the KSZ8081RNA part, KSZ8081RNA pin 16 REFCLK as PHYAD bit [2] has weak internal pull-down. But at reset, connected to PD09 of the MPU it's connected with an internal pull-up forming PHYAD[2:0] = 7.

Fixes 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
Cc Ludovic Desroches <[email protected]>
Cc <[email protected]> # 4.14+
---
  arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/at91-sama5d27_som1.dtsi +2 -3
index 1b1163858b1d..e3251f3e3eaa 100644
@@ -84,8 +84,8 @@ macb0: ethernet@f8008000 {
                              pinctrl-0 = <&pinctrl_macb0_default>;
                              phy-mode = "rmii";
 
-                            ethernet-phy@0 {
-                                    reg = <0x0>;
+                            ethernet-phy@7 {
+                                    reg = <0x7>;
                                      interrupt-parent = <&pioA>;
                                      interrupts = <PIN_PD31 IRQ_TYPE_LEVEL_LOW>;
                                      pinctrl-names = "default";
--

2.30.0

Quoted 5 lines
Quoted 4 lines

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

--

Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |
Signature · 1 line
Nicolas Ferre