Message ID | 1684969313-35503-3-git-send-email-justin.chen@broadcom.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c790:0:b0:3b6:ef29:a0d7 with SMTP id b16csp4426vqu; Wed, 24 May 2023 16:28:14 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7aK98uyZPLhWJAXcKmN1lwIYYoXOD9CymW6zQlU0SRi9ek+yvQBBffRuA7+d9o+TrojLJI X-Received: by 2002:a17:90a:fc92:b0:24e:243b:8735 with SMTP id ci18-20020a17090afc9200b0024e243b8735mr902910pjb.13.1684970894377; Wed, 24 May 2023 16:28:14 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1684970894; cv=none; d=google.com; s=arc-20160816; b=lqB4zXoRHWzFnh+cxlRm7kl1oV/am9+5tzKtAvkbHKY+KZ9fkn8hZC3BJ+6tbjmD4z drS16PJE49BGxig/x2XEld4dStDraMsELpADrPJyC1f3jbNH4ZZM4QOOZSPSDvh3uXEl P7hGvkwSAc/vW5GhDciUgJ9o+UlrBtzagJgDVJyOmEtW8z9ZX80Y5TB8+YAhONZJFQ9b RicUFIgO0dVuhp+wJ3gLxVOhgljyLwSu2s0Ao8JjstELkbwdfsE9OKk5Rk4iyT+s3AkQ ZowezVTJLSQQ8cXhU+F6d3WNolAPiekwwozSiQCXn4+CdWKNkUgtCSAQ9/c2sU4rJGZl HlcQ== 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=oklOrFw/54QSZPdabhs59ehcXeHLVsCnPbFQzk6qx8g=; b=pyILUzLH/LEapCqlauzjHRPBQDR7sBYZX9w+aqT6mVMuwT/Vw+nFXi7JlLucqffX8j MiAGK/BK0LZgvISdM+NPVs2MIsm/h6rL5TivpuoITVnJBKGfYSQ2kWGKmoTIb5h1+73n b+mvNVQRlRo2Zm4zlAThRLJBF0czh31Sh1O4/ttKeeVD+mpenwrP4i3sSSro7k8npVg4 ZqpVkl2RYdM6EO9ODrO4jbb2kpw/CPZEDQB4bkdaEvQjFrgm0oj+5udXXJVtA0UUXBpj +zTxbmgF6+/QLsNW8tv66SkfSsAucwMkOcrpH0AjalnCVJYqaiSuk8itYzfIKlN/sTm7 6FUA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=YmX6VbVi; 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 o69-20020a17090a0a4b00b002475696c010si83025pjo.129.2023.05.24.16.27.59; Wed, 24 May 2023 16:28:14 -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=YmX6VbVi; 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 S238568AbjEXXCQ (ORCPT <rfc822;ahmedalshaiji.dev@gmail.com> + 99 others); Wed, 24 May 2023 19:02:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45246 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236131AbjEXXCJ (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Wed, 24 May 2023 19:02:09 -0400 Received: from mail-pl1-x632.google.com (mail-pl1-x632.google.com [IPv6:2607:f8b0:4864:20::632]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55B3B186 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 16:02:07 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1afbc02c602so2791955ad.1 for <linux-kernel@vger.kernel.org>; Wed, 24 May 2023 16:02:07 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1684969327; x=1687561327; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=oklOrFw/54QSZPdabhs59ehcXeHLVsCnPbFQzk6qx8g=; b=YmX6VbVildHxDvokidjU/3c/FZVdbQJcjMbUo6vXmpaquxKLCKdhKBnr10GEyw4Z2X 7Ic6wYe/EGvhg67fIbTjS20Nfkk4hU7xrW+xkdQyDnSdFWu+KaBAm9lLKXjUo4V0CeoQ hw9skBpplWh7JcfE2UXsFRyZIF3FspjNNFQQQ= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684969327; x=1687561327; 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=oklOrFw/54QSZPdabhs59ehcXeHLVsCnPbFQzk6qx8g=; b=Zy03uDxoBhw5FZbxPSj39mBl4T8k9TLAeMsvsaDzyAyfzTpq7cgh/+CEvUScGn7pEo 4gdRG4JpakvCu6nMVQJZLJmX5iRqC4Weou1AGuXSprptu8iVz1FDWDtsfv1KhecLS7sI UiBabyVDeEalEFv2a+N4e5DejinmTmGcgW+Gy1GA0QXJ4yVqBUsxld2SpYv+kCNkVXKP DGr3TrkTE0xofzleHtI+LWXu55LvGWFL7zhKAG7lBEeQ6EN/lk8+9JSePRBPO2H+3Zm9 9mUrp4snnatES23Ig5QCl81d/4iTBR5Wsu/LRmxLeIW3+Ii5suYoI7yAH2Kbtog9cu06 5q4g== X-Gm-Message-State: AC+VfDwxWWnxzs3MbIhMLuiy8N3uQZOCGIcqLrVAuvnC9grOiwXKKm2C m+i/GM2Ocy4yMESCSs9Yvks3BA== X-Received: by 2002:a17:903:185:b0:1af:bae0:6be7 with SMTP id z5-20020a170903018500b001afbae06be7mr785609plg.10.1684969326590; Wed, 24 May 2023 16:02:06 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id j10-20020a17090ae60a00b00246774a9addsm1789889pjy.48.2023.05.24.16.02.04 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 24 May 2023 16:02:06 -0700 (PDT) From: Justin Chen <justin.chen@broadcom.com> 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: justin.chen@broadcom.com, florian.fainelli@broadcom.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.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, simon.horman@corigine.com Subject: [PATCH net-next v5 2/6] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Wed, 24 May 2023 16:01:49 -0700 Message-Id: <1684969313-35503-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1684969313-35503-1-git-send-email-justin.chen@broadcom.com> References: <1684969313-35503-1-git-send-email-justin.chen@broadcom.com> Content-Type: multipart/signed; protocol="application/pkcs7-signature"; micalg=sha-256; boundary="000000000000330f1205fc787e04" 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 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: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1766820040539094635?= X-GMAIL-MSGID: =?utf-8?q?1766820040539094635?= |
Series |
Brcm ASP 2.0 Ethernet Controller
|
|
Commit Message
Justin Chen
May 24, 2023, 11:01 p.m. UTC
From: Florian Fainelli <florian.fainelli@broadcom.com> Add a binding document for the Broadcom ASP 2.0 Ethernet controller. Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> Signed-off-by: Justin Chen <justin.chen@broadcom.com> --- v5 - Fix compatible string yaml format to properly capture what we want v4 - 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 | 149 +++++++++++++++++++++ 1 file changed, 149 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml
Comments
On Wed, May 24, 2023 at 04:01:49PM -0700, Justin Chen wrote: > From: Florian Fainelli <florian.fainelli@broadcom.com> > > Add a binding document for the Broadcom ASP 2.0 Ethernet > controller. > > Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> > Signed-off-by: Justin Chen <justin.chen@broadcom.com> > --- > v5 > - Fix compatible string yaml format to properly capture what we want > > v4 > - 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 | 149 +++++++++++++++++++++ > 1 file changed, 149 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..c4cd24492bfd > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml > @@ -0,0 +1,149 @@ > +# 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 <justin.chen@broadcom.com> > + - Florian Fainelli <florian.fainelli@broadcom.com> > + > +description: Broadcom Ethernet controller first introduced with 72165 > + > +properties: > + '#address-cells': > + const: 1 > + '#size-cells': > + const: 1 > + > + compatible: > + oneOf: > + - items: > + - enum: > + - brcm,bcm74165-asp > + - const: brcm,asp-v2.1 > + - items: > + - enum: > + - brcm,bcm72165-asp > + - const: brcm,asp-v2.0 Sorry if I did not notice this before, conventionally compatible goes first here. IFF there is another version, could you shuffle things around? Otherwise, Reviewed-by: Conor Dooley <conor.dooley@microchip.com> Thanks, Conor.
On 25/05/2023 01:01, Justin Chen wrote: > From: Florian Fainelli <florian.fainelli@broadcom.com> > > Add a binding document for the Broadcom ASP 2.0 Ethernet > controller. > > Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> > Signed-off-by: Justin Chen <justin.chen@broadcom.com> > --- > v5 > - Fix compatible string yaml format to properly capture what we want > > v4 > - 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 | 149 +++++++++++++++++++++ > 1 file changed, 149 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..c4cd24492bfd > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml > @@ -0,0 +1,149 @@ > +# 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 <justin.chen@broadcom.com> > + - Florian Fainelli <florian.fainelli@broadcom.com> > + > +description: Broadcom Ethernet controller first introduced with 72165 > + > +properties: > + '#address-cells': Judging by more comments, there will be a v6, thus please also use consistent quotes - either ' or ". > + const: 1 > + '#size-cells': > + const: 1 > + > + compatible: As Conor pointed out, compatible is always first. > + oneOf: > + - items: > + - enum: > + - brcm,bcm74165-asp > + - const: brcm,asp-v2.1 > + - items: > + - enum: > + - brcm,bcm72165-asp > + - const: brcm,asp-v2.0 > + > + 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 Why do you need it? reg defines it. Your description does not explain here much, except copying property name. Can we please avoid descriptions which just copy name? > + > + required: > + - reg > + - brcm,channel > + > + additionalProperties: false > + > +patternProperties: > + "^mdio@[0-9a-f]+$": Isn't mdio a property of each ethernet port? Existing users (e.g.bcmgenet, owl-emac, switches) do it that way... Otherwise how do you define relation-ship? Can one mdio fit multiple ports? > + type: object > + $ref: brcm,unimac-mdio.yaml > + > + description: > + ASP internal UniMAC MDIO bus > + > +required: > + - compatible > + - reg > + - interrupts > + - clocks Best regards, Krzysztof
On 5/31/23 12:18, Krzysztof Kozlowski wrote: > On 25/05/2023 01:01, Justin Chen wrote: >> From: Florian Fainelli <florian.fainelli@broadcom.com> >> >> Add a binding document for the Broadcom ASP 2.0 Ethernet >> controller. >> >> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> >> Signed-off-by: Justin Chen <justin.chen@broadcom.com> >> --- >> v5 >> - Fix compatible string yaml format to properly capture what we want >> >> v4 >> - 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 | 149 +++++++++++++++++++++ >> 1 file changed, 149 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..c4cd24492bfd >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml >> @@ -0,0 +1,149 @@ >> +# 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 <justin.chen@broadcom.com> >> + - Florian Fainelli <florian.fainelli@broadcom.com> >> + >> +description: Broadcom Ethernet controller first introduced with 72165 >> + >> +properties: >> + '#address-cells': > > Judging by more comments, there will be a v6, thus please also use > consistent quotes - either ' or ". > >> + const: 1 >> + '#size-cells': >> + const: 1 >> + >> + compatible: > > As Conor pointed out, compatible is always first. > >> + oneOf: >> + - items: >> + - enum: >> + - brcm,bcm74165-asp >> + - const: brcm,asp-v2.1 >> + - items: >> + - enum: >> + - brcm,bcm72165-asp >> + - const: brcm,asp-v2.0 >> + >> + 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 > > Why do you need it? reg defines it. Your description does not explain > here much, except copying property name. Can we please avoid > descriptions which just copy name? > >> + >> + required: >> + - reg >> + - brcm,channel >> + >> + additionalProperties: false >> + >> +patternProperties: >> + "^mdio@[0-9a-f]+$": > > Isn't mdio a property of each ethernet port? Existing users > (e.g.bcmgenet, owl-emac, switches) do it that way... They are sub-nodes of the larger Ethernet controller block, hence the property here. > > Otherwise how do you define relation-ship? Can one mdio fit multiple ports? The relationship is established between Ethernet ports and children nodes of the MDIO controller, such as switches or Ethernet PHYs using 'phy-handle' for instance. And yes, a single/common MDIO controller could be serving multiple Ethernet ports.
On 31/05/2023 21:29, Florian Fainelli wrote: >>> + required: >>> + - reg >>> + - brcm,channel >>> + >>> + additionalProperties: false >>> + >>> +patternProperties: >>> + "^mdio@[0-9a-f]+$": >> >> Isn't mdio a property of each ethernet port? Existing users >> (e.g.bcmgenet, owl-emac, switches) do it that way... > > They are sub-nodes of the larger Ethernet controller block, hence the > property here. This is the Ethernet controller. They are subnodes here, so what do you mean by that? They are part of some other block? > >> >> Otherwise how do you define relation-ship? Can one mdio fit multiple ports? > > The relationship is established between Ethernet ports and children > nodes of the MDIO controller, such as switches or Ethernet PHYs using > 'phy-handle' for instance. And yes, a single/common MDIO controller > could be serving multiple Ethernet ports. We do not talk about generic case, but your device. Best regards, Krzysztof
On 5/31/23 12:31, Krzysztof Kozlowski wrote: > On 31/05/2023 21:29, Florian Fainelli wrote: >>>> + required: >>>> + - reg >>>> + - brcm,channel >>>> + >>>> + additionalProperties: false >>>> + >>>> +patternProperties: >>>> + "^mdio@[0-9a-f]+$": >>> >>> Isn't mdio a property of each ethernet port? Existing users >>> (e.g.bcmgenet, owl-emac, switches) do it that way... >> >> They are sub-nodes of the larger Ethernet controller block, hence the >> property here. > > This is the Ethernet controller. They are subnodes here, so what do you > mean by that? They are part of some other block? The block is not just an Ethernet controller it has other functions, which is why we went with a top-level node with a 'ranges' property. One of those functions are the MDIO bus controllers. The examples makes it reasonably clear. > >> >>> >>> Otherwise how do you define relation-ship? Can one mdio fit multiple ports? >> >> The relationship is established between Ethernet ports and children >> nodes of the MDIO controller, such as switches or Ethernet PHYs using >> 'phy-handle' for instance. And yes, a single/common MDIO controller >> could be serving multiple Ethernet ports. > > We do not talk about generic case, but your device. The generic case is true here as well. We so happen to have a 1:1 mapping between the MDIO controller, PHY, and Ethernet port, in this particular example.
On 5/31/23 12:18 PM, Krzysztof Kozlowski wrote: > On 25/05/2023 01:01, Justin Chen wrote: >> From: Florian Fainelli <florian.fainelli@broadcom.com> >> >> Add a binding document for the Broadcom ASP 2.0 Ethernet >> controller. >> >> Signed-off-by: Florian Fainelli <florian.fainelli@broadcom.com> >> Signed-off-by: Justin Chen <justin.chen@broadcom.com> >> --- >> v5 >> - Fix compatible string yaml format to properly capture what we want >> >> v4 >> - 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 | 149 +++++++++++++++++++++ >> 1 file changed, 149 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..c4cd24492bfd >> --- /dev/null >> +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml >> @@ -0,0 +1,149 @@ >> +# 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 <justin.chen@broadcom.com> >> + - Florian Fainelli <florian.fainelli@broadcom.com> >> + >> +description: Broadcom Ethernet controller first introduced with 72165 >> + >> +properties: >> + '#address-cells': > > Judging by more comments, there will be a v6, thus please also use > consistent quotes - either ' or ". > >> + const: 1 >> + '#size-cells': >> + const: 1 >> + >> + compatible: > > As Conor pointed out, compatible is always first. > >> + oneOf: >> + - items: >> + - enum: >> + - brcm,bcm74165-asp >> + - const: brcm,asp-v2.1 >> + - items: >> + - enum: >> + - brcm,bcm72165-asp >> + - const: brcm,asp-v2.0 >> + >> + 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 > > Why do you need it? reg defines it. Your description does not explain > here much, except copying property name. Can we please avoid > descriptions which just copy name? > Will add a better description. The values may be different. Thanks, Justin
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..c4cd24492bfd --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml @@ -0,0 +1,149 @@ +# 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 <justin.chen@broadcom.com> + - Florian Fainelli <florian.fainelli@broadcom.com> + +description: Broadcom Ethernet controller first introduced with 72165 + +properties: + '#address-cells': + const: 1 + '#size-cells': + const: 1 + + compatible: + oneOf: + - items: + - enum: + - brcm,bcm74165-asp + - const: brcm,asp-v2.1 + - items: + - enum: + - brcm,bcm72165-asp + - const: brcm,asp-v2.0 + + 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 <dt-bindings/interrupt-controller/irq.h> + #include <dt-bindings/interrupt-controller/arm-gic.h> + + ethernet@9c00000 { + compatible = "brcm,bcm72165-asp", "brcm,asp-v2.0"; + reg = <0x9c00000 0x1fff14>; + interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>; + 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>; + }; + }; + };