From patchwork Thu Jul 13 22:18:57 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 120133 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:a6b2:0:b0:3e4:2afc:c1 with SMTP id c18csp2128680vqm; Thu, 13 Jul 2023 15:33:01 -0700 (PDT) X-Google-Smtp-Source: APBJJlHfD42mRYMryxy2/znupUyW1YkRTspIQ+8zRpqtBV9OhYDNiqZsVWRSBYsTKj8wGTjUPhQg X-Received: by 2002:a05:6402:518f:b0:51e:4218:b91b with SMTP id q15-20020a056402518f00b0051e4218b91bmr1338361edd.1.1689287580946; Thu, 13 Jul 2023 15:33:00 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689287580; cv=none; d=google.com; s=arc-20160816; b=IThPz87Fi+dkhb6UEuniCbrouTLM/yp4EPhdKVN8ikaelxkhpXMXD1J1X/e2KSn+GB SdTjl8jQV9l5mmucfdX9FfizjhdDhYWCNy0XuxUfz2KpaD7tEFcvvIVCr6c9U9TE27fy CiORqTGacCCYjVXd/vKRAthRZmzgb8XZsorg/rM+sgyEf5MICAzkv55dAQD8BoeKbj5P 6dGzga0GulfD0ffZ+10bTARCwjt43UEWvHQyqUiyF/3KjnOpCxlR1ACHBXQq2liLekNQ PeBg32tRhZP5Pcfda9wegRx8xXa5IgLq9u/n5BM4VbMdHA1naAN5lqLMaX0larXOJNOz 6w/A== 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=iWyijcS1l93tWTXTFvCcMMCsgkwdW6HY8d9s1I+Jmbs=; fh=auIu3uj+2hbF0lD5w/46TjOR2iYLfsn3CHYsSny1RMQ=; b=kRD4rrkPerlo/9uLe2H1XIPniDSQ191qUXqPGhPlRl2YrQhxvj/4fYzo05I85g0373 KTsmXnB6aXnthXosTqfjTqfRSblx8S/NwkUosN5trAzEmm3i0tC4ymrKHVFGqA7No2AL rBeHeHgEZkC3LpJbcfA8jpp041t9qUeC3rGZxxpSVlrWDVRrG/qxB6sHYt6xep2erDpS 24w9+UrC3aALMeJia+3Q/MslXYevcdh4EShcpt/qId+hUTCm0bHdc6ESxkjywzNmHzct /TdgLJxT9j/Qz7q0L4rMlD9EQ19yNide5D8NUh6Uv0Uf5wMo/3wcVoqtZeVCW/6vF8YF vl1Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=dcM82PoT; 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 b12-20020aa7c6cc000000b0051da08e2403si7628776eds.255.2023.07.13.15.32.36; Thu, 13 Jul 2023 15:33:00 -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=dcM82PoT; 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 S231909AbjGMWTX (ORCPT + 99 others); Thu, 13 Jul 2023 18:19:23 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:53938 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232449AbjGMWTT (ORCPT ); Thu, 13 Jul 2023 18:19:19 -0400 Received: from mail-oi1-x229.google.com (mail-oi1-x229.google.com [IPv6:2607:f8b0:4864:20::229]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 669382736 for ; Thu, 13 Jul 2023 15:19:18 -0700 (PDT) Received: by mail-oi1-x229.google.com with SMTP id 5614622812f47-38c35975545so1119701b6e.1 for ; Thu, 13 Jul 2023 15:19:18 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1689286757; x=1691878757; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=iWyijcS1l93tWTXTFvCcMMCsgkwdW6HY8d9s1I+Jmbs=; b=dcM82PoT3nlDb4RQMFi9lyJKXuKfYvVBwy2qqWGDY68BUBRF56Rzi0Z9KyFVZewFrf 3oQlBTXG8ZBKhs7avIAtsoZCb9yGrzGSk5Ucx+aUgAk+jqlTh75PbgmfDg1z4sFfrdFJ e0u8Exn0XlD4pIfHv6VA1fZ31FU/b1XyjSXM8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1689286757; x=1691878757; 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=iWyijcS1l93tWTXTFvCcMMCsgkwdW6HY8d9s1I+Jmbs=; b=eeRC5oCQOgxJHYFZLzy5+7FnyW6isJCSIwOW1Oy2iSvA9dwRq0qfAter+sYAJPar7f +omYFUBeeFGVlC056lNF56ukzdfpM2JugGZQsJrySbAMsQes9BCkr1QP6o0tXO7x7KOT pS841dSzGxv6Vqoj4Pz50i59fxMl1lQ/uhu8mIgeIosZNLVI6vY23egdFVM9Tl/1ZqI8 l9cgL8fD6lSqQmqCioWb+hkVfxFb8L3UJCC2OUN0Yjx/nb9l03ub/le+wijoAftk/MLk kIP/Zy+yFNkVysr+VyhY3ks6FTuRILhFsO/7TmvH8MDxAIYDv7NNMXJpTXvuG4PiC/iP GcJg== X-Gm-Message-State: ABy/qLYCi4KlFvIAssSZaRhECB8ctYGYgfc2eQr1a6u1edz1KLhhL2ba oKPTFdPrWKuHsPWnYC2rjHlfwQ== X-Received: by 2002:a05:6808:1929:b0:3a4:91a:224a with SMTP id bf41-20020a056808192900b003a4091a224amr4598005oib.34.1689286757668; Thu, 13 Jul 2023 15:19:17 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id i14-20020a0cf38e000000b006262de12a8csm427623qvk.65.2023.07.13.15.19.15 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 13 Jul 2023 15:19:17 -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, simon.horman@corigine.com, christian.koenig@amd.com, Justin Chen Subject: [net-next v9 02/11] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Thu, 13 Jul 2023 15:18:57 -0700 Message-Id: <1689286746-43609-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1689286746-43609-1-git-send-email-justin.chen@broadcom.com> References: <1689286746-43609-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 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: INBOX X-GMAIL-THRID: 1771346414643382835 X-GMAIL-MSGID: 1771346414643382835 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>; + }; + }; + };