[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <521f9c3c-2979-4308-94ba-ced2cb430eaa@denx.de>
Date: Tue, 21 Jan 2025 12:53:41 +0100
From: Marek Vasut <marex@...x.de>
To: Andrew Lunn <andrew@...n.ch>
Cc: linux-leds@...r.kernel.org, "David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>, Heiner Kallweit <hkallweit1@...il.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
Russell King <linux@...linux.org.uk>, netdev@...r.kernel.org
Subject: Re: [PATCH v2] net: phy: Handle both led@0 and led subnode name for
single-LED PHYs
On 1/20/25 5:35 PM, Andrew Lunn wrote:
> On Mon, Jan 20, 2025 at 10:02:46AM +0100, Marek Vasut wrote:
>> In case a PHY supports only one LED in total, like ADIN1300, and this LED
>> is described in DT, it is currently necessary to include unit address in
>> the LED node name and the address-cells have to be set to 1:
>>
>> leds {
>> #address-cells = <1>;
>> ...
>> led@0 {
>> reg = <0>;
>> ...
>> };
>> };
>>
>> For a single LED PHY, this should not be necessary and plain 'led' node
>> without unit should be acceptable as well:
>>
>> leds {
>> ...
>> led {
>> ...
>> };
>> };
>
> So how do other subsystems handle this? SPI with only a single chip
> select line?
I believe for SPI, it is always mandatory to have 'reg' property.
> Standalone LED controllers with a single LED?
The GPIO LEDs driver does not enumerate the LEDs at all, so there is no
'reg' property needed in any case, but I don't think this is really
applicable for the PHY LEDs, which depend on the ordering within each PHY.
> A PWM with a single output?
Reference the controller node itself, similar to how single output clock
controller works.
>> drivers/net/phy/phy_device.c | 15 +++++++++++++--
>
> What about the device tree binding? Does it already have the reg
> property as optional?
Documentation/devicetree/bindings/net/ethernet-phy.yaml does not, but
that can be changed if desirable . If not desirable, then I can just
discard this patch ?
Powered by blists - more mailing lists