Afaik you cannot patch it in general because los detection some kind of security feature. If there is no rx signal the sfp should disable tx to avoid accidents when people looking into the transmitter.
But this can be manually and temprary changed (because linux requires a pin assigned to los property in dts) using devicetree overlay. I thought you have already done that…
Afair it was a requirement for mainline to match the board with compatibles…here i just copied the emmc one.
Same here,i use symbols in dtb,but mainline required the path for target (previous version of afair r3 sata overlay with fragment and target was rejected).
Not sure if the gpio for los should be active low or active high here to fix the issue when gpio not connected. Imho now it has to be connected to gnd (pin 25) to have los not set.
But when i remap the gpio i get the waitdev for sfp…the module probe seems not complete.so i guess a possible webinterface will not be available for gpon sfp. As i already said i have no gpon sfp so i can test only with my fibre sfp. Not sure why mac is important here (later of course,but not for module parameters).
In case of the gpon, the mac will report link up, because there is always a signal when the module is powered up. But the LOS signal did not report a signal. After the gpio swap and applying the correct level at the gpio pin, the LOS signals link up also and eth1 should go link up.
I think in your test, there is no valid signal for the mac to report link up.
this change seems to break the SFPs on my R4. I have tried branch 6.15-rc (commit 29454660bdbb1c254eba96600ec444596fbcf9bb, from https://github.com/frank-w/BPI-Router-Linux) with the 804a1c85b82dc9168de3db015567edcb00343a40 patch, and with it reversed, and and in both cases I get:
I’m going to need some advice here on how to debug the SFP modules here:
Although the link is OK, the bandwidth on the ports are limited to 100mbps only.
Ethtool shows the link speed is 2500 and the other side reports 2500 als link speed. But testing the connection it seems to be limited to 100mbit/s.
I tried @ericwoud 's i2csfp tool to see whether there would be something wrong with the sfp module, but I could not find anything useful.
It looks like all the quirks for SFP 2.5G modules actually pamper over the issue instead of fixing it.
Has anybody any idea how a 2.5G RJ45 SFP module is limited to 100mbit even though it specifies 2.5G to the host OS and other side reports link speed being 2.5G?
how do I see what goes wrong?
Sfp on r4 is not connected to mt753x switch. Sfp is not related to dsa (unlike bpi-r3 where sfp lan is connected to switch). Afaik the issue also shows 100mbit link with ethtool and not only a throughput issue.
Interesting would be test-setup (which devices are connected how - especially using routing,switching or traffic to/from r4) and maybe try different sfps.