<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>S32GのトピックRe: S32G3 PFE External Timestamp Mode</title>
    <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2154067#M14565</link>
    <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238460"&gt;@alejandro_e&lt;/a&gt;, I'll try to patch the PFE driver then.&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 19 Aug 2025 05:58:14 GMT</pubDate>
    <dc:creator>NidasioAlberto</dc:creator>
    <dc:date>2025-08-19T05:58:14Z</dc:date>
    <item>
      <title>S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2149232#M14470</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;I'm working on an&amp;nbsp;S32G-VNP-RDB3 board and I'd like to configure it as a PTP Boundary Clock on the pfe1 and pfe2 interfaces.&lt;/P&gt;&lt;P&gt;Running `ptp4l -H -i pfe1 -i pfe2 -m` (with the BSP44.0) results in this error:&lt;/P&gt;&lt;PRE&gt;ptp4l[2178.575]: selected /dev/ptp2 as PTP clock&lt;BR /&gt;ptp4l[2178.576]: port 2 (pfe2): PHC device mismatch&lt;BR /&gt;ptp4l[2178.576]: port 2 (pfe2): /dev/ptp2 requested, ptp3 attached&lt;BR /&gt;ptp4l[2178.576]: failed to open port pfe2&lt;BR /&gt;failed to create a clock&lt;/PRE&gt;&lt;P&gt;And that is ok because ptp4l requires the interfaces to use the same hardware clock. In&amp;nbsp;&lt;SPAN&gt;S32G_PFE_LNX_DRV_UM section 2.3.1.2 External Timestamp Mode&lt;/SPAN&gt;, 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).&lt;/P&gt;&lt;DIV class=""&gt;&amp;nbsp;&lt;/DIV&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="NidasioAlberto_1-1754658772398.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/351586iAE8957B7E373A7EB/image-size/medium?v=v2&amp;amp;px=400" role="button" title="NidasioAlberto_1-1754658772398.png" alt="NidasioAlberto_1-1754658772398.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;To apply this configuration (as explained in the chapter), I modify the device three (when building the image with yocto) as following:&lt;/P&gt;&lt;PRE&gt;diff --git a/image/s32g-pfe.dtsi b/image/s32g-pfe-new.dtsi&lt;BR /&gt;index 94f886b..0a6ba1c 100644&lt;BR /&gt;--- a/arch/arm64/boot/dts/freescale/s32g-pfe.dtsi&lt;BR /&gt;+++ b/arch/arm64/boot/dts/freescale/s32g-pfe.dtsi&lt;BR /&gt;@@ -53,6 +53,7 @@&lt;BR /&gt;"pfe-shared-pool", "pfe-bdr-pool";&lt;BR /&gt;nxp,fw-class-name = "s32g_pfe_class.fw";&lt;BR /&gt;nxp,fw-util-name = "s32g_pfe_util.fw";&lt;BR /&gt;+ nxp,pfeng-emac-ts-ext-modes = &amp;lt;PFE_PHYIF_EMAC_1&amp;gt;, &amp;lt;PFE_PHYIF_EMAC_2&amp;gt;;&lt;BR /&gt;nxp,pfeng-ihc-channel = &amp;lt;PFE_HIF_CHANNEL_0&amp;gt;;&lt;BR /&gt;status = "disabled";&lt;BR /&gt;&lt;BR /&gt;@@ -175,4 +176,3 @@&lt;BR /&gt;};&lt;BR /&gt;};&lt;BR /&gt;};&lt;BR /&gt;-&lt;/PRE&gt;&lt;P&gt;In the bootlogs I see this:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;[ 8.716896] pfeng 46000000.pfe pfe1 (uninitialized): Subscribe to HIF1&lt;BR /&gt;[ 8.723466] pfeng 46000000.pfe pfe1 (uninitialized): Host LLTX disabled&lt;BR /&gt;[ 8.730319] pfeng 46000000.pfe pfe1 (uninitialized): Enable HIF1&lt;BR /&gt;[ 8.736399] pfeng 46000000.pfe pfe1 (uninitialized): setting MAC addr: 00:04:9f:be:ef:01&lt;BR /&gt;[ 8.744584] pfeng 46000000.pfe pfe1 (uninitialized): PTP HW addend 0x80000000, max_adj configured to 46566128 ppb&lt;BR /&gt;[ 8.754886] pfeng 46000000.pfe: IEEE1588: Using external timestamp input&lt;BR /&gt;[ 8.761903] pfeng 46000000.pfe pfe1 (uninitialized): Registered PTP HW clock successfully on EMAC1&lt;BR /&gt;[ 8.771626] pfeng 46000000.pfe pfe1: registered&lt;BR /&gt;[ 8.776283] pfeng 46000000.pfe pfe2 (uninitialized): Subscribe to HIF2&lt;BR /&gt;[ 8.782837] pfeng 46000000.pfe pfe2 (uninitialized): Host LLTX disabled&lt;BR /&gt;[ 8.789684] pfeng 46000000.pfe pfe2 (uninitialized): Enable HIF2&lt;BR /&gt;[ 8.795771] pfeng 46000000.pfe pfe2 (uninitialized): setting MAC addr: 00:04:9f:be:ef:02&lt;BR /&gt;[ 8.803945] pfeng 46000000.pfe pfe2 (uninitialized): PTP HW addend 0x80000000, max_adj configured to 46566128 ppb&lt;BR /&gt;[ 8.814257] pfeng 46000000.pfe: IEEE1588: Using external timestamp input&lt;BR /&gt;[ 8.821221] pfeng 46000000.pfe pfe2 (uninitialized): Registered PTP HW clock successfully on EMAC2&lt;BR /&gt;[ 8.830823] pfeng 46000000.pfe pfe2: registered&lt;/PRE&gt;&lt;P&gt;But then `ethtool` still reports different ptp hardware clock for each pfe interface:&lt;/P&gt;&lt;PRE&gt;root@s32g399ardb3:~# ethtool -T pfe0&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 1&lt;BR /&gt;...&lt;BR /&gt;root@s32g399ardb3:~# ethtool -T pfe1&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 2&lt;BR /&gt;...&lt;BR /&gt;root@s32g399ardb3:~# ethtool -T pfe2&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 3&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;And I get the same output from `ptp4l -H -i pfe1 -i pfe2 -m`.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;What am I missing in the configuration? Is there something to change in the pfe firmware such that is needs to be recompiled?&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 13:23:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2149232#M14470</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-08T13:23:44Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2149440#M14479</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/253594"&gt;@NidasioAlberto&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks reaching out to us. I did the steps described in the BSP44 User guide and I was able to configure PTP timestamp with no problem, I used a precompiled image, which should be the same as the one build by yocto. Although with a different command syntax, I used:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ptp4l -2 -H -i end0 -m -s&lt;/LI-CODE&gt;
&lt;P&gt;And got the following output:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@s32g399ardb3:~#  ptp4l -2 -H -i pfe2 -m -s
ptp4l[331.563]: selected /dev/ptp2 as PTP clock
ptp4l[331.600]: port 1 (pfe2): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[331.600]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[331.600]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[337.781]: selected local clock 00049f.fffe.beef02 as best master
ptp4l[385.758]: port 1 (pfe2): link down
ptp4l[385.758]: port 1 (pfe2): LISTENING to FAULTY on FAULT_DETECTED (FT_UNSPECIFIED)
ptp4l[385.788]: port 1 (pfe2): assuming the grand master role
ptp4l[385.788]: port 1 (pfe2): master state recommended in slave only mode
ptp4l[385.788]: port 1 (pfe2): defaultDS.priority1 probably misconfigured&lt;/LI-CODE&gt;
&lt;P&gt;The Link down message appeared after disconnecting the eth cable.&lt;/P&gt;
&lt;P&gt;I just needed to configure the IP of the P3A port before, with the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ip addr add 192.168.0.131/24 dev pfe2&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alejandro_e_0-1754696762765.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/351634i306A984FE2799322/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alejandro_e_0-1754696762765.png" alt="alejandro_e_0-1754696762765.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I connected it to my Window 11 PC.&lt;/P&gt;
&lt;P&gt;You should get the same ouput for PFE1 with:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ptp4l -2 -H -i pfe1 -m -s&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please let me know if I understood your problem correctly&lt;/P&gt;</description>
      <pubDate>Fri, 08 Aug 2025 23:48:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2149440#M14479</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2025-08-08T23:48:08Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2149810#M14485</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238460"&gt;@alejandro_e&lt;/a&gt;&amp;nbsp;for answering, but my problem still persist. I'll try to explain it further.&lt;/P&gt;&lt;P&gt;The PFE peripheral of the S32G3 has 3 interfaces, one is connected to the SJA1110 switch, and the other two are exposed on the board (PFE_MAC0 and PFE_MAC1 in the diagram).&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="S32G-VNP-RDB3 ports simple diagram.png" style="width: 984px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/351732iDD7071087A4F1578/image-size/large?v=v2&amp;amp;px=999" role="button" title="S32G-VNP-RDB3 ports simple diagram.png" alt="S32G-VNP-RDB3 ports simple diagram.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;My target application involves connecting clients to the board through both interfaces, and to synchronize with them with PTP. For this reason I need ptp4l to run with both interfaces, not just pfe1 or pfe2 separately.&lt;/P&gt;&lt;P&gt;From the LinuxPTP documentation of the ptp4l tools, if I want to use hardware time stamping I read that.&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;P&gt;All ports specified by the -i option and in the configuration file must be attached to the same PTP hardware clock (PHC).&lt;/P&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;So for this reason I need to configure the board such that both interfaces use the same hardware clock.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 07:04:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2149810#M14485</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-11T07:04:47Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2150317#M14497</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/253594"&gt;@NidasioAlberto&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Thanks for the clarification, I was not understanding your problem correctly.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For convenience, in the following example I used end0 and pfe2, however you should get the same effect with pfe1 and pfe2.&lt;/P&gt;
&lt;P&gt;Each command execution of ptp4l can only support one interface, you will need to run two commands, you can achieve that with the following:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;ptp4l -2 -H -i pfe2 -s -m &amp;gt; /var/log/ptp4l_pfe2.log &amp;amp; ptp4l -2 -H -i end0 -s -m &amp;gt; /var/log/ptp4l_end0.log &amp;amp;&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The '&lt;FONT face="courier new,courier"&gt;&amp;amp;&lt;/FONT&gt;' at the end of each command will send each execution to the background, therefore you will get control of the terminal. the output will be saved in the files indicated in each command, this can be named however you want, I chose that name for convenience.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For example:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;s32g399ardb3 login: root
root@s32g399ardb3:~# ip addr add 192.168.0.131/24 dev pfe2
root@s32g399ardb3:~# ip addr add 192.168.0.130/24 dev end0
root@s32g399ardb3:~# ptp4l -2 -H -i pfe2 -s -m &amp;gt; /var/log/ptp4l_pfe2.log &amp;amp; ptp4l -2 -H -i end0 -s -m &amp;gt; /var/log/ptp4l_end0.log &amp;amp;
[1] 455
[2] 456
root@s32g399ardb3:~# jobs
[1]-  Running                 ptp4l -2 -H -i pfe2 -s -m &amp;gt; /var/log/ptp4l_pfe2.log &amp;amp;
[2]+  Running                 ptp4l -2 -H -i end0 -s -m &amp;gt; /var/log/ptp4l_end0.log &amp;amp;
root@s32g399ardb3:~# cat /var/log/ptp4l_pfe2.log
ptp4l[79.716]: selected /dev/ptp2 as PTP clock
ptp4l[79.744]: port 1 (pfe2): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[79.744]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[79.745]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[85.948]: selected local clock 00049f.fffe.beef02 as best master
root@s32g399ardb3:~# cat /var/log/ptp4l_end0.log
ptp4l[79.716]: selected /dev/ptp3 as PTP clock
ptp4l[79.760]: port 1 (end0): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[79.760]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[79.760]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE
ptp4l[85.911]: selected local clock b2ecbb.fffe.ef0375 as best master
root@s32g399ardb3:~#&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;First I assigned an IP for each interface, then I invoked ptp4l for each interface and finally I showed the contents of the log files to the terminal.&lt;/P&gt;
&lt;P&gt;For this I connected devices to both P3B (PFE2) and P3A (GMAC0), otherwise some error logs may appear.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if this solves your question.&lt;/P&gt;</description>
      <pubDate>Mon, 11 Aug 2025 20:52:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2150317#M14497</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2025-08-11T20:52:55Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2150601#M14504</link>
      <description>&lt;P&gt;By running two separate ptp4l instances (more so with the `-s` option that enable client only mode), you have that both interfaces can become clients at the same time. When this occurs, and the peripheral hardware clocks of both interface gets synchronized, which one should be used by phc2sys to synchronize the system clock?&lt;/P&gt;&lt;P&gt;What I want to achieve is to have one single instance of ptp4l running on multiple ports synchronizing one single hardware clock. I want to implement a boundary clock that synchronize to an upstream master on one port, and provides it's clock as a master on the others.&lt;/P&gt;&lt;P&gt;ptp4l can work with more than one interface. The LinuxPTP documentation says so and I've also achieved what I want to do with the SJA1110 switch. What I did was to enable the DSA driver for the SJA and to run `ptp4l -i p2 -i p3 -2 -m`. The DSA driver exposes the switch interfaces in linux, and they have the same hardware clock (ethtool also reports so, showing clock 4). Since the two ports have the same hardware clock, ptp4l can use both of them. In this configuration I see that ptp4l chooses one master over one of the two interfaces, and if that master fails, a new master is selected from the other. And the board itself can become the master if the BMCA algorithm chooses so. And with this I can also run `phc2sys -a -rr -m` to automatically synchronize the system clock to the hardware clock if the board is a slave, or the hardware clock to the system clock if it acts as the grandmaster.&lt;/P&gt;&lt;P&gt;Since I enabled the "External Timestamp Mode" for pfe1 and pfe2 (as described by my first post), pfe1 and pfe2 hardware clocks are derived by the hardware clock of pfe0. By running what you provided, that is two ptp4l instances in client only mode, when ptp4l needs to adjust the hardware clocks, it gives an error.&lt;/P&gt;&lt;PRE&gt;root@s32g399ardb3:~# ptp4l -i pfe2 -2 -m&lt;BR /&gt;ptp4l[72513.760]: selected /dev/ptp3 as PTP clock&lt;BR /&gt;ptp4l[72513.796]: port 1 (pfe2): INITIALIZING to LISTENING on INIT_COMPLETE&lt;BR /&gt;ptp4l[72513.796]: port 0 (/var/run/ptp4l): INITIALIZING to LISTENING on INIT_COMPLETE&lt;BR /&gt;ptp4l[72513.796]: port 0 (/var/run/ptp4lro): INITIALIZING to LISTENING on INIT_COMPLETE&lt;BR /&gt;ptp4l[72514.342]: port 1 (pfe2): new foreign master 00049f.fffe.096f15-1&lt;BR /&gt;ptp4l[72518.342]: selected best master clock 00049f.fffe.096f15&lt;BR /&gt;ptp4l[72518.343]: port 1 (pfe2): LISTENING to UNCALIBRATED on RS_SLAVE&lt;BR /&gt;ptp4l[72520.342]: master offset -1593121442 s0 freq +227123 path delay 788&lt;BR /&gt;ptp4l[72521.349]: failed to adjust the clock: Operation not supported&lt;BR /&gt;ptp4l[72522.342]: master offset -1593112737 s0 freq +231478 path delay -211&lt;BR /&gt;ptp4l[72523.349]: failed to adjust the clock: Operation not supported&lt;/PRE&gt;&lt;P&gt;And this does make sense becase if I tell the board that hardware clocks of pfe1 and pfe2 are derived from pfe0, then I cannot momdify them.&lt;/P&gt;&lt;P&gt;So my problem is. With the&amp;nbsp;"External Timestamp Mode" enabled for pfe1 and pfe2, why in Linux the pfe1 and pfe2 peripherals are not related to hardware clock 1 but are instead related to their clocks (2 and 3 respectively). I mean, with the DSA driver for the SJA1110, different interfaces are related to the same hardware clock (in this case `/dev/ptp4`). Please refer to my first post for more details. So, is it a bug or do i need to configure something else? Maybe there is something else to modify in the device tree that I'm missing?&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;Would it also be possible to give some reference to documentation? Like, if ptp4l does not support multiple ports, where can I find this documented?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Btw, thanks a lot&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238460"&gt;@alejandro_e&lt;/a&gt;&amp;nbsp;for helping me.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 06:33:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2150601#M14504</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-12T06:33:56Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2150645#M14506</link>
      <description>&lt;P&gt;From &lt;A href="https://github.com/nxp-auto-linux/pfeng/tree/release/linux_1.9.0" target="_blank" rel="nofollow noopener noreferrer"&gt;the PFE driver repository on GitHub&lt;/A&gt;, I saw that the code managing the external timestamp mode was commited by&amp;nbsp;&lt;A href="https://community.nxp.com/t5/user/viewprofilepage/user-id/80189" target="_blank"&gt;@jpetrous&lt;/A&gt;,&amp;nbsp;maybe he can be of help here&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 07:19:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2150645#M14506</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-12T07:19:44Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2151185#M14523</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/253594"&gt;@NidasioAlberto&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;The problem your are facing with the clocks, this is, using "External timestamp mode" and getting the wrong configuration with the ptp4l is out of my expertise. I will reach out to the internal team for better support on this topic. This might take some time, I appreciate your patience.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the ptp4l documentation, please check the following:&lt;/P&gt;
&lt;P&gt;&lt;A href="https://docs.redhat.com/en/documentation/red_hat_enterprise_linux/7/html/system_administrators_guide/ch-Configuring_PTP_Using_ptp4l" target="_blank"&gt;Chapter&amp;nbsp;20.&amp;nbsp;Configuring PTP Using ptp4l | System Administrator’s Guide | Red Hat Enterprise Linux | 7 | Red Hat Documentation&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alejandro_e_0-1755041461812.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/352084i116B476CCCA91907/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alejandro_e_0-1755041461812.png" alt="alejandro_e_0-1755041461812.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;It does mention that a group of interfaces can be started at the same time with the same instance, however, that is related to the ptp4l program, which is not provided by NXP and therefore we cannot offer much support, other than what we currently provide. Sorry for the inconviniences.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I will get back to you regarding the first topic of this reply.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 12 Aug 2025 23:32:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2151185#M14523</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2025-08-12T23:32:33Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2151414#M14524</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238460"&gt;@alejandro_e&lt;/a&gt;&amp;nbsp;for the follow-up and for escalating the issue. I'll wait for a feedback.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Aug 2025 06:52:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2151414#M14524</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-13T06:52:06Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2152581#M14543</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/253594"&gt;@NidasioAlberto&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;I have received the following feedback from the internal team:&lt;/P&gt;
&lt;P&gt;"&lt;/P&gt;
&lt;P&gt;&lt;FONT color="#808080"&gt;&lt;SPAN&gt;If PFE_EMAC1 and PFE_EMAC2 share timestamp from PFE_EMAC0, it doesn't support to adjust PTP time of PFE_EMAC1 and PFE_EMAC2, you can think PTP time registers work in read-only mode. and reflect the PTP time of PFE_EMAC0. In this case in order to synchronize time you should use PFE_EMAC0.&lt;/SPAN&gt;&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;"&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if this information helped with your problem&lt;/P&gt;</description>
      <pubDate>Fri, 15 Aug 2025 01:13:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2152581#M14543</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2025-08-15T01:13:03Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2153544#M14551</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238460"&gt;@alejandro_e&lt;/a&gt;&amp;nbsp;for getting back to me so quickly.&lt;/P&gt;&lt;P&gt;I understand what the internal team is saying.&lt;/P&gt;&lt;P&gt;What I don't understand is why, when configurationg "External Timestamp Mode" for pfe1 and pfe2, the hardware clock associated with pfe1 and pfe2 is not the same of pfe0 but still their own independent clock. With this I'm referring to what the pfe driver exposes to Linux, and thus to ptp4l.&lt;/P&gt;&lt;P&gt;What I would expect is that insteal of seeing this:&lt;/P&gt;&lt;PRE&gt;root@s32g399ardb3:~# ethtool -T pfe0&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 1&lt;BR /&gt;...&lt;BR /&gt;root@s32g399ardb3:~# ethtool -T pfe1&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 2&lt;BR /&gt;...&lt;BR /&gt;root@s32g399ardb3:~# ethtool -T pfe2&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 3&lt;BR /&gt;...&lt;/PRE&gt;&lt;P&gt;I see this:&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;PRE&gt;root@s32g399ardb3:~# ethtool -T pfe0&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 1&lt;BR /&gt;...&lt;BR /&gt;root@s32g399ardb3:~# ethtool -T pfe1&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 1&lt;BR /&gt;...&lt;BR /&gt;root@s32g399ardb3:~# ethtool -T pfe2&lt;BR /&gt;...&lt;BR /&gt;PTP Hardware Clock: 1&lt;BR /&gt;...&amp;nbsp;&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 09:58:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2153544#M14551</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-18T09:58:54Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2153924#M14560</link>
      <description>&lt;P&gt;Hello&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/253594"&gt;@NidasioAlberto&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;My understanding is that the number of the clock in the output of ethtool is the id of the 'virutal device', and does not necessarily reflect the internal configuration of the module.&lt;/P&gt;
&lt;P&gt;For each device a different clock device gets registered, it happens here&amp;nbsp;&lt;A href="https://github.com/nxp-auto-linux/pfeng/blob/72d7e80fd2d25bf2095ce65bb18ce38c7d297d97/sw/linux-pfeng/pfeng-ptp.c#L247" target="_blank"&gt;linux-pfeng/pfeng-ptp.c#L247&lt;/A&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;for example, using the base BSP44 image, you can see all the PFE_EMAC instances register a PTP clock:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@s32g399ardb3:~# dmesg | grep "Registered PTP HW clock successfully on EMAC"
[    9.525257] pfeng 46000000.pfe pfe0 (uninitialized): Registered PTP HW clock successfully on EMAC0
[    9.593027] pfeng 46000000.pfe pfe1 (uninitialized): Registered PTP HW clock successfully on EMAC1
[    9.653784] pfeng 46000000.pfe pfe2 (uninitialized): Registered PTP HW clock successfully on EMAC2&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This clock register process gets iterated here&amp;nbsp;&lt;A href="https://github.com/nxp-auto-linux/pfeng/blob/4fd51c6de92cd367731ae1e25e292541cf7f4a7a/sw/linux-pfeng/pfeng-netif.c#L1544" target="_blank"&gt;linux-pfeng/pfeng-netif.c#L1544&lt;/A&gt;, for each interface.&lt;/P&gt;
&lt;P&gt;You could modify the source code so that all the interfaces use the same virtual clock. Which is related to the information I shared before:&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="alejandro_e_0-1755555300778.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/352869i35D373A74F534F2E/image-size/medium?v=v2&amp;amp;px=400" role="button" title="alejandro_e_0-1755555300778.png" alt="alejandro_e_0-1755555300778.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;If all the PFE_EMAC interfaces register the same clock you may be able to use a single instance of ptp4l for all the interfaces you are interested in.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For more details you can use the following commands:&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@s32g399ardb3:~# ls -l /sys/class/ptp/
total 0
lrwxrwxrwx 1 root root 0 Oct  9 15:51 ptp0 -&amp;gt; ../../devices/platform/soc/46000000.pfe/ptp/ptp0
lrwxrwxrwx 1 root root 0 Oct  9 15:52 ptp1 -&amp;gt; ../../devices/platform/soc/46000000.pfe/ptp/ptp1
lrwxrwxrwx 1 root root 0 Oct  9 15:52 ptp2 -&amp;gt; ../../devices/platform/soc/46000000.pfe/ptp/ptp2
lrwxrwxrwx 1 root root 0 Oct  9 15:59 ptp3 -&amp;gt; ../../devices/platform/soc/4033c000.ethernet/ptp/ptp3&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="markup"&gt;root@s32g399ardb3:~# ls /sys/class/ptp/
ptp0  ptp1  ptp2  ptp3
root@s32g399ardb3:~# ls /sys/class/ptp/ptp0/
clock_name  dev  device  max_adjustment  max_vclocks  n_alarms  n_external_timestamps  n_periodic_outputs  n_programmable_pins  n_vclocks  power  pps_available  subsystem  uevent
root@s32g399ardb3:~# cat /sys/class/ptp/ptp0/clock_name
pfeng ptp
root@s32g399ardb3:~# cat /sys/class/ptp/ptp0/dev
251:0
root@s32g399ardb3:~# cat /sys/class/ptp/ptp0/max_vclocks
20&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This last part matches the following structure&amp;nbsp;&lt;A href="https://github.com/nxp-auto-linux/linux/blob/c3b60ab7a4dff6e6e608e685b70ddc3d6b2aca81/include/linux/ptp_clock_kernel.h#L166" target="_blank"&gt;linux/include/linux/ptp_clock_kernel.h#L166&lt;/A&gt;.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Let me know if this information was of help&lt;/P&gt;</description>
      <pubDate>Mon, 18 Aug 2025 22:26:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2153924#M14560</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2025-08-18T22:26:11Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2154067#M14565</link>
      <description>&lt;P&gt;Thanks&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/238460"&gt;@alejandro_e&lt;/a&gt;, I'll try to patch the PFE driver then.&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 05:58:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2154067#M14565</guid>
      <dc:creator>NidasioAlberto</dc:creator>
      <dc:date>2025-08-19T05:58:14Z</dc:date>
    </item>
    <item>
      <title>Re: S32G3 PFE External Timestamp Mode</title>
      <link>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2154593#M14569</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/253594"&gt;@NidasioAlberto&lt;/a&gt;,&lt;/P&gt;
&lt;P&gt;Perfect, that is exactly what I conclude is needed.&lt;/P&gt;
&lt;P&gt;If you require more support please let me know and I will do my best effort to help you.&lt;/P&gt;
&lt;P&gt;Given the extend of this post, if you need to follow this topic, please create a new post, you can reference this one to keep track of the context.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thanks&lt;/P&gt;</description>
      <pubDate>Tue, 19 Aug 2025 17:08:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S32G/S32G3-PFE-External-Timestamp-Mode/m-p/2154593#M14569</guid>
      <dc:creator>alejandro_e</dc:creator>
      <dc:date>2025-08-19T17:08:05Z</dc:date>
    </item>
  </channel>
</rss>

