From: Inochi Amaoto <inochiama@gmail.com>
To: Andrew Lunn <andrew+netdev@lunn.ch>,
"David S. Miller" <davem@davemloft.net>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Inochi Amaoto <inochiama@gmail.com>, Yixun Lan <dlan@kernel.org>,
Maxime Coquelin <mcoquelin.stm32@gmail.com>,
Alexandre Torgue <alexandre.torgue@foss.st.com>,
Richard Cochran <richardcochran@gmail.com>,
Paul Walmsley <pjw@kernel.org>,
Palmer Dabbelt <palmer@dabbelt.com>,
Albert Ou <aou@eecs.berkeley.edu>,
Alexandre Ghiti <alex@ghiti.fr>,
"Russell King (Oracle)" <rmk+kernel@armlinux.org.uk>,
Yao Zi <me@ziyao.cc>, Yanteng Si <siyanteng@cqsoftware.com.cn>,
Vladimir Oltean <vladimir.oltean@nxp.com>,
Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>,
Maxime Chevallier <maxime.chevallier@bootlin.com>,
Chen-Yu Tsai <wens@kernel.org>,
Shangjuan Wei <weishangjuan@eswincomputing.com>,
Boon Khai Ng <boon.khai.ng@altera.com>,
Quentin Schulz <quentin.schulz@cherry.de>,
Giuseppe Cavallaro <peppe.cavallaro@st.com>,
Jose Abreu <joabreu@synopsys.com>
Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org,
linux-kernel@vger.kernel.org, linux-riscv@lists.infradead.org,
spacemit@lists.linux.dev,
linux-stm32@st-md-mailman.stormreply.com,
linux-arm-kernel@lists.infradead.org, Yixun Lan <dlan@gentoo.org>,
Longbin Li <looong.bin@gmail.com>
Subject: [PATCH net-next v9 1/4] dt-bindings: net: Add support for Spacemit K3 dwmac
Date: Thu, 12 Mar 2026 09:22:23 +0800 [thread overview]
Message-ID: <20260312012232.373713-2-inochiama@gmail.com> (raw)
In-Reply-To: <20260312012232.373713-1-inochiama@gmail.com>
The GMAC IP on Spacemit K3 is almost a standard Synopsys DesignWare
MAC (version 5.40a) with some extra clock.
Add necessary compatible string for this device.
Signed-off-by: Inochi Amaoto <inochiama@gmail.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
---
.../devicetree/bindings/net/snps,dwmac.yaml | 2 +
.../bindings/net/spacemit,k3-dwmac.yaml | 102 ++++++++++++++++++
2 files changed, 104 insertions(+)
create mode 100644 Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml
diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
index 38bc34dc4f09..98ebb6276bc6 100644
--- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml
+++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml
@@ -109,6 +109,7 @@ properties:
- snps,dwmac-5.10a
- snps,dwmac-5.20
- snps,dwmac-5.30a
+ - snps,dwmac-5.40a
- snps,dwxgmac
- snps,dwxgmac-2.10
- sophgo,sg2042-dwmac
@@ -656,6 +657,7 @@ allOf:
- snps,dwmac-5.10a
- snps,dwmac-5.20
- snps,dwmac-5.30a
+ - snps,dwmac-5.40a
- snps,dwxgmac
- snps,dwxgmac-2.10
- st,spear600-gmac
diff --git a/Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml b/Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml
new file mode 100644
index 000000000000..678eccf044f9
--- /dev/null
+++ b/Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml
@@ -0,0 +1,102 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/net/spacemit,k3-dwmac.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Spacemit K3 DWMAC glue layer
+
+maintainers:
+ - Inochi Amaoto <inochiama@gmail.com>
+
+select:
+ properties:
+ compatible:
+ contains:
+ const: spacemit,k3-dwmac
+ required:
+ - compatible
+
+properties:
+ compatible:
+ items:
+ - const: spacemit,k3-dwmac
+ - const: snps,dwmac-5.40a
+
+ reg:
+ maxItems: 1
+
+ clocks:
+ items:
+ - description: GMAC application clock
+ - description: PTP clock
+ - description: TX clock
+
+ clock-names:
+ items:
+ - const: stmmaceth
+ - const: ptp_ref
+ - const: tx
+
+ interrupts:
+ minItems: 1
+ items:
+ - description: MAC interrupt
+ - description: MAC wake interrupt
+
+ interrupt-names:
+ minItems: 1
+ items:
+ - const: macirq
+ - const: eth_wake_irq
+
+ resets:
+ maxItems: 1
+
+ reset-names:
+ const: stmmaceth
+
+ spacemit,apmu:
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ items:
+ - items:
+ - description: phandle to the syscon node which control the glue register
+ - description: offset of the control register
+ - description: offset of the dline register
+ description:
+ A phandle to syscon with offset to control registers for this MAC
+
+required:
+ - compatible
+ - reg
+ - clocks
+ - clock-names
+ - interrupts
+ - interrupt-names
+ - resets
+ - reset-names
+ - spacemit,apmu
+
+allOf:
+ - $ref: snps,dwmac.yaml#
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/interrupt-controller/irq.h>
+
+ ethernet@cac80000 {
+ compatible = "spacemit,k3-dwmac", "snps,dwmac-5.40a";
+ reg = <0xcac80000 0x2000>;
+ clocks = <&syscon_apmu 66>, <&syscon_apmu 68>,
+ <&syscon_apmu 69>;
+ clock-names = "stmmaceth", "ptp_ref", "tx";
+ interrupts = <131 IRQ_TYPE_LEVEL_HIGH>, <276 IRQ_TYPE_LEVEL_HIGH>;
+ interrupt-names = "macirq", "eth_wake_irq";
+ phy-mode = "rgmii-id";
+ phy-handle = <&phy0>;
+ resets = <&syscon_apmu 67>;
+ reset-names = "stmmaceth";
+ spacemit,apmu = <&syscon_apmu 0x384 0x38c>;
+ };
--
2.53.0
next prev parent reply other threads:[~2026-03-12 1:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-03-12 1:22 [PATCH net-next v9 0/4] riscv: spacemit: Add ethernet support for K3 Inochi Amaoto
2026-03-12 1:22 ` Inochi Amaoto [this message]
2026-03-13 2:34 ` [net-next,v9,1/4] dt-bindings: net: Add support for Spacemit K3 dwmac Jakub Kicinski
2026-03-12 1:22 ` [PATCH net-next v9 2/4] net: stmmac: platform: Add snps,dwmac-5.40a IP compatible string Inochi Amaoto
2026-03-12 1:22 ` [PATCH net-next v9 3/4] net: stmmac: Add glue layer for Spacemit K3 SoC Inochi Amaoto
2026-03-13 2:38 ` Jakub Kicinski
2026-03-13 2:43 ` Inochi Amaoto
2026-03-12 1:22 ` [PATCH net-next v9 4/4] MAINTAINERS: add entry for SpacemiT DWMAC glue layer Inochi Amaoto
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260312012232.373713-2-inochiama@gmail.com \
--to=inochiama@gmail.com \
--cc=alex@ghiti.fr \
--cc=alexandre.torgue@foss.st.com \
--cc=andrew+netdev@lunn.ch \
--cc=aou@eecs.berkeley.edu \
--cc=boon.khai.ng@altera.com \
--cc=conor+dt@kernel.org \
--cc=davem@davemloft.net \
--cc=devicetree@vger.kernel.org \
--cc=dlan@gentoo.org \
--cc=dlan@kernel.org \
--cc=edumazet@google.com \
--cc=joabreu@synopsys.com \
--cc=krzk+dt@kernel.org \
--cc=kuba@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-riscv@lists.infradead.org \
--cc=linux-stm32@st-md-mailman.stormreply.com \
--cc=looong.bin@gmail.com \
--cc=maxime.chevallier@bootlin.com \
--cc=mcoquelin.stm32@gmail.com \
--cc=me@ziyao.cc \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=palmer@dabbelt.com \
--cc=peppe.cavallaro@st.com \
--cc=pjw@kernel.org \
--cc=prabhakar.mahadev-lad.rj@bp.renesas.com \
--cc=quentin.schulz@cherry.de \
--cc=richardcochran@gmail.com \
--cc=rmk+kernel@armlinux.org.uk \
--cc=robh@kernel.org \
--cc=siyanteng@cqsoftware.com.cn \
--cc=spacemit@lists.linux.dev \
--cc=vladimir.oltean@nxp.com \
--cc=weishangjuan@eswincomputing.com \
--cc=wens@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox