Re: [RFC v4 net-next 00/17] add support for the the vsc7512 internal copper phys

From: Vladimir Oltean
Date: Sat Oct 08 2022 - 19:36:14 EST


On Sat, Oct 08, 2022 at 11:51:35AM -0700, Colin Foster wrote:
> The only warning I know about is about the reg array being too long:
> /Documentation/devicetree/bindings/net/dsa/mscc,ocelot.example.dtb: soc@0: ethernet-switch@0:reg: [[1895890944, 65536], [1896022016, 65536], [1896349696, 256], [1896742912, 65536], [1897791488, 256], [1897857024, 256], [1897922560, 256], [1897988096, 256], [1898053632, 256], [1898119168, 256], [1898184704, 256], [1898250240, 256], [1898315776, 256], [1898381312, 256], [1898446848, 256], [1904214016, 524288], [1904738304, 65536], [1896087552, 65536], [1896153088, 65536], [1896218624, 65536]] is too long
>
> Also I know there is still ongoing discussion regarding what the documentation
> should reflect. I hope I'm not getting ahead of myself by submitting this
> RFC at this time.

This is because 'reg' is longer than the schema was told it would be.
net/dsa/mscc,ocelot.yaml defines 'reg' with maxItems: 1, whereas
net/mscc,vsc7514-switch.yaml lists out all targets.

At this stage I wonder whether it wouldn't be better for you to patch up
net/mscc,vsc7514-switch.yaml with support for your compatible string and
reference dsa.yaml, rather than net/dsa/mscc,ocelot.yaml which should
perhaps be rebranded to make it clear it only applies to NXP
integrations of Microchip switches.

I also expressed something along these lines yesterday
https://lore.kernel.org/netdev/20221007231009.qgcirfezgib5vu6y@skbuf/
and I'd wait for a little bit more, to give Krzysztof a chance to
respond and share his thoughts.