Re: [PATCH] w5100: restore GPIO-based link detection

From: Arnd Bergmann

Date: Wed Aug 05 2026 - 05:17:55 EST


On Wed, Aug 5, 2026, at 10:25, Arthur Crépin Leblond wrote:
> On Tue, Aug 04, 2026 at 07:54:29PM +0200, Andrew Lunn wrote:
>>
>>https://wiznet.io/products/ethernet-chips/w5100
>>
>>suggests it has an integrated PHY. So why is a GPIO needed to report
>>link?
>
> the W5100/W5500 exposes directly a LINKLED pin for the carrier status.
> On my board (RPi), that pin is wired to a GPIO to detect changes on the host
> directly via an interrupt.

The datasheet says

LINKLED O 66 Link LED
Active low in link state indicates a good status for
10/100M.
It is always ON when the link is OK and it flashes
while in a TX or RX state.

which sounds like this is not a great way to do it, since any
data transfer would drop the link status. Are you sure the
gpio line as you connect it actually only reports link status
and not RX/TX? Which chip/revision specifically are you using?

With the W5300 driver (now removed) that was trying to use the
link gpio, the LINKLED description in the datasheet is different
and does not mention flashing, so on that one, the gpio link
interrupt was more likely to actually work.

Arnd