Subject: Re: [PATCH net-next] net: dsa: mark parsed interface mode for legacy switch drivers

From: "Russell King (Oracle)" <[email-masked]>
Date: Sun, 13 Aug 2023 23:17:12 +0100

On Sun, Aug 13, 2023 at 11:56:40PM +0200, Linus Walleij wrote:
> On Sat, Aug 12, 2023 at 2:16 PM Russell King (Oracle)
> <[email-masked]> wrote:
> 
> > That leaves the RTL836x driver, for which I've found:
> >
> > http://realtek.info/pdf/rtl8366_8369_datasheet_1-1.pdf
> >
> > and that indicates that the user ports use RSGMII which is SGMII with
> > a clock in one direction.
> 
> Sadly that datasheet has been pretty far off the RTL8366RB,
> the "RB" in the end means "revision B" and things changed a
> lot there.
> 
> What I mostly used was a DD-WRT vendor code drop, which is pretty
> terse, but can be used for guesswork:
> https://svn.dd-wrt.com//browser/src/linux/universal/linux-3.2/drivers/net/ethernet/raeth/rb
> 
> > The only dts I can find is:
> >
> > arch/arm/boot/dts/gemini-dlink-dir-685.dts
> >
> > which doesn't specify phy-mode for these, so that'll be using the
> > phylib default of GMII.
> 
> Hm. That file is my educated guesses and trial-and-error at times,
> due to lack of documentation. It shouldn't be trusted too much.
> 
> > So for realtek, I propose (completely untested):
> 
> I applied it and it all works fine afterwards on the DIR-685.
> Should I test some different configs in the DTS as well?

Note Vladimir's comment about the missing "return" - he's correct.

It would be good to test all combinations that we're aware of users
for, if that's somehow possible? I'm guessing the only one we know
about is yours above?

-- 
RMK's Patch system: https://www.armlinux.org.uk/developer/patches/
FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!