Netdev List
 help / color / mirror / Atom feed
* [PATCH 0/4] Some improve for STM32MP2X and fix for stmac_main
@ 2026-08-04 13:20 Christophe Roullier
  2026-08-04 13:20 ` [PATCH 1/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk Christophe Roullier
                   ` (3 more replies)
  0 siblings, 4 replies; 10+ messages in thread
From: Christophe Roullier @ 2026-08-04 13:20 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	Christophe Roullier
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel

Add PHY Regu for MP23/MP25-DK
Increase deassert value for PHY Reset for MP25-EV1
Fourth commit fix bad cleaning when error during stmmac_mdio_register,
already review on series pushed on 18/02/2026

Christophe Roullier (4):
  arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk
  arm64: dts: st: add 3v3 regulator to ethernet on stm32mp257f-dk
  arm64: dts: st: increase deassert of PHY reset in stm32mp257f-ev1
  net: stmmac: manage error case during stmmac_dvr_probe

 arch/arm64/boot/dts/st/stm32mp235f-dk.dts         | 1 +
 arch/arm64/boot/dts/st/stm32mp257f-dk.dts         | 1 +
 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts        | 2 +-
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
 4 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.43.0


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

* [PATCH 1/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk
  2026-08-04 13:20 [PATCH 0/4] Some improve for STM32MP2X and fix for stmac_main Christophe Roullier
@ 2026-08-04 13:20 ` Christophe Roullier
  2026-08-04 13:20 ` [PATCH 2/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp257f-dk Christophe Roullier
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 10+ messages in thread
From: Christophe Roullier @ 2026-08-04 13:20 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	Christophe Roullier
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel

The Ethernet PHY is supplied by 3v3 PMIC regulator, add it to Ethernet
node.

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
---
 arch/arm64/boot/dts/st/stm32mp235f-dk.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp235f-dk.dts b/arch/arm64/boot/dts/st/stm32mp235f-dk.dts
index dd4efbe5a46e..fb49cd2da2c6 100644
--- a/arch/arm64/boot/dts/st/stm32mp235f-dk.dts
+++ b/arch/arm64/boot/dts/st/stm32mp235f-dk.dts
@@ -137,6 +137,7 @@ &ethernet1 {
 	pinctrl-names = "default", "sleep";
 	phy-handle = <&phy1_eth1>;
 	phy-mode = "rgmii-id";
+	phy-supply = <&scmi_v3v3>;
 	status = "okay";
 
 	mdio {
-- 
2.43.0


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

* [PATCH 2/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp257f-dk
  2026-08-04 13:20 [PATCH 0/4] Some improve for STM32MP2X and fix for stmac_main Christophe Roullier
  2026-08-04 13:20 ` [PATCH 1/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk Christophe Roullier
@ 2026-08-04 13:20 ` Christophe Roullier
  2026-08-04 13:20 ` [PATCH 3/4] arm64: dts: st: increase deassert of PHY reset in stm32mp257f-ev1 Christophe Roullier
  2026-08-04 13:20 ` [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe Christophe Roullier
  3 siblings, 0 replies; 10+ messages in thread
From: Christophe Roullier @ 2026-08-04 13:20 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	Christophe Roullier
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel

The Ethernet PHY is supplied by 3v3 PMIC regulator, add it to Ethernet
node.

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
---
 arch/arm64/boot/dts/st/stm32mp257f-dk.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/arch/arm64/boot/dts/st/stm32mp257f-dk.dts b/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
index 8daf3dfd5133..e98a773448ee 100644
--- a/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
+++ b/arch/arm64/boot/dts/st/stm32mp257f-dk.dts
@@ -144,6 +144,7 @@ &ethernet1 {
 	pinctrl-names = "default", "sleep";
 	phy-handle = <&phy1_eth1>;
 	phy-mode = "rgmii-id";
+	phy-supply = <&scmi_v3v3>;
 	status = "okay";
 
 	mdio {
-- 
2.43.0


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

* [PATCH 3/4] arm64: dts: st: increase deassert of PHY reset in stm32mp257f-ev1
  2026-08-04 13:20 [PATCH 0/4] Some improve for STM32MP2X and fix for stmac_main Christophe Roullier
  2026-08-04 13:20 ` [PATCH 1/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk Christophe Roullier
  2026-08-04 13:20 ` [PATCH 2/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp257f-dk Christophe Roullier
@ 2026-08-04 13:20 ` Christophe Roullier
  2026-08-04 13:20 ` [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe Christophe Roullier
  3 siblings, 0 replies; 10+ messages in thread
From: Christophe Roullier @ 2026-08-04 13:20 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	Christophe Roullier
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel

The RTL8211F has a PHYRSTB pin to reset the chip.
For a complete PHY reset, this pin must be asserted low for
at least 10ms for the internal regulator.
Wait for at least 80ms (for internal circuits setting time) before
accessing the PHY register.
All registers will return to default values after a hardware reset

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
---
 arch/arm64/boot/dts/st/stm32mp257f-ev1.dts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
index 14e033f365e3..a41ab55aa8cb 100644
--- a/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
+++ b/arch/arm64/boot/dts/st/stm32mp257f-ev1.dts
@@ -247,7 +247,7 @@ phy0_eth2: ethernet-phy@1 {
 			compatible = "ethernet-phy-id001c.c916";
 			reg = <1>;
 			reset-assert-us = <10000>;
-			reset-deassert-us = <300>;
+			reset-deassert-us = <80000>;
 			reset-gpios = <&gpiog 6 GPIO_ACTIVE_LOW>;
 		};
 	};
-- 
2.43.0


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

* [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe
  2026-08-04 13:20 [PATCH 0/4] Some improve for STM32MP2X and fix for stmac_main Christophe Roullier
                   ` (2 preceding siblings ...)
  2026-08-04 13:20 ` [PATCH 3/4] arm64: dts: st: increase deassert of PHY reset in stm32mp257f-ev1 Christophe Roullier
@ 2026-08-04 13:20 ` Christophe Roullier
  2026-08-04 14:16   ` Maxime Chevallier
  2026-08-04 17:45   ` Andrew Lunn
  3 siblings, 2 replies; 10+ messages in thread
From: Christophe Roullier @ 2026-08-04 13:20 UTC (permalink / raw)
  To: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	Christophe Roullier
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel

In case of error during stmmac_mdio_register, pm_runtime is not
cleaning before exit probe.

Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
---
 drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
index 0de4bc949913..852de0f51c09 100644
--- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
+++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
@@ -8062,6 +8062,8 @@ static int __stmmac_dvr_probe(struct device *device,
 error_pcs_setup:
 	stmmac_mdio_unregister(ndev);
 error_mdio_register:
+	pm_runtime_put_sync(device);
+	pm_runtime_disable(device);
 	stmmac_napi_del(ndev);
 error_hw_init:
 	destroy_workqueue(priv->wq);
-- 
2.43.0


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

* Re: [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe
  2026-08-04 13:20 ` [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe Christophe Roullier
@ 2026-08-04 14:16   ` Maxime Chevallier
  2026-08-05  9:08     ` Christophe ROULLIER
  2026-08-04 17:45   ` Andrew Lunn
  1 sibling, 1 reply; 10+ messages in thread
From: Maxime Chevallier @ 2026-08-04 14:16 UTC (permalink / raw)
  To: Christophe Roullier, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
	Russell King, linusw, antonio.borneo, Vladimir Oltean
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel

Hi Christophe,

On 8/4/26 15:20, Christophe Roullier wrote:
> In case of error during stmmac_mdio_register, pm_runtime is not
> cleaning before exit probe.
> 
> Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

Can you send this path to the proper networking tree ? Is it a bug you've
encountered in the wild (like, eprobedefer or something ?) or just
something you've noticed ?

If this is something you encountered, let's send it to -net (and it would
need a Fixes tag), otherwise just target that to net-next

Thanks :)

Maxime

> ---
>  drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
>  1 file changed, 2 insertions(+)
> 
> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> index 0de4bc949913..852de0f51c09 100644
> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
> @@ -8062,6 +8062,8 @@ static int __stmmac_dvr_probe(struct device *device,
>  error_pcs_setup:
>  	stmmac_mdio_unregister(ndev);
>  error_mdio_register:
> +	pm_runtime_put_sync(device);
> +	pm_runtime_disable(device);
>  	stmmac_napi_del(ndev);
>  error_hw_init:
>  	destroy_workqueue(priv->wq);


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

* Re: [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe
  2026-08-04 13:20 ` [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe Christophe Roullier
  2026-08-04 14:16   ` Maxime Chevallier
@ 2026-08-04 17:45   ` Andrew Lunn
  2026-08-05  6:39     ` Christophe ROULLIER
  1 sibling, 1 reply; 10+ messages in thread
From: Andrew Lunn @ 2026-08-04 17:45 UTC (permalink / raw)
  To: Christophe Roullier
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	netdev, linux-stm32, linux-arm-kernel, linux-kernel

On Tue, Aug 04, 2026 at 03:20:52PM +0200, Christophe Roullier wrote:
> In case of error during stmmac_mdio_register, pm_runtime is not
> cleaning before exit probe.
> 
> Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>

I don't want to accuse you of anything, but Russell has not been
active for a while, this is v1 of a patchset, so seeing a Reviewed-by:
by Russell jumped out at me. Can you point me at the archived email
from Russell. Just doing my due diligence, trust but verify etc.

     Andrew

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

* Re: [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe
  2026-08-04 17:45   ` Andrew Lunn
@ 2026-08-05  6:39     ` Christophe ROULLIER
  2026-08-05 11:59       ` Andrew Lunn
  0 siblings, 1 reply; 10+ messages in thread
From: Christophe ROULLIER @ 2026-08-05  6:39 UTC (permalink / raw)
  To: Andrew Lunn
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	netdev, linux-stm32, linux-arm-kernel, linux-kernel

No problem Andrew.

https://lkml.iu.edu/2602.2/02822.html

Le 04/08/2026 à 19:45, Andrew Lunn a écrit :
> On Tue, Aug 04, 2026 at 03:20:52PM +0200, Christophe Roullier wrote:
>> In case of error during stmmac_mdio_register, pm_runtime is not
>> cleaning before exit probe.
>>
>> Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
>> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> I don't want to accuse you of anything, but Russell has not been
> active for a while, this is v1 of a patchset, so seeing a Reviewed-by:
> by Russell jumped out at me. Can you point me at the archived email
> from Russell. Just doing my due diligence, trust but verify etc.
>
>       Andrew

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

* Re: [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe
  2026-08-04 14:16   ` Maxime Chevallier
@ 2026-08-05  9:08     ` Christophe ROULLIER
  0 siblings, 0 replies; 10+ messages in thread
From: Christophe ROULLIER @ 2026-08-05  9:08 UTC (permalink / raw)
  To: Maxime Chevallier, Andrew Lunn, David S . Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Maxime Coquelin, Alexandre Torgue,
	Russell King, linusw, antonio.borneo, Vladimir Oltean
  Cc: netdev, linux-stm32, linux-arm-kernel, linux-kernel


Hi Maxime,

The pb comes from an error during ethernet probe (deferred because 
IOExpander used for Reset Ethernet of STM32MP13-DK is not ready), The pb 
is the Ethernet probe initialize pm-runtime but when error occur and 
exit from probe there is no deinit of pm-runtime so when the reprobe is 
called (after init of IOExpander) pm-runtime is already enable and the 
balance between "put" and "get" is not symetric, so Ethernet genpd is 
always active.

Ok I will remove this commit from my series and repush this commit on 
net-next.

Regards,

Christophe.


Le 04/08/2026 à 16:16, Maxime Chevallier a écrit :
> Hi Christophe,
>
> On 8/4/26 15:20, Christophe Roullier wrote:
>> In case of error during stmmac_mdio_register, pm_runtime is not
>> cleaning before exit probe.
>>
>> Signed-off-by: Christophe Roullier <christophe.roullier@foss.st.com>
>> Reviewed-by: Russell King (Oracle) <rmk+kernel@armlinux.org.uk>
> Can you send this path to the proper networking tree ? Is it a bug you've
> encountered in the wild (like, eprobedefer or something ?) or just
> something you've noticed ?
>
> If this is something you encountered, let's send it to -net (and it would
> need a Fixes tag), otherwise just target that to net-next
>
> Thanks :)
>
> Maxime
>
>> ---
>>   drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 2 ++
>>   1 file changed, 2 insertions(+)
>>
>> diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> index 0de4bc949913..852de0f51c09 100644
>> --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
>> @@ -8062,6 +8062,8 @@ static int __stmmac_dvr_probe(struct device *device,
>>   error_pcs_setup:
>>   	stmmac_mdio_unregister(ndev);
>>   error_mdio_register:
>> +	pm_runtime_put_sync(device);
>> +	pm_runtime_disable(device);
>>   	stmmac_napi_del(ndev);
>>   error_hw_init:
>>   	destroy_workqueue(priv->wq);

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

* Re: [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe
  2026-08-05  6:39     ` Christophe ROULLIER
@ 2026-08-05 11:59       ` Andrew Lunn
  0 siblings, 0 replies; 10+ messages in thread
From: Andrew Lunn @ 2026-08-05 11:59 UTC (permalink / raw)
  To: Christophe ROULLIER
  Cc: Andrew Lunn, David S . Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Maxime Coquelin, Alexandre Torgue, Russell King,
	linusw, antonio.borneo, Maxime Chevallier, Vladimir Oltean,
	netdev, linux-stm32, linux-arm-kernel, linux-kernel

On Wed, Aug 05, 2026 at 08:39:12AM +0200, Christophe ROULLIER wrote:
> No problem Andrew.
> 
> https://lkml.iu.edu/2602.2/02822.html

Thanks

Reviewed-by: Andrew Lunn <andrew@lunn.ch>

    Andrew

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

end of thread, other threads:[~2026-08-05 12:00 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-04 13:20 [PATCH 0/4] Some improve for STM32MP2X and fix for stmac_main Christophe Roullier
2026-08-04 13:20 ` [PATCH 1/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp235f-dk Christophe Roullier
2026-08-04 13:20 ` [PATCH 2/4] arm64: dts: st: add 3v3 regulator to ethernet on stm32mp257f-dk Christophe Roullier
2026-08-04 13:20 ` [PATCH 3/4] arm64: dts: st: increase deassert of PHY reset in stm32mp257f-ev1 Christophe Roullier
2026-08-04 13:20 ` [PATCH 4/4] net: stmmac: manage error case during stmmac_dvr_probe Christophe Roullier
2026-08-04 14:16   ` Maxime Chevallier
2026-08-05  9:08     ` Christophe ROULLIER
2026-08-04 17:45   ` Andrew Lunn
2026-08-05  6:39     ` Christophe ROULLIER
2026-08-05 11:59       ` Andrew Lunn

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox