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:
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
on Toradex Embedded Linux Reference Multimedia image
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:
Check system processes: Use ps aux | grep ptp to see if any PTP-related processes are running
Review network configuration: Verify that no other network time synchronization services are conflicting with PTP
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?
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.
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.
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.
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