Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp2283707rwb; Thu, 15 Dec 2022 23:14:20 -0800 (PST) X-Google-Smtp-Source: AA0mqf4IHhVSeDB00v0gVbYpIlOWgk84qUe9h4RRAMCcFdcc/ti08RC3tiPxBBHNuHUAsUw/1U5F X-Received: by 2002:a17:90a:6f46:b0:219:8144:7965 with SMTP id d64-20020a17090a6f4600b0021981447965mr32340396pjk.17.1671174860229; Thu, 15 Dec 2022 23:14:20 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1671174860; cv=none; d=google.com; s=arc-20160816; b=vnM4KuGkVi62x6xcTiQUhZSH9+n3ns6EINesBfzYHykGjLtTpQlmLaSY0vLXHAX8Ys 68pLRyrAFAAJx1L3oz1gVzioNllJCXRvv3UDIlFddBmIExs2IkAJ4vAeyMuRO/ML/OHG hJqPyZc9zT1H4YUWoJyo//7HiXgTN3vUoAXRU1k6AmxNeivDRaY2ChoSh4asgUDKYGwW wpmu/MRdZ6sciNOZtNRj1cTtM4d1E05au9sxzBN7xAGLGH4tT5qoxRUfKAAJqx1SN1Ca 3yWDDOCPI9FZA4HV413qn5okD6UxBOq1oboJTqB5dgwCIH55jPKkfXBYW6qqvvyC7rT1 ucdw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from; bh=xDk1053LU2HdYeLi/22G1OPJ0n0WKJ0ad5MDQ4wd4IM=; b=u/iZDJHUarJvIBc2HGLlll1usR+qBBMqSF8iXm3psGVf1fD7CGGGjCj+udHwcmi6s2 ePyncubn/a9LsfYxU7VfQWsuudNkLZdI8ZS1gwSuYurrQJ0F0stcs5ELRMMvFLgECpCb o2la7FfkIgt8OOpBMB9YTtnCQ+d/5T8bLbFixi+qiLjx/u8mAmr1kXQFgkukXEYpIYHX J6aFyRR3O6yifYs3YF1TEBImQ+uAzEzJWkMzgnTgn85GhNcqlRIHqxkGAbmvwvxmhEE5 aaq9UyoT1UANoFMA343oMJfv0B+r0NVJiSJ2fQI0Zir3MYurJYsBeqMZjZLK9ijz+Aeh TDMg== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id o24-20020a17090a5b1800b0021924a18b39si1505626pji.96.2022.12.15.23.14.11; Thu, 15 Dec 2022 23:14:20 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229952AbiLPHFx (ORCPT + 70 others); Fri, 16 Dec 2022 02:05:53 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35390 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229504AbiLPHFp (ORCPT ); Fri, 16 Dec 2022 02:05:45 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 24A8563FD; Thu, 15 Dec 2022 23:05:42 -0800 (PST) Received: from EXMBX166.cuchost.com (unknown [175.102.18.54]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "EXMBX166", Issuer "EXMBX166" (not verified)) by fd01.gateway.ufhost.com (Postfix) with ESMTP id AED8C24E38B; Fri, 16 Dec 2022 15:05:41 +0800 (CST) Received: from EXMBX173.cuchost.com (172.16.6.93) by EXMBX166.cuchost.com (172.16.6.76) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 16 Dec 2022 15:05:41 +0800 Received: from wyh-VirtualBox.starfivetech.com (171.223.208.138) by EXMBX173.cuchost.com (172.16.6.93) with Microsoft SMTP Server (TLS) id 15.0.1497.42; Fri, 16 Dec 2022 15:05:40 +0800 From: Yanhong Wang To: , , , CC: "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Emil Renner Berthing , Richard Cochran , Andrew Lunn , Heiner Kallweit , Peter Geis , Yanhong Wang Subject: [PATCH v2 4/9] dt-bindings: net: Add bindings for StarFive dwmac Date: Fri, 16 Dec 2022 15:06:27 +0800 Message-ID: <20221216070632.11444-5-yanhong.wang@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20221216070632.11444-1-yanhong.wang@starfivetech.com> References: <20221216070632.11444-1-yanhong.wang@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS064.cuchost.com (172.16.6.24) To EXMBX173.cuchost.com (172.16.6.93) X-YovoleRuleAgent: yovoleflag X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H2, SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Add documentation to describe StarFive dwmac driver(GMAC). Signed-off-by: Yanhong Wang --- .../devicetree/bindings/net/snps,dwmac.yaml | 1 + .../bindings/net/starfive,jh71x0-dwmac.yaml | 103 ++++++++++++++++++ MAINTAINERS | 5 + 3 files changed, 109 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/starfive,jh71x0-dwmac.yaml diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 7870228b4cd3..cdb045d1c618 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -91,6 +91,7 @@ properties: - snps,dwmac-5.20 - snps,dwxgmac - snps,dwxgmac-2.10 + - starfive,jh7110-dwmac reg: minItems: 1 diff --git a/Documentation/devicetree/bindings/net/starfive,jh71x0-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh71x0-dwmac.yaml new file mode 100644 index 000000000000..5cb1272fe959 --- /dev/null +++ b/Documentation/devicetree/bindings/net/starfive,jh71x0-dwmac.yaml @@ -0,0 +1,103 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) 2022 StarFive Technology Co., Ltd. +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/starfive,jh71x0-dwmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JH71x0 DWMAC glue layer + +maintainers: + - Yanhong Wang + +select: + properties: + compatible: + contains: + enum: + - starfive,jh7110-dwmac + required: + - compatible + +allOf: + - $ref: snps,dwmac.yaml# + +properties: + compatible: + items: + - enum: + - starfive,jh7110-dwmac + - const: snps,dwmac-5.20 + + clocks: + items: + - description: GMAC main clock + - description: GMAC AHB clock + - description: PTP clock + - description: TX clock + - description: GTXC clock + - description: GTX clock + + clock-names: + items: + - const: stmmaceth + - const: pclk + - const: ptp_ref + - const: tx + - const: gtxc + - const: gtx + +required: + - compatible + - clocks + - clock-names + - resets + - reset-names + +unevaluatedProperties: false + +examples: + - | + stmmac_axi_setup: stmmac-axi-config { + snps,lpi_en; + snps,wr_osr_lmt = <4>; + snps,rd_osr_lmt = <4>; + snps,blen = <256 128 64 32 0 0 0>; + }; + + gmac0: ethernet@16030000 { + compatible = "starfive,jh7110-dwmac", "snps,dwmac-5.20"; + reg = <0x16030000 0x10000>; + clocks = <&clk 3>, <&clk 2>, <&clk 109>, + <&clk 5>, <&clk 111>, <&clk 108>; + clock-names = "stmmaceth", "pclk", "ptp_ref", + "tx", "gtxc", "gtx"; + resets = <&rst 1>, <&rst 2>; + reset-names = "stmmaceth", "ahb"; + interrupts = <7>, <6>, <5>; + interrupt-names = "macirq", "eth_wake_irq", "eth_lpi"; + phy-mode = "rgmii-id"; + snps,multicast-filter-bins = <64>; + snps,perfect-filter-entries = <8>; + rx-fifo-depth = <2048>; + tx-fifo-depth = <2048>; + snps,fixed-burst; + snps,no-pbl-x8; + snps,tso; + snps,force_thresh_dma_mode; + snps,axi-config = <&stmmac_axi_setup>; + snps,en-tx-lpi-clockgating; + snps,txpbl = <16>; + snps,rxpbl = <16>; + phy-handle = <&phy0>; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index a70c1d0f303e..166b0009f63c 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -19606,6 +19606,11 @@ F: Documentation/devicetree/bindings/clock/starfive* F: drivers/clk/starfive/ F: include/dt-bindings/clock/starfive* +STARFIVE DWMAC GLUE LAYER +M: Yanhong Wang +S: Maintained +F: Documentation/devicetree/bindings/net/starfive,jh71x0-dwmac.yaml + STARFIVE PINCTRL DRIVER M: Emil Renner Berthing M: Jianlong Huang -- 2.17.1