On 4/30/20 12:41 PM, Andrew Lunn wrote:
>> ECD. The registers looks exactly like the one from the Marvell PHYs,
>> which makes me wonder if both have the same building block or if one
>> imitated the registers of the other. There are subtle differences
>> like one bit in the broadcom PHY is "break link" and is self-clearing,
>> while the bit on the Marvell PHY is described as "perform diagnostics
>> on link break".
> 
> Should we be sharing code between the two drivers?

Yes, I am amazed how how identical they are, nearly on a bit level
identical, the coincidence is uncanny. The expansion registers are also
0x10 - 0x15 just in the reverse order, you know, so as to make it not
too obvious this looks about the same ;) I wonder if we managed to find
something here.

> 
>> What do you mean by calibrate it?
> 
> Some of the Marvell documentation talks about calibrating for losses
> on the PCB. Run a diagnostics with no cable plugged in, and get the
> cable length to the 'fault'. This gives you the distance to the RJ45
> socket. You should then subtract that from all subsequent results.
> But since this is board design specific, i decided to ignore it. I
> suppose it could be stuffed into a DT property, but i got the feeling
> it is not worth it, given the measurement granularity of 80cm.

OK, accuracy is different here, they are said to be +/- 5m accurate for
cable faults and +/- 10m accurate for good cables.
-- 
Florian

Reply via email to