From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id A2FB32D0611 for ; Fri, 24 Oct 2025 11:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306611; cv=none; b=Wb7+zue4T1kT4zAmLK4MehiTD6i25CiNf/q8tnJeHjKZ/MEWM6LZNdijUionImJE3gH/eJwmHP+QCp+1fhBrkn3Rbvg61GK9D30IqDmhch8Fmcw7S7qH8+pGLkHciTmV50um132KNivyKRB5G2bldmVrjGOh7nVTjCrLTQJPAZ8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306611; c=relaxed/simple; bh=y29lFhXLeue2fLW/T0fFDgVBn4WVWzZgaoMEythXz/o=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=JAWmBKXsLqrP8nqMEl8Kdc/ZisxC2QdIYX8npKAmaYmpYEdyy0E0yLwsl5EqvaceaJm4mxF4gdfrlkmvQEdXAT8rat4h0knuZChUCPMJUOYuz1e10v2Wj3nCwGHuA7Bf44KHquIaO/JK5G64qpmDBdHCOuh+poYjFbTtpzKNKqI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ4-0002FG-Bx; Fri, 24 Oct 2025 13:50:06 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:53 +0200 Subject: [PATCH v5 01/10] net: stmmac: dwmac-socfpga: don't set has_gmac Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-1-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Instead of setting the has_gmac or has_xgmac fields, let stmmac_probe_config_dt()) fill these fields according to the more generic compatibles. Without setting the has_xgmac/has_gmac field correctly, even basic functions will fail, because the register offsets are different. Signed-off-by: Steffen Trumtrar --- drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c b/drivers/= net/ethernet/stmicro/stmmac/dwmac-socfpga.c index 354f01184e6cc..7ed125dcc73ea 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-socfpga.c @@ -497,7 +497,6 @@ static int socfpga_dwmac_probe(struct platform_device *= pdev) plat_dat->pcs_init =3D socfpga_dwmac_pcs_init; plat_dat->pcs_exit =3D socfpga_dwmac_pcs_exit; plat_dat->select_pcs =3D socfpga_dwmac_select_pcs; - plat_dat->has_gmac =3D true; =20 plat_dat->riwt_off =3D 1; =20 --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 37A5B2D0615 for ; Fri, 24 Oct 2025 11:50:09 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306611; cv=none; b=vDQh0I4J2G9bEqxpyTqUIXo3fwwidg5vpW1rWS54r+4w0Fn/hsCc1Ak1sUt34LQZTfbDUnXHS0W0ypudqyUB2KC3m+yfzsRETdlo7zUDQ6Fy6fxKy6MbRIRSSICInOfk5Q78Zvr9f/Alb8zUfWUS3UI71W/HVkNmiu/PXJo9iGM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306611; c=relaxed/simple; bh=ucnVhXbduOX+ot4YU+vd9rENq1k3IpNDh0LUYYkWUUw=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=qT7h5tQTnEtNHqhxiXveoW4ebLuv1qQqwCae8919PCq+6tBE0sc2iFpfz/ikx0OB3jMIxrnOUbKleZKTHVx0z4TBqfQp7K9Tbyc/8T8N+eHLe7VEGHuYZK3TCvjC5Iwf2rRpKvPzfO6+3GSOAKwl8td7qN6Y8derxZtkxIqeyIw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ4-0002FG-RS; Fri, 24 Oct 2025 13:50:06 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:54 +0200 Subject: [PATCH v5 02/10] net: stmmac: Use interrupt mode INTM=1 for per channel irq Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-2-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar , Teoh Ji Sheng X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Teoh Ji Sheng commit 6ccf12ae111e ("net: stmmac: use interrupt mode INTM=3D1 for multi-MSI") is introduced for platform that uses MSI. Similar approach is taken to enable per channel interrupt that uses shared peripheral interrupt (SPI), so only per channel TX and RX intr (TI/RI) are handled by TX/RX ISR without calling common interrupt ISR. TX/RX NORMAL interrupts check is now decoupled, since NIS bit is not asserted for any TI/RI events when INTM=3D1. Signed-off-by: Teoh Ji Sheng Signed-off-by: Steffen Trumtrar --- drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h | 3 +++ drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c | 10 +++++++++- .../net/ethernet/stmicro/stmmac/stmmac_platform.c | 20 ++++++++++++++++= ++++ include/linux/stmmac.h | 2 ++ 4 files changed, 34 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h b/drivers/net/e= thernet/stmicro/stmmac/dwxgmac2.h index 0d408ee17f337..64b533207e4a6 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2.h @@ -326,6 +326,9 @@ /* DMA Registers */ #define XGMAC_DMA_MODE 0x00003000 #define XGMAC_SWR BIT(0) +#define DMA_MODE_INTM_MASK GENMASK(13, 12) +#define DMA_MODE_INTM_SHIFT 12 +#define DMA_MODE_INTM_MODE1 0x1 #define XGMAC_DMA_SYSBUS_MODE 0x00003004 #define XGMAC_WR_OSR_LMT GENMASK(29, 24) #define XGMAC_WR_OSR_LMT_SHIFT 24 diff --git a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c b/drivers/n= et/ethernet/stmicro/stmmac/dwxgmac2_dma.c index 4d6bb995d8d84..1e9ee1f10f0ef 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwxgmac2_dma.c @@ -31,6 +31,13 @@ static void dwxgmac2_dma_init(void __iomem *ioaddr, value |=3D XGMAC_EAME; =20 writel(value, ioaddr + XGMAC_DMA_SYSBUS_MODE); + + if (dma_cfg->multi_irq_en) { + value =3D readl(ioaddr + XGMAC_DMA_MODE); + value &=3D ~DMA_MODE_INTM_MASK; + value |=3D (DMA_MODE_INTM_MODE1 << DMA_MODE_INTM_SHIFT); + writel(value, ioaddr + XGMAC_DMA_MODE); + } } =20 static void dwxgmac2_dma_init_chan(struct stmmac_priv *priv, @@ -359,13 +366,14 @@ static int dwxgmac2_dma_interrupt(struct stmmac_priv = *priv, } } =20 - /* TX/RX NORMAL interrupts */ + /* RX NORMAL interrupts */ if (likely(intr_status & XGMAC_RI)) { u64_stats_update_begin(&stats->syncp); u64_stats_inc(&stats->rx_normal_irq_n[chan]); u64_stats_update_end(&stats->syncp); ret |=3D handle_rx; } + /* TX NORMAL interrupts */ if (likely(intr_status & (XGMAC_TI | XGMAC_TBU))) { u64_stats_update_begin(&stats->syncp); u64_stats_inc(&stats->tx_normal_irq_n[chan]); diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/driver= s/net/ethernet/stmicro/stmmac/stmmac_platform.c index 27bcaae07a7f2..cfa82b8e04b94 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -607,6 +607,8 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8= *mac) dma_cfg->fixed_burst =3D of_property_read_bool(np, "snps,fixed-burst"); dma_cfg->mixed_burst =3D of_property_read_bool(np, "snps,mixed-burst"); =20 + dma_cfg->multi_irq_en =3D of_property_read_bool(np, "snps,multi-irq-en"); + plat->force_thresh_dma_mode =3D of_property_read_bool(np, "snps,force_thr= esh_dma_mode"); if (plat->force_thresh_dma_mode && plat->force_sf_dma_mode) { plat->force_sf_dma_mode =3D 0; @@ -737,6 +739,8 @@ EXPORT_SYMBOL_GPL(stmmac_pltfr_find_clk); int stmmac_get_platform_resources(struct platform_device *pdev, struct stmmac_resources *stmmac_res) { + char irq_name[11]; + int i; memset(stmmac_res, 0, sizeof(*stmmac_res)); =20 /* Get IRQ information early to have an ability to ask for deferred @@ -746,6 +750,22 @@ int stmmac_get_platform_resources(struct platform_devi= ce *pdev, if (stmmac_res->irq < 0) return stmmac_res->irq; =20 + /* For RX Channel */ + for (i =3D 0; i < MTL_MAX_RX_QUEUES; i++) { + sprintf(irq_name, "%s%d", "macirq_rx", i); + stmmac_res->rx_irq[i] =3D platform_get_irq_byname(pdev, irq_name); + if (stmmac_res->rx_irq[i] < 0) + break; + } + + /* For TX Channel */ + for (i =3D 0; i < MTL_MAX_TX_QUEUES; i++) { + sprintf(irq_name, "%s%d", "macirq_tx", i); + stmmac_res->tx_irq[i] =3D platform_get_irq_byname(pdev, irq_name); + if (stmmac_res->tx_irq[i] < 0) + break; + } + /* On some platforms e.g. SPEAr the wake up irq differs from the mac irq * The external wake up irq can be passed through the platform code * named as "eth_wake_irq" diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index fa1318bac06c4..a8b15b4e3c370 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -102,6 +102,7 @@ struct stmmac_dma_cfg { bool aal; bool eame; bool multi_msi_en; + bool multi_irq_en; bool dche; bool atds; }; @@ -290,6 +291,7 @@ struct plat_stmmacenet_data { u8 vlan_fail_q; struct pci_dev *pdev; int int_snapshot_num; + bool multi_irq_en; int msi_mac_vec; int msi_wol_vec; int msi_lpi_vec; --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 9F4F72D3A75 for ; Fri, 24 Oct 2025 11:50:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306612; cv=none; b=Bg91Y35JOuFmkYHDkM3Fx15O5GkQBKMmbNHptDylsqxvagSmiGooF4JYa0KsFOQccl8Qf+eWXIKaSt13ixtZyl/MXRJ1g+mLF6K9De2j7Ee5j62ggc8rzSonYjb4mDZ5nsgnBWAc+Iwvdebf/Aql3A04v7YPnmBnj541sCxijB8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306612; c=relaxed/simple; bh=I3gmG/bp6iZB7Rx8qBbPXvKsXhqFpo+agDe9s4AJXmI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=dqgdDzux+ryFKZ36mo7wabY0ejZn8fPqIZAYNIjnBC7oKExtsJwWpGUtq0mEt5ER+q9VnKJOcvzXgj+SaPAi4OFTnhJkeBFl+XcPPMsVvG4WpsIV9N0hdMdUgcqQjQ0jAfjsSsA3OLUcY47EPHVXdZyhVrOogpZTbcN6CbIpqvw= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ5-0002FG-CJ; Fri, 24 Oct 2025 13:50:07 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:55 +0200 Subject: [PATCH v5 03/10] arm64: dts: socfpga: agilex5: Add SMMU node Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-3-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar , Adrian Ng Ho Yin X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Adrian Ng Ho Yin Add SMMU node in Agilex5 device tree. Signed-off-by: Adrian Ng Ho Yin Signed-off-by: Steffen Trumtrar --- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/bo= ot/dts/intel/socfpga_agilex5.dtsi index c4ae09b242d07..4f7ed20749927 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi @@ -354,6 +354,18 @@ rst: rstmgr@10d11000 { #reset-cells =3D <1>; }; =20 + smmu: iommu@16000000 { + compatible =3D "arm,smmu-v3"; + reg =3D <0x16000000 0x30000>; + interrupts =3D , + , + ; + interrupt-names =3D "eventq", "gerror", "priq"; + dma-coherent; + #iommu-cells =3D <1>; + status =3D "disabled"; + }; + spi0: spi@10da4000 { compatible =3D "snps,dw-apb-ssi"; reg =3D <0x10da4000 0x1000>; --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 7A8452D4817 for ; Fri, 24 Oct 2025 11:50:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306613; cv=none; b=luoiKPvCAerSABSxBObgyeZ1AbCiXhWAwcazgUKwuuE5Mzg0ERrbiZm30GPh9WkqeAmAT3p3eWBpdD/7GAn1s7VaAvTSC5eMOiN5z4HQ5b4jKPtyyGLeEjbB2zHxH2pynIMEjnmMnB9BZFhIzHnleOSwBfmydubRC+9r+XyLFgw= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306613; c=relaxed/simple; bh=zQNLx6McgX5ZBI5nCKCJRfU5Uo1WNEZSPvfjbFobIVA=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=TSRVBNugs/ZTkE2wYoChgvL07+ySlYJxjeCXCe3WZknZt8M9cLRrDWYAbqheGrqafN23jyTQqq7LMrrEq2MEmGmsW6H3nQCbPbkqpNIf2qZxCnZDEUDXk2eR78EuLz/NgetRJX0f58vKg8LdZzHb0l7kIWs+xb1YQp9MMYodLWU= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ6-0002FG-85; Fri, 24 Oct 2025 13:50:08 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:56 +0200 Subject: [PATCH v5 04/10] arm64: dts: socfpga: agilex5: smmu enablement Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-4-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar , Austin Zhang , Adrian Ng Ho Yin X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: Austin Zhang Add iommu property for peripherals connected to TBU. Signed-off-by: Adrian Ng Ho Yin Signed-off-by: Steffen Trumtrar --- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/bo= ot/dts/intel/socfpga_agilex5.dtsi index 4f7ed20749927..4ccfebfd9d322 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi @@ -303,6 +303,7 @@ nand: nand-controller@10b80000 { interrupts =3D ; clocks =3D <&clkmgr AGILEX5_NAND_NF_CLK>; cdns,board-delay-ps =3D <4830>; + iommus =3D <&smmu 4>; status =3D "disabled"; }; =20 @@ -329,6 +330,7 @@ dmac0: dma-controller@10db0000 { snps,block-size =3D <32767 32767 32767 32767>; snps,priority =3D <0 1 2 3>; snps,axi-max-burst-len =3D <8>; + iommus =3D <&smmu 8>; }; =20 dmac1: dma-controller@10dc0000 { @@ -346,6 +348,7 @@ dmac1: dma-controller@10dc0000 { snps,block-size =3D <32767 32767 32767 32767>; snps,priority =3D <0 1 2 3>; snps,axi-max-burst-len =3D <8>; + iommus =3D <&smmu 9>; }; =20 rst: rstmgr@10d11000 { @@ -468,6 +471,7 @@ usb0: usb@10b00000 { reset-names =3D "dwc2", "dwc2-ecc"; clocks =3D <&clkmgr AGILEX5_USB2OTG_HCLK>; clock-names =3D "otg"; + iommus =3D <&smmu 6>; status =3D "disabled"; }; =20 @@ -553,6 +557,7 @@ gmac0: ethernet@10810000 { snps,tso; altr,sysmgr-syscon =3D <&sysmgr 0x44 0>; snps,clk-csr =3D <0>; + iommus =3D <&smmu 1>; status =3D "disabled"; =20 stmmac_axi_emac0_setup: stmmac-axi-config { @@ -665,6 +670,7 @@ gmac1: ethernet@10820000 { snps,tso; altr,sysmgr-syscon =3D <&sysmgr 0x48 0>; snps,clk-csr =3D <0>; + iommus =3D <&smmu 2>; status =3D "disabled"; =20 stmmac_axi_emac1_setup: stmmac-axi-config { @@ -777,6 +783,7 @@ gmac2: ethernet@10830000 { snps,tso; altr,sysmgr-syscon =3D <&sysmgr 0x4c 0>; snps,clk-csr =3D <0>; + iommus =3D <&smmu 3>; status =3D "disabled"; =20 stmmac_axi_emac2_setup: stmmac-axi-config { --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id F3AFB23C8C5 for ; Fri, 24 Oct 2025 11:50:11 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306613; cv=none; b=rH27xiuu+SxUlEnz3mj0eegTFgCTtNCakEHPjFxtqSMZG6z5iqmystqOknygEt5GXK3rphaMA4CxzXK8vdyo5fDWEa9DQ9fGVOzp3Zys7V3h5U6HMwlkjQJnyOh+77Z1yiAxeaMpf25QxSv3/ceqgMGwW8/uBEWDszlIcyvf8s8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306613; c=relaxed/simple; bh=dOuVtmpqMtteXHbOXlQOCS36sdrfzeJ5kxO7Ib+amjI=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=kx6HhjB1jePZfiB+zdLlmp0XsqGKhOnzRNpSRRtyxG6pAfNbCrACn7+OZ6HaV/zdQof0mkjv9p3gUNhtTXvq1oEP/PtbjsQfrE2VLAnjOgykxxbh4m278KAgegPTJawXD25J8GmqAvFAzXwgiXpqHOUS+bdsfy5UdLt73iIbgeg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ7-0002FG-20; Fri, 24 Oct 2025 13:50:09 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:57 +0200 Subject: [PATCH v5 05/10] dt-bindings: net: altr,socfpga-stmmac: add generic dwxgmac compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-5-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Add the more generic "snps,dwxgmac" compatible to the list of compatibles for the agilex5. The snps,dwmac binding explicitly uses the "snps,dwxgmac-2.10", "snps,dwxgmac" combination as example; the stmmac driver only checks on dwmac and dwxgmac compatibles to decide what kind of gmac it is working with. Signed-off-by: Steffen Trumtrar --- Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml= b/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml index fc445ad5a1f1a..b53847a2d9536 100644 --- a/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml +++ b/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml @@ -46,6 +46,7 @@ properties: - items: - const: altr,socfpga-stmmac-agilex5 - const: snps,dwxgmac-2.10 + - const: snps,dwxgmac =20 clocks: minItems: 1 --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id B5CD12D94AA for ; Fri, 24 Oct 2025 11:50:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306614; cv=none; b=PCDepufwoxDHwIVPFCeuTH+mSVsv2Qrl+IdS1U+jV6WDGyibCfvnov9ARJVhiQ7E7nnbfBNCD/NUKQ7m7X+8zZ7G0SCUpCwLjoUrTJuENx94XiHchoIgWBMejQzLCktaJfrUOuj1LU1IQyvI0RP0kxMzqOuuhLGPftmABHnruMQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306614; c=relaxed/simple; bh=bvjxnCpbgRWS5dB0A4fk7xC8f8vcVUPm7QTjunvl35c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=QxmjocPH0axTvSrlG2Hwv58WmXKkMsjNqvLq5IbS3+8cvj8Au9ClQgvxTBOlC+MtMIlHyOvBrwXa5Re3gGKJp6KMDpWs7AqyhXvapVMNHxST8qsNtj9P8LudzklHwfzajfrQnQsQF2YpBeuv5B8RXFQL37yEQsSoEVK6QbP7VSc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ7-0002FG-Id; Fri, 24 Oct 2025 13:50:09 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:58 +0200 Subject: [PATCH v5 06/10] arm64: dts: socfpga: agilex5: add dwxgmac compatible Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-6-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The gmac0/1/2 are also compatible to the more generic "snps,dwxgmac" compatible. The platform code checks this to decide if it is a GMAC or GMAC4 compatible IP core. Signed-off-by: Steffen Trumtrar --- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/bo= ot/dts/intel/socfpga_agilex5.dtsi index 4ccfebfd9d322..d0c139f03541e 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi @@ -536,7 +536,8 @@ qspi: spi@108d2000 { =20 gmac0: ethernet@10810000 { compatible =3D "altr,socfpga-stmmac-agilex5", - "snps,dwxgmac-2.10"; + "snps,dwxgmac-2.10", + "snps,dwxgmac"; reg =3D <0x10810000 0x3500>; interrupts =3D ; interrupt-names =3D "macirq"; @@ -649,7 +650,8 @@ queue7 { =20 gmac1: ethernet@10820000 { compatible =3D "altr,socfpga-stmmac-agilex5", - "snps,dwxgmac-2.10"; + "snps,dwxgmac-2.10", + "snps,dwxgmac"; reg =3D <0x10820000 0x3500>; interrupts =3D ; interrupt-names =3D "macirq"; @@ -762,7 +764,8 @@ queue7 { =20 gmac2: ethernet@10830000 { compatible =3D "altr,socfpga-stmmac-agilex5", - "snps,dwxgmac-2.10"; + "snps,dwxgmac-2.10", + "snps,dwxgmac"; reg =3D <0x10830000 0x3500>; interrupts =3D ; interrupt-names =3D "macirq"; --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 233972DF138 for ; Fri, 24 Oct 2025 11:50:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306615; cv=none; b=t7Gf0kf0ALAPH9QxLDO64TYFizTJ7/Op6nZGLBghLcV/ZyEMcRgWtLnB7Ne6SUxoTujjPb4okZBa96AnSFZduU0AUNwEjDRk4z7+7R20qBg7lyn/9QVQDHNfBJT9x/LLnOnqrDDFl33tX9M28ohCzMhv6nlCvud1IfZRA9NnunA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306615; c=relaxed/simple; bh=TY3RRdSOv+8U8CtggiZnW2bbIjSfrGwrkuRjjIBosEU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=nuo6ignSHQdp2zuIOQXE3ME4QexJ5XE81Dk5RIANYaDTXtEu0RiJPJyafNmSL8kWJp6hzu66DF55q93q/x66k8eQ4BJXQwJe8ZwH5ok73T6okS8OshHajX5y2KcEsgpez+0pwqhmnsMVllfu6u++OYtnsDt1yjD2WEDAvtCtZiA= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJ8-0002FG-Nj; Fri, 24 Oct 2025 13:50:10 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:49:59 +0200 Subject: [PATCH v5 07/10] dt-bindings: net: altr,socfpga-stmmac: allow dma-coherent property Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-7-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The DMA operations on the SoCFPGA stmmac can be dma-coherent. Add as optional property. Signed-off-by: Steffen Trumtrar Reviewed-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml= b/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml index b53847a2d9536..c34f2ef0cf001 100644 --- a/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml +++ b/Documentation/devicetree/bindings/net/altr,socfpga-stmmac.yaml @@ -109,6 +109,9 @@ properties: txen-skew-ps: description: Skew control of TXC pad =20 + dma-coherent: + description: Present if dma operations are coherent + altr,emac-splitter: $ref: /schemas/types.yaml#/definitions/phandle description: --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0EB7B2E1C4E for ; Fri, 24 Oct 2025 11:50:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306617; cv=none; b=VrIvNwZ7kMyWsEe/mG/hK6nbAEL2uQ3g8Ujw7+69szdwsim9CPlR40SoEqwON616hnDsF+eP2I0SWdiD8FwsQ6BwHWy8nEHoJz0OenbpE6Pa3lJmUjz3UlModJN8z1d3SfE8GThTBvKNaZC8/Yb9WpEyMljqKEerXqNJHzu3zv8= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306617; c=relaxed/simple; bh=QgkBnM9xfqbsYlvy/dOII/9/euxbzsHAI0HqqgHuV7k=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=R4p71tRdRPCXBR8PlZXoBKNIbE74AMJUWFWP6HorH/MDFXuId4g3ddpotObKZKk5J4d4QeFzsWHrXf6kkGGxvZGw25Yv3BxybiaSqNMgwzqwCliuiif8vx3droq7bFri4WDXSqBotHGdwtkNvINpAq2uZCynza/Zycds6tu4gXI= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJA-0002FG-0S; Fri, 24 Oct 2025 13:50:12 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:50:00 +0200 Subject: [PATCH v5 08/10] arm64: dts: socfpga: agilex5: dma coherent enablement for XGMACs Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-8-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar , "Tham, Mun Yew" X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org From: "Tham, Mun Yew" Add dma-coherent property to device tree for XGMACs to resolve kernel panic error on dcache_inval_poc for XGMACs. Signed-off-by: Tham, Mun Yew Signed-off-by: Steffen Trumtrar --- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 3 +++ 1 file changed, 3 insertions(+) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/bo= ot/dts/intel/socfpga_agilex5.dtsi index d0c139f03541e..63c0aa8550313 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi @@ -558,6 +558,7 @@ gmac0: ethernet@10810000 { snps,tso; altr,sysmgr-syscon =3D <&sysmgr 0x44 0>; snps,clk-csr =3D <0>; + dma-coherent; iommus =3D <&smmu 1>; status =3D "disabled"; =20 @@ -672,6 +673,7 @@ gmac1: ethernet@10820000 { snps,tso; altr,sysmgr-syscon =3D <&sysmgr 0x48 0>; snps,clk-csr =3D <0>; + dma-coherent; iommus =3D <&smmu 2>; status =3D "disabled"; =20 @@ -786,6 +788,7 @@ gmac2: ethernet@10830000 { snps,tso; altr,sysmgr-syscon =3D <&sysmgr 0x4c 0>; snps,clk-csr =3D <0>; + dma-coherent; iommus =3D <&smmu 3>; status =3D "disabled"; =20 --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id DFD0A3126BC for ; Fri, 24 Oct 2025 11:50:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306617; cv=none; b=AfMEBqF2s3ZOmaDCM0lKS+g2OMu0548+y208VqKzDeTchTt7/8x5V5DBytSDZdoTNsxrP7kUW+7A3gku+jbEC356XvqT7YlMKQo+C8oYuL+GqPcng9bJ14FLRi64fs2a0GoPHx1P5I8e/CsfyECuWgQPVcv8VTJ/TIuQ70I54g0= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306617; c=relaxed/simple; bh=KwHCb0qiNCRu5QhpLaoRlXewis/D5am7LebbUKnUxYo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=HBYvk95Jc/HyiWte6Yx2v4d13Rp5YDb3nwh9uvQ96qYOUn/LP5Asj+08SML4TqJNJFKcnxVjgqti9xo7GnRUnX5LRcHpCQtjwTr+C44RRpiAwgJFgj9H+EfVUqVy80TpHCWUMlGG7p10pWHYTsEnl5jvlS/Yaorjorwj0hAmk50= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJA-0002FG-SR; Fri, 24 Oct 2025 13:50:12 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:50:01 +0200 Subject: [PATCH v5 09/10] dt-bindings: intel: add agilex5-based Arrow AXE5-Eagle Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-9-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org Add binding for the Arrow Agilex5-based AXE5-Eagle board. Signed-off-by: Steffen Trumtrar Acked-by: Krzysztof Kozlowski --- Documentation/devicetree/bindings/arm/intel,socfpga.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/arm/intel,socfpga.yaml b/Doc= umentation/devicetree/bindings/arm/intel,socfpga.yaml index c75cd7d29f1aa..3ab6058268e8c 100644 --- a/Documentation/devicetree/bindings/arm/intel,socfpga.yaml +++ b/Documentation/devicetree/bindings/arm/intel,socfpga.yaml @@ -24,6 +24,7 @@ properties: - description: Agilex5 boards items: - enum: + - arrow,socfpga-agilex5-axe5-eagle - intel,socfpga-agilex5-socdk - intel,socfpga-agilex5-socdk-nand - const: intel,socfpga-agilex5 --=20 2.51.0 From nobody Mon Feb 9 15:36:26 2026 Received: from metis.whiteo.stw.pengutronix.de (metis.whiteo.stw.pengutronix.de [185.203.201.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 690432DFA39 for ; Fri, 24 Oct 2025 11:50:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=185.203.201.7 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306618; cv=none; b=HDFVkdsahx2JxPKOrmYugd4uQv+fZFj9RuVWU3pqhSCPYQfaQmTw/mFgzU+9V6T25Jy7IHL8tcawvZ0bH58THP+0uFUIRF58CcZk9usa0kFcwDWu61TFdPEyK0j29nhPQEBIryV/unhRXelu2TBFF/+tpPPftALOsVprwx3V1CM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1761306618; c=relaxed/simple; bh=w/Eyzmm/s8J8jMdMaFkZjDIWu5toDsE1Xuy7oZ59vrc=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=ZjVMZYw2wiQ6PdreGfxMdmQwFPfq1kelNkiR44WZnh2VDlc89d5+4U0N3kJQQxi3sLsAEv7CGDlsqk6W/4IzTn8C3K+gGsli+xMPKWAzXaYV+T+w/c4Xky6HlVxOx4IsQRrRYQcYywXQ/nrVeMvmwEzj2WdvwE/Uys8X/IWd2rM= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de; spf=pass smtp.mailfrom=pengutronix.de; arc=none smtp.client-ip=185.203.201.7 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=pengutronix.de Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=pengutronix.de Received: from ptz.office.stw.pengutronix.de ([2a0a:edc0:0:900:1d::77] helo=ratatoskr.trumtrar.info) by metis.whiteo.stw.pengutronix.de with esmtp (Exim 4.92) (envelope-from ) id 1vCGJB-0002FG-DJ; Fri, 24 Oct 2025 13:50:13 +0200 From: Steffen Trumtrar Date: Fri, 24 Oct 2025 13:50:02 +0200 Subject: [PATCH v5 10/10] arm64: dts: socfpga: agilex5: initial support for Arrow AXE5-Eagle Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: quoted-printable Message-Id: <20251024-v6-12-topic-socfpga-agilex5-v5-10-4c4a51159eeb@pengutronix.de> References: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> In-Reply-To: <20251024-v6-12-topic-socfpga-agilex5-v5-0-4c4a51159eeb@pengutronix.de> To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dinh Nguyen , Maxime Chevallier , Maxime Coquelin , Alexandre Torgue , Matthew Gerlach Cc: kernel@pengutronix.de, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, Steffen Trumtrar , Krzysztof Kozlowski X-Mailer: b4 0.14.3 X-SA-Exim-Connect-IP: 2a0a:edc0:0:900:1d::77 X-SA-Exim-Mail-From: s.trumtrar@pengutronix.de X-SA-Exim-Scanned: No (on metis.whiteo.stw.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org The Arrow AXE5-Eagle is an Intel Agilex5 SoCFPGA based board with: - 1x PCIe Gen4.0 edge connector - 4-port USB HUB - 2x 1Gb Ethernet - microSD - HDMI output - 2x 10Gb SFP+ cages As most devices aren't supported mainline yet, this is only the initial support for the board: leds, gpios, gmac2, i2c, uart and qspi. Although gmac1 is equipped on the board, it doesn't work yet as it needs additional pinctrl settings in the bootloader to work. Signed-off-by: Steffen Trumtrar Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/intel/Makefile | 1 + .../boot/dts/intel/socfpga_agilex5_axe5_eagle.dts | 146 +++++++++++++++++= ++++ 2 files changed, 147 insertions(+) diff --git a/arch/arm64/boot/dts/intel/Makefile b/arch/arm64/boot/dts/intel= /Makefile index 33f6d01266b1a..0a18ca306054b 100644 --- a/arch/arm64/boot/dts/intel/Makefile +++ b/arch/arm64/boot/dts/intel/Makefile @@ -2,6 +2,7 @@ dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) +=3D socfpga_agilex_n6000.dtb \ socfpga_agilex_socdk.dtb \ socfpga_agilex_socdk_nand.dtb \ + socfpga_agilex5_axe5_eagle.dtb \ socfpga_agilex5_socdk.dtb \ socfpga_agilex5_socdk_nand.dtb \ socfpga_n5x_socdk.dtb diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5_axe5_eagle.dts b/arc= h/arm64/boot/dts/intel/socfpga_agilex5_axe5_eagle.dts new file mode 100644 index 0000000000000..a2a262f3d07c6 --- /dev/null +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5_axe5_eagle.dts @@ -0,0 +1,146 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2024, Arrow Electronics, Inc. + */ +#include "socfpga_agilex5.dtsi" + +/ { + model =3D "SoCFPGA Agilex5 Arrow AXE5-Eagle"; + compatible =3D "arrow,socfpga-agilex5-axe5-eagle", "intel,socfpga-agilex5= "; + + aliases { + serial0 =3D &uart0; + }; + + chosen { + stdout-path =3D "serial0:115200n8"; + }; + + leds { + compatible =3D "gpio-leds"; + + led-0 { + label =3D "hps_led0"; + gpios =3D <&porta 6 GPIO_ACTIVE_HIGH>; + }; + + led-1 { + label =3D "hps_led1"; + gpios =3D <&porta 7 GPIO_ACTIVE_HIGH>; + }; + }; + + gpio-keys { + compatible =3D "gpio-keys"; + + key-0 { + label =3D "hps_sw0"; + gpios =3D <&porta 10 0>; + linux,input-type =3D <5>; /* EV_SW */ + linux,code =3D <0x0>; + }; + + key-1 { + label =3D "hps_sw1"; + gpios =3D <&porta 1 0>; + linux,input-type =3D <5>; /* EV_SW */ + linux,code =3D <0x0>; + }; + + key-2 { + label =3D "hps_pb0"; + gpios =3D <&porta 8 1>; + linux,code =3D <187>; /* KEY_F17 */ + }; + + key-3 { + label =3D "hps_pb1"; + gpios =3D <&porta 9 1>; + linux,code =3D <188>; /* KEY_F18 */ + }; + }; + + vdd: regulator-vdd { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-supply"; + regulator-min-microvolt =3D <1800000>; + regulator-max-microvolt =3D <1800000>; + regulator-always-on; + }; + + vdd_3_3: regulator-vdd { + compatible =3D "regulator-fixed"; + regulator-name =3D "fixed-supply"; + regulator-min-microvolt =3D <3300000>; + regulator-max-microvolt =3D <3300000>; + regulator-always-on; + }; +}; + +&gmac2 { + status =3D "okay"; + phy-mode =3D "rgmii-id"; + phy-handle =3D <&emac2_phy0>; + + mdio0 { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + emac2_phy0: ethernet-phy@1 { + compatible =3D "ethernet-phy-ieee802.3-c22"; + reg =3D <0x1>; + }; + }; +}; + +&gpio0 { + status =3D "okay"; +}; + +&i2c0 { + status =3D "okay"; +}; + +&i2c1 { + status =3D "okay"; + + i2c-mux@70 { + compatible =3D "nxp,pca9544"; + #address-cells =3D <1>; + #size-cells =3D <0>; + reg =3D <0x70>; + status =3D "okay"; + }; +}; + +&osc1 { + clock-frequency =3D <25000000>; +}; + +&qspi { + status =3D "okay"; + + flash@0 { + #address-cells =3D <1>; + #size-cells =3D <1>; + compatible =3D "micron,mt25qu02g", "jedec,spi-nor"; + reg =3D <0>; + spi-max-frequency =3D <100000000>; + + m25p,fast-read; + cdns,read-delay =3D <2>; + cdns,tshsl-ns =3D <50>; + cdns,tsd2d-ns =3D <50>; + cdns,tchsh-ns =3D <4>; + cdns,tslch-ns =3D <4>; + }; +}; + +&smmu { + status =3D "okay"; +}; + +&uart0 { + status =3D "okay"; +}; --=20 2.51.0