From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-dl1-f45.google.com (mail-dl1-f45.google.com [74.125.82.45]) (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 0132F33C19C for ; Wed, 28 Jan 2026 09:02:26 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.82.45 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769590948; cv=none; b=KAuj+4ZOCd4CzllO0syw7lHfeGcZmOUdBmd992V7TXd4k1IjnAAlDXPb/3OOpBm5gqtSH4GC2mg0b5VjbMa+0z0Rgn2iebr5yxKlzj4h+Rr3TcU/+aW01Stl7QFW8qA/knMOLbx9hKsOnykiXx6NES/MMr2PNFh7uenbPa7BfPk= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1769590948; c=relaxed/simple; bh=5xIKoh/TwhS0XTiSYjF8TimZ4Mgh0qKu32LLs95xkk8=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=r8/hsFP21j4iZ6I/0K4BKaNruILqhr13unzy7Z0iPKv1Xz3fRnGECYoOWUNyoargHnutSvvZkg6z7iG+X6iqwdkwu5kmBWK7HZWTyph2fou3fZqUd2XTVzlQ1E9WdypjwS+3suhQO19FF1HNP/3lVlnNDZEJIcBqXVv5rafutb0= 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=fmg0gkdD; arc=none smtp.client-ip=74.125.82.45 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="fmg0gkdD" Received: by mail-dl1-f45.google.com with SMTP id a92af1059eb24-124566b6693so14718788c88.0 for ; Wed, 28 Jan 2026 01:02:26 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1769590946; x=1770195746; 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=fmg0gkdDtMXFl86sdA7dBhpr/rOwD1Xy4Z8Dm3LcwjV3+vuqTb54I2VxBsuNUODiXg 3dqjM5K4RphHSI5L1gMqaLXZKj0XdFJOpreHeRsRG2CEtZXq9paAMwGevaL85r4mnZMu oyR0XzX09D5UjwaAS4WuqTl+/bQx1+sdO1QM04VFcONbzQ3SuVByyWArXYuW0UHefRuE VHDp6bq/H05spRG1XdK6jFzB7d6bX2wVHAu7q1iGLEQrMLhBwkakkdhIfrZ1SfhqM04F 6w4h/Nhw5RQqmAkaxXwVdDiTN1E0O8X8fdEBAfv/UyU9PeY9s+OCN8Q5HAwtrwQ1TjBY RMIg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1769590946; x=1770195746; 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=eg6YWymM+ymrcQAFuhp8wphvtZkXGVq+biTQ624wXUhB4Q8dxZM8ImOt8h66gu3+fS Zlb/IP8IWF3hrnhjhot/QdM9sf0bcBRoPVpI4dSZcFcqe1dGNyuzgtDo/2LTjOapAiJp XR898lwyOFGc4q4iY8XRUUVd/QuNeoiC7WMqQ7r4NolVF+GRl7YS6TIIfSx9I4/oVbjq kmhR6Eb1rfVi3zTFITRupg9oOR4GIhKo+TWAa8thABFarq/mI4aZZCfBaLnXiQeWaHdX b49s3U/8bVIxmIOEJIVlb8zrE2Nk3MAnma2uMqt1JcpgO++EQcjBIHudm8pAtuh5T9hd 8ltw== X-Gm-Message-State: AOJu0YzuozSCuvnBdbyRnuqR4L9C6aJpMw3wZ6NocHMY6gF8/oRkAvEy zYxBPuXQhIVV6DPKmtUYCokxwtou33IL/161n6ugL4kQA2eQtolXFs9XMRf8yA== X-Gm-Gg: AZuq6aJILhaKG3Wx6YT+5Uq12eJ856w+OvH/itCn1wTjDcvw50UCJ0sbBYR58nXHYKA YWKzrlUePDA6d5fko7kgVpUKELO3sonMO0EXAJdoWvdCLv1Y00JgHyURXERpZQe+QOcQajxZlSX dCxjH0YMzMUZmHwoJLTHoVuCKawsy2/LjgOEVbXrJJ1Ww5asaAfgz0JCCVIVJ1k6bYT96Sjzp8I taa257+NlWTpm8mR00t9XKcZJxAI5qHh0oiwlBXClFen5ibfleDTIYqNGgfYjgWWS9BjjbZrzdF 0n1Lb5Atw/k+UzkWaVX/8UxWan6keoRpKTwVSk0AjoKHozS+Ae4aRcLumFU31qQ/VuD77RmtqYk QWj66LmLTSV2wHDZG8f1ykLOre1bM691z21BwNrYIEeK2CoWjS44FYRQhIFXFu1+oWXS0p/JfAi JBMgWeZOSrPQ== 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: netdev@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