]> git.baikalelectronics.ru Git - kernel.git/commit
net: dsa: qca8k: make rgmii delay configurable
authorAnsuel Smith <ansuelsmth@gmail.com>
Fri, 14 May 2021 21:00:06 +0000 (23:00 +0200)
committerDavid S. Miller <davem@davemloft.net>
Fri, 14 May 2021 22:30:22 +0000 (15:30 -0700)
commita7e24bbc1d433f87b90e8eacd92d433904379d8e
treef650749b10171792e18d830a8f20ab5fbf8b0795
parent02d0dba843dfc4561ada240029d7d368c965979b
net: dsa: qca8k: make rgmii delay configurable

The legacy qsdk code used a different delay instead of the max value.
Qsdk use 1 ns for rx and 2 ns for tx. Make these values configurable
using the standard rx/tx-internal-delay-ps ethernet binding and apply
qsdk values by default. The connected gmac doesn't add any delay so no
additional delay is added to tx/rx.
On this switch the delay is actually in ns so value should be in the
1000 order. Any value converted from ps to ns by dividing it by 1000
as the switch max value for delay is 3ns.

Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/qca8k.c
drivers/net/dsa/qca8k.h