From patchwork Wed Oct 18 09:03:46 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 154765 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:612c:2908:b0:403:3b70:6f57 with SMTP id ib8csp4655673vqb; Wed, 18 Oct 2023 02:04:42 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGinDPb2pOsD/zhKPvFQ1ZMWvZ7ivlgoO+cN4V8dQfDZyewk79oL9FSD9KVu27ypsQ4lVmR X-Received: by 2002:a05:6a00:2294:b0:6be:cb8c:92c7 with SMTP id f20-20020a056a00229400b006becb8c92c7mr323826pfe.3.1697619882116; Wed, 18 Oct 2023 02:04:42 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1697619882; cv=none; d=google.com; s=arc-20160816; b=F3GAbYJbtxiewJnMLbXRia/TjOnP78ij7EjRGDby+fug0EIjaD+P/ds78VWQYMwfm9 86raROlrwukzHrLnt5evPmaVv8InbCo+wk5cKCw53N6N5dK7Co0jKLZTPfvkEE84hkCC ctbk55gavdk7JcoaJymNRRHKOznpouIywjkbHCq6BwejAsHlNwLzpwmnRKfJanmU1Rp3 MDL/msO9P7+W4j/xknJ+Szo60qjllfCCpqheATqCnyuY5ZeLlnyvDrG9uV9zgnUBntym nNwTAYsSwSiGfVfp+DZpcIhInEHk0nxKQGvxEQ13WqLWbZ8h9UACYT3qRjYXIDhq4rhg /q7g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:in-reply-to:references:message-id :content-transfer-encoding:mime-version:subject:date:from :dkim-signature; bh=KAoLwGOze8wrOhHWHJbCc0YbKSQgR6L56yNHOLOvQxY=; fh=4OsP5L1B9pUAL+M4LarVIcTAoEa8QdmflUFnWk97NDA=; b=EcerHzvC06K1CZROG9Td0U7YXoBOMJAg5FfxI5du2THEef/mx2fIIKwyMJfpnrQEnQ bdr8DCjuTD1krvacVZ47jVFTxBSkb/ldbykzKmcBY8aGh2fQdKrq3bDbNn0stKq+XCV9 i+wi1tELjuiro7s9a2QeRGNsHeVjbR53t4MniuFnI65oSzsZeBHBeRpBPSBU59f7opmc TzvLr5H0w+thEIg1f7CCwcZKRnS14Dd59PXB1c2/6QXYhrV3uuxEG08OFz4InUVmOMJD q6vgzuu4NqQ1FrWX1JysnlwsEeYEQ4a8yty/4yyALf0TYNEgk+bdAuEiRE9jYsiBMWdt L/Cg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hqx+8bz+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from morse.vger.email (morse.vger.email. [2620:137:e000::3:1]) by mx.google.com with ESMTPS id b1-20020a056a00114100b0068fc9c6eafdsi3631854pfm.137.2023.10.18.02.04.41 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:04:42 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) client-ip=2620:137:e000::3:1; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Hqx+8bz+; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:1 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id 9D4BF80FE96A; Wed, 18 Oct 2023 02:04:39 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229798AbjJRJEZ (ORCPT + 24 others); Wed, 18 Oct 2023 05:04:25 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:54724 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229635AbjJRJEB (ORCPT ); Wed, 18 Oct 2023 05:04:01 -0400 Received: from mail-lf1-x134.google.com (mail-lf1-x134.google.com [IPv6:2a00:1450:4864:20::134]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A853F106 for ; Wed, 18 Oct 2023 02:03:59 -0700 (PDT) Received: by mail-lf1-x134.google.com with SMTP id 2adb3069b0e04-507a62d4788so5804014e87.0 for ; Wed, 18 Oct 2023 02:03:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1697619838; x=1698224638; darn=vger.kernel.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=KAoLwGOze8wrOhHWHJbCc0YbKSQgR6L56yNHOLOvQxY=; b=Hqx+8bz+mbRZpLdEyv8DsMIVX0ffYm4VBpOn1diY0DqeY39Nm4XWIiqUy5dlRFg7z9 BmhGUq57UNe8BlxFrYl2YmfAtYP8MJwfZ88CYO/tOqqGMZ0aLNGr83qWfsBquLTX/VQV kImUsuGLtbJPjp4PouvN2PpPEuv7NoYXb8Mnbc3NdLLNx+PkbHdmp7dApZVI3BdcbezK /arcicAxZeXiHKmrbAey1hXlZ5wjXE+V36FG/LCrsStnVy8d9jY1ZD274AdipgSLQ345 uYbzHNfGQvFbFvpOJ9lw+N+iwwMf0J2ZY2/a0ItaG6Wwab1yKGNs3sy3UGSTFFeAdqqU +ARQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1697619838; x=1698224638; 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=KAoLwGOze8wrOhHWHJbCc0YbKSQgR6L56yNHOLOvQxY=; b=oD3SsZg5HiSs+jITQhFlThXYEvANJWnKsyd0cZFKgrBo0Yiivpl5lT4i7NLvRt/pj/ 5G6RyoCyZHbot1Hd27E61BbmjwsUNBowWTXKrwNGF4WdMaTWoDGyZ7FLfMgnugwmNfN7 3vDJLRW5E57Yt1IbeRjdnT9FSkMFfcZouX5tM3W5z+dg5FevL8/FKMFMX6y0M+z1nd92 ooCB8VRoQRk+5GqYqUnpzDq8v1jUcWcze3E+COO95U9jwFGkDT+eWCY0g9vdYE8HHZxB a/9+xUidn/dQCaPo2VfgNEO+ZZE2+K8l4EwdIR6R0xnGQ/j9/G6I1GUqU6EsbdscAtpk tP+w== X-Gm-Message-State: AOJu0YwdcpA9dkCzGLBJ8xHEV3vF+oy0NspLMOgsKURbHufjK7hNpliq LZR/jfRrFdFQo23fDtmpHM0o5w== X-Received: by 2002:a05:6512:304c:b0:507:8c55:39f9 with SMTP id b12-20020a056512304c00b005078c5539f9mr4283817lfb.49.1697619837993; Wed, 18 Oct 2023 02:03:57 -0700 (PDT) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id w19-20020a05651234d300b005056fb1d6fbsm616595lfr.238.2023.10.18.02.03.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Oct 2023 02:03:57 -0700 (PDT) From: Linus Walleij Date: Wed, 18 Oct 2023 11:03:46 +0200 Subject: [PATCH net-next v4 7/7] dt-bindings: marvell: Add Marvell MV88E6060 DSA schema MIME-Version: 1.0 Message-Id: <20231018-marvell-88e6152-wan-led-v4-7-3ee0c67383be@linaro.org> References: <20231018-marvell-88e6152-wan-led-v4-0-3ee0c67383be@linaro.org> In-Reply-To: <20231018-marvell-88e6152-wan-led-v4-0-3ee0c67383be@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-Spam-Status: No, score=-0.8 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (morse.vger.email [0.0.0.0]); Wed, 18 Oct 2023 02:04:39 -0700 (PDT) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1780083465442581746 X-GMAIL-MSGID: 1780083465442581746 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 Reviewed-by: Andrew Lunn Reviewed-by: Vladimir Oltean --- .../bindings/net/dsa/marvell,mv88e6060.yaml | 90 ++++++++++++++++++++++ MAINTAINERS | 1 + 2 files changed, 91 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..787f328551f6 --- /dev/null +++ b/Documentation/devicetree/bindings/net/dsa/marvell,mv88e6060.yaml @@ -0,0 +1,90 @@ +# 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 PHYs 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# + +allOf: + - $ref: dsa.yaml#/$defs/ethernet-ports + +required: + - compatible + - reg + +unevaluatedProperties: false + +examples: + - | + #include + #include + mdio { + #address-cells = <1>; + #size-cells = <0>; + + ethernet-switch@16 { + compatible = "marvell,mv88e6060"; + reg = <16>; + + ethernet-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 = "rev-mii"; + ethernet = <ðc>; + 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/