PTP on Verdin iMX8M Plus

I have a Verdin imx8mp on Mallow carrier board.
Something seems to be wrong with /dev/ptp0
It looks fine, and is not held by any process according to lsof

root@verdin-imx8mp-15140914:~# ls -al /dev/ptp0
crw------- 1 root root 248, 0 May 29 18:48 /dev/ptp0

But ptp4l says it is busy:

root@verdin-imx8mp-15140914:~# ptp4l -i end0 -P -m
ptp4l[50712.607]: selected /dev/ptp0 as PTP clock
ptp4l[50712.612]: Failed to open /dev/ptp0: Device or resource busy
failed to create a clock

I tried in two ways:

  1. on Torizon OS with Docker, in which case I started a Debian image with --network=host --device=/dev/ptp0 and used apt to install linuxptp
  2. on Toradex Embedded Linux Reference Multimedia image

Here is the second one:

tdx-info

Software summary

Bootloader: U-Boot
Kernel version: 6.6.94-7.3.0 #1 SMP PREEMPT Wed Jun 25 09:14:55 UTC 2025
Kernel command line: root=PARTUUID=70864eaf-02 ro rootwait console=tty1 console=ttymxc2,115200
Distro name: NAME=“TDX Wayland with XWayland”
Distro version: VERSION_ID=7.3.0-build.8
Distro variant: -
Hostname: verdin-imx8mp-15140914

Hardware info

HW model: Toradex Verdin iMX8M Plus WB on Verdin Development Board
Toradex version: 0058 V1.1A
Serial number: 15140914
Processor arch: aarch64

Hi, I’m the Toradex AI Assistant.

I might make mistakes or occasionally get you wrong. Our support team will step in if needed.


I cannot provide a specific solution to your PTP device issue based on the available documentation sources. The sources don’t contain information about PTP (Precision Time Protocol) configuration or troubleshooting for the Verdin iMX8M Plus on the Mallow carrier board.

Potential Next Steps

Since this appears to be a specific PTP/networking configuration issue, you may want to:

  1. Check system processes: Use ps aux | grep ptp to see if any PTP-related processes are running
  2. Review network configuration: Verify that no other network time synchronization services are conflicting with PTP
  3. Examine kernel modules: Check if PTP-related kernel modules are properly loaded with lsmod | grep ptp

Available Resources

For general hardware information about your setup, you can reference the Mallow Carrier Board documentation (1).

If you’d like a general answer based on my knowledge of Linux PTP troubleshooting, please let me know and I can provide some general guidance that might help with your configuration.

Best regards, Toradex AI Assistant.


Did you like my answer? :+1: :-1:

If I answered your question, please tick the “Solution” checkbox.

For follow-up questions to me, please use @ToradexAI in your post.

I’m not an expert in PTP, but based on my research, if CONFIG_NETWORK_PHY_TIMESTAMPING is disabled, the kernel may not enable the necessary hooks for hardware timestamping. As a result, the PHC device may still be registered, but it remains in ‘free running’ mode.

Please check if the CONFIG_NETWORK_PHY_TIMESTAMPING is enabled.

zcat /proc/config.gz | grep -i timestamp

And recompile the kernel if needed.

root@verdin-imx8mp-15140914:~# zcat /proc/config.gz | grep -i timestamp
# CONFIG_NETWORK_PHY_TIMESTAMPING is not set
# CONFIG_NF_CONNTRACK_TIMESTAMP is not set
# Enable PHYLIB and NETWORK_PHY_TIMESTAMPING to see the additional clocks.
root@verdin-imx8mp-15140914:~# dmesg | grep -iE 'ptp|stmmac|eqos|ethernet|end0'
[    0.078983] PTP clock support registered
[    2.234490] imx-dwmac 30bf0000.ethernet: IRQ eth_lpi not found
[    2.241169] imx-dwmac 30bf0000.ethernet: User ID: 0x10, Synopsys ID: 0x51
[    2.254988] imx-dwmac 30bf0000.ethernet: 	DWMAC4/5
[    2.267036] imx-dwmac 30bf0000.ethernet: DMA HW capability register supported
[    2.274256] imx-dwmac 30bf0000.ethernet: RX Checksum Offload Engine supported
[    2.281474] imx-dwmac 30bf0000.ethernet: Wake-Up On Lan supported
[    2.287871] imx-dwmac 30bf0000.ethernet: Enable RX Mitigation via HW Watchdog Timer
[    2.295639] imx-dwmac 30bf0000.ethernet: Enabled L3L4 Flow TC (entries=8)
[    2.302520] imx-dwmac 30bf0000.ethernet: Enabled RFS Flow TC (entries=10)
[    2.309436] imx-dwmac 30bf0000.ethernet: Enabling HW TC (entries=256, max_off=256)
[    2.317081] imx-dwmac 30bf0000.ethernet: Using 34/40 bits DMA host/device width
[    5.464525] imx-dwmac 30bf0000.ethernet end0: renamed from eth0
[    9.564632] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    9.612031] imx-dwmac 30bf0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-0
[    9.625325] imx-dwmac 30bf0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-1
[    9.637033] imx-dwmac 30bf0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-2
[    9.648540] imx-dwmac 30bf0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-3
[    9.660074] imx-dwmac 30bf0000.ethernet end0: Register MEM_TYPE_PAGE_POOL RxQ-4
[    9.741340] imx-dwmac 30bf0000.ethernet end0: PHY [stmmac-0:07] driver [Microchip KSZ9131 Gigabit PHY] (irq=40)
[    9.764832] imx-dwmac 30bf0000.ethernet end0: No Safety Features support found
[    9.776455] imx-dwmac 30bf0000.ethernet end0: IEEE 1588-2008 Advanced Timestamp supported
[    9.792649] imx-dwmac 30bf0000.ethernet end0: registered PTP clock
[    9.813002] imx-dwmac 30bf0000.ethernet end0: FPE workqueue start
[    9.826933] imx-dwmac 30bf0000.ethernet end0: configuring for phy/rgmii-id link mode
[   12.716621] imx-dwmac 30bf0000.ethernet end0: Link is Up - 1Gbps/Full - flow control off
[   12.739016] 8021q: adding VLAN 0 to HW filter on device end0
[   20.446993] platform 30be0000.ethernet: deferred probe pending
[  647.415151] ptp: physical clock is free running
[50712.608377] ptp: physical clock is free running

Did you create ptp0 node or it appears automatically on boot? I don’t know if it matters, but on iMX7 major number is 250 and linuxptp works well.

CONFIG_NETWORK_PHY_TIMESTAMPING is disabled in my case. Does it give any benefits (on timestamping capable PHY’s only) over PTP support in Freescale Ethernet?

I saw somewhat like “ptp0: Device or resource busy” when I passed /dev/ptp0? to pmcutility or something like that. pmcthen deleted /dev/ptp0 node… Though, not sure what was real sequence, but certainly wrong arguments to pmc and phc2syswere causing busy issue. I would try to reboot and make sure nothing from linuxptp is accessing eth0/ptp0, and then try launching ptp4l with -m, -i and optional -p switch.

I did not create /dev/ptp0
I am not sure I understand your question about benefits.
I am not sure I understand your point about pmc.
Of course I tried to reboot, and, as I described, I even tried a different installation altogether.
I don’t see anything accessing ptp0, as I described above. So it seems that something is wrong with the kernel.

This issue could be related to the following kernel regression:

‘ptp4l, and any other application which calls clock_adjtime() on a physical clock, returns error -EBUSY after commit 87f7ce260a3c.’

A fix for this regression was merged into the mainline kernel for v6.11-rc1 and has also been backported to several stable releases, including v6.6.95, v6.10.16, and others.

Since your current kernel version is v6.6.94, it is most likely affected by this bug.

What do I do?
I tried following the build procedure described here:

It also builds 6.6.94
I think I found how to enable CONFIG_NETWORK_PHY_TIMESTAMPING in it, but I did not deploy and test yet.

And why this build is so far behind the current kernel, which is 6.17 already?

I believe I figured this out.

I built torizon-docker 6.6.101 with a custom layer setting these:
CONFIG_PHYLIB=y – this one might have been set already but just in case
CONFIG_NETWORK_PHY_TIMESTAMPING=y
CONFIG_NET_CLS_ACT=y

docker run -it --rm --network=host --device=/dev/ptp0 --cap-add=NET_ADMIN --cap-add=SYS_TIME torizon/debian:stable
apt install linuxptp
gptp.conf:
[global]
priority1 248
priority2 248
gmCapable 1
time_stamping hardware
[ethernet0]
transportSpecific 1
delay_mechanism P2P
network_transport L2
logAnnounceInterval -3
logSyncInterval -4
announceReceiptTimeout 8
syncReceiptTimeout 8
neighborPropDelayThresh 800

root@verdin-imx8mp-15140914:/# ptp4l -i ethernet0 -f gptp.conf -m
ptp4l[516.764]: selected /dev/ptp0 as PTP clock
ptp4l[516.840]: port 1: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[516.840]: port 0: INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[517.858]: port 1: LISTENING to MASTER on ANNOUNCE_RECEIPT_TIMEOUT_EXPIRES
ptp4l[517.858]: selected local clock 00142d.fffe.e70832 as best master
ptp4l[517.858]: port 1: assuming the grand master role
ptp4l[518.476]: port 1: new foreign master 0001f2.fffe.ffbd91-4
ptp4l[520.476]: selected best master clock 0001f2.fffe.ffbd91
ptp4l[520.476]: running in a temporal vortex
ptp4l[520.477]: port 1: MASTER to UNCALIBRATED on RS_SLAVE
ptp4l[520.978]: port 1: UNCALIBRATED to SLAVE on MASTER_CLOCK_SELECTED
ptp4l[521.728]: rms 559 max 735 freq +31672 +/- 355 delay -23919 +/- 0
ptp4l[522.728]: rms 193 max 226 freq +31005 +/- 22 delay -23538 +/- 0
ptp4l[523.728]: rms 136 max 255 freq +31400 +/- 87 delay -23919 +/- 0
ptp4l[524.728]: rms 184 max 356 freq +31555 +/- 155 delay -24300 +/- 0
ptp4l[525.728]: rms 325 max 465 freq +30795 +/- 43 delay -23919 +/- 0
ptp4l[526.729]: rms 143 max 236 freq +31346 +/- 55 delay -24300 +/- 0
ptp4l[527.729]: rms 90 max 115 freq +31048 +/- 8 delay -24169 +/- 0
ptp4l[528.729]: rms 31 max 55 freq +31072 +/- 12 delay -24169 +/- 0
ptp4l[529.729]: rms 10 max 25 freq +31112 +/- 10 delay -24169 +/- 0