From: Maxime Chevallier <maxime.chevallier@bootlin.com>
To: James Clark <jjc@jclark.com>, Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@kernel.org>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Richard Cochran <richardcochran@gmail.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org
Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: route the auxiliary snapshot trigger from the FPGA
Date: Fri, 4 Dec 2026 13:35:18 +0100 [thread overview]
Message-ID: <e2b7cae4-92e9-466b-984e-b7331e420e13@bootlin.com> (raw)
In-Reply-To: <c0bc9280fa492b03753d6eea686fe387e4373df5.1796106489.git.jjc@jclark.com>
Hi James,
On 12/1/26 09:29, James Clark wrote:
> On Agilex 5, an external timestamp trigger driven by the FPGA design
> never reaches the EMAC.
>
> The EMAC's trigger input takes its signal from an HPS pin unless the
> ppstrig_sel bit (bit 4) of the EMAC's tsn register in the System
> Manager selects the FPGA fabric. Nothing in the kernel sets that bit.
>
> Set the bit when the device tree has altr,f2h-ptp-aux-trig, and clear
> it otherwise. It has to be written while the EMAC is in reset, which is
> where the PHY mode is written to the same register.
>
> Tested on a Terasic DE25-Nano, with a separate series that makes
> external timestamps work on XGMAC: with the property, external
> timestamp channel 1 reports one event per pulse from a header pin.
>
> Signed-off-by: James Clark <jjc@jclark.com>
[...]
> @@ -481,6 +487,16 @@ static int socfpga_gen10_set_phy_mode(struct socfpga_dwmac *dwmac,
> ctrl &= ~SYSMGR_GEN10_EMACGRP_CTRL_PTP_REF_CLK_MASK;
> }
>
> + /* Take the trigger of auxiliary snapshot 1 from the FPGA fabric, or
> + * from the HPS I/O pin multiplexer
> + */
> + if (dwmac->ops->has_ppstrig_sel) {
> + if (dwmac->f2h_ptp_aux_trig)
> + ctrl |= SYSMGR_AGILEX5_TSN_PPSTRIG_SEL;
> + else
> + ctrl &= ~SYSMGR_AGILEX5_TSN_PPSTRIG_SEL;
> + }
> +
Do you know if this is "gen 10" specific, or just for the AgileX5 series?
Because if it's only agilex5, then you shoud create a .set_phy_mode()
specific to agileX5 that could call the gen_10 one, then do this pps
trigger config.
Maxime
next prev parent reply other threads:[~2026-12-04 12:37 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-12-01 8:29 [PATCH net-next 0/2] net: stmmac: dwmac-socfpga: route the auxiliary snapshot trigger from the FPGA James Clark
2026-12-01 8:29 ` [PATCH net-next 1/2] dt-bindings: net: altr,socfpga-stmmac: add altr,f2h-ptp-aux-trig James Clark
2026-12-01 8:29 ` [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: route the auxiliary snapshot trigger from the FPGA James Clark
2026-12-03 8:29 ` netdev-bot+sashiko
2026-12-03 8:48 ` James Clark
2026-12-04 12:35 ` Maxime Chevallier [this message]
2026-12-04 12:48 ` James Clark
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2b7cae4-92e9-466b-984e-b7331e420e13@bootlin.com \
--to=maxime.chevallier@bootlin.com \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=edumazet@kernel.org \
--cc=jjc@jclark.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=richardcochran@gmail.com \
--cc=robh@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox