[PATCH] arm64: dts: imx8mp-frdm: Add overlay for EQOS PTP event pins

From: James Clark

Date: Thu Nov 19 2026 - 01:23:17 EST


On the FRDM-IMX8MPLUS, pins 13 and 28 of the J18 expansion header are
wired to the SoC pads GPIO1_IO08 and GPIO1_IO09. Very few boards
bring PTP event signals out to a header, so this is a valuable feature
for PTP work. Add an overlay that connects the two pads to PTP event
channel 0 of the EQOS Ethernet controller:

J18 pin 13 (GPIO1_IO08): ENET_QOS_1588_EVENT0_AUX_IN, external
timestamp input
J18 pin 28 (GPIO1_IO09): ENET_QOS_1588_EVENT0_OUT, periodic output

The input must be EVENT0_AUX_IN, not EVENT0_IN: the stmmac driver
timestamps external events with the auxiliary snapshot; with EVENT0_IN
no timestamps are captured.

Tested with pin 28 wired to pin 13: a 1 Hz periodic output on channel
0 was timestamped on external timestamp channel 0.

Signed-off-by: James Clark <jjc@xxxxxxxxxx>
---
I used an LLM coding assistant to help prepare this patch.

arch/arm64/boot/dts/freescale/Makefile | 5 ++++
.../dts/freescale/imx8mp-frdm-eqos-ptp.dtso | 26 +++++++++++++++++++
2 files changed, 31 insertions(+)
create mode 100644 arch/arm64/boot/dts/freescale/imx8mp-frdm-eqos-ptp.dtso

diff --git a/arch/arm64/boot/dts/freescale/Makefile b/arch/arm64/boot/dts/freescale/Makefile
index cfd548284358..5cdad9dbda8c 100644
--- a/arch/arm64/boot/dts/freescale/Makefile
+++ b/arch/arm64/boot/dts/freescale/Makefile
@@ -633,6 +633,11 @@ imx8mp-evk-flexcan2-dtbs += imx8mp-evk.dtb imx8mp-evk-flexcan2.dtbo
dtb-$(CONFIG_ARCH_MXC) += imx8mp-evk-flexcan2.dtb

dtb-$(CONFIG_ARCH_MXC) += imx8mp-frdm.dtb
+
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-frdm-eqos-ptp.dtbo
+imx8mp-frdm-eqos-ptp-dtbs += imx8mp-frdm.dtb imx8mp-frdm-eqos-ptp.dtbo
+dtb-$(CONFIG_ARCH_MXC) += imx8mp-frdm-eqos-ptp.dtb
+
DTC_FLAGS_imx8mp-hummingboard-iiot := -@
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot.dtb
dtb-$(CONFIG_ARCH_MXC) += imx8mp-hummingboard-iiot-panel-dsi-WJ70N3TYJHMNG0.dtbo
diff --git a/arch/arm64/boot/dts/freescale/imx8mp-frdm-eqos-ptp.dtso b/arch/arm64/boot/dts/freescale/imx8mp-frdm-eqos-ptp.dtso
new file mode 100644
index 000000000000..15d0efc30243
--- /dev/null
+++ b/arch/arm64/boot/dts/freescale/imx8mp-frdm-eqos-ptp.dtso
@@ -0,0 +1,26 @@
+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
+/*
+ * Overlay for the NXP FRDM-IMX8MPLUS board: connect PTP event channel 0
+ * of the EQOS Ethernet controller to the J18 expansion header.
+ *
+ * J18 pin 13 (GPIO1_IO08): external timestamp input (EXTTS 0)
+ * J18 pin 28 (GPIO1_IO09): periodic output (PEROUT 0)
+ */
+
+#include "imx8mp-pinfunc.h"
+
+/dts-v1/;
+/plugin/;
+
+&eqos {
+ pinctrl-0 = <&pinctrl_eqos>, <&pinctrl_eqos_1588_event>;
+};
+
+&iomuxc {
+ pinctrl_eqos_1588_event: eqos1588eventgrp {
+ fsl,pins = <
+ MX8MP_IOMUXC_GPIO1_IO08__ENET_QOS_1588_EVENT0_AUX_IN (MX8MP_PULL_ENABLE | MX8MP_HYS_SCHMITT)
+ MX8MP_IOMUXC_GPIO1_IO09__ENET_QOS_1588_EVENT0_OUT (MX8MP_DSE_X6 | MX8MP_FSEL_FAST)
+ >;
+ };
+};
--
2.56.0