From patchwork Fri Jun 16 22:14:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 13283336 X-Patchwork-Delegate: kuba@kernel.org Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net [23.128.96.19]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6549B8BE7 for ; Fri, 16 Jun 2023 22:14:41 +0000 (UTC) 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 914543ABA for ; Fri, 16 Jun 2023 15:14:36 -0700 (PDT) Received: by mail-pl1-x632.google.com with SMTP id d9443c01a7336-1b539102474so5351125ad.1 for ; Fri, 16 Jun 2023 15:14:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686953676; x=1689545676; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=4bWMbA3O7Pt7hCz42fiTlw0FLwpa+PsZOliSy5PDR3g=; b=SR8VorLEEoNKcWTEjjei8cN414BkuDhVp4sPujEFTRIjKX5Z9HlI1l8zpU1TScd649 Cu/keR83TZyTU5J7MQVzwgbbDg08Pnz7gnJZL2bXNkDc/Wffkz8JeIKhUkFkF+rk9yEa PqkTw5OtEAK9jE/fZsZSkF68R1kRU2Eo3yEA4= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686953676; x=1689545676; 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=4bWMbA3O7Pt7hCz42fiTlw0FLwpa+PsZOliSy5PDR3g=; b=Fvn6Y2gVHMPXvjH/mYQMDCsCsmNEci9zGhp8rPk5inomiapaM12hoyHvgXYip2tHhW VRZ2jvY9M9EhOSLwptSOS3fKHi2JjyJf0a13dLK8Xe4AKyOYUjeR4b7JQn5zal1jxsP5 b58nqkNTk7Oh5re5FmMCX4Xi3Vewza7hU1eXG/WctkkqApisc89aFnJ/zbOgiTiI9H6Z Dr3gGZbbRcnDd4xkB5fZmNSwTqP6tWLhIK5alseV6TZsVpEpG0hNfVCgWNuVeSsZ0DvC r+u9yBOeypA4DlCiSinZMqigkyy8JNWhXwZGfAACWQzoY/Xa/Z5o728xx4Yh2FeTpF2O iLtQ== X-Gm-Message-State: AC+VfDyZB31CBTeucQTvyduACgsJIozNy7/1EiCnupnbhcv8JWEZYymw VWpsSOGZdfqQoeEGJan/AzeU1WlOgi/fUP4+s8JwB0FzIf6oMfhgvluwTLH2wDQXBRbn1ewsBTC skdWjVfGJwI59O4O1SnTg0zIqe/PHDn74Ed4HTxsV1vD4koUn+wZ2O3ktlMyTL+ym519pzgTF/7 MsnDVKXw== X-Google-Smtp-Source: ACHHUZ60O/ht7b+pQZ+nuE7JBWbXHQMQ1pflIJgNeBB2BeM7yFH+QIizUu1R0MhkiKv8vw2h3OH+PA== X-Received: by 2002:a17:903:2607:b0:1af:eb1c:80ba with SMTP id jd7-20020a170903260700b001afeb1c80bamr2606321plb.8.1686953675542; Fri, 16 Jun 2023 15:14:35 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id f12-20020a170902ab8c00b001aaed524541sm16220860plr.227.2023.06.16.15.14.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 16 Jun 2023 15:14:35 -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: 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, Justin Chen Subject: [PATCH net-next v8 02/11] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Fri, 16 Jun 2023 15:14:15 -0700 Message-Id: <1686953664-17498-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1686953664-17498-1-git-send-email-justin.chen@broadcom.com> References: <1686953664-17498-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 X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: X-Patchwork-Delegate: kuba@kernel.org From: Florian Fainelli Add a binding document for the Broadcom ASP 2.0 Ethernet controller. Reviewed-by: Conor Dooley Signed-off-by: Florian Fainelli Signed-off-by: Justin Chen --- v7 - Added "unevaluatedProperties: False" v6 - Moved compatible to the top - Changed quotes to be consistent - Elaborated on brcm,channel description 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 | 155 +++++++++++++++++++++ 1 file changed, 155 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..aa3162c74833 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml @@ -0,0 +1,155 @@ +# 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: + compatible: + oneOf: + - items: + - enum: + - brcm,bcm74165-asp + - const: brcm,asp-v2.1 + - items: + - enum: + - brcm,bcm72165-asp + - const: brcm,asp-v2.0 + + "#address-cells": + const: 1 + "#size-cells": + const: 1 + + 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# + + unevaluatedProperties: false + + properties: + reg: + maxItems: 1 + description: Port number + + brcm,channel: + $ref: /schemas/types.yaml#/definitions/uint32 + description: | + ASP Channel Number + + The depacketizer channel that consumes packets from + the unimac/port. + + 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>; + }; + }; + };