Received: by 2002:a05:7412:31a9:b0:e2:908c:2ebd with SMTP id et41csp3885332rdb; Thu, 14 Sep 2023 05:57:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IF9/CtdMTjRdtmOm7+IF0SeDhyXUOyOUlaa7lM76G2naDprackCoWJJyDlNilwh0SVdxoRi X-Received: by 2002:a17:90a:d494:b0:271:ae4f:dd15 with SMTP id s20-20020a17090ad49400b00271ae4fdd15mr5302439pju.32.1694696255472; Thu, 14 Sep 2023 05:57:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1694696255; cv=none; d=google.com; s=arc-20160816; b=0d/j1Pygh+LKERY4/aPTAhFx2pOH8+pJ0k2QOOmIANe3+6U5T4EuYT+/s+Jt8IACZc Sev2EXNszNqdnqi2E90ZUmUWdeI8HmuA8bQFjcNuvwP29++Qtx1bj4QOadKnYiNWUJbW y0GwuFGr3D/UOiionSavwAPXKdcHTimz/59IRtPk6hpfxBw/Yf6tGAtz34LjLNimRl6A VMM6gQhuuA/xOi8WMCvJH2az5aHdc+Kw7CuW963diotJ26KK3sbgsznlSIqMRvVRc7n5 AGNLk6gFjA23WmidLX/WyD+vHj+dgZVyi8X+NlJEqNu/aCntPjk4lDL+z8yCBw/QyJfr o5dA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=pYIitMx9g3MKpxiS3F1EWy6vcHj1Wu+TNRC6xmRdLjk=; fh=Y9Y47uS3LEqioxtGf+TJR0dLtSed9digYrJ4gXl+cdE=; b=0emAMKnz9/ANsMh/KCsj5aSF2Kb/XNPo/tVOB+sdsr6wqph7ALlcIXYidQ2Y0eH2Fl 1lHWeqJT0SzSp0kCLSjaELs5fDuWEfKSTKGMBP+qxX36IAlFnjCWpLj3U3WatKrFU83F TlIqZgWSph6iCCvdeYBgsg0g8+GbU5fzxIqCaowoQYUbK/sm4tyjB9VAiV1YNKLvHuaU Zf+19UNzy103dLDnnAh9mknGgHthFLGrf0LB9qwnrOrE4FATphPxRK2FNWEUOiliefF9 Woo9uyIOD2X1xtNfnh+W7zVdeZarSZOFsyEWF5UtWehxAsh2e4kLW80krWwozlkCDOAw KqOw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=IZBzX8Zi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from lipwig.vger.email (lipwig.vger.email. [23.128.96.33]) by mx.google.com with ESMTPS id my14-20020a17090b4c8e00b002744e9b7a22si3307928pjb.9.2023.09.14.05.57.35 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 05:57:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) client-ip=23.128.96.33; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20221208 header.b=IZBzX8Zi; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.33 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by lipwig.vger.email (Postfix) with ESMTP id C29D280AD105; Thu, 14 Sep 2023 04:45:30 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at lipwig.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237327AbjINLpS (ORCPT + 99 others); Thu, 14 Sep 2023 07:45:18 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:38170 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235161AbjINLpQ (ORCPT ); Thu, 14 Sep 2023 07:45:16 -0400 Received: from mail-pl1-x62a.google.com (mail-pl1-x62a.google.com [IPv6:2607:f8b0:4864:20::62a]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3DE799B; Thu, 14 Sep 2023 04:45:12 -0700 (PDT) Received: by mail-pl1-x62a.google.com with SMTP id d9443c01a7336-1bdf4752c3cso6319715ad.2; Thu, 14 Sep 2023 04:45:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20221208; t=1694691911; x=1695296711; 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=pYIitMx9g3MKpxiS3F1EWy6vcHj1Wu+TNRC6xmRdLjk=; b=IZBzX8ZidbxoFreVJap+2hqnscH2X31MkgLhfxAs3zhdTh4Tzl+huHFpaWY6tSPgU8 bRWojsV9gQrf0OEhq+xuZAElZ3IeBralyyQRMVCsSnAfHlpkFfOxcnOGRvo55BjYnH0Y KqAPodxKoYFgj4cUOCPnuFA02rZvPOxfLkOhT8TP2WeqvQCFT7U2CgGEziqkgsZHlCNR REq8TAwJc/YoBFqbDxI2K0H2WKFBXMknyM+L79hmpiLlm7YvNP/qYJKUyZmU/lwCnBVO EfK0h5zUmEyD2ZG9PdqS8lSDrGqdwSa0V1SEXCg+S61LMawjFHnSi0Zhfaihd0gg2KRc YL7A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1694691911; x=1695296711; 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=pYIitMx9g3MKpxiS3F1EWy6vcHj1Wu+TNRC6xmRdLjk=; b=lj19pUlEg0X7p7CyPkVZsaYXzwtUV4cYP4kN3hfHRf657vRef53z1KRnf83Mol2MM4 +iZ81AbQxZ4gNeh/WVTpKR8MeCpyTagM5BkxVon/mE2W2Yb5XxYtALwYcP5t3YuoVBjG /nvdfFL43Q1ghcl0LMH/P0n9Z6DHVUYgd1E/ewjtEqwmU3f5x4tgJDZ4GVyD5ez1CLq9 bBaA7PyzGok3zhRC9UIkbj5CG3mqnnEr056FtzkXkvOsvAEk5Nx7TSQiaXXaY4mQQ8/Q fdc4Q/XfS1IXI2Dj10PrPuanwlOnOAwZFn1nCTX+yZlOO9BENWNPFMcTfkGA/Q12dnve qZfg== X-Gm-Message-State: AOJu0YzhWrV4CiXPAYva8VNE4bl4UOOJhakpdR4GEsBTPMRnqhQPgine 50rTYHn1CZ6obe3nYFd7Uo8oYVrD/lWUmg== X-Received: by 2002:a17:902:7242:b0:1c1:f27e:a55a with SMTP id c2-20020a170902724200b001c1f27ea55amr5022262pll.46.1694691911280; Thu, 14 Sep 2023 04:45:11 -0700 (PDT) Received: from kelvin-ThinkPad-L14-Gen-1.lan ([103.184.129.7]) by smtp.gmail.com with ESMTPSA id h12-20020a170902748c00b001b9cea4e8a2sm1388570pll.293.2023.09.14.04.45.07 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Sep 2023 04:45:10 -0700 (PDT) From: Keguang Zhang To: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-mips@vger.kernel.org, linux-kernel@vger.kernel.org Cc: Lee Jones , Rob Herring , Krzysztof Kozlowski , Conor Dooley , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Thomas Bogendoerfer , Giuseppe Cavallaro , Alexandre Torgue , Jose Abreu , Serge Semin , Keguang Zhang , Krzysztof Kozlowski Subject: [PATCH v5 2/3] dt-bindings: net: Add Loongson-1 Ethernet Controller Date: Thu, 14 Sep 2023 19:44:34 +0800 Message-Id: <20230914114435.481900-3-keguang.zhang@gmail.com> X-Mailer: git-send-email 2.39.2 In-Reply-To: <20230914114435.481900-1-keguang.zhang@gmail.com> References: <20230914114435.481900-1-keguang.zhang@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (lipwig.vger.email [0.0.0.0]); Thu, 14 Sep 2023 04:45:31 -0700 (PDT) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lipwig.vger.email Add devicetree binding document for Loongson-1 Ethernet controller. And modify MAINTAINERS to add a new F: entry for Loongson1 dt-binding documents. Signed-off-by: Keguang Zhang Reviewed-by: Krzysztof Kozlowski --- V4 -> V5: Add a new F: entry for Loongson1 dt-binding documents V3 -> V4: Add "|" to description part Amend "phy-mode" property V2 -> V3: Split the DT-schema file into loongson,ls1b-gmac.yaml and loongson,ls1c-emac.yaml (suggested by Serge Semin) Change the compatibles to loongson,ls1b-gmac and loongson,ls1c-emac Rename loongson,dwmac-syscon to loongson,ls1-syscon Amend the title Add description Add Reviewed-by tag from Krzysztof Kozlowski(Sorry! I'm not sure) V1 -> V2: Fix "clock-names" and "interrupt-names" property Rename the syscon property to "loongson,dwmac-syscon" Drop "phy-handle" and "phy-mode" requirement Revert adding loongson,ls1b-dwmac/loongson,ls1c-dwmac to snps,dwmac.yaml .../bindings/net/loongson,ls1b-gmac.yaml | 114 ++++++++++++++++++ .../bindings/net/loongson,ls1c-emac.yaml | 113 +++++++++++++++++ MAINTAINERS | 1 + 3 files changed, 228 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml create mode 100644 Documentation/devicetree/bindings/net/loongson,ls1c-emac.yaml diff --git a/Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml b/Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml new file mode 100644 index 000000000000..c4f3224bad38 --- /dev/null +++ b/Documentation/devicetree/bindings/net/loongson,ls1b-gmac.yaml @@ -0,0 +1,114 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/loongson,ls1b-gmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson-1B Gigabit Ethernet MAC Controller + +maintainers: + - Keguang Zhang + +description: | + Loongson-1B Gigabit Ethernet MAC Controller is based on + Synopsys DesignWare MAC (version 3.50a). + + Main features + - Dual 10/100/1000Mbps GMAC controllers + - Full-duplex operation (IEEE 802.3x flow control automatic transmission) + - Half-duplex operation (CSMA/CD Protocol and back-pressure support) + - RX Checksum Offload + - TX Checksum insertion + - MII interface + - RGMII interface + +select: + properties: + compatible: + contains: + enum: + - loongson,ls1b-gmac + required: + - compatible + +properties: + compatible: + items: + - enum: + - loongson,ls1b-gmac + - const: snps,dwmac-3.50a + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: stmmaceth + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: macirq + + loongson,ls1-syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon containing some extra configurations + including PHY interface mode. + + phy-mode: + enum: + - mii + - rgmii-id + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + - loongson,ls1-syscon + +allOf: + - $ref: snps,dwmac.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + gmac0: ethernet@1fe10000 { + compatible = "loongson,ls1b-gmac", "snps,dwmac-3.50a"; + reg = <0x1fe10000 0x10000>; + + clocks = <&clkc LS1X_CLKID_AHB>; + clock-names = "stmmaceth"; + + interrupt-parent = <&intc1>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq"; + + loongson,ls1-syscon = <&syscon>; + + phy-handle = <&phy0>; + phy-mode = "mii"; + snps,pbl = <1>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + phy0: ethernet-phy@0 { + reg = <0x0>; + }; + }; + }; diff --git a/Documentation/devicetree/bindings/net/loongson,ls1c-emac.yaml b/Documentation/devicetree/bindings/net/loongson,ls1c-emac.yaml new file mode 100644 index 000000000000..99001b940b83 --- /dev/null +++ b/Documentation/devicetree/bindings/net/loongson,ls1c-emac.yaml @@ -0,0 +1,113 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/loongson,ls1c-emac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Loongson-1C Ethernet MAC Controller + +maintainers: + - Keguang Zhang + +description: | + Loongson-1C Ethernet MAC Controller is based on + Synopsys DesignWare MAC (version 3.50a). + + Main features + - 10/100Mbps + - Full-duplex operation (IEEE 802.3x flow control automatic transmission) + - Half-duplex operation (CSMA/CD Protocol and back-pressure support) + - IEEE 802.1Q VLAN tag detection for reception frames + - MII interface + - RMII interface + +select: + properties: + compatible: + contains: + enum: + - loongson,ls1c-emac + required: + - compatible + +properties: + compatible: + items: + - enum: + - loongson,ls1c-emac + - const: snps,dwmac-3.50a + + reg: + maxItems: 1 + + clocks: + maxItems: 1 + + clock-names: + items: + - const: stmmaceth + + interrupts: + maxItems: 1 + + interrupt-names: + items: + - const: macirq + + loongson,ls1-syscon: + $ref: /schemas/types.yaml#/definitions/phandle + description: + Phandle to the syscon containing some extra configurations + including PHY interface mode. + + phy-mode: + enum: + - mii + - rmii + +required: + - compatible + - reg + - clocks + - clock-names + - interrupts + - interrupt-names + - loongson,ls1-syscon + +allOf: + - $ref: snps,dwmac.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + + emac: ethernet@1fe10000 { + compatible = "loongson,ls1c-emac", "snps,dwmac-3.50a"; + reg = <0x1fe10000 0x10000>; + + clocks = <&clkc LS1X_CLKID_AHB>; + clock-names = "stmmaceth"; + + interrupt-parent = <&intc1>; + interrupts = <2 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "macirq"; + + loongson,ls1-syscon = <&syscon>; + + phy-handle = <&phy0>; + phy-mode = "mii"; + snps,pbl = <1>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + phy0: ethernet-phy@13 { + reg = <0x13>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index fa7487b7729b..e514b53fb225 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -14379,6 +14379,7 @@ MIPS/LOONGSON1 ARCHITECTURE M: Keguang Zhang L: linux-mips@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/*/loongson,ls1*.yaml F: arch/mips/include/asm/mach-loongson32/ F: arch/mips/loongson32/ F: drivers/*/*loongson1* -- 2.39.2