From patchwork Tue May 23 21:53:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 98194 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:b0ea:0:b0:3b6:4342:cba0 with SMTP id b10csp2453694vqo; Tue, 23 May 2023 15:25:20 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5c+rfFTWqerhLFQHot9antLjV6nVOOOc/ut6IpurTiwz0/N6OAuQrpIN3NmufyAgzSUR2J X-Received: by 2002:a05:6a20:258e:b0:101:5037:7542 with SMTP id k14-20020a056a20258e00b0010150377542mr17895083pzd.10.1684880719889; Tue, 23 May 2023 15:25:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684880719; cv=none; d=google.com; s=arc-20160816; b=LyNM9QMAQ5FKpfSZsA2BB139vsxer9ev7Gl2zbYBVChS8I7yP0fctKfN7wWqMsdMaM 5/a/qDRm73BPlIBr5BVFYoWpgBdMRti9auvlB1leyI5qbM3TTwhi/4jMyvHCJRFtj7jn AQX4ZMTTA4ANtxbF99UWuMTAVRTS9PV75i9en3N21pAwtAa93N03Dy1Llx2rOEBx/bnh 0UvhwKbpELy4Jf8Mmg4wiV5lHJrgV9H3hOGVUqXH6Rem6xQwinYxIrYmG+VL16+mtoJw d4BpbomV9ZSnTVY9+GJCFUGj0Cp+lDzfPHxxrg+6WF7sRFY91QByvl6BkpE66kRrFkBl E3KA== 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=aUZmayXr6lOcW/0UzamRikvAlWBbNA3J2k2unJN1ANA=; b=H4awl+LOqzUPlipBltw8yVF5mww6izFgOJlEq7XK7chyie364ilEPhxRhKw4BRCCkc GUKsOgOSNnq8G3SV8LAkMEHaTXxyjSTbCLw47DM00VhDWwi3rqwlpDUsguv6/3Pi5HNJ TwIo26xbzCTTZDLDD50Oz5k1DE+F/VsDBJ4k5eNYb/U5xOanVZehsGnHUAOfYvfiONY/ W1N7v075goRBQ8o7WbT9Rlqv38nhH0kvLg6msp4EiKVDT0zgAbO6ZsLedqx3mXsgI0Vo h6v4sxSWRcAltJd7KP421iKYEns7OGVOl2iTWx0gpk120Id0/mRCxbZmPUEwrJpbWaoZ s+kQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=NNgzzDmZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a187-20020a6390c4000000b0053ef469281bsi1512422pge.474.2023.05.23.15.25.07; Tue, 23 May 2023 15:25:19 -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=@broadcom.com header.s=google header.b=NNgzzDmZ; 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=QUARANTINE sp=QUARANTINE dis=NONE) header.from=broadcom.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238749AbjEWVyF (ORCPT + 99 others); Tue, 23 May 2023 17:54:05 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44624 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238743AbjEWVyB (ORCPT ); Tue, 23 May 2023 17:54:01 -0400 Received: from mail-pf1-x42b.google.com (mail-pf1-x42b.google.com [IPv6:2607:f8b0:4864:20::42b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E2ECBBF for ; Tue, 23 May 2023 14:53:59 -0700 (PDT) Received: by mail-pf1-x42b.google.com with SMTP id d2e1a72fcca58-64d41d8bc63so35147b3a.0 for ; Tue, 23 May 2023 14:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1684878839; x=1687470839; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=aUZmayXr6lOcW/0UzamRikvAlWBbNA3J2k2unJN1ANA=; b=NNgzzDmZRPvpYNE6bs4Pb6jJVQAJjmq/O2vXlVmHsFNrjqW19nn/u63at16sealT+r Pp0rZzN3n/nfJNevI9+opw+V2YmpADmlViT8Yypm37GFwJK+z70PHFYoOdMD6JuSVeQa BYDh6wNwtq+f3l7XtMO0xbsfa0Tac+rgK6ob0= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684878839; x=1687470839; h=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=aUZmayXr6lOcW/0UzamRikvAlWBbNA3J2k2unJN1ANA=; b=aBWhe1R9ix5ahUNXangb3zHE9NipbiVspJ+mBN3qjKBW25CVSgFWNpoTslHjI3q1NV 6c7qkPjqI/H01oWbhXqckkrIWkLEumvZG+a7qPGGfKwJ6P5dPrOFwKCEaU3pD9bvu1X6 3IkJUI42+4+cNxkyHpLK3cEtqtavE8ikHFxow2NP7cbtZNQOX2lwCVT5N/7zU464p0HC fLnAOVgHklevu1RvPntIGg3rLmwvhufW3Bde91iYP2m4ydV5cj4pGfyFQTpThOE0z3Eb yU9Kvq8W4V+EP3U6nf2whkFAK1mAriE+d+feHB5Jes/qnrxpl5LvmS+tcWFxhUnTXiIt 9rrg== X-Gm-Message-State: AC+VfDw/CWqZYShQCJUtjM9NhKOGe/ImP9Mv9Okkyjx75R9gbpJWwHw6 snJnBmj7N0kBYD/zfW2JhzqHTg== X-Received: by 2002:a17:902:d2c2:b0:1ac:b4db:6a62 with SMTP id n2-20020a170902d2c200b001acb4db6a62mr16196725plc.65.1684878839320; Tue, 23 May 2023 14:53:59 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id e4-20020a170902744400b001ae62d7cb2bsm7189820plt.199.2023.05.23.14.53.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2023 14:53:59 -0700 (PDT) From: Justin Chen To: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, bcm-kernel-feedback-list@broadcom.com Cc: justinpopo6@gmail.com, justin.chen@broadcom.com, f.fainelli@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, opendmb@gmail.com, andrew@lunn.ch, hkallweit1@gmail.com, linux@armlinux.org.uk, richardcochran@gmail.com, sumit.semwal@linaro.org, christian.koenig@amd.com, conor@kernel.org, simon.horman@corigine.com, Florian Fainelli Subject: [PATCH net-next v4 2/6] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Tue, 23 May 2023 14:53:43 -0700 Message-Id: <1684878827-40672-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1684878827-40672-1-git-send-email-justin.chen@broadcom.com> References: <1684878827-40672-1-git-send-email-justin.chen@broadcom.com> X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, MIME_HEADER_CTYPE_ONLY,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_NONE, T_SCC_BODY_TEXT_LINE,T_TVD_MIME_NO_HEADERS,URIBL_BLOCKED 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 X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766725485488524383?= X-GMAIL-MSGID: =?utf-8?q?1766725485488524383?= From: Florian Fainelli Add a binding document for the Broadcom ASP 2.0 Ethernet controller. Signed-off-by: Florian Fainelli Signed-off-by: Justin Chen --- v3 - Adjust compatible string example to reference SoC and HW ver v3 - Minor formatting issues - Change channel prop to brcm,channel for vendor specific format - Removed redundant v2.0 from compat string - Fix ranges field v2 - Minor formatting issues .../devicetree/bindings/net/brcm,asp-v2.0.yaml | 145 +++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml diff --git a/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml new file mode 100644 index 000000000000..07f7373b9d64 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml @@ -0,0 +1,145 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/brcm,asp-v2.0.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Broadcom ASP 2.0 Ethernet controller + +maintainers: + - Justin Chen + - Florian Fainelli + +description: Broadcom Ethernet controller first introduced with 72165 + +properties: + '#address-cells': + const: 1 + '#size-cells': + const: 1 + + compatible: + enum: + - brcm,asp-v2.0 + - brcm,bcm72165-asp + - brcm,asp-v2.1 + - brcm,bcm74165-asp + + reg: + maxItems: 1 + + ranges: true + + interrupts: + minItems: 1 + items: + - description: RX/TX interrupt + - description: Port 0 Wake-on-LAN + - description: Port 1 Wake-on-LAN + + clocks: + maxItems: 1 + + ethernet-ports: + type: object + properties: + '#address-cells': + const: 1 + '#size-cells': + const: 0 + + patternProperties: + "^port@[0-9]+$": + type: object + + $ref: ethernet-controller.yaml# + + properties: + reg: + maxItems: 1 + description: Port number + + brcm,channel: + $ref: /schemas/types.yaml#/definitions/uint32 + description: ASP channel number + + required: + - reg + - brcm,channel + + additionalProperties: false + +patternProperties: + "^mdio@[0-9a-f]+$": + type: object + $ref: brcm,unimac-mdio.yaml + + description: + ASP internal UniMAC MDIO bus + +required: + - compatible + - reg + - interrupts + - clocks + - ranges + +additionalProperties: false + +examples: + - | + #include + #include + + ethernet@9c00000 { + compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0"; + reg = <0x9c00000 0x1fff14>; + interrupts = ; + ranges = <0x0 0x9c00000 0x1fff14>; + clocks = <&scmi 14>; + #address-cells = <1>; + #size-cells = <1>; + + mdio@c614 { + compatible = "brcm,asp-v2.0-mdio"; + reg = <0xc614 0x8>; + reg-names = "mdio"; + #address-cells = <1>; + #size-cells = <0>; + + phy0: ethernet-phy@1 { + reg = <1>; + }; + }; + + mdio@ce14 { + compatible = "brcm,asp-v2.0-mdio"; + reg = <0xce14 0x8>; + reg-names = "mdio"; + #address-cells = <1>; + #size-cells = <0>; + + phy1: ethernet-phy@1 { + reg = <1>; + }; + }; + + ethernet-ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + brcm,channel = <8>; + phy-mode = "rgmii"; + phy-handle = <&phy0>; + }; + + port@1 { + reg = <1>; + brcm,channel = <9>; + phy-mode = "rgmii"; + phy-handle = <&phy1>; + }; + }; + };