Re: [PATCH 0/3] leds: add Realtek RTL9300 port LEDs under software control

From: Andrew Lunn

Date: Sun Oct 18 2026 - 18:37:11 EST


On Sun, Oct 18, 2026 at 12:43:35PM -0700, Ross Cawston wrote:
> The RTL9300 switch drives up to four LEDs per port over its LED
> interface, serial or scanned, each normally showing a hardware function
> chosen by the LED set of the port. Some boards wire LEDs to it that have
> no hardware function and that the vendor firmware switches in software,
> such as the PoE status LEDs of the MokerLink POE-10G07110GSM.
>
> This series adds a binding for such LEDs as a child of the switch, like
> its I2C and MDIO controllers, and a driver that takes them under
> software control and exposes them as LED class devices.

This is an odd architecture when compared to other switch drivers with
LEDs.

Port LEDs should be within the port node of the switch in DT. Ideally
you want all LEDs for a port to start the with basics, on/off control.
That gives the minimum, enough that you can make them software blink
on traffic, show link speed, poe, shift lock, morse code panic dumps.

If the LED has more capabilities, you can then advertise this, and the
led triggers will offload blinking to the hardware. But this is an
extension, not a requirement.

So please don't make these LEDs special.

Andrew