Re: [net-next PATCH v3 09/14] dt-bindings: net: dsa: dsa-port: Document support for LEDs node

From: Andrew Lunn
Date: Tue Mar 14 2023 - 21:58:39 EST


On Wed, Mar 15, 2023 at 02:50:00AM +0200, Vladimir Oltean wrote:
> On Tue, Mar 14, 2023 at 11:15:11AM +0100, Christian Marangi wrote:
> > Document support for LEDs node in dsa port.
> > Switch may support different LEDs that can be configured for different
> > operation like blinking on traffic event or port link.
> >
> > Also add some Documentation to describe the difference of these nodes
> > compared to PHY LEDs, since dsa-port LEDs are controllable by the switch
> > regs and the possible intergated PHY doesn't have control on them.
> >
> > Signed-off-by: Christian Marangi <ansuelsmth@xxxxxxxxx>
> > ---
> > .../devicetree/bindings/net/dsa/dsa-port.yaml | 21 +++++++++++++++++++
> > 1 file changed, 21 insertions(+)
>
> Of all schemas, why did you choose dsa-port.yaml? Why not either something
> hardware specific (qca8k.yaml) or more generic (ethernet-controller.yaml)?

The binding should be generic. So qca8k.yaml is way to specific. The
Marvell switch should re-use it at some point.

Looking at the hierarchy, ethernet-controller.yaml would work since
dsa-port includes ethernet-switch-port, which includes
ethernet-controller.

These are MAC LEDs, and there is no reason why a standalone MAC in a
NIC could not implement such LEDs. So yes,
ethernet-controller.yaml.

Is there actually anything above ethernet-controller.yaml? This is
about a netdev really, so a wifi MAC, or even a CAN MAC could also use
the binding....

Andrew