From patchwork Mon Nov 13 23:36:01 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Linus Walleij X-Patchwork-Id: 13454604 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 20D24C4167D for ; Mon, 13 Nov 2023 23:36:41 +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=dc9Teyrh0B8VFbXr32+CiyPgXLEIB+RKSb252IermvE=; b=d+6xORfb4wO3Xu PPdLnnqawiOitfr5+KLU8cwNgydjsbMjuCKdVYQ2GZbT+qM+igFWOD3uxKHknHagdqk6YBRiq3IK+ 9b1cKQZm32nPp/465TZGhpPXxxhc8SGCBe23G9BUdTlLruYYoCtHT1UbdtM6gGApAs+KM2RVOcUeX zaHhk/xEVU2Tsa1q00Vf9iuLFlet+FtdaWI6p1lg5jam55RvEiSmBysMZSoNnkCwCS0F9aXlZCABC gNvCFx/qeqBHe8M0B8ynjEQJ3BwOIM1uJB+ifb1Lh67mesqslbxLF/4T9/GhUm5+8dj2Wr89YKQ8A b0jToUhTYPDpYC635+BQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1r2gTT-00EtTT-0c; Mon, 13 Nov 2023 23:36:11 +0000 Received: from mail-lj1-x22f.google.com ([2a00:1450:4864:20::22f]) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1r2gTN-00EtPW-2w for linux-arm-kernel@lists.infradead.org; Mon, 13 Nov 2023 23:36:07 +0000 Received: by mail-lj1-x22f.google.com with SMTP id 38308e7fff4ca-2c5071165d5so21789691fa.0 for ; Mon, 13 Nov 2023 15:36:05 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1699918564; x=1700523364; 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=N7sBbrB5dazvmxdFbFWIm12yMxEolhEuwzB459S9svI=; b=QQ0szzuuDfLI0dvxkfo7o3F9Kiv44tRKC4fXAyZ5Ana1GXGa+T5mG9AQhZJnhCXTNE 1tIoqicPV7IU7uMZ4q4MTVERG6yyRw6x1xURMO/XN7i/kxt5Fg0dTr47Gki1sFsi+c9j YTmUnEtpbkTWNNPCMOzexGhK0+X5yG3njAH8wgd3wNYQu+hmvDlX5vZiZdOjiZse1TiB qhumKXnoGrBYloGA/w4atJ5DnETgihgGXNG1rCJjnptMK43zsK7X8ImeHXQvH8RJRFhD yavGqXUL95YwXYF/Al/Pd76YIjEjvXJnJe81v3Kw1ZCTDRV3GyRHe+ER2fb2DhgbT0pj Mipg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699918564; x=1700523364; 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=N7sBbrB5dazvmxdFbFWIm12yMxEolhEuwzB459S9svI=; b=o64cQCPoS6XZN2A16/pa5kRFs/I3eb+x/mvRwxK0Qjq59ueorrREQxlrv+IV6ZMA6B JvSvmyW1O17Z5TgH/If7XUtb8WSpPfucq4g9PXA5wSUyQp0fkt4BEqZ9ZvGYZOlbk4DC JO4FMbux6UvgpjWf4ZZDdPnNauogqsfloU+Crcu1P+8PMMCl+u0vZqGHmrkMQj6Fo3/1 6E3IrlqyvgllUXfF8i+1IrngMKLpXd2vipudetkUKIPf+TlRHwsi/2iZZlztVgNJ3Mhp 6GgUik8IKbo0G3SvUOOhnvb+cgemHJTjazNN0zff+8B7vIS9m3F064ekXuZdIMgpgPGl 7dgg== X-Gm-Message-State: AOJu0YxJLf7f3BsDTnjnyEusBjQt6RsUXChRXRFQrUnhbKkJXYvDNyQi qIYw5Bf12FixmqNDGgtil606uQ== X-Google-Smtp-Source: AGHT+IEcKzuTyUsnCCKx0aDIJeN7M8fqCWuHVFSv5zu+wJ/DA8g7pht0vHxLMNEUkq/nMkCaBzn1tQ== X-Received: by 2002:a05:651c:1055:b0:2c5:3139:2d04 with SMTP id x21-20020a05651c105500b002c531392d04mr451059ljm.47.1699918564602; Mon, 13 Nov 2023 15:36:04 -0800 (PST) Received: from [127.0.1.1] ([85.235.12.238]) by smtp.gmail.com with ESMTPSA id 17-20020a2e0611000000b002b70a8478ddsm1202859ljg.44.2023.11.13.15.36.03 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Nov 2023 15:36:04 -0800 (PST) From: Linus Walleij Date: Tue, 14 Nov 2023 00:36:01 +0100 Subject: [PATCH net-next v8 6/9] dt-bindings: net: ethernet-switch: Accept special variants MIME-Version: 1.0 Message-Id: <20231114-marvell-88e6152-wan-led-v8-6-50688741691b@linaro.org> References: <20231114-marvell-88e6152-wan-led-v8-0-50688741691b@linaro.org> In-Reply-To: <20231114-marvell-88e6152-wan-led-v8-0-50688741691b@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 X-Mailer: b4 0.12.4 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20231113_153605_955507_FD1507D8 X-CRM114-Status: GOOD ( 11.80 ) 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 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. Signed-off-by: Linus Walleij Reviewed-by: Andrew Lunn Reviewed-by: Rob Herring --- .../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$":