From patchwork Thu Jun 1 22:12:27 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 102217 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:994d:0:b0:3d9:f83d:47d9 with SMTP id k13csp647142vqr; Thu, 1 Jun 2023 15:19:23 -0700 (PDT) X-Google-Smtp-Source: ACHHUZ5z1oblzGHBRbPZTVQnHZULrv8wBJfA43spEdt3D09IoioOQ4KROt1nQoUWLjMp9FSUhj9J X-Received: by 2002:a05:6a00:21ca:b0:64e:bce9:3229 with SMTP id t10-20020a056a0021ca00b0064ebce93229mr12455539pfj.9.1685657963117; Thu, 01 Jun 2023 15:19:23 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1685657963; cv=none; d=google.com; s=arc-20160816; b=oiXgFrddGLgSd6+fZtGwQVRN5mYPfnyj7EDBwQusf6gwcU6saI8AapwQxl3U4wZV5R xytS6kkjIkm/iEoU29xSozbAIUKBfFo9o6u5+15R2wGR/ZBNQmhs2FaHOw8ZyiNXcHNX qNWuxGoboCDSIHIwnUe5MLSrf7aaxxE12PzqIiFLUy22FvOaOxFxW1ux7NTU5Pa9P0z2 aXQSliNVcWKJt3gRYhpiMVJT4N6q44Q8NBpXbGfwUqZcnn/+02OiVy8+X8ISk78DzHCM ecjQN0AwC6x4qT2VqmIFAqLEJ+Q4qfcVi98HxrmSnTmag1rew2+pRASYmjLfvoyA7Hu+ W2pQ== 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=9CjLg+gusNL/o5NJUzikef4sGaz8MNx0kUe+1TJWTCY=; b=FPz94K4vsVVujRrYo5gSWwerAsWtS1BzvsgcXH2ZLjLmRJSeudAy3QDGJpkLJefet7 RPtHHno26J75oU+BEpEcYhvwJKpiACqdFpvA+PPo9DVokXWZimqiEL/FseIKi5jlnukR cDE2Ge1jslNb6nmZ70Ny9fPLaBEs9xX1JqRJD+L7Jm+auPKTZyX5ZaxqkecZFc5F627B AY6tsJq0uV4uqOxhwt8zi6SquY5WO3MkOKqJkkSEQCxhAjw44bvHWmIiilRqpI93vQYw TsRcJkn0l6oo85jrZMxVsS9LIWslUp7ERA8Li+UhVKCekquN2z/xuIsshdMmpHCtrPZg ez2g== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@broadcom.com header.s=google header.b=TUDQcDGp; 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 f188-20020a6251c5000000b0064f33c84c5csi6163462pfb.181.2023.06.01.15.19.08; Thu, 01 Jun 2023 15:19:22 -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=TUDQcDGp; 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 S233108AbjFAWNC (ORCPT + 99 others); Thu, 1 Jun 2023 18:13:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:40576 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S232672AbjFAWMv (ORCPT ); Thu, 1 Jun 2023 18:12:51 -0400 Received: from mail-qk1-x729.google.com (mail-qk1-x729.google.com [IPv6:2607:f8b0:4864:20::729]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7A28C18C for ; Thu, 1 Jun 2023 15:12:49 -0700 (PDT) Received: by mail-qk1-x729.google.com with SMTP id af79cd13be357-75afa109e60so121396785a.2 for ; Thu, 01 Jun 2023 15:12:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1685657568; x=1688249568; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=9CjLg+gusNL/o5NJUzikef4sGaz8MNx0kUe+1TJWTCY=; b=TUDQcDGpJMzJAwFLnVmc3zfu4PJFebDtK2bSo3qvpMpd8xh8Ll2lkkwebyDku6c54K QhYvGzBIr37aKBresGfCiKrQhBB1ZGC4rXPbO74nMPd54JgWhSEy9KUk0sLP5pcvLtEM scFCW8kQyEy437rMnTZK82N5/7eeClLIErhTU= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1685657568; x=1688249568; 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=9CjLg+gusNL/o5NJUzikef4sGaz8MNx0kUe+1TJWTCY=; b=ZIquAynDBirMLGtUbbByWgSsG6lyjEvxjkktDNTuxkMALTnkEN1jtvqyz0nSr7+qUO QCHL0EPHUOKIhM+S61G7/jEtURwZJ1VNF+Dl0ev8debjU9BqWWVgJ96CxijjO5W6yrtm /+e//jP/EhrdwEKNJB/r+Bm1v6jzZvqsOKE8ahLCVjz8Op6ldGa3R46JLWCBJPPacH5g f1qgQQWiY2bXzrNVKNJnXIHXnlLhLE3KSWcOlgbHvlEFbcMJK+3c4nCEdqHrZxQ/EA5C IsVv1igU2qSpSFQskcCuzwQbXOWBw5b63z4fqHEI0QJ2jX/HUs9+KoTN0eKQro45WG/f WSlw== X-Gm-Message-State: AC+VfDyuPxSlaWqGZ/wuXczfw5n+196TT8xEsviZw0A4L+0roE8SGFZS QAGUo2WqtN98l1A1E1wOVUG96w== X-Received: by 2002:a05:6214:c49:b0:5d5:fd1d:6ef5 with SMTP id r9-20020a0562140c4900b005d5fd1d6ef5mr10123071qvj.12.1685657568497; Thu, 01 Jun 2023 15:12:48 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id f5-20020a05620a068500b00759554bbe48sm7180430qkh.4.2023.06.01.15.12.46 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 01 Jun 2023 15:12:48 -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 v6 2/6] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Thu, 1 Jun 2023 15:12:27 -0700 Message-Id: <1685657551-38291-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1685657551-38291-1-git-send-email-justin.chen@broadcom.com> References: <1685657551-38291-1-git-send-email-justin.chen@broadcom.com> X-Spam-Status: No, score=-2.2 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: =?utf-8?q?INBOX?= X-GMAIL-THRID: =?utf-8?q?1767540484430012556?= X-GMAIL-MSGID: =?utf-8?q?1767540484430012556?= 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 --- 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 | 153 +++++++++++++++++++++ 1 file changed, 153 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..3f2bf64b65c0 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml @@ -0,0 +1,153 @@ +# 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# + + 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>; + }; + }; + };