From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=100.103.45.18 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796360964; b=pd5saIdzXkqcJD6u2UJTAItHt8HTkGLe4m5Oqz4KPPSZcRPC06sSgCmEuF6whAZl75XG DjrkjpiaFQsnxVP0O3lWnCZssYt7Ed1yFNlNMLrCwEOFxNFpnbT7uA537sNVVQ+3O50mw G9gHm/p4xY5bS/YtnBh3u9/V/aMxR0m56q5zmPwqBupXKWL/4JHH3XyDSc1ApNRCg56Jf iGcthFX9vaoH/S0C8DboVPmM3uJf2kV1exOZXx2xaJuLDliwvG3KCyZ5NWqPYTj6faY1D TfUbL7aG4jPEv4+ez6qbDcW4MhV+bcHb+ByPVVwg8ZTTkxmv4ia3/f3k/LXfAXUQF8g== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796360964; h=Received:DKIM-Signature:Message-ID:From:Subject:Reply-To:To:Cc: In-Reply-To:References:Content-Type:Content-Transfer-Encoding:Date; bh=PxE/OkVp0A+lodD8kbpCVNoWkd9B2PFrvOU/hFsEo5c=; b=V/gH9cT62J9XwGSLz10cxcv0n5l9IBtAGhsYsOpJaFdFWCMHzwHJ/NGqDhB5KWmVNjZU pkGu0gd29AkpVMx2i92sy1YZHUWQSpv3+NN9nBjzi3876m8fNwwyCNaPVYrEYD/AELq7N p7d8GQh7LOqkx4mbpfNSlXobElWR63xeH93U6MRN/9LuD/6y0xwBDqRCKkA7n71O2ZqC/ kTOnirmNWxQZDl0GJONP20NYa43IoPZWMZepmcSpu1asNmuxxFrtE971ZAX7fFCv7zipZ pmqFlh48PhPpI7pH15VjVhSv2cas3f1Wo0Br0i0LBzMvIbjByb+g9pS4VuxhU97szRA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Z5Lts0JQ; arc=none smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id BAC05606A322 for ; Fri, 4 Dec 2026 05:09:24 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=Z5Lts0JQ Received: by smtp.kernel.org (Postfix) with ESMTPSA id 3AB581F000CE; Fri, 4 Dec 2026 05:09:24 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796360964; bh=PxE/OkVp0A+lodD8kbpCVNoWkd9B2PFrvOU/hFsEo5c=; h=From:Subject:Reply-To:To:Cc:In-Reply-To:References:Date; b=Z5Lts0JQzXr3PIPQWmp/Iu/pYhYMF3Q6NyqxKM0Ci6DNCJ7jugqPGU32uWoqkVpeC LZahgKMXS+zDua2JcvO8eN94vNAk9645zPUryKeZz4GCYZhYg2TlXPi+7PspJoBGQc CX5iHpv1k85usNVTA3WHtCyc2tJLNXjjvrdhNfKcxZX63F2jFoOg3a7nQhW+x3vw1x BDrCjFTe0bEt3yPpWMdUeKpSKX4qKulgnRCOqrpTLdE2/rldttJ4aSvlPY7Z4VDqoV WSNOVs3sXI2H09Ju0FeuwDUyiQ5XH8bFv0O+yMu6yj2a/ZqqqYVG0tYqgR+WEeVYum G/tZXiK2w/5IQ== Message-ID: From: sashiko-bot@kernel.org Subject: Re: [PATCH net-next v3 2/2] net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA converter Reply-To: sashiko-reviews@lists.linux.dev To: muhammad.nazim.amirul.nazle.asmade@altera.com Cc: devicetree@vger.kernel.org, robh@kernel.org, conor+dt@kernel.org In-Reply-To: <20261203050900.32211-3-muhammad.nazim.amirul.nazle.asmade@altera.com> References: <20261203050900.32211-1-muhammad.nazim.amirul.nazle.asmade@altera.com> <20261203050900.32211-3-muhammad.nazim.amirul.nazle.asmade@altera.com> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Date: Fri, 04 Dec 2026 05:09:23 +0000 X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list Thank you for your contribution! Sashiko AI review found 1 potential issue to consider: - [Medium] net: stmmac: GMII mode unconditionally selects FPGA PTP clock in gen10 -- commit 6ae7fdd0a14695eb719a64e613323133b44c5648 Author: Nazim Amirul net: stmmac: dwmac-socfpga: Add support for Agilex5 TSN GMAC with FPGA conv= erter This patch adds the "altr,socfpga-stmmac-agilex5-tsn" compatible for Agilex5 TSN GMAC ports behind an FPGA GMII-to-RGMII converter. For RGMII phy-modes it tracks a separate GMII MAC-side interface and enables the stmmac internal TX and RX delay flags. > diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/driver= s/net/ethernet/stmicro/stmmac/dwmac-socfpga.c > index 4e0187ffe0d32..273ff8b08c769 100644 > --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c > +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c [ ... ] > @@ -704,10 +707,34 @@ static const struct socfpga_dwmac_ops socfpga_agile= x5_ops =3D { > .setup_plat_dat =3D socfpga_agilex5_setup_plat_dat, > }; > =20 > +static void socfpga_agilex5_tsn_gmac_setup_plat_dat(struct socfpga_dwmac= *dwmac) > +{ > + struct plat_stmmacenet_data *plat_dat =3D dwmac->plat_dat; > + > + socfpga_agilex5_setup_plat_dat(dwmac); > + > + /* The FPGA GMII-to-RGMII converter is only in the RGMII path. It > + * presents GMII to the MAC and adds both RGMII delays, so only > + * phy-mode "rgmii-id" describes the board correctly. > + */ > + if (!phy_interface_mode_is_rgmii(plat_dat->phy_interface)) > + return; > + > + dwmac->mac_interface =3D PHY_INTERFACE_MODE_GMII; > + plat_dat->has_internal_tx_delay =3D true; > + plat_dat->has_internal_rx_delay =3D true; > +} > + > +static const struct socfpga_dwmac_ops socfpga_agilex5_tsn_gmac_ops =3D { > + .set_phy_mode =3D socfpga_gen10_set_phy_mode, > + .setup_plat_dat =3D socfpga_agilex5_tsn_gmac_setup_plat_dat, > +}; [Severity: Medium] Does setting dwmac->mac_interface to PHY_INTERFACE_MODE_GMII cause socfpga_gen10_set_phy_mode() to route the EMAC PTP reference clock to the FPGA even when altr,f2h_ptp_ref_clk is not set? drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c:socfpga_gen10_set_phy_m= ode() { ... if (dwmac->f2h_ptp_ref_clk || phymode =3D=3D PHY_INTERFACE_MODE_MII || phymode =3D=3D PHY_INTERFACE_MODE_GMII || phymode =3D=3D PHY_INTERFACE_MODE_SGMII) { ctrl |=3D SYSMGR_GEN10_EMACGRP_CTRL_PTP_REF_CLK_MASK; regmap_read(sys_mgr_base_addr, SYSMGR_FPGAINTF_EMAC_REG, &module); ... } On Agilex5, gmac1 uses the HPS clock AGILEX5_EMAC_PTP_CLK as ptp_ref without altr,f2h_ptp_ref_clk, so switching the PTP reference clock mux to the FPGA breaks PTP/TSN hardware timestamping unless the FPGA bitstream also supplies a PTP reference clock. socfpga_gen5_set_phy_mode() was updated in 15ce30609d1e ("net: stmmac: fix enabling socfpga's ptp_ref_clock") to gate the PTP_REF_CLK mux bit solely on dwmac->f2h_ptp_ref_clk; should socfpga_gen10_set_phy_mode() do the same? --=20 Sashiko AI review =C2=B7 https://sashiko.dev/#/patchset/20261203050900.3221= 1-1-muhammad.nazim.amirul.nazle.asmade@altera.com?part=3D2