Received: from mail-dl1-f47.google.com (mail-dl1-f47.google.com [74.125.82.47]) (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 BB6D02FFFA3 for ; Wed, 28 Jan 2026 09:00:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.47 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769590840; cv=none; b=C6e0497lwdKeBBR9Lt3YFEIXkZWk2Y/ZW2wECb9aIUJR0teBCFfuG+kWIut98kUK4qyfmiKvFea1sfcLWF0cL8poHXP4LHoQyQ/xCQxJN45Tw7r2Uzus03NafE1n4U0fZ9rfgZgCf5zH4szcvcjATmM3AJPTkH67OlFoDT37a+k= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769590840; c=relaxed/simple; bh=5xIKoh/TwhS0XTiSYjF8TimZ4Mgh0qKu32LLs95xkk8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=tw4tad+uJbMxZte3wJ01rkFt5h/n++RuUAPndc/Kqyl/6WBKKXOQpytzKwsnCRFFwdcYHOZBfxAF99mJwpo9uQEQ7L4goWxvlkXSGMmYA+O37e3XMaznvcABe7VPcTp9On2uNJxA3fqQ8fsCzhlrpWDJyiav2gMgbciNXLIRSYw= 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=k6TA4deC; arc=none smtp.client-ip=74.125.82.47 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="k6TA4deC" Received: by mail-dl1-f47.google.com with SMTP id a92af1059eb24-124566b6693so14715292c88.0 for ; Wed, 28 Jan 2026 01:00:38 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769590838; x=1770195638; 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=yEOFkSi2N0vtkbtCff5kn8mqsv72spWR8lTmAsEOTX4=; b=k6TA4deCuUzi3RkPpBVIhrOt8Y+ar6h4zyFYoqupCU/kG30IxWTfn09GgN5ka2knmR OGRqh9MMAQ0JMvrPl/UkE6+mF7uV567BB9/AQX6R2+M2BDtDiASCixedh+FPWnH0JrLa Slh9DqpzKMNrpPj4PV4KGIIEWs55zVF4wgVdYODy0Vl1IsljG5kJ9ow3M5PytItGFUbP ck6mhU+5UtVXoEZnE0vsr+/BXM0NUjmkZE7Wp8+dba7Y9P5cSf31qri1mhzpsDFuPXxs e/tYXaWtdPjFZRgx9vxJORK87nX6Kx2MDpxkEFKXYaeH86/SmWejtMxnMFLKs2DLwwCD Kf4w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769590838; x=1770195638; 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=yEOFkSi2N0vtkbtCff5kn8mqsv72spWR8lTmAsEOTX4=; b=JjqlHjV+18zEooKs9hILPISNLmkQ3Uv/SibJVOXT198ZcL28pxmV/3rhwBes2/32mA 8QPNP4Azn8o0idowSy57ZGeYNydwpV2T8YNdocY5ykK7oF0DKqdcnKouQEFzeBGAI/vm UmCPrQo9qPoydcV1Fzl127F+dxW/xnJOa9okMKe8Vzc8m76IFi7YcIciP9y2M9XdDV8J vX9n/2Jt+FAn0DzRyv/qcimYBxkq6+Kr8Fl3c0K75j/YRvYTWJDkCXtSkLa3z2DxEd/+ eun1OrwEAmGk3YGdcUOBQzYz0exAfLuyLWAct4Vw2aMFUy6uYUVFEy4eZ/mhnU3BgWl8 77wA== X-Forwarded-Encrypted: i=1; AJvYcCVcSYuonWe48K1omDPP947Yk6DIEDhVHBb4DqlKOtlhY0QaYeR9LAoAwbp7rfoHG/eWuJ2NpS07UXtk@vger.kernel.org X-Gm-Message-State: AOJu0YyEGOWtg505mgAqx+uUwKdIJsKTM873D8hbZ5N48FW2aafzYPcn vGt6L7Qen/7OvNfWv/NP7Bm0W5gytiFoAL0RYxa7xNrwlk0f7UA83p63D+nSTg== X-Gm-Gg: AZuq6aKCncWYOG4I1D4MkLtIDPz++rg7MXlOPnSd3SNLo/Bg6A75BzuAomu7ucjLE45 d9+IW8UTUBO4YalDTjkhs7Mz18vAdcd8D76S8h3ZVAQKXf0WcQRU/gAz8zxx+FPj+LSHhsUILst XAhVQykS4BGQ4twukFMQl7BhhWTjfLSG3PYWSnwRrFDUZyRpDdRko4MijkuEVkIYol7o3wQoYN/ YWNrm/EFBAKvoE9hs4TEpqvguAc8XgvdcdS8NuYCGVYV0mMZpJgY6/dIcJsh8BXfNzMtFhKS/5p ErCA8zgvoRFfbC4AkmLFqIvYFqOEX8fG7UQIUWhXSqpFAzbzH34WizgmNU+G4LtukXJ06DfYyw+ qFwMItQ8ly6EpygCczgD2KwBgcWT5WZh3Zn96IcnIv6wMwjdmsP5a24IM7xlM+RtkBJBl2nHEdH OSpsrfwanSYw== X-Received: by 2002:a05:7300:a188:b0:2a4:3594:d540 with SMTP id 5a478bee46e88-2b78d90178cmr2919827eec.13.1769585396662; Tue, 27 Jan 2026 23:29:56 -0800 (PST) Received: from localhost ([2001:19f0:ac00:4eb8:5400:5ff:fe30:7df3]) by smtp.gmail.com with ESMTPSA id 5a478bee46e88-2b7a16ef40asm1515483eec.13.2026.01.27.23.29.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 27 Jan 2026 23:29:56 -0800 (PST) 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 , Lad Prabhakar , Inochi Amaoto , Maxime Chevallier , Choong Yong Liang , Chen-Yu Tsai , Shangjuan Wei , 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, Longbin Li Subject: [PATCH net-next v3 1/3] dt-bindings: net: Add support for Spacemit K3 dwmac Date: Wed, 28 Jan 2026 15:29:27 +0800 Message-ID: <20260128072931.875041-2-inochiama@gmail.com> X-Mailer: git-send-email 2.52.0 In-Reply-To: <20260128072931.875041-1-inochiama@gmail.com> References: <20260128072931.875041-1-inochiama@gmail.com> Precedence: bulk X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 --- .../devicetree/bindings/net/snps,dwmac.yaml | 2 + .../bindings/net/spacemit,k3-dwmac.yaml | 103 ++++++++++++++++++ 2 files changed, 105 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 dd3c72e8363e..a3fcb9a251fa 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -34,6 +34,7 @@ select: - snps,dwmac-5.10a - snps,dwmac-5.20 - snps,dwmac-5.30a + - snps,dwmac-5.40a - snps,dwxgmac - snps,dwxgmac-2.10 @@ -653,6 +654,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..fc024a927fcc --- /dev/null +++ b/Documentation/devicetree/bindings/net/spacemit,k3-dwmac.yaml @@ -0,0 +1,103 @@ +# 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 main 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 = "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.52.0