Received: by 2002:a05:6358:16cc:b0:ea:6187:17c9 with SMTP id r12csp1735343rwl; Thu, 5 Jan 2023 19:06:59 -0800 (PST) X-Google-Smtp-Source: AMrXdXuY5IaYDIFjzref0jHP1vhzJ5aj1++cQDHnSiygppkS6PglkaUKtnjfGVjzWHHGheX0sKyi X-Received: by 2002:a17:906:260e:b0:7c1:9046:878a with SMTP id h14-20020a170906260e00b007c19046878amr45754042ejc.38.1672974419622; Thu, 05 Jan 2023 19:06:59 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1672974419; cv=none; d=google.com; s=arc-20160816; b=wz3jgdjrGX1ZS/aznhSDmrGtvtxSbhpgJdlQ9t868nCdFd4v83SXLGH/orhB6Xjn3+ Mq4I9kvWORiGLlC2PviJTRB0dCS78eYkqx60rHtGyiWcieJ80uQvt2RXr4dGS/Q/n+jr pOhTeCAkEGfKz0H7xKOaytzwuWFNXcqwUtj0Sn64UtFmaIIHxjM1eiGxIVRZoenei24G 72fNeRBUsQ54num2X4lne+f+eXzU8+EuQWMBXRDUJ7fPUqnd2Wxv4Kr3OLklOVSNHvxU mZQW13sCWoWzxeI/2LZ4qfxKHBZD4zNTJ14Wjf3JEvjA0UDTmWMOSp+aeu0FDf0yPwNW iGgg== 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=5WFpvuLviUbQx6a8+rn8gbAC2mQLCd4G6z877A1kYks=; b=p21FtUUGrb0sP/MpTOVKThF1QnrN/p9dUjXHTGwgJCHG21gj6aONAr7HYGJr0JWdKr HHTeXRcSlw7AqOPMzUiqfD7m15hlhu0aRajkqfMKj+Wf4120fNzyDxuIxoBB78ptae7P HBuZEVH4IvQnNR4ronsDPddKV+fLP8wFCcACOqdMsCebc71jOVJ8mF4cvkquIGkOwh8f xhAjQ6fgZwB14+l0l5wkd3NQ6/z9yBFNvMz6vhZhO7idg0zTejAeqB7A9rHTpv1csKFP jld2mGny0HTlyailx+ktsR4REUxvXyF94A5X0NR+Bn1iow5KZr/qSz/IqHZNtMVGRro4 d7Fw== 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 bb11-20020a1709070a0b00b0078db371355esi32672457ejc.987.2023.01.05.19.06.46; Thu, 05 Jan 2023 19:06:59 -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 S230159AbjAFDAm (ORCPT + 56 others); Thu, 5 Jan 2023 22:00:42 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53526 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229931AbjAFDAO (ORCPT ); Thu, 5 Jan 2023 22:00:14 -0500 Received: from fd01.gateway.ufhost.com (fd01.gateway.ufhost.com [61.152.239.71]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 4E88C6719F; Thu, 5 Jan 2023 19:00:10 -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 689A924E020; Fri, 6 Jan 2023 11:00:07 +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, 6 Jan 2023 11:00:07 +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, 6 Jan 2023 11:00:05 +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 v3 4/7] dt-bindings: net: Add support StarFive dwmac Date: Fri, 6 Jan 2023 10:59:58 +0800 Message-ID: <20230106030001.1952-5-yanhong.wang@starfivetech.com> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20230106030001.1952-1-yanhong.wang@starfivetech.com> References: <20230106030001.1952-1-yanhong.wang@starfivetech.com> MIME-Version: 1.0 Content-Type: text/plain X-Originating-IP: [171.223.208.138] X-ClientProxiedBy: EXCAS066.cuchost.com (172.16.6.26) 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,jh7110-dwmac.yaml | 113 ++++++++++++++++++ MAINTAINERS | 5 + 3 files changed, 119 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index f7693e8c8d6d..2542f3a0538c 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,jh7110-dwmac.yaml b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml new file mode 100644 index 000000000000..eb0767da834a --- /dev/null +++ b/Documentation/devicetree/bindings/net/starfive,jh7110-dwmac.yaml @@ -0,0 +1,113 @@ +# 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,jh7110-dwmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: StarFive JH7110 DWMAC glue layer + +maintainers: + - Yanhong Wang + +select: + properties: + compatible: + contains: + enum: + - starfive,jh7110-dwmac + required: + - compatible + +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 + + resets: + items: + - description: MAC Reset signal. + - description: AHB Reset signal. + + reset-names: + items: + - const: stmmaceth + - const: ahb + +allOf: + - $ref: snps,dwmac.yaml# + +unevaluatedProperties: true + +required: + - compatible + - clocks + - clock-names + - resets + - reset-names + +examples: + - | + 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>; + }; + }; + + 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>; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index a70c1d0f303e..56be59bb09f7 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,jh7110-dwmac.yaml + STARFIVE PINCTRL DRIVER M: Emil Renner Berthing M: Jianlong Huang -- 2.17.1