All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
@ 2021-02-17 11:38 ` nicolas.ferre
  0 siblings, 0 replies; 8+ messages in thread
From: nicolas.ferre @ 2021-02-17 11:38 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Alexandre Belloni, Ludovic Desroches
  Cc: Claudiu Beznea, stable

From: Claudiu Beznea <claudiu.beznea@microchip.com>

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.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: <stable@vger.kernel.org> # 4.14+
---
 arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
index 1b1163858b1d..e3251f3e3eaa 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
@@ -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


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

* [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
@ 2021-02-17 11:38 ` nicolas.ferre
  0 siblings, 0 replies; 8+ messages in thread
From: nicolas.ferre @ 2021-02-17 11:38 UTC (permalink / raw)
  To: linux-kernel, linux-arm-kernel, Alexandre Belloni, Ludovic Desroches
  Cc: Claudiu Beznea, stable

From: Claudiu Beznea <claudiu.beznea@microchip.com>

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.

Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
Cc: <stable@vger.kernel.org> # 4.14+
---
 arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
index 1b1163858b1d..e3251f3e3eaa 100644
--- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
+++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
@@ -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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
  2021-02-17 11:38 ` nicolas.ferre
@ 2021-03-23 10:45   ` Alexander Dahl
  -1 siblings, 0 replies; 8+ messages in thread
From: Alexander Dahl @ 2021-03-23 10:45 UTC (permalink / raw)
  To: nicolas.ferre, linux-kernel, linux-arm-kernel, Alexandre Belloni,
	Ludovic Desroches
  Cc: Claudiu Beznea, stable, Ahmad Fatoum, devicetree

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:

Tested-by: Alexander Dahl <ada@thorsis.com>

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

> nicolas.ferre@microchip.com hat am 17.02.2021 12:38 geschrieben:
> 
>  
> From: Claudiu Beznea <claudiu.beznea@microchip.com>
> 
> 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.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: <stable@vger.kernel.org> # 4.14+
> ---
>  arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> index 1b1163858b1d..e3251f3e3eaa 100644
> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> @@ -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
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
@ 2021-03-23 10:45   ` Alexander Dahl
  0 siblings, 0 replies; 8+ messages in thread
From: Alexander Dahl @ 2021-03-23 10:45 UTC (permalink / raw)
  To: nicolas.ferre, linux-kernel, linux-arm-kernel, Alexandre Belloni,
	Ludovic Desroches
  Cc: Claudiu Beznea, stable, Ahmad Fatoum, devicetree

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:

Tested-by: Alexander Dahl <ada@thorsis.com>

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

> nicolas.ferre@microchip.com hat am 17.02.2021 12:38 geschrieben:
> 
>  
> From: Claudiu Beznea <claudiu.beznea@microchip.com>
> 
> 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.
> 
> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
> Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
> Cc: <stable@vger.kernel.org> # 4.14+
> ---
>  arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)
> 
> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> index 1b1163858b1d..e3251f3e3eaa 100644
> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
> @@ -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
> 
> 
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
  2021-03-23 10:45   ` Alexander Dahl
@ 2021-03-23 10:55     ` Ahmad Fatoum
  -1 siblings, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2021-03-23 10:55 UTC (permalink / raw)
  To: Alexander Dahl, nicolas.ferre, linux-kernel, linux-arm-kernel,
	Alexandre Belloni, Ludovic Desroches
  Cc: Claudiu Beznea, stable, devicetree, Pengutronix Kernel Team,
	Oleksij Rempel

Hello Alexander,

On 23.03.21 11:45, Alexander Dahl wrote:
> 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:
> 
> Tested-by: Alexander Dahl <ada@thorsis.com>
> 
> 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:

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

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

Cheers,
Ahmad

> 
> 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
> 
>> nicolas.ferre@microchip.com hat am 17.02.2021 12:38 geschrieben:
>>
>>  
>> From: Claudiu Beznea <claudiu.beznea@microchip.com>
>>
>> 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.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
>> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>> Cc: <stable@vger.kernel.org> # 4.14+
>> ---
>>  arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>> index 1b1163858b1d..e3251f3e3eaa 100644
>> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>> @@ -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
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> 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 |

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

* Re: [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
@ 2021-03-23 10:55     ` Ahmad Fatoum
  0 siblings, 0 replies; 8+ messages in thread
From: Ahmad Fatoum @ 2021-03-23 10:55 UTC (permalink / raw)
  To: Alexander Dahl, nicolas.ferre, linux-kernel, linux-arm-kernel,
	Alexandre Belloni, Ludovic Desroches
  Cc: Claudiu Beznea, stable, devicetree, Pengutronix Kernel Team,
	Oleksij Rempel

Hello Alexander,

On 23.03.21 11:45, Alexander Dahl wrote:
> 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:
> 
> Tested-by: Alexander Dahl <ada@thorsis.com>
> 
> 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:

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

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

Cheers,
Ahmad

> 
> 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
> 
>> nicolas.ferre@microchip.com hat am 17.02.2021 12:38 geschrieben:
>>
>>  
>> From: Claudiu Beznea <claudiu.beznea@microchip.com>
>>
>> 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.
>>
>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>> Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
>> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>> Cc: <stable@vger.kernel.org> # 4.14+
>> ---
>>  arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
>>  1 file changed, 2 insertions(+), 2 deletions(-)
>>
>> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>> index 1b1163858b1d..e3251f3e3eaa 100644
>> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>> @@ -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
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel@lists.infradead.org
>> 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 |

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

* Re: [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
  2021-03-23 10:55     ` Ahmad Fatoum
@ 2021-03-23 11:17       ` Nicolas Ferre
  -1 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2021-03-23 11:17 UTC (permalink / raw)
  To: Ahmad Fatoum, Alexander Dahl, linux-kernel, linux-arm-kernel,
	Alexandre Belloni, Ludovic Desroches
  Cc: Claudiu Beznea, stable, devicetree, Pengutronix Kernel Team,
	Oleksij Rempel

Alexander, Ahmad,

On 23/03/2021 at 11:55, Ahmad Fatoum wrote:
> Hello Alexander,
> 
> On 23.03.21 11:45, Alexander Dahl wrote:
>> 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:
>>
>> Tested-by: Alexander Dahl <ada@thorsis.com>
>>
>> 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")

I didn't noticed that on my side.

> With this addressed:
> 
> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Thanks a lot for your feedback.

> 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

>> 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
>>
>>> nicolas.ferre@microchip.com hat am 17.02.2021 12:38 geschrieben:
>>>
>>>
>>> From: Claudiu Beznea <claudiu.beznea@microchip.com>
>>>
>>> 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.
>>>
>>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>>> Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
>>> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
>>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>>> Cc: <stable@vger.kernel.org> # 4.14+
>>> ---
>>>   arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>>> index 1b1163858b1d..e3251f3e3eaa 100644
>>> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>>> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>>> @@ -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
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel@lists.infradead.org
>>> 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 |
> 


-- 
Nicolas Ferre

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

* Re: [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7
@ 2021-03-23 11:17       ` Nicolas Ferre
  0 siblings, 0 replies; 8+ messages in thread
From: Nicolas Ferre @ 2021-03-23 11:17 UTC (permalink / raw)
  To: Ahmad Fatoum, Alexander Dahl, linux-kernel, linux-arm-kernel,
	Alexandre Belloni, Ludovic Desroches
  Cc: Claudiu Beznea, stable, devicetree, Pengutronix Kernel Team,
	Oleksij Rempel

Alexander, Ahmad,

On 23/03/2021 at 11:55, Ahmad Fatoum wrote:
> Hello Alexander,
> 
> On 23.03.21 11:45, Alexander Dahl wrote:
>> 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:
>>
>> Tested-by: Alexander Dahl <ada@thorsis.com>
>>
>> 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")

I didn't noticed that on my side.

> With this addressed:
> 
> Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

Thanks a lot for your feedback.

> 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

>> 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
>>
>>> nicolas.ferre@microchip.com hat am 17.02.2021 12:38 geschrieben:
>>>
>>>
>>> From: Claudiu Beznea <claudiu.beznea@microchip.com>
>>>
>>> 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.
>>>
>>> Signed-off-by: Claudiu Beznea <claudiu.beznea@microchip.com>
>>> Fixes: 2f61929eb10a ("ARM: dts: at91: at91-sama5d27_som1: fix PHY ID")
>>> Cc: Ludovic Desroches <ludovic.desroches@microchip.com>
>>> Signed-off-by: Nicolas Ferre <nicolas.ferre@microchip.com>
>>> Cc: <stable@vger.kernel.org> # 4.14+
>>> ---
>>>   arch/arm/boot/dts/at91-sama5d27_som1.dtsi | 4 ++--
>>>   1 file changed, 2 insertions(+), 2 deletions(-)
>>>
>>> diff --git a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>>> index 1b1163858b1d..e3251f3e3eaa 100644
>>> --- a/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>>> +++ b/arch/arm/boot/dts/at91-sama5d27_som1.dtsi
>>> @@ -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
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel@lists.infradead.org
>>> 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 |
> 


-- 
Nicolas Ferre

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

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

end of thread, other threads:[~2021-03-23 11:19 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-17 11:38 [PATCH] ARM: dts: at91-sama5d27_som1: fix phy address to 7 nicolas.ferre
2021-02-17 11:38 ` nicolas.ferre
2021-03-23 10:45 ` Alexander Dahl
2021-03-23 10:45   ` Alexander Dahl
2021-03-23 10:55   ` Ahmad Fatoum
2021-03-23 10:55     ` Ahmad Fatoum
2021-03-23 11:17     ` Nicolas Ferre
2021-03-23 11:17       ` Nicolas Ferre

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.