[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <8cc9699c-92e3-4736-86b4-fe59049b3b18@lunn.ch>
Date: Thu, 1 Jun 2023 14:28:53 +0200
From: Andrew Lunn <andrew@...n.ch>
To: Atsushi Nemoto <atsushi.nemoto@...d.co.jp>
Cc: netdev@...r.kernel.org, devicetree@...r.kernel.org,
Michael Hennerich <michael.hennerich@...log.com>,
Alexandru Tachici <alexandru.tachici@...log.com>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
Horatiu Vultur <horatiu.vultur@...rochip.com>
Subject: Re: [PATCH net-next v2 1/2] dt-bindings: net: adin: document a phy
link status inversion property
On Thu, Jun 01, 2023 at 09:29:01AM +0900, Atsushi Nemoto wrote:
> On 2023/05/31 23:35, Andrew Lunn wrote:
> >> The ADIN1200/ADIN1300 supports inverting the link status output signal
> >> on the LINK_ST pin.
> >
> > Please could you add an explanation to the commit message why you
> > would want to do this? Is this because there is an LED connected to
> > it, but its polarity is inverted?
>
> Yes, the LINK_ST pin of AD1200/1300 is active-high but our custom
> board designer connected it to an LED as an active-low signal.
O.K. LED is the magic word here. And the fact that there is nothing
specific to this PHY. Being able to specify the polarity of an output
to an LED is pretty common.
Please take a look at:
ocumentation/devicetree/bindings/net/ethernet-phy.yaml
where it describes LEDs. Please add a generic DT property there for
everybody to use. See if the LED subsystem has a name for such a
property.
There is sufficient code in net-next to allow LED0 to be controlled in
a limited way. There are more patches coming soon which will give you
much more control.
Using LINK_ST to control an LED is not so easy to represent in the
current code because it appears you don't have manual control of the
LED, i.e. forced on/off. But you can offload functions when the new
code lands.
Andrew
Powered by blists - more mailing lists