Re: [PATCH 2/4] dt-bindings: net: dsa: Add SoC-e switch IP and DSA bindings

Benedikt Spranger <[email protected]>
Newsgroups org.kernel.vger.netdev,org.kernel.vger.linux-devicetree,org.kernel.vger.linux-kernel
Organization Linutronix GmbH
Message-ID <20260805153220.3860b262@mitra>
On Mon, 3 Aug 2026 18:43:23 +0200
Andrew Lunn <[email protected]> wrote:

> If it is not compatible, it needs a different compatible.
This is quite tricky here - namewise. 

> It gets interesting with something you synthesizer, something where
> there are a number of different synthesise options. How do you define
> compatible? You might want a very specific compatible, for your
> synthesise configuration, and a more generic compatible which might
> work for other synthesise configurations, but maybe not?

SOC-E sells quite a bunch of switch IPs (MES, MRS, NTS to name some).
As far as we know for now, these different IP cores can be determined
by reading specific registers, which seem to be on the same spot across
different IPs. You may wonder about "It seems". Since we have only a
limited access for information about different IPs, we have examined the
vendor linux DSA driver and the surrounding configuration software.

So for now the different features can be read out at specific registers
- an autoconfiguration of the DSA driver is therefor possible. Now to
the compatible string. The easiest way is to name it after the IP core
name: MES, MRS or NTS. But that's wishfull thinking:

You can use the MRS IP core an disable all management features. You
have an unmanaged switch with an MDIO interface. Terefore you can not
rely on the compatible string and have to verify the feature registers.
Also you have to switch device trees for different IP cores for no good.

The big plus for this solution is less struggle with the devicetree
police.

So in fact the compatible string should reflect a register layout
nessesary to determine the switch IP and configuration. There is no
such name in the documentation, as we can see so far.

As a suggestion from my side: soce,switch-reg-layout-v1

If this minimal set of registers changes in an incompatible way, the
version number can be increased.

Regards
    Bene
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.