* [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key
@ 2026-09-01 2:53 Rosen Penev
2026-09-01 3:08 ` Andrew Lunn
2026-09-01 3:10 ` sashiko-bot
0 siblings, 2 replies; 5+ messages in thread
From: Rosen Penev @ 2026-09-01 2:53 UTC (permalink / raw)
To: devicetree
Cc: Andrew Lunn, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
Krzysztof Kozlowski, Conor Dooley,
moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x,...,
open list
Add a gpio-keys node exposing Wake-On-LAN on its gpio0 18 input,
allowing the board to be woken from suspend.
Assisted-by: opencode:big-pickle
Signed-off-by: Rosen Penev <rosenp@gmail.com>
---
arch/arm/boot/dts/marvell/armada-388-helios4.dts | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
index 176198d99c26..e3376c703cbf 100644
--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
+++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
@@ -87,6 +87,18 @@ fault-led {
};
};
+ gpio-keys {
+ compatible = "gpio-keys";
+ pinctrl-0 = <µsom_phy0_int_pins>;
+
+ wol {
+ label = "Wake-On-LAN";
+ linux,code = <KEY_WAKEUP>;
+ gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
+ wakeup-source;
+ };
+ };
+
io-leds {
compatible = "gpio-leds";
pinctrl-names = "default";
--
2.55.0
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key
2026-09-01 2:53 [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key Rosen Penev
@ 2026-09-01 3:08 ` Andrew Lunn
2026-09-01 18:37 ` Rosen Penev
2026-09-01 3:10 ` sashiko-bot
1 sibling, 1 reply; 5+ messages in thread
From: Andrew Lunn @ 2026-09-01 3:08 UTC (permalink / raw)
To: Rosen Penev
Cc: devicetree, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
Krzysztof Kozlowski, Conor Dooley,
moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x,...,
open list
On Mon, Aug 31, 2026 at 07:53:11PM -0700, Rosen Penev wrote:
> Add a gpio-keys node exposing Wake-On-LAN on its gpio0 18 input,
> allowing the board to be woken from suspend.
Could you explain this some more. Why a GPIO key? The MAC needs to
know if the PHY can wake the system, in order to offload the WoL to
the PHY.
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key
2026-09-01 2:53 [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key Rosen Penev
2026-09-01 3:08 ` Andrew Lunn
@ 2026-09-01 3:10 ` sashiko-bot
1 sibling, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-09-01 3:10 UTC (permalink / raw)
To: Rosen Penev; +Cc: conor+dt, robh, devicetree
Thank you for your contribution! Sashiko AI review found 2 potential issue(s) to consider:
- [Medium] Missing `pinctrl-names` property causes the `pinctrl-0` configuration to be ignored.
- [Medium] Routing the PHY Wake-On-LAN interrupt to `gpio-keys` causes the interrupt pin to get stuck low after the first wakeup.
--
commit a86b93404f7467809ab8336ca71556ed631044f5
Author: Rosen Penev <rosenp@gmail.com>
ARM: dts: helios4: add Wake-on-LAN gpio key
Add a gpio-keys node exposing Wake-On-LAN on its gpio0 18 input, allowing
the board to be woken from suspend.
> diff --git a/arch/arm/boot/dts/marvell/armada-388-helios4.dts b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
> index ec134e22bae3e..8e30963b9b409 100644
> --- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
> +++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
> @@ -87,6 +87,18 @@ fault-led {
> };
> };
>
> + gpio-keys {
> + compatible = "gpio-keys";
> + pinctrl-0 = <µsom_phy0_int_pins>;
[Severity: Medium]
Will this pinctrl configuration be ignored by the kernel?
During device probe, pinctrl_bind_pins() in the driver core looks for a state
named 'default'. Because pinctrl-names is omitted, the device tree parser
assigns the state the default name '0'.
Does this cause the core to fail to find 'default', log 'no default pinctrl
state', and skip applying the pin multiplexing configuration?
> +
> + wol {
> + label = "Wake-On-LAN";
> + linux,code = <KEY_WAKEUP>;
> + gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
> + wakeup-source;
[Severity: Medium]
Could routing the PHY Wake-On-LAN interrupt to gpio-keys cause the interrupt
pin to get stuck low after the first wakeup?
When the Marvell PHY receives a WoL magic packet, it pulls the INTn pin low,
and the gpio-keys driver wakes the system via a falling edge interrupt.
However, because the PHY node lacks an interrupts property, the PHY driver
operates in polling mode and never registers an interrupt handler to read the
PHY interrupt status register.
Since the internal interrupt state is never cleared, will the INTn pin remain
permanently stuck low, causing WoL to silently fail on all subsequent
attempts until the device is rebooted?
> + };
> + };
> +
> io-leds {
> compatible = "gpio-leds";
> pinctrl-names = "default";
--
Sashiko AI review · https://sashiko.dev/#/patchset/20260901025311.955936-1-rosenp@gmail.com?part=1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key
2026-09-01 3:08 ` Andrew Lunn
@ 2026-09-01 18:37 ` Rosen Penev
2026-09-01 19:38 ` Andrew Lunn
0 siblings, 1 reply; 5+ messages in thread
From: Rosen Penev @ 2026-09-01 18:37 UTC (permalink / raw)
To: Andrew Lunn
Cc: devicetree, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
Krzysztof Kozlowski, Conor Dooley,
moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x,...,
open list
On Mon, Aug 31, 2026 at 8:08 PM Andrew Lunn <andrew@lunn.ch> wrote:
>
> On Mon, Aug 31, 2026 at 07:53:11PM -0700, Rosen Penev wrote:
> > Add a gpio-keys node exposing Wake-On-LAN on its gpio0 18 input,
> > allowing the board to be woken from suspend.
>
> Could you explain this some more. Why a GPIO key? The MAC needs to
> know if the PHY can wake the system, in order to offload the WoL to
> the PHY.
This was an out of tree solution to get WOL working on this board.
After some back and forth with an LLM, the conclusion reached was that
this is the simplest way to get it working, not upstream ready. And as
sashiko points out, it has problems. I'll respin.
>
> Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key
2026-09-01 18:37 ` Rosen Penev
@ 2026-09-01 19:38 ` Andrew Lunn
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Lunn @ 2026-09-01 19:38 UTC (permalink / raw)
To: Rosen Penev
Cc: devicetree, Gregory Clement, Sebastian Hesselbarth, Rob Herring,
Krzysztof Kozlowski, Conor Dooley,
moderated list:ARM/Marvell Kirkwood and Armada 370, 375, 38x,...,
open list
On Tue, Sep 01, 2026 at 11:37:03AM -0700, Rosen Penev wrote:
> On Mon, Aug 31, 2026 at 8:08 PM Andrew Lunn <andrew@lunn.ch> wrote:
> >
> > On Mon, Aug 31, 2026 at 07:53:11PM -0700, Rosen Penev wrote:
> > > Add a gpio-keys node exposing Wake-On-LAN on its gpio0 18 input,
> > > allowing the board to be woken from suspend.
> >
> > Could you explain this some more. Why a GPIO key? The MAC needs to
> > know if the PHY can wake the system, in order to offload the WoL to
> > the PHY.
> This was an out of tree solution to get WOL working on this board.
>
> After some back and forth with an LLM, the conclusion reached was that
> this is the simplest way to get it working, not upstream ready. And as
> sashiko points out, it has problems. I'll respin.
Please do look at the work Russell King did for phylink and WoL.
What MAC and PHY are involved?
Andrew
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2026-09-01 19:38 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-01 2:53 [PATCH] ARM: dts: helios4: add Wake-on-LAN gpio key Rosen Penev
2026-09-01 3:08 ` Andrew Lunn
2026-09-01 18:37 ` Rosen Penev
2026-09-01 19:38 ` Andrew Lunn
2026-09-01 3:10 ` sashiko-bot
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox