net: stmmac: dwmac-meson8b: use picoseconds for the RGMII RX delay
authorMartin Blumenstingl <martin.blumenstingl@googlemail.com>
Wed, 6 Jan 2021 13:42:49 +0000 (14:42 +0100)
committerJakub Kicinski <kuba@kernel.org>
Thu, 7 Jan 2021 23:58:33 +0000 (15:58 -0800)
commit140ddf0633dfb923fcf4132289fd022dde0145fc
tree5e0a015f0f81e1813e2f311ebd9118e179fa37cc
parent025822884a4fd2d0af51dcf77ddc494e60c5ff63
net: stmmac: dwmac-meson8b: use picoseconds for the RGMII RX delay

Amlogic Meson G12A, G12B and SM1 SoCs have a more advanced RGMII RX
delay register which allows picoseconds precision. Parse the new
"rx-internal-delay-ps" property or fall back to the value from the old
"amlogic,rx-delay-ns" property.

No upstream DTB uses the old "amlogic,rx-delay-ns" property (yet).
Only include minimalistic logic to fall back to the old property,
without any special validation (for example if the old and new
property are given at the same time).

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Reviewed-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-meson8b.c