From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=185.246.85.4 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796387738; b=37I7O5vhLdPAm3tofTfCj6NPzfMX9xWX4Iy8gsX9LDveH8DX6KkbPU7wBE/aXwlQTw1g 2QZEb2PkRuSnM24+N7pneCmzdf/y1L4SImkeiA0s4wVqCwbyez2CqQmg01ev5ytG4D7O5 giEo9YHdVCBWPApfyb6xfYmlcojSaRg9+7NvfNB6ODIyf4mxhpuRvAy1xIuKlVu4FPJ2L 7+haFGZws98hNl9/1UueIdvbKJZs/FtNTxMtP+qkqRWZkrm3BoqKeDZ3XQXIcXFKqPQMo m35wZao/OZ8BPZTDzG+zyHZFdr5sDm4eBIwzivoGIyJNYqh3a8Z0WUnQ7F7M2CKQcfQ== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796387738; h=DMARC-Filter:Received:Received:Received:DKIM-Signature:Message-ID: Date:MIME-Version:User-Agent:Subject:To:Cc:References:From: Content-Language:In-Reply-To:Content-Type:Content-Transfer-Encoding: X-Last-TLS-Session-Version; bh=RV5WbfPB7egWLG8gHWwgYew773o+i5SP5npixlR/TX4=; b=tu5OtWP1FKfeLcaJDopiVhVxtMJncEi7ifBSQ6QUvStYgLpFuslgmRM0mEQrh8XqG5TV G6ynTlqYn2Gyfa5il/zg1qx8xZZkOHprQ8VJzwxLjrQxpb/j8FVtgw2OaaF+T0XwF3s+z 02C7JLJg82sAcElbPDSf9/CI4KVDFgMk4sY43dJLKMr/xgGI9ze0CiaYuqOF16/67LBw8 00D5pPD59GlyyfzWXNmV//5E7vuTc0Hv770KykBLLLhyCFHP5O+08M2SNGN2cNjRLbH4I brjO3AR5LFX+mQcDkMxkl0AR2tY86a0mw39ytsaGZevd1uAGnefLhdwJtWzFSjgEX3A== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=bootlin.com; spf=pass smtp.mailfrom=bootlin.com; dkim=pass header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=dA17qlsF; arc=none smtp.remote-ip=185.246.85.4 Received: from smtpout-03.galae.net (smtpout-03.galae.net [185.246.85.4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 2E54D606A32F for ; Fri, 4 Dec 2026 12:35:37 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 2E54D606A32F Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=reject dis=none) header.from=bootlin.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=bootlin.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=bootlin.com header.i=@bootlin.com header.a=rsa-sha256 header.s=dkim header.b=dA17qlsF Received: from smtpout-01.galae.net (smtpout-01.galae.net [212.83.139.233]) by smtpout-03.galae.net (Postfix) with ESMTPS id 824614E417AE; Fri, 4 Dec 2026 12:35:36 +0000 (UTC) Received: from mail.galae.net (mail.galae.net [212.83.136.155]) by smtpout-01.galae.net (Postfix) with ESMTPS id 54974603C4; Fri, 4 Dec 2026 12:35:36 +0000 (UTC) Received: from [127.0.0.1] (localhost [127.0.0.1]) by localhost (Mailerdaemon) with ESMTPSA id 0413B11EA16A7; Fri, 04 Dec 2026 13:35:24 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=dkim; t=1796387735; h=from:subject:date:message-id:to:cc:mime-version:content-type: content-transfer-encoding:content-language:in-reply-to:references; bh=RV5WbfPB7egWLG8gHWwgYew773o+i5SP5npixlR/TX4=; b=dA17qlsFSA+6IzDlbc4SI796AFce3kyujxMa00ZaLWlPVRVtHigaM7OWJPcABvEQ3NmhCH NVYvzmim5z8kFssJaEfe7u90AY54N1O1auQ+B4Rt/oa/0N080WhZEdTK23bjJ9rwT7wL5T A0NaqXQ6QRz3nkbZHaDe86FPmXm3G5mi5fVcI7a+cNczAN3jlfors+rp/ALf/PApImeHvC tvFArlBQ848QilhBQlLuWZWAEqrRh8pQzl6XakbIoMeL9s2i6hPAWT64AXz+uPGm/mj2nL hAZYRT2Vr2G1k2WqdPlOdSyupWRGRwO7CxlBxf8bA75JkrbsWmWg97PIBP6qug== Message-ID: Date: Fri, 4 Dec 2026 13:35:18 +0100 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: route the auxiliary snapshot trigger from the FPGA To: James Clark , Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Maxime Coquelin , Alexandre Torgue , Richard Cochran Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org References: From: Maxime Chevallier Content-Language: en-US In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Last-TLS-Session-Version: TLSv1.3 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 [...] > @@ -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