Re: [RFC net-next 1/2] dt-bindings: net: dsa: add bindings for GSW Series switches

From: Krzysztof Kozlowski
Date: Thu Oct 27 2022 - 12:08:14 EST


On 27/10/2022 09:57, Vladimir Oltean wrote:
> Hi Camel,
>
> On Thu, Oct 27, 2022 at 08:46:27AM -0400, Krzysztof Kozlowski wrote:
>>> >> +      - enum:
>>> >> +          - mxl,gsw145-mdio
>>> >
>>> > Why "mdio" suffix?
>>>
>>> Inspired by others dsa chips.
>>> lan9303.txt:  - "smsc,lan9303-mdio" for mdio managed mode
>>> lantiq-gswip.txt:- compatible   : "lantiq,xrx200-mdio" for the MDIO bus
>>> inside the GSWIP
>>> nxp,sja1105.yaml:                  - nxp,sja1110-base-t1-mdio
>>
>> As I replied to Andrew, this is discouraged.
>
> Let's compare apples to apples, shall we?
> "nxp,sja1110-base-t1-mdio" is the 100Base-T1 MDIO controller of the
> NXP SJA1110 switch, hence the name. It is not a SJA1110 switch connected
> over MDIO.

Thanks for clarifying. Then this could be fine. Let me then explain what
is discouraged:
1. Adding bus suffixes to the compatible, so for example foo,bar LED
controller is on I2C bus, so you call it "foo,bar-i2c".

2. Adding device types to the compatible, if this is the only
function/variant of the device, so for example calling foo,bar LED
controller "foo,bar-led". This makes sense in case of multi functional
devices (PMICs, SoCs), but not standalone ones.

So what do we have here? Is it one of the cases above?

Best regards,
Krzysztof