Motorcomm YT8821 on SFP module

There seems no way to lock it from userland.

I use a devicetree overlay, to disable the sfp-cage. I set the compatible string of &sfp1 and/or &sfp2 to skip

For the ā€œi2csfp eepromā€ command, does it redo the checksum and also the Vendor specific checksum, like Cisco use?

I calculate and fix 2 chacksums: at device 0x50 registers 0x3f and 0x5f.

Hi,

I have tried contacting the seller on aliexpress. They donā€™t even read messages sent to them. So they are probably totally unaware of the problem we are having with all the SFP units they sell. I was thinking that if they at least knew of the problem, they could maybe fix it in future units. I guess not.

Kind Regards

James

I guess, because, as long as the phy is not being attached by the kernel, there is no problemā€¦

Because all vendors can change these values, this will become a more common problem with these OEM modules I think.

@ericwoud Maybe in the detection code in the kernel, have it detect Read Only 0x56, and treat all transceivers like that the same, ignoring the name fields. We could add module parameters to the sfp.ko module, so that a user could statically configure the quirk/fixup to use for each slot, bypassing any sfp auto-detect logic.

E,g, modprobe sfp type=0,1

0 meaning first sfp slot, use auto-detect

1 meaning second sfp slot, use quirk 1 etc.

Then users could select quirks without even needing to recompile the kernel.

We use that approach for the Linux Sound ALSA because new variants are arriving all the time, and it allows us to get the user sound working, until the permanent quirk is added for that specific motherboard.

Why do you need to lock the i2c bus? Just unbind the SFP device in /sys/bus/platform/drivers/sfp/. For example if your device is called sfp-1, you do

echo sfp-1 >/sys/bus/platform/drivers/sfp/unbind

You can list bound devices by listing the symlinks in that folder.

This is cool! Is this tool available for experiments?

The tool does just that now :wink:

Any news about this?

I have no news on the yt8821 nor the sfp module.

I noticed that some modules seems to fail to work without rollball quirk on current openwrt snapshot, any idea about it? @ericwoud

For Rollball it is a fixup, not a quirk.

Do you have a YT8821 module or a rtl8221b? This is the topic for the YT8821.

Maybe this for the rtl8221b:

But I do not use openwrt myself.

My module is rtl8221, and they are also 8221ā€¦ Thatā€™s the weird thing,

Edit: found the problem, wrong br.nominal value settings

Hello, I would like to ask if that change would be helpful to improve sfp with motorcom chipset

Hi Dan,

We were not successful communicating with the phy on the sfp module at all. The author of the yt8821 driver has hardwired an yt8821 to the BPI-R3, he did not use a RollBall sfp module.

Perhaps Marek has made some progession, I do not know.

1 Like

Hey, Stupid question: is it possible to change somehow the SFP module that would be recognized not as OEM but that it contains yt8821? Another question: do you have also an issue with upload on that module? Is it possible somehow to improve usage of that module? On the BPI-R4, when I connect to the WAN interface, I have 940/940Mbit, but which SFP with yt8821 it is just 900/550Mbit

EDIT: I tried to change the module name from OEM to something else, like:

curl -LO https://github.com/ericwoud/i2csfp/releases/download/aarch64/i2csfp
chmod +x i2csfp
./i2csfp /dev/i2c-3  eepromfix -V OEM -N SFP-2.5G-T

Seems to be recognized same as earlier. If changing SFP module name can help, I will move discussion to another thread ([BPI-R4] and SFP or I2csfp - sfp debugging via i2c)

EDIT: For those who read and donā€™t know what to do, first you need to find a password to be able to change the value (via bruteforce). If you are lucky, no bruteforce would be needed.

Just changing the name will not help.

You could try fiddling with ethtool --pause parameters, see if any options will improve the speed.

Maybe it is not needed. Probably my ISP got some troubles. Today bandwidth seems to be normal. Sorry for the noise.

Edit: speed for upload is like 80% what I have on wan