From mboxrd@z Thu Jan 1 00:00:00 1970 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 79726C43217 for ; Tue, 29 Nov 2022 00:28:58 +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:In-Reply-To:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=CSKC6+xHQuujnnnqLVGuGMUkbR4Q4hp4WErZK46iaO4=; b=4bP7JiCVaI2PVb sBHiatA9UrccIejwBJz5j7v2E0yyTyqtz2O4tyFz97OIPuILaCOh5V1Iy2SBEqT4HM3ZC5d+P2CM3 PZA4K44reRNVtyYzS6Ryzkxj7ZinmtDIawq/6nIsuTC68jeruNjXO4/39FgV94SVoVQQghHMqDvHD KNJwSxwx+qUahb3uyhr1NXkD2ZBCim1eeoQqS/6A8krRp3rHiKMoH0rKMqM0mNzfUhbkzBH3TqkVc 5COwjvb9xwWz0tnwS5YT4kZnsh1dJslu6tIx4Nti5c4+moMgd3xJs03IGgdeH6ZZw3TF8lsBq6HVP SxZZdHgsE3NyOyhG29TQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozoTU-004tQx-4V; Tue, 29 Nov 2022 00:27:48 +0000 Received: from desiato.infradead.org ([2001:8b0:10b:1:d65d:64ff:fe57:4e05]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ozoTP-004tPe-OS; Tue, 29 Nov 2022 00:27:43 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=desiato.20200630; h=In-Reply-To:Content-Type:MIME-Version: References:Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description; bh=q5dZdPYvUfozQhqkmlonGbI8EniXavdtqXfZRx36D18=; b=YnS0o0CiBLdxEav/AqEn4Um7se Y2nJU02RkgEDqPSRTFbZCKtjS4ACvwNrFXznEmF/sX7Z8xqQPr/NLRvGc5wUhI905XRkJiAfcPeUd vFAb5/bkDmJIYqZXmtbsbUb9Jmp7cvLAs/WLRSRaMM3PiaJwAGbNZPihK4VNvS2+U7GHwasu4OVs1 qCrULJ2samTXmSGBhd5Re9FHsA3cGaKjHwNEK7JZZZP1DCJpkpSBWWRb5jATMvkUlve9Npu1G+WWW FPfxfbektaZJbW7rNYmzDjha/LtXZFXRsRxb+NKPyie2AzBwHbHCt5Ue7ug/kwaPFTPsyKqoUwm36 LzBi/sJQ==; Received: from mail-oi1-f180.google.com ([209.85.167.180]) by desiato.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1oznTT-005e4c-32; Mon, 28 Nov 2022 23:23:45 +0000 Received: by mail-oi1-f180.google.com with SMTP id s206so13393942oie.3; Mon, 28 Nov 2022 15:23:41 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=q5dZdPYvUfozQhqkmlonGbI8EniXavdtqXfZRx36D18=; b=Fm7Z68hIYtQw/Bfu8GkgLEQnkMxvYefajIsvwEQVOpHJttFuf5JpJPLAMgF9IVSRoM jxA1nkU2IY6n+nsUdApCp49nQKFu/D/yGhtdgoDJtagpJvBns9peB0aQ7Z0iWPGLRITH 2IJIRcBF9zFjQO9tQgOzKFXX3kew9t94eqMMNiUa0mmhfN0xQBMZmbP29s1DsD0Tphq4 5nhjvdtN1DA7LyCSej8Ox3KeiNrmYruFFwJlDQXB3J0Oj9Xb+4iISY0zeX6ylbrxFb6z UDf0lC7UVvj0h7gwOvZ5KxmVrj8s3mXgGJQpbUgCgqexqdXVSgl2ejV+8geOOzBzIg/4 drxQ== X-Gm-Message-State: ANoB5pkh7T49A30IifkWGGjmfABz9JJk3EWvHaJ8/IkS8h1Hks9kaxUw /2GfQIOKeZKpMaguUNg56g== X-Google-Smtp-Source: AA0mqf6Xi0RitObRTHWEfRmcg3CLjY1g6LEw6t9+uwWWjYPmvv4KJPFIiDn1ezDuYbdQF9T8u3CZeQ== X-Received: by 2002:aca:c108:0:b0:354:946b:f72f with SMTP id r8-20020acac108000000b00354946bf72fmr19606267oif.48.1669677820060; Mon, 28 Nov 2022 15:23:40 -0800 (PST) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id m25-20020a056870059900b001422f9b5c17sm6565028oap.8.2022.11.28.15.23.38 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 28 Nov 2022 15:23:39 -0800 (PST) Received: (nullmailer pid 1685201 invoked by uid 1000); Mon, 28 Nov 2022 23:23:37 -0000 Date: Mon, 28 Nov 2022 17:23:37 -0600 From: Rob Herring To: Colin Foster Cc: linux-renesas-soc@vger.kernel.org, linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, netdev@vger.kernel.org, John Crispin , Alexandre Belloni , Claudiu Manoil , Marek Vasut , Sean Wang , DENG Qingfang , Landen Chao , =?UTF-8?B?bsOnIMOcTkFM?= , Vivien Didelot , =?UTF-8?B?Q2zDqW1lbnQgTMOpZ2Vy?= , =?UTF-8?Q?Alvin_=C5=A0ipraga?= , Linus Walleij , UNGLinuxDriver@microchip.com, Woojung Huh , Matthias Brugger , Kurt Kanzenbach , Krzysztof Kozlowski , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , George McCollister Subject: Re: [PATCH v3 net-next 03/10] dt-bindings: net: dsa: utilize base definitions for standard dsa switches Message-ID: <20221128232337.GA1513198-robh@kernel.org> References: <20221127224734.885526-1-colin.foster@in-advantage.com> <20221127224734.885526-4-colin.foster@in-advantage.com> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20221127224734.885526-4-colin.foster@in-advantage.com> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221128_232343_401084_D584F653 X-CRM114-Status: GOOD ( 21.03 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Sun, Nov 27, 2022 at 02:47:27PM -0800, Colin Foster wrote: > DSA switches can fall into one of two categories: switches where all ports > follow standard '(ethernet-)?port' properties, and switches that have > additional properties for the ports. > > The scenario where DSA ports are all standardized can be handled by > swtiches with a reference to 'dsa.yaml#'. > > The scenario where DSA ports require additional properties can reference > the new '$dsa.yaml#/$defs/base'. This will allow switches to reference > these base defitions of the DSA switch, but add additional properties under > the port nodes. You have this backwards. '$dsa.yaml#/$defs/base' can't be extended. Perhaps '$defs/ethernet-ports' would be a better name. > > Suggested-by: Rob Herring > Signed-off-by: Colin Foster > --- > > v3 > * New patch > > --- > .../bindings/net/dsa/arrow,xrs700x.yaml | 2 +- > .../devicetree/bindings/net/dsa/brcm,b53.yaml | 2 +- > .../devicetree/bindings/net/dsa/dsa.yaml | 19 ++++++++++++++++--- > .../net/dsa/hirschmann,hellcreek.yaml | 2 +- > .../bindings/net/dsa/mediatek,mt7530.yaml | 2 +- > .../bindings/net/dsa/microchip,ksz.yaml | 2 +- > .../bindings/net/dsa/microchip,lan937x.yaml | 2 +- > .../bindings/net/dsa/mscc,ocelot.yaml | 2 +- > .../bindings/net/dsa/nxp,sja1105.yaml | 2 +- > .../devicetree/bindings/net/dsa/realtek.yaml | 2 +- > .../bindings/net/dsa/renesas,rzn1-a5psw.yaml | 2 +- > 11 files changed, 26 insertions(+), 13 deletions(-) > > diff --git a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml > index 259a0c6547f3..8d5abb05abdf 100644 > --- a/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/arrow,xrs700x.yaml > @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# > title: Arrow SpeedChips XRS7000 Series Switch Device Tree Bindings > > allOf: > - - $ref: dsa.yaml# > + - $ref: dsa.yaml#/$defs/base > > maintainers: > - George McCollister > diff --git a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml > index 1219b830b1a4..f323fc01b224 100644 > --- a/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/brcm,b53.yaml > @@ -66,7 +66,7 @@ required: > - reg > > allOf: > - - $ref: dsa.yaml# > + - $ref: dsa.yaml#/$defs/base > - if: > properties: > compatible: > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > index b9d48e357e77..bd1f0f7c14a8 100644 > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > @@ -19,9 +19,6 @@ description: > select: false > > properties: > - $nodename: > - pattern: "^(ethernet-)?switch(@.*)?$" > - > dsa,member: > minItems: 2 > maxItems: 2 > @@ -58,4 +55,20 @@ oneOf: > > additionalProperties: true > > +$defs: > + base: > + description: A DSA switch without any extra port properties > + $ref: '#/' > + > + patternProperties: > + "^(ethernet-)?ports$": This node at the top level needs 'additionalProperties: false' assuming we don't allow extra properties in 'ports' nodes. If we do, then we'll need to be able to reference the 'ports' schema to extend it like is done with dsa-ports.yaml. > + type: object > + > + patternProperties: > + "^(ethernet-)?ports@[0-9]+$": > + description: Ethernet switch ports > + $ref: dsa-port.yaml# > + unevaluatedProperties: false > + > + One blank line. > ... _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel