From: "Arthur Crépin Leblond" <arthur@marmottus.net>
To: Arnd Bergmann <arnd@arndb.de>
Cc: Andrew Lunn <andrew@lunn.ch>, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S . Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Netdev <netdev@vger.kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH] w5100: restore GPIO-based link detection
Date: Wed, 5 Aug 2026 11:44:23 +0200 [thread overview]
Message-ID: <anMF9_h0OilX-Tz3@pc-du-fromage> (raw)
In-Reply-To: <5d9c865e-a9a2-4756-a27b-a5af60ef3bad@app.fastmail.com>
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
next prev parent reply other threads:[~2026-08-05 9:44 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-08-04 14:38 [PATCH] w5100: restore GPIO-based link detection Arthur Crépin Leblond
2026-08-04 15:02 ` Arnd Bergmann
2026-08-04 17:47 ` Arthur Crépin Leblond
2026-08-04 17:54 ` Andrew Lunn
2026-08-05 8:25 ` Arthur Crépin Leblond
2026-08-05 9:11 ` Arnd Bergmann
2026-08-05 9:44 ` Arthur Crépin Leblond [this message]
2026-08-05 10:46 ` Arnd Bergmann
2026-08-05 13:42 ` Arthur Crépin Leblond
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=anMF9_h0OilX-Tz3@pc-du-fromage \
--to=arthur@marmottus.net \
--cc=andrew+netdev@lunn.ch \
--cc=andrew@lunn.ch \
--cc=arnd@arndb.de \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@google.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox