From: Wolfram Sang <wsa+renesas@sang-engineering.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: linux-renesas-soc@vger.kernel.org,
Heiner Kallweit <hkallweit1@gmail.com>,
Russell King <linux@armlinux.org.uk>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
netdev@vger.kernel.org
Subject: Re: [RFC PATCH net-next] net: phy: marvell: support DT configurations with only two LEDs
Date: Wed, 9 Apr 2025 08:55:24 +0200 [thread overview]
Message-ID: <Z_YZ3NiXb15wgDuY@shikoro> (raw)
In-Reply-To: <7f706127-aa48-4385-a7b8-f016e0ba52b7@lunn.ch>
[-- Attachment #1: Type: text/plain, Size: 1740 bytes --]
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
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
next prev parent reply other threads:[~2025-04-09 6:55 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-08 6:30 [RFC PATCH net-next] net: phy: marvell: support DT configurations with only two LEDs Wolfram Sang
2025-04-08 12:44 ` Andrew Lunn
2025-04-09 6:55 ` Wolfram Sang [this message]
2025-04-09 12:11 ` Andrew Lunn
2025-04-10 7:40 ` Wolfram Sang
2025-04-10 13:10 ` Andrew Lunn
2025-04-10 20:05 ` Wolfram Sang
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=Z_YZ3NiXb15wgDuY@shikoro \
--to=wsa+renesas@sang-engineering.com \
--cc=andrew@lunn.ch \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=hkallweit1@gmail.com \
--cc=kuba@kernel.org \
--cc=linux-renesas-soc@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
/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;
as well as URLs for NNTP newsgroup(s).