Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp3163049rdh; Mon, 27 Nov 2023 07:44:14 -0800 (PST) X-Google-Smtp-Source: AGHT+IGNjkZIrvqky/ZJSpkmbM/0xZT6Uk1iFaYbBIyLv6K1PL3aNLg5g4wM2wgOExNVwSrjad8W X-Received: by 2002:a17:90b:350d:b0:285:b6b1:a2d6 with SMTP id ls13-20020a17090b350d00b00285b6b1a2d6mr6922111pjb.33.1701099854122; Mon, 27 Nov 2023 07:44:14 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1701099854; cv=none; d=google.com; s=arc-20160816; b=mB72WiE74Ul1SVLSMt3QVyKpRd55K5qHeDmeu7q1qPLF156OQ0LW3wkijJNcjw04NY +2MLlc+ROM/v9WvkBwna73eVsUoMd0p18KnwD96jqx005GrfAqB4tHvmo8G9KhTbVXtT CvF5BPLEiEXKzsN9ak14R7zIDeIK99XTxbSlGNt+9zd2rCxjSJJiIfclcyOGq968J/vJ Syf3hG/vmU60bTLWxGZaqrohXDK65Pc4iII+XgRnuLcjRz1Gjz2RnbUOaW4kny/qI+Dv FyS2q5y6e4rP0bfAtIGbx5OPynXSpXSiQRy9ZBAzDpSrhCMz+/SNoXRrHzNa8wL9VajR oW+Q== 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 Return-Path: Received: from howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id w7-20020a17090aea0700b002805aa7b138si10886309pjy.59.2023.11.27.07.44.13 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Nov 2023 07:44:14 -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 E06758227782; Mon, 27 Nov 2023 07:44:10 -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 + 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 ); 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 ; Mon, 27 Nov 2023 07:43:17 -0800 (PST) Received: by mail-lf1-x130.google.com with SMTP id 2adb3069b0e04-507e85ebf50so5907675e87.1 for ; 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 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 , 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 , =?utf-8?q?Marek_Beh=C3=BAn?= Cc: Christian Marangi , linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, netdev@vger.kernel.org, Linus Walleij , Rob Herring 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: 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:11 -0800 (PST) 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 Reviewed-by: Andrew Lunn Signed-off-by: Linus Walleij --- .../devicetree/bindings/net/ethernet-switch.yaml | 23 +++++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) 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$": -- 2.34.1