From patchwork Wed Jun 14 22:30:11 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 108163 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp264025vqr; Wed, 14 Jun 2023 15:32:46 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ7j+0qwT+u3nJDlibs1wTFPe3DDXhjT+e9lLy1JP4J6zIjSFrEl+cDgr8uwcOoMjyXPW85W X-Received: by 2002:a17:906:9b8d:b0:974:e755:9fde with SMTP id dd13-20020a1709069b8d00b00974e7559fdemr17868686ejc.19.1686781965841; Wed, 14 Jun 2023 15:32:45 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1686781965; cv=none; d=google.com; s=arc-20160816; b=kyUIMFkcgTbXMIO6vwJsYcAA+YLfW6U3EVqcEVGOQbWbQO0Z62TsygYxhScpbl5nMs bzzSXhsgrj18Yi6gngiL1OZsLCgmQkHzpR99PCuj9pSTfnTVDr01WVVvmLmKySpIl1rI 51ro7JGnjyoBS+KwvVMaMEoPyIo4oRry6G/kuoor+4mCh0uH91XwaBHrONXF6etczvX3 GN8wG5gfwHrR5ReP0yE1ggsXj4hac/o8YE4E4GFSdoo84y4w5wuYAyjqZi0+qTJzpsr9 VDlcIqPSmhf/Jz/RhUIg83wd+cdnDPgdX3cxr8LY3dQa+0XFt+rT2vICrAJJzYHLDipp yGOA== 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=I/D5KYojReiaxlseT7Klb4C3OpJJu5tOAy6NMk789pg=; b=ZhBXqXmDo7H0zcavKjntaCP2xS6aa77BIx6TvYLgSP+B5W0W5MWRS1nPjw+k/jPsZL 1/KCx1AIWVSABrne/ecWnbbgHHcyCZyUsi9p6qfvxqIWt1kHCkpdP4HEGnxIQESupWlL 2O9kPAi1cs9YZj/5CEIbQ4KkRDyrUMxcRCzYYqwdiS0YM/+Xa+BigOb4A1vGd+8Mrihq Rnb8WFO7QEccJWGjOdNomsoKWu1Durz7KwDVPbO6B2KvjFCln8dbKa+Tp+afMS6IIboB 2/muLWDBuD0VVDxHAGIoddL6TJOajoV1Vk9ENN3ShNWS7GWBLwZoMEzU8B3DXre7kwvG MB9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=OD9P8d9W; 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 ca17-20020a170906a3d100b009738d042979si7559966ejb.800.2023.06.14.15.31.50; Wed, 14 Jun 2023 15:32:45 -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=OD9P8d9W; 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 S236705AbjFNWaj (ORCPT + 99 others); Wed, 14 Jun 2023 18:30:39 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60956 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236680AbjFNWae (ORCPT ); Wed, 14 Jun 2023 18:30:34 -0400 Received: from mail-qt1-x82b.google.com (mail-qt1-x82b.google.com [IPv6:2607:f8b0:4864:20::82b]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 84D29268B for ; Wed, 14 Jun 2023 15:30:33 -0700 (PDT) Received: by mail-qt1-x82b.google.com with SMTP id d75a77b69052e-3f6a494810fso22409881cf.1 for ; Wed, 14 Jun 2023 15:30:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1686781832; x=1689373832; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=I/D5KYojReiaxlseT7Klb4C3OpJJu5tOAy6NMk789pg=; b=OD9P8d9WikPrvITlThL9u2ZMvlbDPsJDcYQUKV17fAE6/Nb4YQrrMiSP4iDPLy93tI 6BaNtzOHE6GVUG3nmpNoeME7Rdgy+CGt2CsnnKHvRhfVNyZyZKGE2bBcacSERm4DUEPb OqdlLavBKkFuvLWdqoOEWTx47/W+fbN+HLkpA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1686781832; x=1689373832; 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=I/D5KYojReiaxlseT7Klb4C3OpJJu5tOAy6NMk789pg=; b=L/hZ6ccZNdMIXsJh3Ks2a2Sd8qb1lE4xHuTaTtG/KdoCNP1arUP+mDhqO2qd0qvENi Wa88KU00O8oThnDwJyIyq2YQjMZ0epnbxn/mRXSGaYP5x5akjjY0WXUMBGXg38C8ac5R CFcOsauWMn6cXJLsB9n8jO7+6sfXFLB6cnoGz10xwphnJrZHKcgz31oNM6/MoEA6R5Na HjXwcW5Av+e2aj6d2L8qQcigWE1Bv5oRc65n94Xl3bi1he2w1JER6brLd/IsORegkvAR DilAj9LyF/uSGquWkzuXL1qCq8XxWH+httknNbijSTdH+PAHm5QUNQwXtiQpwoZ1shB0 C9Pw== X-Gm-Message-State: AC+VfDxAPNV/+UTRdE3onpBP82WJGEfDJEUkcO3/IngUFh9JuvdvvPa/ SsUfrIUKMCrcOV+7lBQ9Pw0ZdQ== X-Received: by 2002:a05:622a:4b:b0:3f9:c38b:44b7 with SMTP id y11-20020a05622a004b00b003f9c38b44b7mr3413534qtw.50.1686781832544; Wed, 14 Jun 2023 15:30:32 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id d3-20020ac85443000000b003ef2db16e72sm5419360qtq.94.2023.06.14.15.30.30 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Wed, 14 Jun 2023 15:30:32 -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 v7 02/11] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Wed, 14 Jun 2023 15:30:11 -0700 Message-Id: <1686781820-832-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1686781820-832-1-git-send-email-justin.chen@broadcom.com> References: <1686781820-832-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?1768719086213166362?= X-GMAIL-MSGID: =?utf-8?q?1768719086213166362?= 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>; + }; + }; + };