From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 89BD3606A322 for ; Thu, 3 Dec 2026 08:29:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=BK7+XaM6; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=D3GGF77O DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:References:In-Reply-To:Message-ID:Date :Cc:To:From:Subject:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=XwIy3zsdNA5CPbMjfeaGgN4as3MANqVvK+TxzD77T6g=; b=BK7+XaM6GCN7GyzjC9R93e68oQ CjeatM9utDT4JEB85F13na1OL86XM8+Py+mHhRmwj9b+/FWvz+eyzXjcHUHOSSu0inMvnYqh9sJrQ 2pvUbNaTnATyNPd4pChWXEOBhAN6xzBlWXZ2kljLxZrWN+4iwLwRd3VGwxI/L3mTvEViwfIN5aQXY SUBzJQWA9apYbjAfv00gYkE5D0y/hipib2RFSH/TkbNlf01dRP391TErnG+Q5NK3Fw686vjNdNRFC YPDbQo0yamsWkB41LUqWwr5IQIPydG+vfGSRc21rc+Lk04NSeW568fmm0nLs0UK5+2D/xDTurslMm sksL4cWA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2C8-0000000DrbW-3oSc; Thu, 03 Dec 2026 08:29:36 +0000 Received: from tor.source.kernel.org ([2600:3c04:e001:324:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2C7-0000000Drau-2JzC for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 08:29:35 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id E3CF260D79; Thu, 3 Dec 2026 08:29:34 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id C644B1F00893; Thu, 3 Dec 2026 08:29:33 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796286574; bh=XwIy3zsdNA5CPbMjfeaGgN4as3MANqVvK+TxzD77T6g=; h=Subject:From:To:Cc:Date:In-Reply-To:References; b=D3GGF77OA8+udHd52+uIGYWrhoBw+SZXDm1kaQzn7qv0MdAFCs+9zYmEHo3AMpGxs pRj8jwBkRPOxiNHOlB/+Epq54jFUjePAOyAn/NvDlD3OyRqTQouCskfVFZOl3sK+ps gpVy86JPOwLrnH59Ao+O3gGW4ejidmHa/abR82c6pdF0Tr7Q5LpeTMiPqT+6uKnDSI k9kX1YpGBl7OfgPiZokLDeXCbmfmHZzoDbLdL5zIsW+l7VhEzGHSJ1VdVW8FyA7ore 7LfEdrSeaOhWtLK9D8hrUnKMgvS02eBUxkxLJyg37k+UWWqnx15z1lcG0yJhp12Qc4 cazVgimm719yw== Subject: Re: [PATCH net-next 2/2] net: stmmac: dwmac-socfpga: route the auxiliary snapshot trigger from the FPGA From: netdev-bot+sashiko@kernel.org To: jjc@jclark.com Cc: maxime.chevallier@bootlin.com, andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@kernel.org, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, richardcochran@gmail.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org Date: Thu, 03 Dec 2026 08:29:33 +0000 Message-ID: <179628657335.3146.8324183269390775648@kernel.org> In-Reply-To: References: X-sashiko-severity: Medium Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit X-Archived-By: MIME-Version: 1.0 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-10.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider. Critical: 0 · High: 0 · Medium: 1 · Low: 0 If you believe none of the issues are legitimate, please reply to each issue of Medium severity or higher and explain why the AI is wrong. If any of them are legitimate and you plan to respin, please let patchwork know by including "pw-bot: cr" as a separate line at the end of your reply (one such reply per series is enough). - [Medium] In socfpga_gen10_set_phy_mode() (drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c), the new… -- net: stmmac: dwmac-socfpga: route the auxiliary snapshot trigger from the FPGA On Agilex 5, this sets the ppstrig_sel bit in the EMAC's System Manager tsn register when the device tree has altr,f2h-ptp-aux-trig, and clears it otherwise. When the bit is set, auxiliary snapshot 1 is triggered from the FPGA fabric instead of an HPS pin. The bit is written while the EMAC is held in reset, in the same place the PHY mode is written. > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c > index 4e0187ffe0d32..0a706624d2856 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c [ ... ] > @@ -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; [Severity: Medium] Does the FPGA-to-EMAC interface gate also need to be opened when f2h_ptp_aux_trig is set? Earlier in socfpga_gen10_set_phy_mode(), only this block writes the per-EMAC bit in SYSMGR_FPGAINTF_EMAC_REG: if (dwmac->f2h_ptp_ref_clk || phymode == PHY_INTERFACE_MODE_MII || phymode == PHY_INTERFACE_MODE_GMII || phymode == PHY_INTERFACE_MODE_SGMII) { ctrl |= SYSMGR_GEN10_EMACGRP_CTRL_PTP_REF_CLK_MASK; regmap_read(sys_mgr_base_addr, SYSMGR_FPGAINTF_EMAC_REG, &module); module |= (SYSMGR_FPGAINTF_EMAC_BIT << reg_shift); regmap_write(sys_mgr_base_addr, SYSMGR_FPGAINTF_EMAC_REG, module); } else { The altr,socfpga-stmmac.yaml binding describes the altr,sysmgr-syscon shift on Arria10/Stratix10/Agilex as the bit that "enable/disable signals from the FPGA fabric to the EMAC modules". A trigger driven by the fabric looks like one of those signals. Take an Agilex 5 board with an RGMII or RMII PHY, no altr,f2h_ptp_ref_clk, and altr,f2h-ptp-aux-trig set. The else branch would run, so the gate is never opened. The trigger mux would still be pointed at the FPGA. Would external timestamp channel 1 then see no events, with no error reported, unless the firmware had already opened the gate? The f2h_ptp_ref_clk path always pairs the FPGA-sourced signal with opening this gate. Should f2h_ptp_aux_trig be added to that condition as well? I can't tell from the source whether the aux trigger line actually goes through this gate. The DE25-Nano test may have passed because U-Boot or ATF had already set the bit, so it doesn't settle the question either way. > + else > + ctrl &= ~SYSMGR_AGILEX5_TSN_PPSTRIG_SEL; > + } > + > regmap_write(sys_mgr_base_addr, reg_offset, ctrl); [ ... ] -- Sashiko AI review · https://netdev-ai.bots.linux.dev/sashiko/#/patchset/cover.1796106489.git.jjc%40jclark.com