Hello,
I'm working on an S32G-VNP-RDB3 board and I'd like to configure it as a PTP Boundary Clock on the pfe1 and pfe2 interfaces.
Running `ptp4l -H -i pfe1 -i pfe2 -m` (with the BSP44.0) results in this error:
ptp4l[2178.575]: selected /dev/ptp2 as PTP clock
ptp4l[2178.576]: port 2 (pfe2): PHC device mismatch
ptp4l[2178.576]: port 2 (pfe2): /dev/ptp2 requested, ptp3 attached
ptp4l[2178.576]: failed to open port pfe2
failed to create a clock
And that is ok because ptp4l requires the interfaces to use the same hardware clock. In S32G_PFE_LNX_DRV_UM section 2.3.1.2 External Timestamp Mode, it is explained that the clock tree can be configured such that "EMAC0 is the time source and feeds GMAC, EMAC1 and EMAC2" (dotted line in the figure).
NidasioAlberto_1-1754658772398.png
To apply this configuration (as explained in the chapter), I modify the device three (when building the image with yocto) as following:
diff --git a/image/s32g-pfe.dtsi b/image/s32g-pfe-new.dtsi
index 94f886b..0a6ba1c 100644
--- a/arch/arm64/boot/dts/freescale/s32g-pfe.dtsi
+++ b/arch/arm64/boot/dts/freescale/s32g-pfe.dtsi
@@ -53,6 +53,7 @@
"pfe-shared-pool", "pfe-bdr-pool";
nxp,fw-class-name = "s32g_pfe_class.fw";
nxp,fw-util-name = "s32g_pfe_util.fw";
+ nxp,pfeng-emac-ts-ext-modes = <PFE_PHYIF_EMAC_1>, <PFE_PHYIF_EMAC_2>;
nxp,pfeng-ihc-channel = <PFE_HIF_CHANNEL_0>;
status = "disabled";
@@ -175,4 +176,3 @@
};
};
};
-
In the bootlogs I see this:
[ 8.716896] pfeng 46000000.pfe pfe1 (uninitialized): Subscribe to HIF1
[ 8.723466] pfeng 46000000.pfe pfe1 (uninitialized): Host LLTX disabled
[ 8.730319] pfeng 46000000.pfe pfe1 (uninitialized): Enable HIF1
[ 8.736399] pfeng 46000000.pfe pfe1 (uninitialized): setting MAC addr: 00:04:9f:be:ef:01
[ 8.744584] pfeng 46000000.pfe pfe1 (uninitialized): PTP HW addend 0x80000000, max_adj configured to 46566128 ppb
[ 8.754886] pfeng 46000000.pfe: IEEE1588: Using external timestamp input
[ 8.761903] pfeng 46000000.pfe pfe1 (uninitialized): Registered PTP HW clock successfully on EMAC1
[ 8.771626] pfeng 46000000.pfe pfe1: registered
[ 8.776283] pfeng 46000000.pfe pfe2 (uninitialized): Subscribe to HIF2
[ 8.782837] pfeng 46000000.pfe pfe2 (uninitialized): Host LLTX disabled
[ 8.789684] pfeng 46000000.pfe pfe2 (uninitialized): Enable HIF2
[ 8.795771] pfeng 46000000.pfe pfe2 (uninitialized): setting MAC addr: 00:04:9f:be:ef:02
[ 8.803945] pfeng 46000000.pfe pfe2 (uninitialized): PTP HW addend 0x80000000, max_adj configured to 46566128 ppb
[ 8.814257] pfeng 46000000.pfe: IEEE1588: Using external timestamp input
[ 8.821221] pfeng 46000000.pfe pfe2 (uninitialized): Registered PTP HW clock successfully on EMAC2
[ 8.830823] pfeng 46000000.pfe pfe2: registered
But then `ethtool` still reports different ptp hardware clock for each pfe interface:
root@s32g399ardb3:~# ethtool -T pfe0
...
PTP Hardware Clock: 1
...
root@s32g399ardb3:~# ethtool -T pfe1
...
PTP Hardware Clock: 2
...
root@s32g399ardb3:~# ethtool -T pfe2
...
PTP Hardware Clock: 3
...
And I get the same output from `ptp4l -H -i pfe1 -i pfe2 -m`.
What am I missing in the configuration? Is there something to change in the pfe firmware such that is needs to be recompiled?