From nobody Thu Apr 9 14:58:04 2026 Received: from mail-pf1-f179.google.com (mail-pf1-f179.google.com [209.85.210.179]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 92697239E75 for ; Mon, 9 Mar 2026 00:43:44 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.210.179 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773017025; cv=none; b=BiPCDJZjgsd8R4iPvzv0sHxOihptuaYBz1kXPtLvJM0oMKTwJin9xiievQgyT2JYu8aaCOnmhParUxmyCkGj34IIuCtAe0sZ/V6MCG6FItrsZMoHUpHs4hHk1JjnfhQ1WOxSCyzh0pcL/41GlsIFR2BS1jlFN1V1iLA84lY+osI= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773017025; c=relaxed/simple; bh=hnJ30MhACPLAzazphFsNEYJjgsYJCLO8n/Kdkd54fAk=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=DFth0MDlAczA4DCDh9cuJdBs0HzQfA91XoFdMVkmZ9GXnhKXs66ZLY36F407tshSfdzN5EFwXWUE6Lgu6NlWBK4FjvAWqujazaRVwbkGNEAzkOTCC36l7gt/Vv7koskFul/gldJf1Z06f21JMCNkyt0wMq4dKZTtoPA7irltngY= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=Uxydga8Y; arc=none smtp.client-ip=209.85.210.179 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="Uxydga8Y" Received: by mail-pf1-f179.google.com with SMTP id d2e1a72fcca58-8299f1ca86fso1085477b3a.0 for ; Sun, 08 Mar 2026 17:43:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1773017024; x=1773621824; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=PjA77pToB3Hfq307snqYtTPSiBkdeTdC0aw7kzmt+xc=; b=Uxydga8YpgNjkGTMNQdPmIk7wtBewdhH/edjk0q9fwaopEYgL9OlwPIqpqPRp3GnO2 OXQxaZz+9X+Mav5qVMT7gzk7p7lxvMqtdhRMxJuqNjnJhSwpleZJkO449lMJl9y99iF6 OSBwvHmy/qyzcnlEt7Rj7eZnmA+AURGuqpDl7yBU5wYhvb1EegysK8wo8ethoeIwWd91 Wio6LR1kGH1iFxYe5Tc8+9mAvhkf6tW4E5Dy33IgbDXStTQi2PZ+Nsuk3Daxwz+Y45t0 oqKeZ7hZqkJaAtBk4EqEMKSToeKA3edBQSvYlaMyGXRJL+PgM66qr8Oy5qL5oQ9rQ/we uRxQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1773017024; x=1773621824; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=PjA77pToB3Hfq307snqYtTPSiBkdeTdC0aw7kzmt+xc=; b=exH5oXdCtDj0fAi5aohmLrflmvUJCVcMRVFC6q6ESJI+fehARvHz0w1qiWyNPTU741 zE7tNRQ9FTVa6/9iMCLqWyHaxKNR8MSHz2OaM9oQChhyIznK+uEwkv2qWD2LNWDI+o/O xfrVHX68+aDuo20ZfUI4tbMo9nkugdFC/H+iK2xh2exxLVZ4kgy/ifR76aQoCPamYvos Af4QJd+JbN3z7us2H7CE8cQhz0LXQdnnvx/h4v85GxzBNyC3KLqd343hcKbCyY1r3Nd7 PToodKyvobN1FciBc1tEpLMcNgJDrIWrzJSbMjI3YRvC4/gdV0ohR6jdb8s6OVvt4S4v NwkA== X-Forwarded-Encrypted: i=1; AJvYcCUMic9Qlv4DlTOPcSG2WZIvZHdknNgFLzqKN9OKdch8ikxs3ZD9hfbQDYBrO4faT6yEvKimjERJX5h1CTA=@vger.kernel.org X-Gm-Message-State: AOJu0YzUYYXc8ZHn7poLsRn81u0Yq+mbbRLwCGn/x2ItxmFOAdcOdQeK LJ4GgXpwJJ8G3jPT/FMhHf2nzVWj3F9Pn0mYnZaYYbDM4Ayg3GPhneIn X-Gm-Gg: ATEYQzyCpnEBlIZ++NgOffm+zH+X4WW3jZaYcZANVGY/ZNc5uyRJEGBRmn1ggKldWz/ KKK2JcKoOeQZQ1saJaasD7qLlfzJhdPUJxAk+Oi2TS5eb/uU4rH7JvTGBD4qaRoPfkUQLbm20kb kdISdJFEcXCmhA/SZyyAiDs8beXWf1h2CJ7GsorLhL4/6pOTiFbsoKOnnkiZNCxnVT+8DdSI4rF Hzaq2wH4ajJejnkfmTnBzi0e8qTNCIDDh9pCVrI4M8x8SYn4L9pzlMfjdq/RjLKTEuNBg1I39IN jN//dxeiFT6RscNLNMpARmvri3JGBHEwhDhBZzwjFnVGyDzf46brV9JMbRf2ULyO+a9MO2hMmHY pMfPcmLSgbc6wv7vFyhUiFLO0NtOwuE/MnM977M9p+P2CdO0aqHNKnFRKbplNde/vvDcPVbNsKo 1zn7e3wYBE79aqvjw5e1oZlTQ= X-Received: by 2002:a05:6a00:1581:b0:829:a131:8318 with SMTP id d2e1a72fcca58-829a2f813f7mr6833727b3a.44.1773017023904; Sun, 08 Mar 2026 17:43:43 -0700 (PDT) Received: from localhost ([2001:19f0:8001:1b2d:5400:5ff:fefa:a95d]) by smtp.gmail.com with ESMTPSA id d2e1a72fcca58-829a4635d62sm8441226b3a.5.2026.03.08.17.43.42 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 08 Mar 2026 17:43:43 -0700 (PDT) From: Inochi Amaoto To: Andrew Lunn , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Yixun Lan , Maxime Coquelin , Alexandre Torgue , Richard Cochran , Paul Walmsley , Palmer Dabbelt , Albert Ou , Alexandre Ghiti , "Russell King (Oracle)" , Yao Zi , Yanteng Si , Vladimir Oltean , Lad Prabhakar , Shangjuan Wei , Inochi Amaoto , Maxime Chevallier , Chen-Yu Tsai , Boon Khai Ng , Quentin Schulz , Giuseppe Cavallaro , Jose Abreu 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 , Longbin Li Subject: [PATCH net-next v8 1/3] dt-bindings: net: Add support for Spacemit K3 dwmac Date: Mon, 9 Mar 2026 08:42:42 +0800 Message-ID: <20260309004305.315018-2-inochiama@gmail.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260309004305.315018-1-inochiama@gmail.com> References: <20260309004305.315018-1-inochiama@gmail.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 Reviewed-by: Rob Herring (Arm) --- .../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/Docume= ntation/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 + +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 + + ethernet@cac80000 { + compatible =3D "spacemit,k3-dwmac", "snps,dwmac-5.40a"; + reg =3D <0xcac80000 0x2000>; + clocks =3D <&syscon_apmu 66>, <&syscon_apmu 68>, + <&syscon_apmu 69>; + clock-names =3D "stmmaceth", "ptp_ref", "tx"; + interrupts =3D <131 IRQ_TYPE_LEVEL_HIGH>, <276 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names =3D "macirq", "eth_wake_irq"; + phy-mode =3D "rgmii-id"; + phy-handle =3D <&phy0>; + resets =3D <&syscon_apmu 67>; + reset-names =3D "stmmaceth"; + spacemit,apmu =3D <&syscon_apmu 0x384 0x38c>; + }; --=20 2.53.0