From nobody Wed Dec 17 03:02:25 2025 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 6F2881D514C for ; Thu, 5 Dec 2024 09:06:21 +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=1733389583; cv=none; b=bAa7niEau46NV9FGPX6b7rHrmjoFQxCCxQ8k34LIkYycmKm39rKJSAPYux6Op4gkl71Uht1lqS/PyyNe02w1p3t49FsCWqUqxXLOroDD/ehETHOxJyRrtslm/7b2QOQnLaBrKICsHxoVEJ2S4fIWuP+t58+WHT3hZNpGBG75o7Q= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733389583; c=relaxed/simple; bh=03WGIBVqEJZPaK9SgPYfCuwS7r2M6ou3hBrVG6tNq4c=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=LBG2Ec8grDJS2/DLktsfeGiGinluuIYpnr5zg26+d49ya66r4HsCBc6yOSnqZb4Fh86GcwSbHPlC+X/LWgSDHfkdESJm/rSbgbwxJU0M4EZnIwTwWWy931Sc8OAeYQubTSwO0VRcyst5jiSOtULUe7yTrtbbUK16G5ZGAL+op28= 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 1tJ7oR-0004Ks-Jk; Thu, 05 Dec 2024 10:06:19 +0100 From: Steffen Trumtrar Date: Thu, 05 Dec 2024 10:06:01 +0100 Subject: [PATCH v3 1/6] dt-bindings: net: dwmac: Convert socfpga dwmac to DT schema 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: <20241205-v6-12-topic-socfpga-agilex5-v3-1-2a8cdf73f50a@pengutronix.de> References: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> In-Reply-To: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> To: Dinh Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , Michael Turquette , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-clk@vger.kernel.org, kernel@pengutronix.de, Steffen Trumtrar X-Mailer: b4 0.14.2 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 Changes to the binding while converting: - add "snps,dwmac-3.7{0,2,4}a". They are used, but undocumented. - altr,f2h_ptp_ref_clk is not a required property but optional. Signed-off-by: Steffen Trumtrar --- .../devicetree/bindings/net/socfpga-dwmac.txt | 57 ---------- .../devicetree/bindings/net/socfpga-dwmac.yaml | 119 +++++++++++++++++= ++++ 2 files changed, 119 insertions(+), 57 deletions(-) diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt b/Docu= mentation/devicetree/bindings/net/socfpga-dwmac.txt deleted file mode 100644 index 612a8e8abc88774619f4fd4e9205a3dd32226a9b..000000000000000000000000000= 0000000000000 --- a/Documentation/devicetree/bindings/net/socfpga-dwmac.txt +++ /dev/null @@ -1,57 +0,0 @@ -Altera SOCFPGA SoC DWMAC controller - -This is a variant of the dwmac/stmmac driver an inherits all descriptions -present in Documentation/devicetree/bindings/net/stmmac.txt. - -The device node has additional properties: - -Required properties: - - compatible : For Cyclone5/Arria5 SoCs it should contain - "altr,socfpga-stmmac". For Arria10/Agilex/Stratix10 SoCs - "altr,socfpga-stmmac-a10-s10". - Along with "snps,dwmac" and any applicable more detailed - designware version numbers documented in stmmac.txt - - altr,sysmgr-syscon : Should be the phandle to the system manager node t= hat - encompasses the glue register, the register offset, and the register sh= ift. - On Cyclone5/Arria5, the register shift represents the PHY mode bits, wh= ile - on the Arria10/Stratix10/Agilex platforms, the register shift represents - bit for each emac to enable/disable signals from the FPGA fabric to the - EMAC modules. - - altr,f2h_ptp_ref_clk use f2h_ptp_ref_clk instead of default eosc1 clock - for ptp ref clk. This affects all emacs as the clock is common. - -Optional properties: -altr,emac-splitter: Should be the phandle to the emac splitter soft IP nod= e if - DWMAC controller is connected emac splitter. -phy-mode: The phy mode the ethernet operates in -altr,sgmii-to-sgmii-converter: phandle to the TSE SGMII converter - -This device node has additional phandle dependency, the sgmii converter: - -Required properties: - - compatible : Should be altr,gmii-to-sgmii-2.0 - - reg-names : Should be "eth_tse_control_port" - -Example: - -gmii_to_sgmii_converter: phy@100000240 { - compatible =3D "altr,gmii-to-sgmii-2.0"; - reg =3D <0x00000001 0x00000240 0x00000008>, - <0x00000001 0x00000200 0x00000040>; - reg-names =3D "eth_tse_control_port"; - clocks =3D <&sgmii_1_clk_0 &emac1 1 &sgmii_clk_125 &sgmii_clk_125>; - clock-names =3D "tse_pcs_ref_clk_clock_connection", "tse_rx_cdr_refclk"; -}; - -gmac0: ethernet@ff700000 { - compatible =3D "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,dwmac"; - altr,sysmgr-syscon =3D <&sysmgr 0x60 0>; - reg =3D <0xff700000 0x2000>; - interrupts =3D <0 115 4>; - interrupt-names =3D "macirq"; - mac-address =3D [00 00 00 00 00 00];/* Filled in by U-Boot */ - clocks =3D <&emac_0_clk>; - clock-names =3D "stmmaceth"; - phy-mode =3D "sgmii"; - altr,gmii-to-sgmii-converter =3D <&gmii_to_sgmii_converter>; -}; diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.yaml b/Doc= umentation/devicetree/bindings/net/socfpga-dwmac.yaml new file mode 100644 index 0000000000000000000000000000000000000000..022d9eb7011d47666b140aaecf5= 4541ca3dec0ec --- /dev/null +++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.yaml @@ -0,0 +1,119 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/socfpga-dwmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Altera SOCFPGA SoC DWMAC controller + +maintainers: + - Dinh Nguyen + +description: + This is a variant of the dwmac/stmmac driver an inherits all descriptions + present in Documentation/devicetree/bindings/net/stmmac.txt. + +# We need a select here so we don't match all nodes with 'snps,dwmac' +select: + properties: + compatible: + contains: + enum: + - altr,socfpga-stmmac # For Cyclone5/Arria5 SoCs + - altr,socfpga-stmmac-a10-s10 # For Arria10/Agilex/Stratix10 SoCs + required: + - compatible + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + oneOf: + - items: + - enum: + - altr,socfpga-stmmac + - const: snps,dwmac-3.70a + - items: + - enum: + - altr,socfpga-stmmac-a10-s10 + - const: snps,dwmac-3.72a + - const: snps,dwmac + - items: + - enum: + - altr,socfpga-stmmac-a10-s10 + - const: snps,dwmac-3.74a + - const: snps,dwmac + + altr,sysmgr-syscon: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to the sysmgr node + - description: register offset that controls the PHY mode or FPG= A signals + - description: register shift for the PHY mode bits or FPGA sign= als + description: + Should be the phandle to the system manager node that + encompasses the glue register, the register offset, and the register= shift. + On Cyclone5/Arria5, the register shift represents the PHY mode bits,= while + on the Arria10/Stratix10/Agilex platforms, the register shift repres= ents + bit for each emac to enable/disable signals from the FPGA fabric to = the + EMAC modules. + + altr,f2h_ptp_ref_clk: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Use f2h_ptp_ref_clk instead of default eosc1 clock + for ptp ref clk. This affects all emacs as the clock is common. + + altr,emac-splitter: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Should be the phandle to the emac splitter soft IP node if + DWMAC controller is connected emac splitter. + + phy-mode: + $ref: /schemas/types.yaml#/definitions/phandle + description: + The phy mode the ethernet operates in. + + altr,sgmii-to-sgmii-converter: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the TSE SGMII converter. + + This device node has additional phandle dependency, the sgmii conver= ter + - compatible that should be altr,gmii-to-sgmii-2.0 + - reg-names that should be "eth_tse_control_port" + +required: + - compatible + - reg + - altr,sysmgr-syscon + +examples: + - | + //Example 1 + gmii_to_sgmii_converter: phy@100000240 { + compatible =3D "altr,gmii-to-sgmii-2.0"; + reg =3D <0x00000001 0x00000240 0x00000008>, + <0x00000001 0x00000200 0x00000040>; + reg-names =3D "eth_tse_control_port"; + clocks =3D <&sgmii_1_clk_0 &emac1 1 &sgmii_clk_125 &sgmii_clk_12= 5>; + clock-names =3D "tse_pcs_ref_clk_clock_connection", "tse_rx_cdr_= refclk"; + }; + + - | + //Example 2 + gmac0: ethernet@ff700000 { + compatible =3D "altr,socfpga-stmmac", "snps,dwmac-3.70a", "snps,= dwmac"; + altr,sysmgr-syscon =3D <&sysmgr 0x60 0>; + reg =3D <0xff700000 0x2000>; + interrupts =3D <0 115 4>; + interrupt-names =3D "macirq"; + mac-address =3D [00 00 00 00 00 00];/* Filled in by U-Boot */ + clocks =3D <&emac_0_clk>; + clock-names =3D "stmmaceth"; + phy-mode =3D "sgmii"; + altr,gmii-to-sgmii-converter =3D <&gmii_to_sgmii_converter>; + }; --=20 2.46.0 From nobody Wed Dec 17 03:02:25 2025 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 8531F1D8DEE for ; Thu, 5 Dec 2024 09:06:22 +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=1733389584; cv=none; b=D0TFUAuVCe9Wx+sx7NK8/SfoBCYwjBbXz4iGotftbO1qO9yH1WHNu6zzHCfUlKFO2DCXrvPahBU4JIMuBv8kn7C/ov5XIm4/y7Cc/BJaAhhfhtVpNa1TuK8xhZs0d/WdE0gO+ZB6dffEgnXT5uwrKU9u7tPMkE9DDJ/qtBn3QEQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733389584; c=relaxed/simple; bh=oK+x3raXO0ZklCx6Lwdr6h2upXcFX7OssXs9Pph4aKs=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=CS004mQ3BhVsT3m/PwMsm1ySnrHd9mEZNM0doamsBOjNsfKwdFfotwqRouQBWZrbOLJ/xG+kbopiV7ZdCbXjIw/M136L6Afhd0ljMqCkVdxAXQJPx0iah6pbq/MTla35oT56zL7XgbnQeWENulAJeg8auFQcuQdaDvTceALZooU= 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 1tJ7oS-0004Ks-KQ; Thu, 05 Dec 2024 10:06:20 +0100 From: Steffen Trumtrar Date: Thu, 05 Dec 2024 10:06:02 +0100 Subject: [PATCH v3 2/6] dt-bindings: net: dwmac: add compatible for Agilex5 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: <20241205-v6-12-topic-socfpga-agilex5-v3-2-2a8cdf73f50a@pengutronix.de> References: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> In-Reply-To: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> To: Dinh Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , Michael Turquette , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-clk@vger.kernel.org, kernel@pengutronix.de, Steffen Trumtrar X-Mailer: b4 0.14.2 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 Agilex5 SoCs have three Synopsys DWXGMAC-compatible ethernet IP-cores. Add a SoC-specific front compatible to the binding. Signed-off-by: Steffen Trumtrar --- Documentation/devicetree/bindings/net/socfpga-dwmac.yaml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/Documentation/devicetree/bindings/net/socfpga-dwmac.yaml b/Doc= umentation/devicetree/bindings/net/socfpga-dwmac.yaml index 022d9eb7011d47666b140aaecf54541ca3dec0ec..c578b4280c6c85f08b6e0918352= d38ed98998489 100644 --- a/Documentation/devicetree/bindings/net/socfpga-dwmac.yaml +++ b/Documentation/devicetree/bindings/net/socfpga-dwmac.yaml @@ -21,6 +21,7 @@ select: enum: - altr,socfpga-stmmac # For Cyclone5/Arria5 SoCs - altr,socfpga-stmmac-a10-s10 # For Arria10/Agilex/Stratix10 SoCs + - altr,socfpga-stmmac-agilex5 # For Agilex5 SoCs required: - compatible =20 @@ -44,6 +45,12 @@ properties: - altr,socfpga-stmmac-a10-s10 - const: snps,dwmac-3.74a - const: snps,dwmac + - items: + - enum: + - altr,socfpga-stmmac-agilex5 + - const: altr,socfpga-stmmac-a10-s10 + - const: snps,dwxgmac-2.10 + - const: snps,dwxgmac =20 altr,sysmgr-syscon: $ref: /schemas/types.yaml#/definitions/phandle-array --=20 2.46.0 From nobody Wed Dec 17 03:02:25 2025 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 610981D90DD for ; Thu, 5 Dec 2024 09:06:23 +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=1733389585; cv=none; b=ErSvwyu+R+6z+0hDboniNUj1YqdrJ8Md6jCVNdNrmdv4DzIP5ShHecdFyqAKkkL3G0KkUQ/TIG8aGZqkNXe1m9VRg76JWP6cEvlJs6k+ize1Mcc0HeKyeB8qT+ogzu0w4bA/HUwzOy+X4mxREOPeemztt6bKrDXt3oM63HNWGow= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733389585; c=relaxed/simple; bh=pSo7L9MEP7twD6ah3Ij1nNIiFq2+Dr/DUU9JWAwRGQo=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=rlB+PkCFFwGbd16M1sg5dVn6nJSM5I/e4jwVEVvCePxeQQdDCTRPSFBOYinlN0KALwbCRoUhbvsVxeGuGFlKKeSvvynPCfzvhAGrh6Al/MF3IV6FeX3RtbS+rnv5Ke4p6U4ZNvtvaFlcC3kYARV/rj2/DaI3Tsgpt7CyNwqZJ3k= 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 1tJ7oT-0004Ks-J9; Thu, 05 Dec 2024 10:06:21 +0100 From: Steffen Trumtrar Date: Thu, 05 Dec 2024 10:06:03 +0100 Subject: [PATCH v3 3/6] arm64: dts: agilex5: add gmac nodes 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: <20241205-v6-12-topic-socfpga-agilex5-v3-3-2a8cdf73f50a@pengutronix.de> References: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> In-Reply-To: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> To: Dinh Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , Michael Turquette , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-clk@vger.kernel.org, kernel@pengutronix.de, Steffen Trumtrar X-Mailer: b4 0.14.2 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 Agilex5 provides three Synopsys XGMAC ethernet cores, that can be used to transmit and receive data at 10M/100M/1G/2.5G over ethernet connections and enables support for Time Sensitive Networking (TSN) applications. Signed-off-by: Steffen Trumtrar --- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 90 ++++++++++++++++++++++= ++++ 1 file changed, 90 insertions(+) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/bo= ot/dts/intel/socfpga_agilex5.dtsi index 1162978329c1637aa0fd9a4adef16a9ae5017ac3..0035caef5af2774083885cf2d0d= 8a38ee8be9627 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi @@ -141,6 +141,96 @@ soc: soc@0 { device_type =3D "soc"; interrupt-parent =3D <&intc>; =20 + gmac0: ethernet@10810000 { + compatible =3D "altr,socfpga-stmmac-agilex5", + "altr,socfpga-stmmac-a10-s10", + "snps,dwxgmac-2.10", + "snps,dwxgmac"; + reg =3D <0x10810000 0x3500>; + interrupt-parent =3D <&intc>; + interrupts =3D ; + interrupt-names =3D "macirq"; + max-frame-size =3D <3800>; + snps,multicast-filter-bins =3D <64>; + snps,perfect-filter-entries =3D <64>; + rx-fifo-depth =3D <16384>; + tx-fifo-depth =3D <32768>; + resets =3D <&rst EMAC0_RESET>, <&rst EMAC0_OCP_RESET>; + reset-names =3D "stmmaceth", "ahb"; + clocks =3D <&clkmgr AGILEX5_EMAC0_CLK>, + <&clkmgr AGILEX5_EMAC_PTP_CLK>; + clock-names =3D "stmmaceth", "ptp_ref"; + snps,axi-config =3D <&stmmac_axi_emac0_setup>; + altr,sysmgr-syscon =3D <&sysmgr 0x44 0>; + status =3D "disabled"; + + stmmac_axi_emac0_setup: stmmac-axi-config { + snps,wr_osr_lmt =3D <31>; + snps,rd_osr_lmt =3D <31>; + snps,blen =3D <0 0 0 32 16 8 4>; + }; + }; + + gmac1: ethernet@10820000 { + compatible =3D "altr,socfpga-stmmac-agilex5", + "altr,socfpga-stmmac-a10-s10", + "snps,dwxgmac-2.10", + "snps,dwxgmac"; + reg =3D <0x10820000 0x3500>; + interrupt-parent =3D <&intc>; + interrupts =3D ; + interrupt-names =3D "macirq"; + max-frame-size =3D <3800>; + snps,multicast-filter-bins =3D <64>; + snps,perfect-filter-entries =3D <64>; + rx-fifo-depth =3D <16384>; + tx-fifo-depth =3D <32768>; + resets =3D <&rst EMAC1_RESET>, <&rst EMAC1_OCP_RESET>; + reset-names =3D "stmmaceth", "ahb"; + clocks =3D <&clkmgr AGILEX5_EMAC1_CLK>, + <&clkmgr AGILEX5_EMAC_PTP_CLK>; + clock-names =3D "stmmaceth", "ptp_ref"; + snps,axi-config =3D <&stmmac_axi_emac1_setup>; + altr,sysmgr-syscon =3D <&sysmgr 0x48 0>; + status =3D "disabled"; + + stmmac_axi_emac1_setup: stmmac-axi-config { + snps,wr_osr_lmt =3D <31>; + snps,rd_osr_lmt =3D <31>; + snps,blen =3D <0 0 0 32 16 8 4>; + }; + }; + + gmac2: ethernet@10830000 { + compatible =3D "altr,socfpga-stmmac-agilex5", + "altr,socfpga-stmmac-a10-s10", + "snps,dwxgmac-2.10", + "snps,dwxgmac"; + reg =3D <0x10830000 0x3500>; + interrupt-parent =3D <&intc>; + interrupts =3D ; + interrupt-names =3D "macirq"; + max-frame-size =3D <3800>; + snps,multicast-filter-bins =3D <64>; + snps,perfect-filter-entries =3D <64>; + rx-fifo-depth =3D <16384>; + tx-fifo-depth =3D <32768>; + resets =3D <&rst EMAC2_RESET>, <&rst EMAC2_OCP_RESET>; + reset-names =3D "stmmaceth", "ahb"; + clocks =3D <&clkmgr AGILEX5_EMAC2_CLK>, + <&clkmgr AGILEX5_EMAC_PTP_CLK>; + clock-names =3D "stmmaceth", "ptp_ref"; + snps,axi-config =3D <&stmmac_axi_emac2_setup>; + altr,sysmgr-syscon =3D <&sysmgr 0x4c 0>; + status =3D "disabled"; + + stmmac_axi_emac2_setup: stmmac-axi-config { + snps,wr_osr_lmt =3D <31>; + snps,rd_osr_lmt =3D <31>; + snps,blen =3D <0 0 0 32 16 8 4>; + }; + }; + clkmgr: clock-controller@10d10000 { compatible =3D "intel,agilex5-clkmgr"; reg =3D <0x10d10000 0x1000>; --=20 2.46.0 From nobody Wed Dec 17 03:02:25 2025 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 8B7D71DA612 for ; Thu, 5 Dec 2024 09:06:24 +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=1733389586; cv=none; b=aSu7LTmK5h5e5eqG+dXYyxjLP4Yr4+rDOXR+sBca3P1K+TbLUOp7Pt4F0DVSAgGbQhjs2pzyQKN3D/hUoYc+NAYUfuBdsLzxMoh+Bidk+5f0DvZ0YduoDYNj5HyffmBy7qaiTGlGELE5j3whJJzLb6UzB3lNCopE61VbDKJ9XFQ= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733389586; c=relaxed/simple; bh=at8DXr0K9qhUNjjdPNc/kRN0tQX2gXsyOQUWEX2md6Y=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=MMXRodAo8hjc7fx5tGcV2u9X+zKVrknnXUjR1/hMiXipU6na/hOoSistpt8TeVsoFJODN6p6/dWfzXfb494GZSH/ATAskiVxMUxk+8uSyJcjOHq/rXM2wbnnHJk052FGOfvNAYMh4oLvAiBbjIa0CcTYGYgKiKKh/62vsh1IgnA= 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 1tJ7oU-0004Ks-NS; Thu, 05 Dec 2024 10:06:22 +0100 From: Steffen Trumtrar Date: Thu, 05 Dec 2024 10:06:04 +0100 Subject: [PATCH v3 4/6] arm64: dts: agilex5: add gpio0 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: <20241205-v6-12-topic-socfpga-agilex5-v3-4-2a8cdf73f50a@pengutronix.de> References: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> In-Reply-To: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> To: Dinh Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , Michael Turquette , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-clk@vger.kernel.org, kernel@pengutronix.de, Steffen Trumtrar , Krzysztof Kozlowski X-Mailer: b4 0.14.2 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 gpio0 is the same as gpio1 with a different base address. Signed-off-by: Steffen Trumtrar Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi b/arch/arm64/bo= ot/dts/intel/socfpga_agilex5.dtsi index 0035caef5af2774083885cf2d0d8a38ee8be9627..47f49d1e1442f66d97a323cd382= f3f42d34ab835 100644 --- a/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5.dtsi @@ -312,6 +312,25 @@ i3c1: i3c@10da1000 { status =3D "disabled"; }; =20 + gpio0: gpio@10c03200 { + compatible =3D "snps,dw-apb-gpio"; + reg =3D <0x10c03200 0x100>; + #address-cells =3D <1>; + #size-cells =3D <0>; + resets =3D <&rst GPIO0_RESET>; + + porta: gpio-controller@0 { + compatible =3D "snps,dw-apb-gpio-port"; + reg =3D <0>; + gpio-controller; + #gpio-cells =3D <2>; + snps,nr-gpios =3D <24>; + interrupt-controller; + #interrupt-cells =3D <2>; + interrupts =3D ; + }; + }; + gpio1: gpio@10c03300 { compatible =3D "snps,dw-apb-gpio"; reg =3D <0x10c03300 0x100>; --=20 2.46.0 From nobody Wed Dec 17 03:02:25 2025 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 8B8AE1DB951 for ; Thu, 5 Dec 2024 09:06:25 +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=1733389587; cv=none; b=O1o1mmXDyHJ4CAp+FnxY1x7IKPHqwWsyKJfKe4bhcffsd10QuuPnTnfOgh3aEBoI5TQod/63WvekoBpAn4lAMl3BCp8bx0gYIgFFo9iGZGuPOhBdXNWuj0GAKPrk9p1eW6ZeuVcoijOT9Zn7gTqQeRB+XXruXlx5F58ssGa89ak= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733389587; c=relaxed/simple; bh=18+pW2kWUE/Ue5Yvz/lr13w8by67WAGX398CfJwKjvU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=oqAVWenP/BVEm3Qys2l6Jl/yRpOpD8R0/VOA07jap3oLBAKWx4KXSTyCFfBinpQzZsPZ+97YWMKQa/SLovcH4dN5PVOszvt/if4tyWm9dacn0rPFbt8suDL1AX2Fd8qiaw4ijiufMr3HXZEoDa+t2fMH/YmYwBK30cs8lNWbn/w= 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 1tJ7oV-0004Ks-NK; Thu, 05 Dec 2024 10:06:23 +0100 From: Steffen Trumtrar Date: Thu, 05 Dec 2024 10:06:05 +0100 Subject: [PATCH v3 5/6] 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: <20241205-v6-12-topic-socfpga-agilex5-v3-5-2a8cdf73f50a@pengutronix.de> References: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> In-Reply-To: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> To: Dinh Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , Michael Turquette , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-clk@vger.kernel.org, kernel@pengutronix.de, Steffen Trumtrar , Krzysztof Kozlowski X-Mailer: b4 0.14.2 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 2ee0c740eb56d63cff7767167ee3c640beba0803..03de49222d465584f24cc6c7dff= f6ccfe304db46 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 - const: intel,socfpga-agilex5 =20 --=20 2.46.0 From nobody Wed Dec 17 03:02:25 2025 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 9A5A71E00BE for ; Thu, 5 Dec 2024 09:06:26 +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=1733389588; cv=none; b=hm3vSraHpfGRt7A339dtFPRZvdP/BTuggAScfCN0BqntMTNz3Ul0nZ88G9jae8TrP3J+9C9FYyv/xg7VkPKwo0g2NIKVvYhA6goYFKSe2Wa3X58eAGPhxO/fa4BVjGODIDnERFkf/DLWk5BxuT8jkLo0bcSrT4QWVT0/TAH231c= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1733389588; c=relaxed/simple; bh=0WFk74EjB5BReqyGSQPdVJxhNKrDOunizJQoJsX5EiU=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=txt+ruSUGSWvcCiSjgz56MSzBfnMakNTuIgFqVOzmTPgi9hDSczwWoWxQaz0HiCx7TAhJP1nGuJseh2m8a0PTYOwz3D1cS3Ep5DLQuNs49nzrsOvI7zUnl3eOX3ynoJymXxd32ZHA8F+CR57yPnyxx2wdbv/hzhTYaEs8RuODic= 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 1tJ7oW-0004Ks-QO; Thu, 05 Dec 2024 10:06:24 +0100 From: Steffen Trumtrar Date: Thu, 05 Dec 2024 10:06:06 +0100 Subject: [PATCH v3 6/6] arm64: dts: 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: <20241205-v6-12-topic-socfpga-agilex5-v3-6-2a8cdf73f50a@pengutronix.de> References: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> In-Reply-To: <20241205-v6-12-topic-socfpga-agilex5-v3-0-2a8cdf73f50a@pengutronix.de> To: Dinh Nguyen , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Richard Cochran , Michael Turquette , Stephen Boyd Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, linux-clk@vger.kernel.org, kernel@pengutronix.de, Steffen Trumtrar , Krzysztof Kozlowski X-Mailer: b4 0.14.2 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. Signed-off-by: Steffen Trumtrar Reviewed-by: Krzysztof Kozlowski --- arch/arm64/boot/dts/intel/Makefile | 1 + .../boot/dts/intel/socfpga_agilex5_axe5_eagle.dts | 140 +++++++++++++++++= ++++ 2 files changed, 141 insertions(+) diff --git a/arch/arm64/boot/dts/intel/Makefile b/arch/arm64/boot/dts/intel= /Makefile index d39cfb723f5b6674a821dfdafb21b12668bb1e0e..3e87d548c532b1a9e38f4489c03= 7c5c4db3a50b8 100644 --- a/arch/arm64/boot/dts/intel/Makefile +++ b/arch/arm64/boot/dts/intel/Makefile @@ -3,5 +3,6 @@ dtb-$(CONFIG_ARCH_INTEL_SOCFPGA) +=3D socfpga_agilex_n6000.= dtb \ socfpga_agilex_socdk.dtb \ socfpga_agilex_socdk_nand.dtb \ socfpga_agilex5_socdk.dtb \ + socfpga_agilex5_axe5_eagle.dtb \ socfpga_n5x_socdk.dtb dtb-$(CONFIG_ARCH_KEEMBAY) +=3D keembay-evm.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 0000000000000000000000000000000000000000..c0f6870e7b40a53ca0d685b4109= ff24e1409bb0e --- /dev/null +++ b/arch/arm64/boot/dts/intel/socfpga_agilex5_axe5_eagle.dts @@ -0,0 +1,140 @@ +// 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 { + #address-cells =3D <1>; + #size-cells =3D <0>; + compatible =3D "snps,dwmac-mdio"; + emac2_phy0: ethernet-phy@1 { + 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>; + }; +}; + +&uart0 { + status =3D "okay"; +}; --=20 2.46.0