net: phy: nxp-c45-tja11xx: read egress ts on TJA1120
authorRadu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Mon, 31 Jul 2023 09:16:15 +0000 (12:16 +0300)
committerJakub Kicinski <kuba@kernel.org>
Wed, 2 Aug 2023 04:06:25 +0000 (21:06 -0700)
commitbdb4c5b8852029d9a82f366885071ba27d254366
tree2cc10e1964f274f95c89a9746aa7ce4818eeba15
parentb0b2247d815d0f6806b702022052e208c3c2d56a
net: phy: nxp-c45-tja11xx: read egress ts on TJA1120

The egress timestamp FIFO/circular buffer work different on TJA1120 than
TJA1103.

For TJA1103 the new timestamp should be manually moved from the FIFO to
the hardware buffer before checking if the timestamp is valid.

For TJA1120 the hardware will move automatically the new timestamp
from the FIFO to the buffer and the user should check the valid bit, read
the timestamp and unlock the buffer by writing any of the buffer
registers(which are read only).

Another change for the TJA1120 is the behaviour of the EGR TS IRQ bit.
This bit was a self-clear bit for TJA1103, but now should be cleared
before reading the timestamp.

Signed-off-by: Radu Pirea (NXP OSS) <radu-nicolae.pirea@oss.nxp.com>
Link: https://lore.kernel.org/r/20230731091619.77961-8-radu-nicolae.pirea@oss.nxp.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/phy/nxp-c45-tja11xx.c