[net-next PATCH v5 15/15] arm: mvebu: dt: Add PHY LED support for 370-rd WAN port

Pavel Machek pavel at ucw.cz
Thu Mar 23 12:11:00 PDT 2023


Hi!

> > > The WAN port of the 370-RD has a Marvell PHY, with one LED on
> > > the front panel. List this LED in the device tree.
> > > 
> > > Signed-off-by: Andrew Lunn <andrew at lunn.ch>
> > > Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
> > 
> > > @@ -135,6 +136,19 @@ &mdio {
> > >  	pinctrl-names = "default";
> > >  	phy0: ethernet-phy at 0 {
> > >  		reg = <0>;
> > > +		leds {
> > > +			#address-cells = <1>;
> > > +			#size-cells = <0>;
> > > +
> > > +			led at 0 {
> > > +				reg = <0>;
> > > +				label = "WAN";
> > > +				color = <LED_COLOR_ID_WHITE>;
> > > +				function = LED_FUNCTION_LAN;
> > > +				function-enumerator = <1>;
> > > +				linux,default-trigger = "netdev";
> > > +			};
> > > +		};
> > >  	};
> > >  
> > 
> > How will this end up looking in sysfs?
> 
> Hi Pavel
> 
> It is just a plain boring LED, so it will look like all other LEDs.
> There is nothing special here.

Well, AFAICT it will end up as /sys/class/leds/WAN, which is really
not what we want. (Plus the netdev trigger should be tested; we'll
need some kind of link to the ethernet device if we want this to work
on multi-ethernet systems).

> > Should documentation be added to Documentation/leds/leds-blinkm.rst
> >  ?
> 
> This has nothing to do with blinkm, which appears to be an i2c LED
> driver.

Sorry, I meant

Should documentation be added to Documentation/leds/well-known-leds.txt ?

Best regards,
								Pavel
-- 
People of Russia, stop Putin before his war on Ukraine escalates.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 195 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20230323/41160307/attachment.sig>


More information about the linux-arm-kernel mailing list