[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20220419131038.7fb2f4pthsiyugho@bang-olufsen.dk>
Date: Tue, 19 Apr 2022 13:10:39 +0000
From: Alvin Šipraga <ALSI@...g-olufsen.dk>
To: Arınç ÜNAL <arinc.unal@...nc9.com>
CC: Luiz Angelo Daros de Luca <luizluca@...il.com>,
"netdev@...r.kernel.org" <netdev@...r.kernel.org>,
"linus.walleij@...aro.org" <linus.walleij@...aro.org>,
"andrew@...n.ch" <andrew@...n.ch>,
"vivien.didelot@...il.com" <vivien.didelot@...il.com>,
"f.fainelli@...il.com" <f.fainelli@...il.com>,
"olteanv@...il.com" <olteanv@...il.com>,
"davem@...emloft.net" <davem@...emloft.net>,
"kuba@...nel.org" <kuba@...nel.org>,
"pabeni@...hat.com" <pabeni@...hat.com>,
"robh+dt@...nel.org" <robh+dt@...nel.org>,
"krzk+dt@...nel.org" <krzk+dt@...nel.org>,
"devicetree@...r.kernel.org" <devicetree@...r.kernel.org>
Subject: Re: [PATCH net v2 1/2] dt-bindings: net: dsa: realtek: cleanup
compatible strings
On Tue, Apr 19, 2022 at 03:47:40AM +0300, Arınç ÜNAL wrote:
> On 19/04/2022 02:35, Luiz Angelo Daros de Luca wrote:
> > Compatible strings are used to help the driver find the chip ID/version
> > register for each chip family. After that, the driver can setup the
> > switch accordingly. Keep only the first supported model for each family
> > as a compatible string and reference other chip models in the
> > description.
> >
> > The removed compatible strings have never been used in a released kernel.
> >
> > CC: devicetree@...r.kernel.org
> > Link: https://lore.kernel.org/netdev/20220414014055.m4wbmr7tdz6hsa3m@bang-olufsen.dk/
> > Signed-off-by: Luiz Angelo Daros de Luca <luizluca@...il.com>
>
> Do we know the chip ID and version of all of the switches this driver _can_
> support? So we have all the switches actually supported under a single
> compatible string.
>
> The chip ID seems to be the same across all the switches under this defacto
> rtl8367c family.
Some of them will have a different chip ID, but we haven't had anyone try those
switches yet. Currently they will be unsupported, and I wouldn't want to claim
otherwise though because nobody has actually tested. There are small differences
per switch but in general these differences disappear if they have the same chip
ID. To give a more precise answer will require a lot more detail which I don't
think is relevant, but if you are curious, you can check how the vendor driver
does the detection and what the different parameters then are:
https://github.com/openwrt/openwrt/blob/aae7af4219e56c2787f675109d9dd1a44a5dcba4/target/linux/mediatek/files-5.10/drivers/net/phy/rtk/rtl8367c/rtk_switch.c#L712
>
> Alvin, could your contacts at Realtek provide the chip ID and version for
> the switches we don’t know:
> RTL8363NB, RTL8363NB-VB, RTL8363SC, RTL8363SC-VB, RTL8364NB, RTL8364NB-VB,
> RTL8366SC, RTL8367SB, RTL8370MB, RTL8310SR
I'll ask my contact at Realtek if he can give me a full list of chip/version
values per switch, but given that the vendor driver is already doing similar
auto-detection, I think it is safe to assume that we don't require an additional
compatible string for the switches listed in Luiz' patch. The vendor driver
simply doesn't have a very granular check - presumably because the switches in
this family share many similarities - so it's not possible to infer the
chip/version ID per switch.
Kind regards,
Alvin
Powered by blists - more mailing lists