net: dsa: mv88e6xxx: support 4000ps cycle counter period
authorShenghao Yang <me@shenghaoyang.info>
Sun, 20 Oct 2024 06:38:30 +0000 (14:38 +0800)
committerPaolo Abeni <pabeni@redhat.com>
Thu, 24 Oct 2024 10:57:46 +0000 (12:57 +0200)
commit3e65ede526cf4f95636dbc835598d100c7668ab3
tree2ebd456a612a51853f9c7921f5488a2972366b8f
parent7e3c18097a709e9b958e721066e5fe76e563739b
net: dsa: mv88e6xxx: support 4000ps cycle counter period

The MV88E6393X family of devices can run its cycle counter off
an internal 250MHz clock instead of an external 125MHz one.

Add support for this cycle counter period by adding another set
of coefficients and lowering the periodic cycle counter read interval
to compensate for faster overflows at the increased frequency.

Otherwise, the PHC runs at 2x real time in userspace and cannot be
synchronized.

Fixes: de776d0d316f ("net: dsa: mv88e6xxx: add support for mv88e6393x family")
Signed-off-by: Shenghao Yang <me@shenghaoyang.info>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/dsa/mv88e6xxx/ptp.c