[PATCH net-next 1/4] dt-bindings: net: document st,phy-wol property
Florian Fainelli
florian.fainelli at broadcom.com
Mon Jul 21 11:08:20 PDT 2025
On 7/21/2025 10:07 AM, Andrew Lunn wrote:
>> Regarding this property, somewhat similar to "mediatek,mac-wol",
>> I need to position a flag at the mac driver level. I thought I'd go
>> using the same approach.
>
> Ideally, you don't need such a flag. WoL should be done as low as
> possible. If the PHY can do the WoL, the PHY should be used. If not,
> fall back to MAC.
>
> Many MAC drivers don't support this, or they get the implementation
> wrong. So it could be you need to fix the MAC driver.
>
> MAC get_wol() should ask the PHY what it supports, and then OR in what
> the MAC supports.
>
> When set_wol() is called, the MAC driver should ask the PHY driver to
> do it. If it return 0, all is good, and the MAC driver can be
> suspended when times comes. If the PHY driver returns EOPNOTSUPP, it
> means it cannot support all the enabled WoL operations, so the MAC
> driver needs to do some of them. The MAC driver then needs to ensure
> it is not suspended.
>
> If the PHY driver is missing the interrupt used to wake the system,
> the get_wol() call should not return any supported WoL modes. The MAC
> will then do WoL. Your "vendor,mac-wol" property is then pointless.
>
> Correctly describe the PHY in DT, list the interrupt it uses for
> waking the system.
+1
--
Florian
More information about the linux-arm-kernel
mailing list