Re: [PATCH] w5100: restore GPIO-based link detection
Arthur Crépin Leblond <[email protected]>
| Newsgroups | org.kernel.vger.netdev,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <anMF9_h0OilX-Tz3@pc-du-fromage> |
On Wed, Aug 05, 2026 at 11:11:53AM +0200, Arnd Bergmann wrote: >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 You're right for the W5100 that would not make any sense during data transfers it would trigger the interrupt. That's unreliable. I am using the W5500, and in the datasheet it says Link LED This shows the Link status. Low: Link is established High: Link is not established I can confirm it is what is happening, I don't see any changes of state during TX/RX. Arthur