[PATCH net-next v4 0/3] w5100: restore GPIO-based link detection

Arthur Crépin Leblond posted 3 patches 1 month, 2 weeks ago
There is a newer version of this series
.../devicetree/bindings/net/wiznet,w5100.yaml      | 72 ++++++++++++++++++++++
.../devicetree/bindings/net/wiznet,w5x00.txt       | 50 ---------------
drivers/net/ethernet/wiznet/w5100.c                | 68 ++++++++++++++++++++
3 files changed, 140 insertions(+), 50 deletions(-)
Re: [PATCH net-next v4 0/3] w5100: restore GPIO-based link detection
Posted by Arnd Bergmann 1 month, 2 weeks ago
On Tue, Aug 11, 2026, at 14:34, Arthur Crépin Leblond wrote:
>
> In the previous version of the w5100 driver, the LINKLED pin could be
> wired to a GPIO to detect the link status changes via an interrupt.
> This only works on w5500 as it is the only one documenting its LINKLED
> pin to hold the link status (on w5100 the LINKLED pin is changing with
> RX/TX activity).
>
> This series of patches is bringing back the link status detection on
> w5500 using the Link Status bit of the PHY Configuration Register.
> Additionally, the LINKLED pin can also be wired to detect link status
> changes and read the register in the interrupt handler.
>
> Arthur Crépin Leblond
>
> Signed-off-by: Arthur Crépin Leblond <arthur@marmottus.net>
> ---
> Changes in v4:
> - Use directly an interrupt line instead of gpio -> irq
> - Update interrupts in DT bindings
> - Address sashiko reviews
>  - drop devm_ on request_threaded_irq to avoid use after free
>  - disable/enable the link_irq in the suspend/resume
>  - only call netif_carrier_on|off if the link interrupt is present
> - Link to v3: 
> https://patch.msgid.link/20260806-wiznet-link-gpio-v3-0-532d4a143805@marmottus.net

Hi Arthur,

This version looks good to me,

Reviewed-by: Arnd Bergmann <arnd@arndb.de>

Krzystof said that he preferred these to be described as GPIOs
instead, but I think there were some other open questions with
your previous version. If you can come up with a version that
Krzystof likes better, I'm fine with that as well.

To me, the main benefit here is that describing it as a
interrupt instead of gpio means it can be connected to an
interrupt pin of a chip that is not also a gpio pin, but
this is another rare corner case, and the code will already
work just fine without the optional interrupt if someone
has a system with interrupt pins that are not also gpios.

      Arnd
Re: [PATCH net-next v4 0/3] w5100: restore GPIO-based link detection
Posted by Krzysztof Kozlowski 1 month, 2 weeks ago
On 11/08/2026 15:01, Arnd Bergmann wrote:
> On Tue, Aug 11, 2026, at 14:34, Arthur Crépin Leblond wrote:
>>
>> In the previous version of the w5100 driver, the LINKLED pin could be
>> wired to a GPIO to detect the link status changes via an interrupt.
>> This only works on w5500 as it is the only one documenting its LINKLED
>> pin to hold the link status (on w5100 the LINKLED pin is changing with
>> RX/TX activity).
>>
>> This series of patches is bringing back the link status detection on
>> w5500 using the Link Status bit of the PHY Configuration Register.
>> Additionally, the LINKLED pin can also be wired to detect link status
>> changes and read the register in the interrupt handler.
>>
>> Arthur Crépin Leblond
>>
>> Signed-off-by: Arthur Crépin Leblond <arthur@marmottus.net>
>> ---
>> Changes in v4:
>> - Use directly an interrupt line instead of gpio -> irq
>> - Update interrupts in DT bindings
>> - Address sashiko reviews
>>  - drop devm_ on request_threaded_irq to avoid use after free
>>  - disable/enable the link_irq in the suspend/resume
>>  - only call netif_carrier_on|off if the link interrupt is present
>> - Link to v3: 
>> https://patch.msgid.link/20260806-wiznet-link-gpio-v3-0-532d4a143805@marmottus.net
> 
> Hi Arthur,
> 
> This version looks good to me,
> 
> Reviewed-by: Arnd Bergmann <arnd@arndb.de>
> 
> Krzystof said that he preferred these to be described as GPIOs
> instead, but I think there were some other open questions with
> your previous version. If you can come up with a version that
> Krzystof likes better, I'm fine with that as well.

No, interrupts are fine.

Best regards,
Krzysztof