]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns
authorAlvin Šipraga <alsi@bang-olufsen.dk>
Mon, 29 Nov 2021 10:30:19 +0000 (11:30 +0100)
committerDavid S. Miller <davem@davemloft.net>
Mon, 29 Nov 2021 12:51:37 +0000 (12:51 +0000)
commit8603b6db804018a18c5df18115b1cf4e38288f85
treef6435ec2b23daec6623e6721cab2ecd06b1bf045
parent66fd4d4d4d23e5ef28eb51dcfd3c3724adfd8aab
net: dsa: rtl8365mb: set RGMII RX delay in steps of 0.3 ns

A contact at Realtek has clarified what exactly the units of RGMII RX
delay are. The answer is that the unit of RX delay is "about 0.3 ns".
Take this into account when parsing rx-internal-delay-ps by
approximating the closest step value. Delays of more than 2.1 ns are
rejected.

This obviously contradicts the previous assumption in the driver that a
step value of 4 was "about 2 ns", but Realtek also points out that it is
easy to find more than one RX delay step value which makes RGMII work.

Fixes: ab469a9de4db ("net: dsa: realtek-smi: add rtl8365mb subdriver for RTL8365MB-VC")
Cc: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: Alvin Šipraga <alsi@bang-olufsen.dk>
Acked-by: Arınç ÜNAL <arinc.unal@arinc9.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/rtl8365mb.c