From patchwork Tue May 23 21:53:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Justin Chen X-Patchwork-Id: 685161 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9AEFFC7EE23 for ; Tue, 23 May 2023 21:54:04 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238750AbjEWVyD (ORCPT ); Tue, 23 May 2023 17:54:03 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44622 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S238744AbjEWVyB (ORCPT ); Tue, 23 May 2023 17:54:01 -0400 Received: from mail-pl1-x62c.google.com (mail-pl1-x62c.google.com [IPv6:2607:f8b0:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id E112A83 for ; Tue, 23 May 2023 14:53:59 -0700 (PDT) Received: by mail-pl1-x62c.google.com with SMTP id d9443c01a7336-1ae763f9c0bso1483445ad.2 for ; Tue, 23 May 2023 14:53:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=broadcom.com; s=google; t=1684878839; x=1687470839; h=references:in-reply-to:message-id:date:subject:cc:to:from:from:to :cc:subject:date:message-id:reply-to; bh=lerwKtV2jyzMLpmowlTaDdnxBFXOjX2qHGe6x9+hPkU=; b=Hsr9NJtuARELbQaH7pJVxVBC/5LHIOJmgc5GSR1AN3wrUCVVUi0OpR4WnEDYcIvLjd MfMLhS0OlSQyHndlfQAlU8LuzxFcXpz2a+WWT9YgiGF9c/QhTufDLo4/EOLAY2qlILYy sgQ/VQmRqC7+RDYDl/dm+eh4QJTZSDIN9ULtw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20221208; t=1684878839; x=1687470839; 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=lerwKtV2jyzMLpmowlTaDdnxBFXOjX2qHGe6x9+hPkU=; b=YOFYaRMnDmEb6B+bb1zPUj7K5Hp6oB0wfg+2uS9dSx+LUm1KQGB6TthZ6pa7U9UjaS ZxlQJiTDS2UMNPwlA0mRnhyH4JYeLX5xHa9Yv2Au2uF+VfTO0x1B2YO4cyv1B5ULZccd hjh8rXJjkrqBnqHpksURK5xci/sfTcQZNOAOs2p9VfTKWZsVpgWWKhES5nGtvBzU1PrV GP0xPNpWNHlyUMWjoJiEtvJkAGXyBsr++pVgaBxTV7L66ZACYylv+ufG9KdIbjoru03u bFOPYED2EaGcY9TdLy7tv3f43Oa+kosU0uyFaU82m03X7XLf1xSofNDv4JUDweN69Iv/ yedg== X-Gm-Message-State: AC+VfDxsacUdKCvX5st1LFLsjYBzPtKkxCQ3it7ZtCNwdQhRx9YW52ha hIjFc/IwvhcOaxf+d1Dw7Fu0Lw== X-Google-Smtp-Source: ACHHUZ7AmSBlU/Hd0Hai5K5aI0MMCPhXJdl2nZVhD/LqT37vgiqoZThbv397FHeLU5DVez1itEHGrQ== X-Received: by 2002:a17:902:d2c2:b0:1ac:b4db:6a62 with SMTP id n2-20020a170902d2c200b001acb4db6a62mr16196725plc.65.1684878839320; Tue, 23 May 2023 14:53:59 -0700 (PDT) Received: from stbirv-lnx-2.igp.broadcom.net ([192.19.223.252]) by smtp.gmail.com with ESMTPSA id e4-20020a170902744400b001ae62d7cb2bsm7189820plt.199.2023.05.23.14.53.57 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 23 May 2023 14:53:59 -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: justinpopo6@gmail.com, justin.chen@broadcom.com, f.fainelli@gmail.com, davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.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, conor@kernel.org, simon.horman@corigine.com, Florian Fainelli Subject: [PATCH net-next v4 2/6] dt-bindings: net: Brcm ASP 2.0 Ethernet controller Date: Tue, 23 May 2023 14:53:43 -0700 Message-Id: <1684878827-40672-3-git-send-email-justin.chen@broadcom.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1684878827-40672-1-git-send-email-justin.chen@broadcom.com> References: <1684878827-40672-1-git-send-email-justin.chen@broadcom.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org From: Florian Fainelli Add a binding document for the Broadcom ASP 2.0 Ethernet controller. Signed-off-by: Florian Fainelli Signed-off-by: Justin Chen --- v3 - 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 | 145 +++++++++++++++++++++ 1 file changed, 145 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..07f7373b9d64 --- /dev/null +++ b/Documentation/devicetree/bindings/net/brcm,asp-v2.0.yaml @@ -0,0 +1,145 @@ +# 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: + '#address-cells': + const: 1 + '#size-cells': + const: 1 + + compatible: + enum: + - brcm,asp-v2.0 + - brcm,bcm72165-asp + - brcm,asp-v2.1 + - brcm,bcm74165-asp + + 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 + #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>; + }; + }; + };