[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Z_YZ3NiXb15wgDuY@shikoro>
Date: Wed, 9 Apr 2025 08:55:24 +0200
From: Wolfram Sang <wsa+renesas@...g-engineering.com>
To: Andrew Lunn <andrew@...n.ch>
Cc: linux-renesas-soc@...r.kernel.org,
Heiner Kallweit <hkallweit1@...il.com>,
Russell King <linux@...linux.org.uk>,
"David S. Miller" <davem@...emloft.net>,
Eric Dumazet <edumazet@...gle.com>,
Jakub Kicinski <kuba@...nel.org>, Paolo Abeni <pabeni@...hat.com>,
netdev@...r.kernel.org
Subject: Re: [RFC PATCH net-next] net: phy: marvell: support DT
configurations with only two LEDs
Hi Andrew,
> Please make use of the LED binding:
>
> &mdio {
> pinctrl-0 = <&mdio_pins>;
> pinctrl-names = "default";
> phy0: ethernet-phy@0 {
> reg = <0>;
> leds {
> #address-cells = <1>;
> #size-cells = <0>;
>
> led@0 {
> reg = <0>;
> color = <LED_COLOR_ID_WHITE>;
> function = LED_FUNCTION_WAN;
> default-state = "keep";
> };
> };
> };
>
> Just list the two LEDs you have connected.
Been there, didn't work. This is what I had:
mdio {
#address-cells = <1>;
#size-cells = <0>;
compatible = "snps,dwmac-mdio";
phy_mii0: ethernet-phy@8 {
reg = <8>;
leds {
#address-cells = <1>;
#size-cells = <0>;
led@0 {
reg = <0>;
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_LAN;
default-state = "keep";
};
led@1 {
reg = <1>;
color = <LED_COLOR_ID_AMBER>;
function = LED_FUNCTION_ACTIVITY;
default-state = "keep";
};
};
};
};
I played around with LED_FUNCTION_* values. I looked at other
devicetrees but I only could find one-LED setups. I tried going to one
LED, too, with LED_COLOR_ID_MULTI. No success. Then, I looked at the
driver code and did not see a path that would enable
'MII_88E1510_PHY_LED0_LINK_LED1_ACTIVE' via any DT configuration. Thus,
the above patch. If you have any further pointers how to do this
properly, I'd love to hear about them.
Thank you,
Wolfram
Download attachment "signature.asc" of type "application/pgp-signature" (834 bytes)
Powered by blists - more mailing lists