From patchwork Sat Oct 14 20:51:33 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13422133 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 bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 4F1D7CDB482 for ; Sat, 14 Oct 2023 20:52:30 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References:Message-Id :MIME-Version:Subject:Date:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=lt9tx62z0/giHh6wOKIhjc0rEntXfEckKLsh78mcvr8=; b=md4Mk6UHbH4iJa kXx3mKP9LhjpywzqFWTYncD7/dV8Xc0KuIdxpLAGh5xSd9MO3yd5KA64z7aJ6cW/Wj73Wt/i7SlG1 hYBiI2NhkpLp2K6y9mzjku6pGLm+5nMqLgJ18VY3eFOtEPXPqquzkuI6H8+AWcwQnlLfjD5Lqo42F aPczOsSgFLQacnw/O7s2zLWAKyAkc+BiQEqAJxJKJQv9ZBtxKIPsMsZHFaG5YtvTWAevz3fTFbaNa E28u+tsVuI7UDLa9cmMpjpRH4r0wFeqjUiEswpVvVLJBgoVCU1YnaDTE+FR3rwdYbf/rOReJ64/PQ 5hNZqWWTXvsYdct75LCg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1qrlc2-005lih-0v; Sat, 14 Oct 2023 20:51:54 +0000 Received: from mail-lf1-x12e.google.com ([2a00:1450:4864:20::12e]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1qrlbo-005ler-0a for linux-arm-kernel@lists.infradead.org; Sat, 14 Oct 2023 20:51:44 +0000 Received: by mail-lf1-x12e.google.com with SMTP id 2adb3069b0e04-507a936f4a9so213069e87.1 for ; Sat, 14 Oct 2023 13:51:39 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697316698; x=1697921498; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=83tifkcL7STtWqxT7Toe1m2iOWJK+NJCvD/bs0pj7pU=; b=Bf2382snpK07Z2Ks3JW2WM41tLe09liogwxYLnnFDmlaalz7xEWtsQ4n4vz3nSSp7x 61ntBH8DP5F4dnf7jC52pjUTwhrVeO1DpreAmdMR2xEWyVx6vEZdAxSLzReDKmXqNwni LQPNpQ44n3Zrbzddb4TxmUfwNOCyariKHiPCM/IpZvf0kmk63mUIV5mkpAAnRY2Bddxk SE5KYjJOGAeN6APoxFe8hu/rYMkCR9Gkp3w1m6Nt2uQ99aTMp542DE3E0k135iFycn41 XxBDFt9yAnzl+MdvogTylFJIM1AldJcM2cj+0OxQASXL+zuUom++iDRgI2nbeQ8qiz2c b5kw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697316698; x=1697921498; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=83tifkcL7STtWqxT7Toe1m2iOWJK+NJCvD/bs0pj7pU=; b=LD4xY3+6jsJ9OxBEzo85kPBGC4VWhIc4grSNRm4b3URsFYY4Hj1qGTBWqZ7i6UEXKR zigvuqTOM6venshiTiKDGK/1XHnCCZZmDeLdBzzAdqtgM1gceerdyQZsHArBO3Dhjb6n OiSwQwkqa14OBKqodiiC8h6XbxYxsNG3KMViZ2MUfAUfwuWeOm5DN9LGCBxLI/ZjAUGd BycGPlLavV6JPLZksRHZ79Kz80NLvO5maAYyMeOlfVQN/ErhEgDStWz9IIBYfOyCxWqI bQN//bAQy0x+xWvmk3zxgl9PyBVq/VJ0PpXl52OoBffUn93i/dxZfwUpoU9E6JbaDf4L Adgw== X-Gm-Message-State: AOJu0Yx0YXqG/gX2Fi7wL1CbYDiS/P8zNIZE7ziIAZ/rQaQHAV8aKKJ6 ndzDtMX2wDQcYtwsX4KcZPuGag== X-Google-Smtp-Source: AGHT+IHFr/VAVKK4SuDqlJGBmO5soHuX301jwXaHnqV1V+ZBJoGsixdCBVKtlESDOjoGWehemW8ulQ== X-Received: by 2002:a05:6512:1153:b0:4fb:7559:aea3 with SMTP id m19-20020a056512115300b004fb7559aea3mr30227904lfg.39.1697316698352; Sat, 14 Oct 2023 13:51:38 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id o17-20020ac24e91000000b004ff96c09b47sm49926lfr.260.2023.10.14.13.51.37 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 14 Oct 2023 13:51:37 -0700 (PDT) From: Linus Walleij Date: Sat, 14 Oct 2023 22:51:33 +0200 Subject: [PATCH net-next v2 2/5] dt-bindings: marvell: Add Marvell MV88E6060 DSA schema MIME-Version: 1.0 Message-Id: <20231014-marvell-88e6152-wan-led-v2-2-7fca08b68849@linaro.org> References: <20231014-marvell-88e6152-wan-led-v2-0-7fca08b68849@linaro.org> In-Reply-To: <20231014-marvell-88e6152-wan-led-v2-0-7fca08b68849@linaro.org> To: Andrew Lunn , Gregory Clement , Sebastian Hesselbarth , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Russell King , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni Cc: Christian Marangi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Linus Walleij X-Mailer: b4 0.12.3 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231014_135140_219954_A0146DAA X-CRM114-Status: GOOD ( 19.05 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The Marvell MV88E6060 is one of the oldest DSA switches from Marvell, and it has DT bindings used in the wild. Let's define them properly. It is different enough from the rest of the MV88E6xxx switches that it deserves its own binding. Signed-off-by: Linus Walleij --- .../bindings/net/dsa/marvell,mv88e6060.yaml | 106 +++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 107 insertions(+) diff --git a/Documentation/devicetree/bindings/net/dsa/marvell,mv88e6060.yaml b/Documentation/devicetree/bindings/net/dsa/marvell,mv88e6060.yaml new file mode 100644 index 000000000000..74e546a8472c --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/marvell,mv88e6060.yaml @@ -0,0 +1,106 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/dsa/marvell,mv88e6060.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Marvell MV88E6060 DSA switch + +maintainers: + - Andrew Lunn + +description: + The Marvell MV88E6060 switch has been produced and sold by Marvell + since at least 2010. The switch has one pin ADDR4 that controls the + MDIO address of the switch to be 0x10 or 0x00, and on the MDIO bus + connected to the switch, the PHY:s inside the switch appear as + independent devices on address 0x00-0x04 or 0x10-0x14, so in difference + from many other DSA switches this switch does not have an internal + MDIO bus for the PHY devices. + +properties: + compatible: + const: marvell,mv88e6060 + description: + The MV88E6060 is the oldest Marvell DSA switch product, and + as such a bit limited in features compared to later hardware. + + reg: + maxItems: 1 + + reset-gpios: + description: + GPIO to be used to reset the whole device + maxItems: 1 + +$ref: dsa.yaml# + +patternProperties: + "^(ethernet-)?ports$": + type: object + patternProperties: + "^(ethernet-)?port@[0-9]+$": + type: object + description: Ethernet switch ports + + $ref: dsa-port.yaml# + + unevaluatedProperties: false + +oneOf: + - required: + - ports + - required: + - ethernet-ports + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + #include + mdio { + #address-cells = <1>; + #size-cells = <0>; + + switch@16 { + compatible = "marvell,mv88e6060"; + reg = <16>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + label = "lan1"; + }; + port@1 { + reg = <1>; + label = "lan2"; + }; + port@2 { + reg = <2>; + label = "lan3"; + }; + port@3 { + reg = <3>; + label = "lan4"; + }; + port@5 { + reg = <5>; + phy-mode = "rgmii-id"; + ethernet = <ðc>; + label = "cpu"; + fixed-link { + speed = <100>; + full-duplex; + }; + }; + }; + }; + }; diff --git a/MAINTAINERS b/MAINTAINERS index 1b4475254d27..4c933a2a56ad 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -12625,6 +12625,7 @@ MARVELL 88E6XXX ETHERNET SWITCH FABRIC DRIVER M: Andrew Lunn L: netdev@vger.kernel.org S: Maintained +F: Documentation/devicetree/bindings/net/dsa/marvell,mv88e6060.yaml F: Documentation/devicetree/bindings/net/dsa/marvell,mv88e6xxx.yaml F: Documentation/networking/devlink/mv88e6xxx.rst F: drivers/net/dsa/mv88e6xxx/