From nobody Thu Nov 21 22:08:34 2024 Received: from mail-pl1-f172.google.com (mail-pl1-f172.google.com [209.85.214.172]) (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 7C5BB197A8E; Mon, 18 Nov 2024 08:27:35 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.214.172 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731918457; cv=none; b=XEBND4CafJhP4B7lfX4f38JuVwVgPI3o5ScZ6Bn7JEJfcjbH/DW4aVOYn6cs0PYBSo8n1WJyVdbe4hOJVMgiVl6MbMYu+cUJ1cTs9dKAPj6RrugjGMFgYVXkGHAudyDp959NikZtI8EFC3+eWbdru1bS7grUvCS92dxPmQ6AOoM= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1731918457; c=relaxed/simple; bh=tJkA/L925Bu8lVnvvyeGCksg6B4e+OPE3BFgbshH92w=; h=From:To:Cc:Subject:Date:Message-Id:In-Reply-To:References: MIME-Version; b=Je25PVicWvHFm3X4ursAzQcYX6yBVlnJghFrzQPScO9Z/M9PQ+EXJdlIsy0ykCnZiSGMb5B65Yi3bcMsPAeqyKLwGFU17s/f93xpSISjP571p3+wrG/GiqbLoSPoOu7eQOVgfnjELzcwsv5sk6bxaTSGJE2PzQpAaL4VSvs3/lk= 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=Djy9Ko/N; arc=none smtp.client-ip=209.85.214.172 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="Djy9Ko/N" Received: by mail-pl1-f172.google.com with SMTP id d9443c01a7336-21207f0d949so11210555ad.2; Mon, 18 Nov 2024 00:27:35 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1731918455; x=1732523255; 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=22eBrCOuw0pL18pceraGOlsxlVBeZpCNoSmGSYgXMW8=; b=Djy9Ko/NMzhgjpCtm5Dv+qFeAk+yqm5vjS+KrI7K0QBS+KcO7Omr1S9EaAo4uVYWxm pXt46vpS7IU5PirqVGS+ggJ3kaPEU/EIdmR4asQuluo7OR3p8J726jg641l+stSOaAvr 4oig0+MZafr6eK/CYjp8Fz/0TqNiL8I/Vt1XRg8lZ+Bde8Wia3O82lvIuvqwHyfgbNOY I8SmJBmzz+QT00W2K+AttErGJEVnUSOzV4EHYd0welacgpEYyE9rIymlJkCCfHVMxPAD 8l6xrFGeACTq0Rv24u++X0P3YgxIodL4G4czUsOBqZXj48bg9QaVPw9v6FywThV3rnI6 unBA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731918455; x=1732523255; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=22eBrCOuw0pL18pceraGOlsxlVBeZpCNoSmGSYgXMW8=; b=kAea7LDXxPPwdNVsGJSWklt4+KTdlx5bK3LuPllm7pDVntrGU4/1+Fmhlh42r7NS8z /5uPjY0Vy76Baomgz8xXiEZ0nOkIX+7EjT1dcXyiav3v4PTKMz6QpIvZGcjCRbRkxH1H p7Gl9YEv1mKLk21fFJ9pzbsIpDwOoNMGRZk1Ia4kEkEicRtartcYF4m94iCNmwFQuIYF jVpv9jE3uPF8qwXTru7ze/i2xrpmLPmrZ8WOD3waJ9MNVKFg8s21RYdpcCOktO65XPfq ZQdJSuCcubACu/lTZQPT/cQwcQPaQABMqkMBYCATd6evwiJUaIkgSOq7UIH79WZufMSE nuZA== X-Forwarded-Encrypted: i=1; AJvYcCULhorrx7NUF8MB1uoU63Nih6gl33wM/Okb+ouJzh/DqCMgbMPFMulQ+ATmiwxIr3HN5Zw6TrYL4K5+ernz@vger.kernel.org, AJvYcCUbJjgCbGdwhB6P8dHNRKtskSYoPO0nB8isVReHeEaReiWtNSx39zLn2oppuCqDjO8sJc0dlqo0@vger.kernel.org, AJvYcCX7r07aZdeRSnifjweSEXmDBXb4ehRa9KV4wGZJiYWLOpMnG3ZY3NcDoOtI8Tq8/redbgGOljzIHGI6@vger.kernel.org X-Gm-Message-State: AOJu0Yzc++qE/dlpvy93z5cI9hoHB2I2zFAmVQ8Qa1meMrDczfPz27eV e71h3Tht2oTTrXKyYX12Un9F2PsG5p1aJCbW9qYWIVLPhFPklBTJ X-Google-Smtp-Source: AGHT+IFCMhGgX1xOfQNJJSKDX6LuB6StegDr2eFKaxNLfiSTIGrTwq5g52HdTmoiFI6ckWKVxwhnng== X-Received: by 2002:a17:903:22c4:b0:20b:861a:25c7 with SMTP id d9443c01a7336-211d0f1183dmr160198245ad.54.1731918454839; Mon, 18 Nov 2024 00:27:34 -0800 (PST) Received: from yclu-ubuntu.. (60-250-196-139.hinet-ip.hinet.net. [60.250.196.139]) by smtp.gmail.com with ESMTPSA id d9443c01a7336-211d0ebbf9esm51883815ad.45.2024.11.18.00.27.31 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Nov 2024 00:27:34 -0800 (PST) From: Joey Lu To: andrew+netdev@lunn.ch, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, mcoquelin.stm32@gmail.com, richardcochran@gmail.com Cc: alexandre.torgue@foss.st.com, joabreu@synopsys.com, ychuang3@nuvoton.com, schung@nuvoton.com, yclu4@nuvoton.com, peppe.cavallaro@st.com, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, openbmc@lists.ozlabs.org, linux-stm32@st-md-mailman.stormreply.com, Joey Lu Subject: [PATCH v3 1/3] dt-bindings: net: nuvoton: Add schema for Nuvoton MA35 family GMAC Date: Mon, 18 Nov 2024 16:27:05 +0800 Message-Id: <20241118082707.8504-2-a0987203069@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20241118082707.8504-1-a0987203069@gmail.com> References: <20241118082707.8504-1-a0987203069@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" Create initial schema for Nuvoton MA35 family Gigabit MAC. Signed-off-by: Joey Lu --- .../bindings/net/nuvoton,ma35d1-dwmac.yaml | 173 ++++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 1 + 2 files changed, 174 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nuvoton,ma35d1-dw= mac.yaml diff --git a/Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yam= l b/Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml new file mode 100644 index 000000000000..92cbbcc72f2b --- /dev/null +++ b/Documentation/devicetree/bindings/net/nuvoton,ma35d1-dwmac.yaml @@ -0,0 +1,173 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nuvoton,ma35d1-dwmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Nuvoton DWMAC glue layer controller + +maintainers: + - Joey Lu + +description: + Nuvoton 10/100/1000Mbps Gigabit Ethernet MAC Controller is based on + Synopsys DesignWare MAC (version 3.73a). + +# We need a select here so we don't match all nodes with 'snps,dwmac' +select: + properties: + compatible: + contains: + enum: + - nuvoton,ma35d1-dwmac + required: + - compatible + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + oneOf: + - enum: + - nuvoton,ma35d1-dwmac + - const: snps,dwmac-3.70a + + reg: + description: + Register range should be one of the GMAC interface. + + interrupts: + maxItems: 1 + + clocks: + items: + - description: MAC clock + - description: PTP clock + + clock-names: + items: + - const: stmmaceth + - const: ptp_ref + + nuvoton,sys: + $ref: /schemas/types.yaml#/definitions/phandle-array + items: + - items: + - description: phandle to access syscon registers. + - description: GMAC interface ID. + enum: + - 0 + - 1 + description: + A phandle to the syscon with one argument that configures system reg= isters + for MA35D1's two GMACs. The argument specifies the GMAC interface ID. + + resets: + maxItems: 1 + + reset-names: + items: + - const: stmmaceth + + phy-mode: + enum: + - rmii + - rgmii + - rgmii-id + - rgmii-txid + - rgmii-rxid + + phy-handle: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Specifies a reference to a node representing a PHY device. + + tx-internal-delay-ps: + enum: [0, 2000] + default: 0 + description: + RGMII TX path delay used only when PHY operates in RGMII mode with + internal delay (phy-mode is 'rgmii-id' or 'rgmii-txid') in pico-seco= nds. + + rx-internal-delay-ps: + enum: [0, 2000] + default: 0 + description: + RGMII RX path delay used only when PHY operates in RGMII mode with + internal delay (phy-mode is 'rgmii-id' or 'rgmii-rxid') in pico-seco= nds. + + mdio: + $ref: /schemas/net/mdio.yaml# + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - nuvoton,sys + - resets + - reset-names + - phy-mode + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + //Example 1 + gmac0: ethernet@40120000 { + compatible =3D "nuvoton,ma35d1-dwmac"; + reg =3D <0x0 0x40120000 0x0 0x10000>; + interrupts =3D ; + interrupt-names =3D "macirq"; + clocks =3D <&clk EMAC0_GATE>, <&clk EPLL_DIV8>; + clock-names =3D "stmmaceth", "ptp_ref"; + + nuvoton,sys =3D <&sys 0>; + resets =3D <&sys MA35D1_RESET_GMAC0>; + reset-names =3D "stmmaceth"; + + phy-mode =3D "rgmii-id"; + phy-handle =3D <ð_phy0>; + mdio0: mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + eth_phy0: ethernet-phy@0 { + reg =3D <0>; + }; + }; + }; + + - | + //Example 2 + gmac1: ethernet@40130000 { + compatible =3D "nuvoton,ma35d1-dwmac"; + reg =3D <0x0 0x40130000 0x0 0x10000>; + interrupts =3D ; + interrupt-names =3D "macirq"; + clocks =3D <&clk EMAC1_GATE>, <&clk EPLL_DIV8>; + clock-names =3D "stmmaceth", "ptp_ref"; + + nuvoton,sys =3D <&sys 1>; + resets =3D <&sys MA35D1_RESET_GMAC1>; + reset-names =3D "stmmaceth"; + + phy-mode =3D "rmii"; + phy-handle =3D <ð_phy1>; + mdio1: mdio { + compatible =3D "snps,dwmac-mdio"; + #address-cells =3D <1>; + #size-cells =3D <0>; + + eth_phy1: ethernet-phy@1 { + reg =3D <1>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Docume= ntation/devicetree/bindings/net/snps,dwmac.yaml index 4e2ba1bf788c..aecdb3d37b53 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -66,6 +66,7 @@ properties: - ingenic,x2000-mac - loongson,ls2k-dwmac - loongson,ls7a-dwmac + - nuvoton,ma35d1-dwmac - qcom,qcs404-ethqos - qcom,sa8775p-ethqos - qcom,sc8280xp-ethqos --=20 2.34.1