Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp185154pxb; Tue, 12 Apr 2022 21:01:42 -0700 (PDT) X-Google-Smtp-Source: ABdhPJw8ADbDhTba1Kiy3yG99QQ1n8WUxsK3LnSrxpDpXf6kMOyWpj3VwFPBnvuNLKGEJOfanED7 X-Received: by 2002:a05:6402:3604:b0:41c:c4e6:2988 with SMTP id el4-20020a056402360400b0041cc4e62988mr41588420edb.157.1649822502004; Tue, 12 Apr 2022 21:01:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1649822501; cv=none; d=google.com; s=arc-20160816; b=viQBQepiHf+aKd5GVosObxYYsxRS3ToiV5ELiUrBc/z1fKU/puUCPz3pGHNPWekpq6 H/Jb8C6sXXa/PVgf0Dl3/daqvRWxCZttu0CF9vKxWfw8uBU3TQay4a0W9z6yBISVI7Gd ESx54jJdqOo3FreKTtgxrdlBLiEaCNLktvvE+mAJZBDKnCgWUUe3lmNIOKXtwkt8Lj6M Pk4NZmMMAl31Yck0f4b0HFSinULJuE0z+nuaa/pEcM3WTruEKPJAf2bauNzf8Xr77+md MLT7rKb9Py3lO5/JZpKXmpkonNQ3fIjwr/EOahu+HFUAfbNfMQnDd66MwGnAQ7IQLTgv UyAw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:references:in-reply-to:message-id:date:subject :cc:to:from:dkim-signature; bh=cWiDTxPWXtJvNGSaGQVi3ZjY/HAbUitpn0w87jsYEX8=; b=eZ9oVLCv1oV+5JGqAftAMWPsDLng8+ZZT5Vc+9WE2/9ef8HQfjafQ9fiiqIACDc0i5 Q1QSartIhXIPaz3CGrmca5HVjhdOSl31eLBZq2Smy9CFiwaKFTNOIw0UiqvNxvPZvR5O 7y4dV/XjNfqqNStqdbVHyr1VwQ6pq0pyQkT/jQLXCAb3FOvkb9GP+v7ZuiBjCqFEixbw QboyAXBL3hTu7XhIMheBvlIDHeA4/KTd/Zv5TbA0Qp6s9FVxopGzT+01EufCc3x7Lm29 Nek5erQxqKk7OwEBVr2eyR4FIDj9kpOxGgjC/kOZP+SVdterfsGA+BBMuXjiHLb1O2+0 9HkQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E1+vA5lY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id c3-20020a17090620c300b006df76385ee0si9748686ejc.896.2022.04.12.21.01.04; Tue, 12 Apr 2022 21:01:41 -0700 (PDT) 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; dkim=pass header.i=@gmail.com header.s=20210112 header.b=E1+vA5lY; 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; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231709AbiDMCeg (ORCPT + 99 others); Tue, 12 Apr 2022 22:34:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52016 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229767AbiDMCeb (ORCPT ); Tue, 12 Apr 2022 22:34:31 -0400 Received: from mail-pg1-x535.google.com (mail-pg1-x535.google.com [IPv6:2607:f8b0:4864:20::535]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 288E627CD7; Tue, 12 Apr 2022 19:32:11 -0700 (PDT) Received: by mail-pg1-x535.google.com with SMTP id q19so482938pgm.6; Tue, 12 Apr 2022 19:32:11 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=cWiDTxPWXtJvNGSaGQVi3ZjY/HAbUitpn0w87jsYEX8=; b=E1+vA5lY1KjCu1jqN2dFs06LxGSTGv/qAAhNTR2A/NUeuL7NkiCiwTjMKx9gAdlU0B wUmx3KdNwHAuAnErmFveWCm8307MXxqQng10aEai/xTYofIN0foT55/rnHKNoc8b7Jrz /0h435AinW0HRds51gSWzCqIvst617fh6vbw/frc7tU+k+se9lbvjUo6uQqtXjky5m3z Dh43Enz2G5mDrhQ2PH4rBrQ0J5E9AP3+dc0jDpSSam8E1xWIXOc2JyNLvRKF0u+serwh /XCCyTBLEjZNZYhQsbZiQUboK7C6nfdbNXliVj/SuRJTLVE1SZIt9/OHUaJdHgYBCWpg 7LEg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=cWiDTxPWXtJvNGSaGQVi3ZjY/HAbUitpn0w87jsYEX8=; b=irLy8rLDz20cwUYdUvBminLx1Lyfh682R7Es/1liDkZhqIaeo7ifWtm+jvzPZm6lzf etsVa0HkgbjhvCx+RcUuKKUJLL/lc0zaKjTDpn+esE/PnXs918D9RLpDdpZCidBzbESE mKKJcE50Mznk1WXLhqe3VYzqfDKGWvTGa3zo7q1/p1nnGC1w+/HJy5d2BUl2oxlLwpOK lrIedVZvuulv15EXWYIb6S6yK8XNal0F7BgVGtIipduPg2PuInTKkodtSQSagAjKla7d KR67LuMuumOsUYl8GLDqELhlcDEDkNgFgn/c4+RpsL8oCYPsQKRNPmV5uCtZKZbYsSrN em5w== X-Gm-Message-State: AOAM530mUE77U89YtSrr7/gyw1DVE77gJH7lITAevmKKV8APRakxNMWW 59rNFa92rEoqLvKUXQwKpoY= X-Received: by 2002:a63:24d:0:b0:380:ada1:cd4b with SMTP id 74-20020a63024d000000b00380ada1cd4bmr33351477pgc.127.1649817130665; Tue, 12 Apr 2022 19:32:10 -0700 (PDT) Received: from scdiu3.sunplus.com ([113.196.136.192]) by smtp.googlemail.com with ESMTPSA id q28-20020a656a9c000000b00372f7ecfcecsm4255943pgu.37.2022.04.12.19.32.07 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 12 Apr 2022 19:32:10 -0700 (PDT) From: Wells Lu To: davem@davemloft.net, kuba@kernel.org, robh+dt@kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, p.zabel@pengutronix.de, pabeni@redhat.com, krzk+dt@kernel.org, roopa@nvidia.com, andrew@lunn.ch, edumazet@google.com Cc: wells.lu@sunplus.com, Wells Lu Subject: [PATCH net-next v8 1/2] devicetree: bindings: net: Add bindings doc for Sunplus SP7021. Date: Wed, 13 Apr 2022 10:31:57 +0800 Message-Id: <1649817118-14667-2-git-send-email-wellslutw@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1649817118-14667-1-git-send-email-wellslutw@gmail.com> References: <1649817118-14667-1-git-send-email-wellslutw@gmail.com> X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,FREEMAIL_FROM, RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 bindings documentation for Sunplus SP7021 SoC. Reviewed-by: Rob Herring Signed-off-by: Wells Lu --- Changes in v8 - None .../bindings/net/sunplus,sp7021-emac.yaml | 140 +++++++++++++++++++++ MAINTAINERS | 7 ++ 2 files changed, 147 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml diff --git a/Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml b/Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml new file mode 100644 index 0000000..6dc15cd --- /dev/null +++ b/Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml @@ -0,0 +1,140 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright (C) Sunplus Co., Ltd. 2021 +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/sunplus,sp7021-emac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Sunplus SP7021 Dual Ethernet MAC Device Tree Bindings + +maintainers: + - Wells Lu + +description: | + Sunplus SP7021 dual 10M/100M Ethernet MAC controller. + Device node of the controller has following properties. + +properties: + compatible: + const: sunplus,sp7021-emac + + reg: + maxItems: 1 + + interrupts: + maxItems: 1 + + clocks: + maxItems: 1 + + resets: + maxItems: 1 + + ethernet-ports: + type: object + description: Ethernet ports to PHY + + properties: + "#address-cells": + const: 1 + + "#size-cells": + const: 0 + + patternProperties: + "^port@[0-1]$": + type: object + description: Port to PHY + + properties: + reg: + minimum: 0 + maximum: 1 + + phy-handle: + maxItems: 1 + + phy-mode: + maxItems: 1 + + nvmem-cells: + items: + - description: nvmem cell address of MAC address + + nvmem-cell-names: + description: names corresponding to the nvmem cells + items: + - const: mac-address + + required: + - reg + - phy-handle + - phy-mode + - nvmem-cells + - nvmem-cell-names + + mdio: + $ref: mdio.yaml# + unevaluatedProperties: false + +additionalProperties: false + +required: + - compatible + - reg + - interrupts + - clocks + - resets + - pinctrl-0 + - pinctrl-names + - ethernet-ports + - mdio + +examples: + - | + #include + ethernet@9c108000 { + compatible = "sunplus,sp7021-emac"; + reg = <0x9c108000 0x400>; + interrupt-parent = <&intc>; + interrupts = <66 IRQ_TYPE_LEVEL_HIGH>; + clocks = <&clkc 0xa7>; + resets = <&rstc 0x97>; + pinctrl-0 = <&emac_demo_board_v3_pins>; + pinctrl-names = "default"; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + phy-handle = <ð_phy0>; + phy-mode = "rmii"; + nvmem-cells = <&mac_addr0>; + nvmem-cell-names = "mac-address"; + }; + + port@1 { + reg = <1>; + phy-handle = <ð_phy1>; + phy-mode = "rmii"; + nvmem-cells = <&mac_addr1>; + nvmem-cell-names = "mac-address"; + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + + eth_phy0: ethernet-phy@0 { + reg = <0>; + }; + + eth_phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + }; +... diff --git a/MAINTAINERS b/MAINTAINERS index fd768d4..1d54292 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -18869,6 +18869,13 @@ L: netdev@vger.kernel.org S: Maintained F: drivers/net/ethernet/dlink/sundance.c +SUNPLUS ETHERNET DRIVER +M: Wells Lu +L: netdev@vger.kernel.org +S: Maintained +W: https://sunplus.atlassian.net/wiki/spaces/doc/overview +F: Documentation/devicetree/bindings/net/sunplus,sp7021-emac.yaml + SUNPLUS OCOTP DRIVER M: Vincent Shih S: Maintained -- 2.7.4