devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol
@ 2024-11-09 15:16 Nícolas F. R. A. Prado
  2024-11-09 15:16 ` [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol Nícolas F. R. A. Prado
                   ` (3 more replies)
  0 siblings, 4 replies; 13+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-11-09 15:16 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
	Alexandre Torgue, Jose Abreu, Maxime Coquelin,
	Bartosz Golaszewski, Andrew Halaney, Simon Horman
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-stm32, Nícolas F. R. A. Prado

This series fixes the inverted handling of the mediatek,mac-wol DT
property. This was done with backwards compatibility in v1, but based on
the feedback received, all boards should be using MAC WOL, so many of
them were incorrectly described and didn't have working WOL tested
anyway. So for v2, the approach is simpler: just fix the driver handling
and update the DTs to enable MAC WOL everywhere.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
Changes in v2:
- Dropped introduction of new property mediatek,mac-wol-noninverted for
  backwards compatibility
- Set MAC WOL for every DT
- Link to v1: https://lore.kernel.org/r/20241101-mediatek-mac-wol-noninverted-v1-0-75b81808717a@collabora.com

---
Nícolas F. R. A. Prado (2):
      net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
      arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards

 arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
 arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
 drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c          | 4 ++--
 4 files changed, 5 insertions(+), 2 deletions(-)
---
base-commit: c88416ba074a8913cf6d61b789dd834bbca6681c
change-id: 20241101-mediatek-mac-wol-noninverted-198c6c404536

Best regards,
-- 
Nícolas F. R. A. Prado <nfraprado@collabora.com>


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

* [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
  2024-11-09 15:16 [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol Nícolas F. R. A. Prado
@ 2024-11-09 15:16 ` Nícolas F. R. A. Prado
  2024-11-14  9:26   ` AngeloGioacchino Del Regno
  2024-11-09 15:16 ` [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards Nícolas F. R. A. Prado
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 13+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-11-09 15:16 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
	Alexandre Torgue, Jose Abreu, Maxime Coquelin,
	Bartosz Golaszewski, Andrew Halaney, Simon Horman
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-stm32, Nícolas F. R. A. Prado

The mediatek,mac-wol property is being handled backwards to what is
described in the binding: it currently enables PHY WOL when the property
is present and vice versa. Invert the driver logic so it matches the
binding description.

Fixes: fd1d62d80ebc ("net: stmmac: replace the use_phy_wol field with a flag")
Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
 drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
index f8ca81675407ade786f2b9a38c63511a0b7fb705..c9636832a570a211a53f9480b0a8aec56509199f 100644
--- a/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
+++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-mediatek.c
@@ -589,9 +589,9 @@ static int mediatek_dwmac_common_data(struct platform_device *pdev,
 
 	plat->mac_interface = priv_plat->phy_mode;
 	if (priv_plat->mac_wol)
-		plat->flags |= STMMAC_FLAG_USE_PHY_WOL;
-	else
 		plat->flags &= ~STMMAC_FLAG_USE_PHY_WOL;
+	else
+		plat->flags |= STMMAC_FLAG_USE_PHY_WOL;
 	plat->riwt_off = 1;
 	plat->maxmtu = ETH_DATA_LEN;
 	plat->host_dma_width = priv_plat->variant->dma_bit_mask;

-- 
2.47.0


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

* [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
  2024-11-09 15:16 [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol Nícolas F. R. A. Prado
  2024-11-09 15:16 ` [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol Nícolas F. R. A. Prado
@ 2024-11-09 15:16 ` Nícolas F. R. A. Prado
  2024-11-14  9:26   ` AngeloGioacchino Del Regno
  2024-11-14  4:00 ` [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol patchwork-bot+netdevbpf
  2024-12-23 11:06 ` (subset) " AngeloGioacchino Del Regno
  3 siblings, 1 reply; 13+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-11-09 15:16 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, AngeloGioacchino Del Regno, Biao Huang,
	Alexandre Torgue, Jose Abreu, Maxime Coquelin,
	Bartosz Golaszewski, Andrew Halaney, Simon Horman
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-stm32, Nícolas F. R. A. Prado

Due to the mediatek,mac-wol property previously being handled backwards
by the dwmac-mediatek driver, its use in the DTs seems to have been
inconsistent.

Now that the driver has been fixed, correct this description. All the
currently upstream boards support MAC WOL, so add the mediatek,mac-wol
property to the missing ones.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
---
 arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
 arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
 arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
 3 files changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/mediatek/mt2712-evb.dts b/arch/arm64/boot/dts/mediatek/mt2712-evb.dts
index c84c47c1352fba49d219fb8ace17a74953927fdc..0449686bd06ba17c5798aafdfb3fa071fca7e2f2 100644
--- a/arch/arm64/boot/dts/mediatek/mt2712-evb.dts
+++ b/arch/arm64/boot/dts/mediatek/mt2712-evb.dts
@@ -115,6 +115,7 @@ &eth {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&eth_default>;
 	pinctrl-1 = <&eth_sleep>;
+	mediatek,mac-wol;
 	status = "okay";
 
 	mdio {
diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
index 31d424b8fc7cedef65489392eb279b7fd2194a4a..c12684e8c449b2d7b3b3a79086925bfe5ae0d8f8 100644
--- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
@@ -109,6 +109,7 @@ &eth {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&eth_default_pins>;
 	pinctrl-1 = <&eth_sleep_pins>;
+	mediatek,mac-wol;
 	status = "okay";
 
 	mdio {
diff --git a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
index e2e75b8ff91880711c82f783c7ccbef4128b7ab4..4985b65925a9ed10ad44a6e58b9657a9dd48751f 100644
--- a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
+++ b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
@@ -271,6 +271,7 @@ &eth {
 	pinctrl-names = "default", "sleep";
 	pinctrl-0 = <&eth_default_pins>;
 	pinctrl-1 = <&eth_sleep_pins>;
+	mediatek,mac-wol;
 	status = "okay";
 
 	mdio {

-- 
2.47.0


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

* Re: [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol
  2024-11-09 15:16 [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol Nícolas F. R. A. Prado
  2024-11-09 15:16 ` [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol Nícolas F. R. A. Prado
  2024-11-09 15:16 ` [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards Nícolas F. R. A. Prado
@ 2024-11-14  4:00 ` patchwork-bot+netdevbpf
  2024-12-20 16:09   ` Nícolas F. R. A. Prado
  2024-12-23 11:06 ` (subset) " AngeloGioacchino Del Regno
  3 siblings, 1 reply; 13+ messages in thread
From: patchwork-bot+netdevbpf @ 2024-11-14  4:00 UTC (permalink / raw)
  To: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado_=3Cnfraprado=40collabora=2Ecom?=,
	=?utf-8?q?=3E?=
  Cc: andrew+netdev, davem, edumazet, kuba, pabeni, robh, krzk+dt,
	conor+dt, matthias.bgg, angelogioacchino.delregno, biao.huang,
	alexandre.torgue, joabreu, mcoquelin.stm32, bartosz.golaszewski,
	ahalaney, horms, kernel, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, linux-stm32

Hello:

This series was applied to netdev/net.git (main)
by Jakub Kicinski <kuba@kernel.org>:

On Sat, 09 Nov 2024 10:16:31 -0500 you wrote:
> This series fixes the inverted handling of the mediatek,mac-wol DT
> property. This was done with backwards compatibility in v1, but based on
> the feedback received, all boards should be using MAC WOL, so many of
> them were incorrectly described and didn't have working WOL tested
> anyway. So for v2, the approach is simpler: just fix the driver handling
> and update the DTs to enable MAC WOL everywhere.
> 
> [...]

Here is the summary with links:
  - [v2,1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
    https://git.kernel.org/netdev/net/c/a03b18a71c12
  - [v2,2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
    (no matching commit)

You are awesome, thank you!
-- 
Deet-doot-dot, I am a bot.
https://korg.docs.kernel.org/patchwork/pwbot.html



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

* Re: [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
  2024-11-09 15:16 ` [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards Nícolas F. R. A. Prado
@ 2024-11-14  9:26   ` AngeloGioacchino Del Regno
  2024-11-14 12:29     ` Michael Walle
  2024-11-14 19:22     ` Nícolas F. R. A. Prado
  0 siblings, 2 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-11-14  9:26 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Michael Walle
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, Biao Huang, Alexandre Torgue,
	Jose Abreu, Maxime Coquelin, Bartosz Golaszewski, Andrew Halaney,
	Simon Horman

Il 09/11/24 16:16, Nícolas F. R. A. Prado ha scritto:
> Due to the mediatek,mac-wol property previously being handled backwards
> by the dwmac-mediatek driver, its use in the DTs seems to have been
> inconsistent.
> 
> Now that the driver has been fixed, correct this description. All the
> currently upstream boards support MAC WOL, so add the mediatek,mac-wol
> property to the missing ones.
> 
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> ---
>   arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
>   arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
>   arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
>   3 files changed, 3 insertions(+)
> 

..snip..

> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> index 31d424b8fc7cedef65489392eb279b7fd2194a4a..c12684e8c449b2d7b3b3a79086925bfe5ae0d8f8 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> @@ -109,6 +109,7 @@ &eth {
>   	pinctrl-names = "default", "sleep";
>   	pinctrl-0 = <&eth_default_pins>;
>   	pinctrl-1 = <&eth_sleep_pins>;
> +	mediatek,mac-wol;

The demo board has the same WoL capability as the EVK, so you can avoid adding the
mac-wol property here.

>   	status = "okay";
>   
>   	mdio {
> diff --git a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> index e2e75b8ff91880711c82f783c7ccbef4128b7ab4..4985b65925a9ed10ad44a6e58b9657a9dd48751f 100644
> --- a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> +++ b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> @@ -271,6 +271,7 @@ &eth {
>   	pinctrl-names = "default", "sleep";
>   	pinctrl-0 = <&eth_default_pins>;
>   	pinctrl-1 = <&eth_sleep_pins>;
> +	mediatek,mac-wol;

I'm mostly sure that Kontron's i1200 works the same as the EVK in regards to WoL.

Michael, I recall you worked on this board - can you please confirm?

Thanks,
Angelo


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

* Re: [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
  2024-11-09 15:16 ` [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol Nícolas F. R. A. Prado
@ 2024-11-14  9:26   ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-11-14  9:26 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Biao Huang,
	Alexandre Torgue, Jose Abreu, Maxime Coquelin,
	Bartosz Golaszewski, Andrew Halaney, Simon Horman
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-stm32

Il 09/11/24 16:16, Nícolas F. R. A. Prado ha scritto:
> The mediatek,mac-wol property is being handled backwards to what is
> described in the binding: it currently enables PHY WOL when the property
> is present and vice versa. Invert the driver logic so it matches the
> binding description.
> 
> Fixes: fd1d62d80ebc ("net: stmmac: replace the use_phy_wol field with a flag")
> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>

Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>



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

* Re: [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
  2024-11-14  9:26   ` AngeloGioacchino Del Regno
@ 2024-11-14 12:29     ` Michael Walle
  2024-11-14 13:56       ` AngeloGioacchino Del Regno
  2024-11-14 19:22     ` Nícolas F. R. A. Prado
  1 sibling, 1 reply; 13+ messages in thread
From: Michael Walle @ 2024-11-14 12:29 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno, Nícolas F. R. A. Prado
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, Biao Huang, Alexandre Torgue,
	Jose Abreu, Maxime Coquelin, Bartosz Golaszewski, Andrew Halaney,
	Simon Horman

[-- Attachment #1: Type: text/plain, Size: 2459 bytes --]

Hi,

On Thu Nov 14, 2024 at 10:26 AM CET, AngeloGioacchino Del Regno wrote:
> Il 09/11/24 16:16, Nícolas F. R. A. Prado ha scritto:
> > Due to the mediatek,mac-wol property previously being handled backwards
> > by the dwmac-mediatek driver, its use in the DTs seems to have been
> > inconsistent.
> > 
> > Now that the driver has been fixed, correct this description. All the
> > currently upstream boards support MAC WOL, so add the mediatek,mac-wol
> > property to the missing ones.
> > 
> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > ---
> >   arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
> >   arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
> >   arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
> >   3 files changed, 3 insertions(+)
> > 
>
> ..snip..
>
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> > index 31d424b8fc7cedef65489392eb279b7fd2194a4a..c12684e8c449b2d7b3b3a79086925bfe5ae0d8f8 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> > +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> > @@ -109,6 +109,7 @@ &eth {
> >   	pinctrl-names = "default", "sleep";
> >   	pinctrl-0 = <&eth_default_pins>;
> >   	pinctrl-1 = <&eth_sleep_pins>;
> > +	mediatek,mac-wol;
>
> The demo board has the same WoL capability as the EVK, so you can avoid adding the
> mac-wol property here.

Not sure I can follow you here.

>
> >   	status = "okay";
> >   
> >   	mdio {
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> > index e2e75b8ff91880711c82f783c7ccbef4128b7ab4..4985b65925a9ed10ad44a6e58b9657a9dd48751f 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> > +++ b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> > @@ -271,6 +271,7 @@ &eth {
> >   	pinctrl-names = "default", "sleep";
> >   	pinctrl-0 = <&eth_default_pins>;
> >   	pinctrl-1 = <&eth_sleep_pins>;
> > +	mediatek,mac-wol;
>
> I'm mostly sure that Kontron's i1200 works the same as the EVK in regards to WoL.
>
> Michael, I recall you worked on this board - can you please confirm?

I'd say so. Honestly, I've never tried WoL on this board, but I'm
not aware of any difference to the *demo* board (not the EVK).

-michael

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 297 bytes --]

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

* Re: [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
  2024-11-14 12:29     ` Michael Walle
@ 2024-11-14 13:56       ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-11-14 13:56 UTC (permalink / raw)
  To: Michael Walle, Nícolas F. R. A. Prado
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, Andrew Lunn, David S. Miller, Eric Dumazet,
	Jakub Kicinski, Paolo Abeni, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Matthias Brugger, Biao Huang, Alexandre Torgue,
	Jose Abreu, Maxime Coquelin, Bartosz Golaszewski, Andrew Halaney,
	Simon Horman

Il 14/11/24 13:29, Michael Walle ha scritto:
> Hi,
> 
> On Thu Nov 14, 2024 at 10:26 AM CET, AngeloGioacchino Del Regno wrote:
>> Il 09/11/24 16:16, Nícolas F. R. A. Prado ha scritto:
>>> Due to the mediatek,mac-wol property previously being handled backwards
>>> by the dwmac-mediatek driver, its use in the DTs seems to have been
>>> inconsistent.
>>>
>>> Now that the driver has been fixed, correct this description. All the
>>> currently upstream boards support MAC WOL, so add the mediatek,mac-wol
>>> property to the missing ones.
>>>
>>> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>>> ---
>>>    arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
>>>    arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
>>>    arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
>>>    3 files changed, 3 insertions(+)
>>>
>>
>> ..snip..
>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>>> index 31d424b8fc7cedef65489392eb279b7fd2194a4a..c12684e8c449b2d7b3b3a79086925bfe5ae0d8f8 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>>> @@ -109,6 +109,7 @@ &eth {
>>>    	pinctrl-names = "default", "sleep";
>>>    	pinctrl-0 = <&eth_default_pins>;
>>>    	pinctrl-1 = <&eth_sleep_pins>;
>>> +	mediatek,mac-wol;
>>
>> The demo board has the same WoL capability as the EVK, so you can avoid adding the
>> mac-wol property here.
> 
> Not sure I can follow you here.
> 

That's in the sense that they do WoL through the MAC and not through the PHY (as
in, it's the MAC that has to be configured for WoL and not *only* the PHY).

>>
>>>    	status = "okay";
>>>    
>>>    	mdio {
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
>>> index e2e75b8ff91880711c82f783c7ccbef4128b7ab4..4985b65925a9ed10ad44a6e58b9657a9dd48751f 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
>>> @@ -271,6 +271,7 @@ &eth {
>>>    	pinctrl-names = "default", "sleep";
>>>    	pinctrl-0 = <&eth_default_pins>;
>>>    	pinctrl-1 = <&eth_sleep_pins>;
>>> +	mediatek,mac-wol;
>>
>> I'm mostly sure that Kontron's i1200 works the same as the EVK in regards to WoL.
>>
>> Michael, I recall you worked on this board - can you please confirm?
> 
> I'd say so. Honestly, I've never tried WoL on this board, but I'm
> not aware of any difference to the *demo* board (not the EVK).

Thanks for confirming. I will ignore the devicetree commit entirely then, as this
would ...un...fix the fix (meaning that patch [1/2] is good!).

Cheers,
Angelo

> 
> -michael



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

* Re: [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
  2024-11-14  9:26   ` AngeloGioacchino Del Regno
  2024-11-14 12:29     ` Michael Walle
@ 2024-11-14 19:22     ` Nícolas F. R. A. Prado
  2024-11-15  9:26       ` AngeloGioacchino Del Regno
  1 sibling, 1 reply; 13+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-11-14 19:22 UTC (permalink / raw)
  To: AngeloGioacchino Del Regno
  Cc: Michael Walle, kernel, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Biao Huang,
	Alexandre Torgue, Jose Abreu, Maxime Coquelin,
	Bartosz Golaszewski, Andrew Halaney, Simon Horman

On Thu, Nov 14, 2024 at 10:26:34AM +0100, AngeloGioacchino Del Regno wrote:
> Il 09/11/24 16:16, Nícolas F. R. A. Prado ha scritto:
> > Due to the mediatek,mac-wol property previously being handled backwards
> > by the dwmac-mediatek driver, its use in the DTs seems to have been
> > inconsistent.
> > 
> > Now that the driver has been fixed, correct this description. All the
> > currently upstream boards support MAC WOL, so add the mediatek,mac-wol
> > property to the missing ones.
> > 
> > Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
> > ---
> >   arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
> >   arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
> >   arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
> >   3 files changed, 3 insertions(+)
> > 
> 
> ..snip..
> 
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> > index 31d424b8fc7cedef65489392eb279b7fd2194a4a..c12684e8c449b2d7b3b3a79086925bfe5ae0d8f8 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> > +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
> > @@ -109,6 +109,7 @@ &eth {
> >   	pinctrl-names = "default", "sleep";
> >   	pinctrl-0 = <&eth_default_pins>;
> >   	pinctrl-1 = <&eth_sleep_pins>;
> > +	mediatek,mac-wol;
> 
> The demo board has the same WoL capability as the EVK, so you can avoid adding the
> mac-wol property here.

Not sure I follow... If we omit the property here it will use PHY WOL instead,
while the genio 1200 EVK has the property, so it will be using MAC WOL, so
they're already the same and omitting will make them behave differently...

Let me recap to make sure we're all on the same page:

This was the WOL configuration for each board before this series:
MAC mt2712-evb.dts
MAC mt8195-demo.dts
PHY mt8395-genio-1200-evk.dts
MAC mt8395-kontron-3-5-sbc-i1200.dts
PHY mt8395-radxa-nio-12l.dts
PHY mt8390-genio-700-evk.dts

After patch 1, they all get inverted:
PHY mt2712-evb.dts
PHY mt8195-demo.dts
MAC mt8395-genio-1200-evk.dts
PHY mt8395-kontron-3-5-sbc-i1200.dts
MAC mt8395-radxa-nio-12l.dts
MAC mt8390-genio-700-evk.dts

And after patch 2, the remaining PHY ones are set to MAC:
MAC mt2712-evb.dts
MAC mt8195-demo.dts
MAC mt8395-genio-1200-evk.dts
MAC mt8395-kontron-3-5-sbc-i1200.dts
MAC mt8395-radxa-nio-12l.dts
MAC mt8390-genio-700-evk.dts

The only board I have in hands and am able to test is mt8390-genio-700-evk.dts,
which requires MAC WOL to work. For the others, your feedback on v1 was that
they should all be set to MAC WOL. Except for mt2712, which you were not sure
about, but it was already set to MAC WOL so we're keeping the same behavior.

That's how we got to adding mediatek,mac-wol to mt8195-demo.dts,
mt8395-kontron-3-5-sbc-i1200.dts and mt2712-evb.dts. Let me know if there has
been some misunderstanding.

Thanks,
Nícolas

> 
> >   	status = "okay";
> >   	mdio {
> > diff --git a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> > index e2e75b8ff91880711c82f783c7ccbef4128b7ab4..4985b65925a9ed10ad44a6e58b9657a9dd48751f 100644
> > --- a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> > +++ b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
> > @@ -271,6 +271,7 @@ &eth {
> >   	pinctrl-names = "default", "sleep";
> >   	pinctrl-0 = <&eth_default_pins>;
> >   	pinctrl-1 = <&eth_sleep_pins>;
> > +	mediatek,mac-wol;
> 
> I'm mostly sure that Kontron's i1200 works the same as the EVK in regards to WoL.
> 
> Michael, I recall you worked on this board - can you please confirm?
> 
> Thanks,
> Angelo
> 

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

* Re: [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
  2024-11-14 19:22     ` Nícolas F. R. A. Prado
@ 2024-11-15  9:26       ` AngeloGioacchino Del Regno
  0 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-11-15  9:26 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: Michael Walle, kernel, netdev, devicetree, linux-kernel,
	linux-arm-kernel, linux-mediatek, Andrew Lunn, David S. Miller,
	Eric Dumazet, Jakub Kicinski, Paolo Abeni, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Biao Huang,
	Alexandre Torgue, Jose Abreu, Maxime Coquelin,
	Bartosz Golaszewski, Andrew Halaney, Simon Horman

Il 14/11/24 20:22, Nícolas F. R. A. Prado ha scritto:
> On Thu, Nov 14, 2024 at 10:26:34AM +0100, AngeloGioacchino Del Regno wrote:
>> Il 09/11/24 16:16, Nícolas F. R. A. Prado ha scritto:
>>> Due to the mediatek,mac-wol property previously being handled backwards
>>> by the dwmac-mediatek driver, its use in the DTs seems to have been
>>> inconsistent.
>>>
>>> Now that the driver has been fixed, correct this description. All the
>>> currently upstream boards support MAC WOL, so add the mediatek,mac-wol
>>> property to the missing ones.
>>>
>>> Signed-off-by: Nícolas F. R. A. Prado <nfraprado@collabora.com>
>>> ---
>>>    arch/arm64/boot/dts/mediatek/mt2712-evb.dts                   | 1 +
>>>    arch/arm64/boot/dts/mediatek/mt8195-demo.dts                  | 1 +
>>>    arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts | 1 +
>>>    3 files changed, 3 insertions(+)
>>>
>>
>> ..snip..
>>
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>>> index 31d424b8fc7cedef65489392eb279b7fd2194a4a..c12684e8c449b2d7b3b3a79086925bfe5ae0d8f8 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8195-demo.dts
>>> @@ -109,6 +109,7 @@ &eth {
>>>    	pinctrl-names = "default", "sleep";
>>>    	pinctrl-0 = <&eth_default_pins>;
>>>    	pinctrl-1 = <&eth_sleep_pins>;
>>> +	mediatek,mac-wol;
>>
>> The demo board has the same WoL capability as the EVK, so you can avoid adding the
>> mac-wol property here.
> 
> Not sure I follow... If we omit the property here it will use PHY WOL instead,
> while the genio 1200 EVK has the property, so it will be using MAC WOL, so
> they're already the same and omitting will make them behave differently...
> 
> Let me recap to make sure we're all on the same page:
> 
> This was the WOL configuration for each board before this series:
> MAC mt2712-evb.dts
> MAC mt8195-demo.dts
> PHY mt8395-genio-1200-evk.dts
> MAC mt8395-kontron-3-5-sbc-i1200.dts
> PHY mt8395-radxa-nio-12l.dts
> PHY mt8390-genio-700-evk.dts
> 
> After patch 1, they all get inverted:
> PHY mt2712-evb.dts
> PHY mt8195-demo.dts
> MAC mt8395-genio-1200-evk.dts
> PHY mt8395-kontron-3-5-sbc-i1200.dts
> MAC mt8395-radxa-nio-12l.dts
> MAC mt8390-genio-700-evk.dts
> 
> And after patch 2, the remaining PHY ones are set to MAC:
> MAC mt2712-evb.dts
> MAC mt8195-demo.dts
> MAC mt8395-genio-1200-evk.dts
> MAC mt8395-kontron-3-5-sbc-i1200.dts
> MAC mt8395-radxa-nio-12l.dts
> MAC mt8390-genio-700-evk.dts
> 
> The only board I have in hands and am able to test is mt8390-genio-700-evk.dts,
> which requires MAC WOL to work. For the others, your feedback on v1 was that
> they should all be set to MAC WOL. Except for mt2712, which you were not sure
> about, but it was already set to MAC WOL so we're keeping the same behavior.
> 
> That's how we got to adding mediatek,mac-wol to mt8195-demo.dts,
> mt8395-kontron-3-5-sbc-i1200.dts and mt2712-evb.dts. Let me know if there has
> been some misunderstanding.
> 

No, it's me getting confused about the current status - and I'm sorry about that.

So just ignore me saying "we can avoid adding" - we can't.
This commit is definitely needed.

Cheers,
Angelo

> Thanks,
> Nícolas
> 
>>
>>>    	status = "okay";
>>>    	mdio {
>>> diff --git a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
>>> index e2e75b8ff91880711c82f783c7ccbef4128b7ab4..4985b65925a9ed10ad44a6e58b9657a9dd48751f 100644
>>> --- a/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
>>> +++ b/arch/arm64/boot/dts/mediatek/mt8395-kontron-3-5-sbc-i1200.dts
>>> @@ -271,6 +271,7 @@ &eth {
>>>    	pinctrl-names = "default", "sleep";
>>>    	pinctrl-0 = <&eth_default_pins>;
>>>    	pinctrl-1 = <&eth_sleep_pins>;
>>> +	mediatek,mac-wol;
>>
>> I'm mostly sure that Kontron's i1200 works the same as the EVK in regards to WoL.
>>
>> Michael, I recall you worked on this board - can you please confirm?
>>
>> Thanks,
>> Angelo
>>




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

* Re: [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol
  2024-11-14  4:00 ` [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol patchwork-bot+netdevbpf
@ 2024-12-20 16:09   ` Nícolas F. R. A. Prado
  2024-12-20 17:19     ` Jakub Kicinski
  0 siblings, 1 reply; 13+ messages in thread
From: Nícolas F. R. A. Prado @ 2024-12-20 16:09 UTC (permalink / raw)
  To: patchwork-bot+netdevbpf, Jakub Kicinski
  Cc: =?utf-8?q?N=C3=ADcolas_F=2E_R=2E_A=2E_Prado_=3Cnfraprado=40collabora=2Ecom?=,
	=?utf-8?q?=3E?=, andrew+netdev, davem, edumazet, pabeni, robh,
	krzk+dt, conor+dt, matthias.bgg, angelogioacchino.delregno,
	biao.huang, alexandre.torgue, joabreu, mcoquelin.stm32,
	bartosz.golaszewski, ahalaney, horms, kernel, netdev, devicetree,
	linux-kernel, linux-arm-kernel, linux-mediatek, linux-stm32

On Thu, Nov 14, 2024 at 04:00:27AM +0000, patchwork-bot+netdevbpf@kernel.org wrote:
> Hello:
> 
> This series was applied to netdev/net.git (main)
> by Jakub Kicinski <kuba@kernel.org>:
> 
> On Sat, 09 Nov 2024 10:16:31 -0500 you wrote:
> > This series fixes the inverted handling of the mediatek,mac-wol DT
> > property. This was done with backwards compatibility in v1, but based on
> > the feedback received, all boards should be using MAC WOL, so many of
> > them were incorrectly described and didn't have working WOL tested
> > anyway. So for v2, the approach is simpler: just fix the driver handling
> > and update the DTs to enable MAC WOL everywhere.
> > 
> > [...]
> 
> Here is the summary with links:
>   - [v2,1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol
>     https://git.kernel.org/netdev/net/c/a03b18a71c12
>   - [v2,2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
>     (no matching commit)

Hi Jakub,

This message implies patch 2 was also applied, but I only see patch 1, not patch
2 there:
https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/log/?qt=grep&q=mac-wol

So I just wanted to confirm whether it was applied or not. It would be fine for
patch 2 to be merged through the mediatek tree as is usual if you haven't
already taken it.

(Also, FYI, I was not CC'ed in this message from the patchwork bot)

Thanks,
Nícolas

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

* Re: [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol
  2024-12-20 16:09   ` Nícolas F. R. A. Prado
@ 2024-12-20 17:19     ` Jakub Kicinski
  0 siblings, 0 replies; 13+ messages in thread
From: Jakub Kicinski @ 2024-12-20 17:19 UTC (permalink / raw)
  To: Nícolas F. R. A. Prado
  Cc: patchwork-bot+netdevbpf, Nícolas F. R. A. Prado

On Fri, 20 Dec 2024 13:09:45 -0300 Nícolas F. R. A. Prado wrote:
> This message implies patch 2 was also applied, but I only see patch 1, not patch
> 2 there:
> https://git.kernel.org/pub/scm/linux/kernel/git/netdev/net.git/log/?qt=grep&q=mac-wol
> 
> So I just wanted to confirm whether it was applied or not. It would be fine for
> patch 2 to be merged through the mediatek tree as is usual if you haven't
> already taken it.

Yes, the DTS patch needs to go via the appropriate platform tree.
Sorry for not calling it out.

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

* Re: (subset) [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol
  2024-11-09 15:16 [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol Nícolas F. R. A. Prado
                   ` (2 preceding siblings ...)
  2024-11-14  4:00 ` [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol patchwork-bot+netdevbpf
@ 2024-12-23 11:06 ` AngeloGioacchino Del Regno
  3 siblings, 0 replies; 13+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-12-23 11:06 UTC (permalink / raw)
  To: Andrew Lunn, David S. Miller, Eric Dumazet, Jakub Kicinski,
	Paolo Abeni, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Matthias Brugger, Biao Huang, Alexandre Torgue, Jose Abreu,
	Maxime Coquelin, Bartosz Golaszewski, Andrew Halaney,
	Simon Horman, Nícolas F. R. A. Prado
  Cc: kernel, netdev, devicetree, linux-kernel, linux-arm-kernel,
	linux-mediatek, linux-stm32

On Sat, 09 Nov 2024 10:16:31 -0500, Nícolas F. R. A. Prado wrote:
> This series fixes the inverted handling of the mediatek,mac-wol DT
> property. This was done with backwards compatibility in v1, but based on
> the feedback received, all boards should be using MAC WOL, so many of
> them were incorrectly described and didn't have working WOL tested
> anyway. So for v2, the approach is simpler: just fix the driver handling
> and update the DTs to enable MAC WOL everywhere.
> 
> [...]

Applied to v6.13-next/dts64, thanks!

[2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards
      commit: f8a032834abceed9db3f20a5eb56064b21c84613

Cheers,
Angelo



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

end of thread, other threads:[~2024-12-23 11:07 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-09 15:16 [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol Nícolas F. R. A. Prado
2024-11-09 15:16 ` [PATCH v2 1/2] net: stmmac: dwmac-mediatek: Fix inverted handling of mediatek,mac-wol Nícolas F. R. A. Prado
2024-11-14  9:26   ` AngeloGioacchino Del Regno
2024-11-09 15:16 ` [PATCH v2 2/2] arm64: dts: mediatek: Set mediatek,mac-wol on DWMAC node for all boards Nícolas F. R. A. Prado
2024-11-14  9:26   ` AngeloGioacchino Del Regno
2024-11-14 12:29     ` Michael Walle
2024-11-14 13:56       ` AngeloGioacchino Del Regno
2024-11-14 19:22     ` Nícolas F. R. A. Prado
2024-11-15  9:26       ` AngeloGioacchino Del Regno
2024-11-14  4:00 ` [PATCH v2 0/2] net: stmmac: dwmac-mediatek: Fix inverted logic for mediatek,mac-wol patchwork-bot+netdevbpf
2024-12-20 16:09   ` Nícolas F. R. A. Prado
2024-12-20 17:19     ` Jakub Kicinski
2024-12-23 11:06 ` (subset) " AngeloGioacchino Del Regno

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).