Support for RTL838x based managed switches

Awesome thanks for the reminder! I completely forgot about that.

edit: ooh just saw that there was an sx220 tarball. Now I want to have another look at SG220 support haha.

edit2:

So it's in phy_8218b.c under sdk/src/hal/phy/. I'm having a read.

Cool so basically the one i'm reading (from the sx220 source drop) if link is up go get the length from the EEE register.
Else go by channel and do more probing to get cable length by RTCT?
Then you check the status bits to see if it's short, open, mismatch short, mismatch open and then line driver (which I assume means line driver status but IDK?)

Not so great units haha:

/* Length = (Index/64)*8ns*(0.2m/ns) = Index/80 (m) = (1.25) * Index (cm) */

But yeah I guess someone who wants to play around with the mdio registers could get it working. I was reading that phytool or mdio-tools would be the way to start?

edit2:
Ok so ethtool looks like it has cable test support? Or there were patches at some point? I'm still reading.