Message ID | 20231127-marvell-88e6152-wan-led-v9-3-272934e04681@linaro.org |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel-owner@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:ce62:0:b0:403:3b70:6f57 with SMTP id o2csp3227313vqx; Mon, 27 Nov 2023 07:44:09 -0800 (PST) X-Google-Smtp-Source: AGHT+IG4XpShyMG/yndVqz2adhNOtGdN0r+pUiSwE8YDR2YSIpnps437YfIsW/jS56NKO3kUU82i X-Received: by 2002:a17:90a:d98b:b0:27d:2663:c5f4 with SMTP id d11-20020a17090ad98b00b0027d2663c5f4mr16063424pjv.47.1701099849468; Mon, 27 Nov 2023 07:44:09 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701099849; cv=none; d=google.com; s=arc-20160816; b=apzsCCcXr+8sm+1WxH4/GaYUCb7MXDU/qk2zhkUm3qWxFoFGJJxlJ3HQqDTPyugVY0 7SaRBZW3u5t+1B4HnKWUshumxiEeWmHDhlrvlfrtaSKJn5jPqXaxHvYvN+FGhNGtXUc6 96lZ8vrHpORDEY3a62wXibBk0AIjxMc4CSEJ8cOXMTl4OGW80WwVKCdzP0Y8lvmXbn8d lmtfQS5/IdOBzYOAy62T6CBCyVHLKvtXLrCEAxQF3Lzs8aiuCBrK2RSU64YbUO/N9IIT NzopOlf9EVySBnh8LRFJgQq4O6zjAAR68u9EYPloom6HJp6lwuCaweBC+JVJFEIz2rnX VPYw== 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=laAP022lsP8tLUMRJS12kz9BQh0UCp0+Op3begljKsQ=; fh=JYsP4VLyQTDAtBrWlIiC3mGY2VFoTuIDKBDBK+uc9QY=; b=UT6TQquhIufBONL+BkF5xIn9/r8DlMM/AWkBQU6H2jtqwjuDMbwkLExCTHFp0qVdYi qh8I5j+JprKbT2DqadMxV2MkatYplH1P9+1s9QJusYUaHbSPNuPeFCi5/C+WiR2ZoiAW ykspzu6jfwoh/yKW2fa/ZzuVeBVwRjKs22K5A3u4E7JhtZHdhQIY3KE7SdyKkXTyLmtu l4v95v/UwKnmD20Hjezi1Io/2ukNZqh0VDhc4gXlWU1Q9842a1NsL+r/MQytyXMbk7/H J+/YhrE62b46LIuTGfhXtXpz62hUyrj7omhxvRZt6XCmW18Q+YYx5esl0A1EAXm/0eLk ejKw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vHVHU5BE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id c1-20020a63da01000000b005898e10f9cbsi10273601pgh.572.2023.11.27.07.44.09 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:44:09 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=vHVHU5BE; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (Postfix) with ESMTP id 588F4822778F; Mon, 27 Nov 2023 07:44:06 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234075AbjK0PnV (ORCPT <rfc822;toshivichauhan@gmail.com> + 99 others); Mon, 27 Nov 2023 10:43:21 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57782 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233834AbjK0PnM (ORCPT <rfc822;linux-kernel@vger.kernel.org>); Mon, 27 Nov 2023 10:43:12 -0500 Received: from mail-lf1-x130.google.com (mail-lf1-x130.google.com [IPv6:2a00:1450:4864:20::130]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id EC2BD1A3 for <linux-kernel@vger.kernel.org>; Mon, 27 Nov 2023 07:43:17 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507e85ebf50so5907675e87.1 for <linux-kernel@vger.kernel.org>; Mon, 27 Nov 2023 07:43:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1701099796; x=1701704596; 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=laAP022lsP8tLUMRJS12kz9BQh0UCp0+Op3begljKsQ=; b=vHVHU5BE+wa2rc3yh2h9KurgMGJAXDqFpgFzOn864j46a3y/vwsdsK0whyNrHiGx7K OVy3C6i5UFXWaj4QbB1BNUsC9THkKo9Q1u+ccBmfZuM9ZCdnkqAfOOEMHT0yTIPGvO5P f1v7CCDG08mWJbdIaNUMXODIdziRr0NWT2bwAMEzRN6ScIggxwP8PLW8NlcJVUBIlxky zQg+Lx80fwkKFkHjwaH162iMpFg+3kxRDqdT/OU8u10ZwGHK7DGCLhzAp47GCcmKKvfY Vu8iE3G6BF+Wg2pdIsszfPSlhn6J6PoFCt+fB/uaz+tZe4IzPhcnLl10PSi83R2nwUB5 YgAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1701099796; x=1701704596; 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=laAP022lsP8tLUMRJS12kz9BQh0UCp0+Op3begljKsQ=; b=SvjOnu2kCUGKYgUPgVhyESxz4Nzb94SCuZr/+3g2Y1ppnGbdaiyYuZaX70AH8bCLWX Pisu+kwYZhJ2KeWRPi1N5PlxtFpml+px8+fUZMexa5k54CEPR10ijqFU0BbSXeYLIatG qwsvetqi0JqURwROas/RUqT0mn9T0NY9/sRUtmp74IfRqMyd76yOxQo+AKmtPnf95IoV 8qkNtrdFUZSU0P9yneMMBKwibK2Qlm4Mq/JjnrUxrxwwEnX0PqCsAIcQXCwf0ycUt9Ev emNwBu5tE/b10hHruGja+ORkSqP/7upLqksfBMvv4QZ3d4DwdGdRay2vjFynszRjbC2a UvEA== X-Gm-Message-State: AOJu0YxHQED90XDes1Yr8drixjdeh/83IAPlMA/zaOMwIXV1cPUhLSE9 xugVj+T92Q9xK2csHbIeqsomVex7vHgawwmWCAM= X-Received: by 2002:a05:6512:3a82:b0:509:489f:d84e with SMTP id q2-20020a0565123a8200b00509489fd84emr11144123lfu.37.1701099796186; Mon, 27 Nov 2023 07:43:16 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id v28-20020ac2559c000000b0050ab86037d8sm1505049lfg.205.2023.11.27.07.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:43:15 -0800 (PST) From: Linus Walleij <linus.walleij@linaro.org> Date: Mon, 27 Nov 2023 16:43:06 +0100 Subject: [PATCH net-next v9 3/5] dt-bindings: net: ethernet-switch: Accept special variants MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Message-Id: <20231127-marvell-88e6152-wan-led-v9-3-272934e04681@linaro.org> References: <20231127-marvell-88e6152-wan-led-v9-0-272934e04681@linaro.org> In-Reply-To: <20231127-marvell-88e6152-wan-led-v9-0-272934e04681@linaro.org> To: Andrew Lunn <andrew@lunn.ch>, Gregory Clement <gregory.clement@bootlin.com>, Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>, Rob Herring <robh+dt@kernel.org>, Krzysztof Kozlowski <krzysztof.kozlowski+dt@linaro.org>, Conor Dooley <conor+dt@kernel.org>, Russell King <linux@armlinux.org.uk>, Florian Fainelli <f.fainelli@gmail.com>, Vladimir Oltean <olteanv@gmail.com>, "David S. Miller" <davem@davemloft.net>, Eric Dumazet <edumazet@google.com>, Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>, =?utf-8?q?Marek_Beh=C3=BAn?= <kabel@kernel.org> Cc: Christian Marangi <ansuelsmth@gmail.com>, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Linus Walleij <linus.walleij@linaro.org>, Rob Herring <robh@kernel.org> X-Mailer: b4 0.12.4 X-Spam-Status: No, score=-0.9 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on howler.vger.email Precedence: bulk List-ID: <linux-kernel.vger.kernel.org> X-Mailing-List: linux-kernel@vger.kernel.org X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Mon, 27 Nov 2023 07:44:06 -0800 (PST) X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1783732475508824826 X-GMAIL-MSGID: 1783732475508824826 |
Series |
Create a binding for the Marvell MV88E6xxx DSA switches
|
|
Commit Message
Linus Walleij
Nov. 27, 2023, 3:43 p.m. UTC
Accept special node naming variants for Marvell switches with special node names as ABI. This is maybe not the prettiest but it avoids special-casing the Marvell MV88E6xxx bindings by copying a lot of generic binding code down into that one binding just to special-case these unfixable nodes. Reviewed-by: Rob Herring <robh@kernel.org> Reviewed-by: Andrew Lunn <andrew@lunn.ch> Signed-off-by: Linus Walleij <linus.walleij@linaro.org> --- .../devicetree/bindings/net/ethernet-switch.yaml | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-)
Comments
On Mon, Nov 27, 2023 at 04:43:06PM +0100, Linus Walleij wrote: > Accept special node naming variants for Marvell switches with > special node names as ABI. > > This is maybe not the prettiest but it avoids special-casing > the Marvell MV88E6xxx bindings by copying a lot of generic > binding code down into that one binding just to special-case > these unfixable nodes. > > Reviewed-by: Rob Herring <robh@kernel.org> > Reviewed-by: Andrew Lunn <andrew@lunn.ch> > Signed-off-by: Linus Walleij <linus.walleij@linaro.org> > --- Not great, not terrible. Reviewed-by: Vladimir Oltean <vladimir.oltean@nxp.com>
diff --git a/Documentation/devicetree/bindings/net/ethernet-switch.yaml b/Documentation/devicetree/bindings/net/ethernet-switch.yaml index 72ac67ca3415..b3b7e1a1b127 100644 --- a/Documentation/devicetree/bindings/net/ethernet-switch.yaml +++ b/Documentation/devicetree/bindings/net/ethernet-switch.yaml @@ -20,9 +20,26 @@ description: select: false -properties: - $nodename: - pattern: "^(ethernet-)?switch(@.*)?$" +allOf: + # This condition is here to satisfy the case where certain device + # nodes have to preserve non-standard names because of + # backward-compatibility with boot loaders inspecting certain + # node names. + - if: + properties: + compatible: + contains: + enum: + - marvell,turris-mox-mv88e6085 + - marvell,turris-mox-mv88e6190 + then: + properties: + $nodename: + pattern: "switch[0-3]@[0-3]+$" + else: + properties: + $nodename: + pattern: "^(ethernet-)?switch(@.*)?$" patternProperties: "^(ethernet-)?ports$":