]> git.ipfire.org Git - thirdparty/linux.git/commit
net: stmmac: socfpga: Add hardware supported cross-timestamp
authorRohan G Thomas <rohan.g.thomas@altera.com>
Fri, 31 Oct 2025 17:27:10 +0000 (01:27 +0800)
committerJakub Kicinski <kuba@kernel.org>
Thu, 6 Nov 2025 02:35:14 +0000 (18:35 -0800)
commitfd8c4f6454963aa7ea895657472aa57f33779d57
tree1f3ddb426beb3abe3cc15d2ffe66e0f5614fefe1
parente28988aef70f8f993d93a62161a202e930cfce55
net: stmmac: socfpga: Add hardware supported cross-timestamp

Cross timestamping is supported on Agilex5 platform with Synchronized
Multidrop Timestamp Gathering(SMTG) IP. The hardware cross-timestamp
result is made available the applications through the ioctl call
PTP_SYS_OFFSET_PRECISE, which inturn calls stmmac_getcrosststamp().

Device time is stored in the MAC Auxiliary register. The 64-bit System
time (ARM_ARCH_COUNTER) is stored in SMTG IP. SMTG IP is an MDIO device
with 0xC - 0xF MDIO register space holds 64-bit system time.

This commit is similar to following commit for Intel platforms:
Commit 341f67e424e5 ("net: stmmac: Add hardware supported cross-timestamp")

Signed-off-by: Rohan G Thomas <rohan.g.thomas@altera.com>
Link: https://patch.msgid.link/20251101-agilex5_ext-v2-4-a6b51b4dca4d@altera.com
Signed-off-by: Jakub Kicinski <kuba@kernel.org>
drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c
drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h