net: lan966x: Fix the initialization of taprio
authorHoratiu Vultur <horatiu.vultur@microchip.com>
Fri, 21 Nov 2025 06:14:11 +0000 (07:14 +0100)
committerPaolo Abeni <pabeni@redhat.com>
Tue, 25 Nov 2025 14:45:19 +0000 (15:45 +0100)
commit9780f535f8e0f20b4632b5a173ead71aa8f095d2
treee24d74474312dce544f1f164a824ba427ef22f5d
parent081156ce13f8fa4e97b5148dc54d8c0ddf02117b
net: lan966x: Fix the initialization of taprio

To initialize the taprio block in lan966x, it is required to configure
the register REVISIT_DLY. The purpose of this register is to set the
delay before revisit the next gate and the value of this register depends
on the system clock. The problem is that the we calculated wrong the value
of the system clock period in picoseconds. The actual system clock is
~165.617754MHZ and this correspond to a period of 6038 pico seconds and
not 15125 as currently set.

Fixes: e462b2717380b4 ("net: lan966x: Add offload support for taprio")
Signed-off-by: Horatiu Vultur <horatiu.vultur@microchip.com>
Reviewed-by: Simon Horman <horms@kernel.org>
Link: https://patch.msgid.link/20251121061411.810571-1-horatiu.vultur@microchip.com
Signed-off-by: Paolo Abeni <pabeni@redhat.com>
drivers/net/ethernet/microchip/lan966x/lan966x_ptp.c