Received: by 2002:a05:6358:d09b:b0:dc:cd0c:909e with SMTP id jc27csp4457015rwb; Sat, 10 Dec 2022 08:37:33 -0800 (PST) X-Google-Smtp-Source: AA0mqf777jdCRtDd0m5rSeJZ336MFds/8iemZQ6bLYPjbPD/OhqcjjkggUmerXY/N2PeUWc456ya X-Received: by 2002:aa7:9514:0:b0:576:ebcd:5e0c with SMTP id b20-20020aa79514000000b00576ebcd5e0cmr10040112pfp.0.1670690253194; Sat, 10 Dec 2022 08:37:33 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1670690253; cv=pass; d=google.com; s=arc-20160816; b=WxnT2GF+3ePXbHIq5Qu6lV9LXGOU2m6ESp9XfJhXUwvyrqsjEusY0aVAUCn65ZIFRq ryB8rp3Wj8VNwCdF3oAwliO16/jeA4B9dYqGViDkAAIykwb25jCKF4YZiUbeC4A8Ttmn TiefioXhD8FpWYbCP8iIn+1dhp0/eNsYrHnc7oY8hNBzQj1JxKVDbYFCFU16nzZvt3bR 2THOE1fdmZFDrD0eygvR/0N8r49bhpiVuY5Qx59bv0gjCp0IkXczZsdstvqSMZmaW2tV l0nggiQ6Py10hmVs0VsGX1ppgpNqdQtqdswgjOvsBMFSLdImfwdlMUPPko3rVZvvQxnM hFng== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:in-reply-to:from :content-language:references:cc:to:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=AuxrhOcouOodCpiih51edJPpKil1toFz+E57gSw+0VQ=; b=TCfQvdEcSn/XwV8BLOR8QA2XU9WUwBAKSBKKfEInwjhPNHH4oBLBVrZUx2EBFUIRKM z70Y/Z/q6+gZzTFx8R0Z4yI19p0q9+z/IEeJMBR6BlT+hRlpI4GnyIftpm1W8GWEmdfv JetB6NyZo+HYJ1+ch7LYh6twX6P6QWLHENerNi2fzkQVGoVCo4CjYVaekRfatPIhdE+d vSHSbJOL7lmx9FQoU1ZGPCPXsgl7zun1nSCoBEL8FMVnCyv7Mo0HqNlwZAltHPiNiPgE Bjs2sKt2gMt2/+VFHt0DwAhGhggWa1IliBMzPQDLwiW/aAX3VX1Jq/JPA+SU3nt6KIt7 7xyQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=WcYaXZWK; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id a11-20020a056a000c8b00b00571a5c5eaa5si5253119pfv.150.2022.12.10.08.37.23; Sat, 10 Dec 2022 08:37:33 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=WcYaXZWK; arc=pass (i=1 spf=pass spfdomain=arinc9.com dkim=pass dkdomain=arinc9.com dmarc=pass fromdomain=arinc9.com>); spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229758AbiLJQ0K (ORCPT + 75 others); Sat, 10 Dec 2022 11:26:10 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50976 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229548AbiLJQ0J (ORCPT ); Sat, 10 Dec 2022 11:26:09 -0500 Received: from sender4-op-o14.zoho.com (sender4-op-o14.zoho.com [136.143.188.14]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36D6D2DCA; Sat, 10 Dec 2022 08:26:04 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1670689494; cv=none; d=zohomail.com; s=zohoarc; b=M7mVTda5GTqsOXhGbbWYwAh8gSAhWSRqvdJYbo7y1LW5r+qHT0qN4+90mjKuuiYeqXdxIcFt0HXKRSGcv0zsaPXEDtcu29cy/s9Adj87toiHT9zjGZsELLZQ8okDv+M8RMByeoGcRmrJ0mGBohJ6nLg6YOnvVYEHpvvJqiFRnzw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1670689494; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=AuxrhOcouOodCpiih51edJPpKil1toFz+E57gSw+0VQ=; b=ezJXQLJD12neIlyNa2jEdbjolhPcyRQaeOKdNSjI4R3hHt3N8YfyRnUBOOXL1/Qq+TNlYGZ9RhnwlJRMZBclkuFxjvpBX+Hx2gqPOaMxUp9H7rzMQ+bhIE9WuhPPUgSipt+r2bpved0SSwb8JhfNlCjBXSDhQmos3xFK1R8kIKs= ARC-Authentication-Results: i=1; mx.zohomail.com; dkim=pass header.i=arinc9.com; spf=pass smtp.mailfrom=arinc.unal@arinc9.com; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1670689494; s=zmail; d=arinc9.com; i=arinc.unal@arinc9.com; h=Message-ID:Date:Date:MIME-Version:Subject:Subject:To:To:Cc:Cc:References:From:From:In-Reply-To:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=AuxrhOcouOodCpiih51edJPpKil1toFz+E57gSw+0VQ=; b=WcYaXZWKMSVvUIEUIJteLadKb5lBLZIW8nkLqECqShu0kboZ8ircbyTQz5Ks2xy1 mmpNIAjAEp/qtpLDRie0vrPFrVHEjN/oWUOvzAhkePilIdNBGJegTLyNHK8GijEyvX7 JKwuUvfGs3UOXLFzOe57iFHs1pgkH1t8EdO9Kt6I= Received: from [10.10.10.3] (37.120.152.236 [37.120.152.236]) by mx.zohomail.com with SMTPS id 1670689491712607.4170178546929; Sat, 10 Dec 2022 08:24:51 -0800 (PST) Message-ID: <1df417b5-a924-33d4-a302-eb526f7124b4@arinc9.com> Date: Sat, 10 Dec 2022 19:24:42 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.4.2 Subject: Re: [PATCH v5 net-next 04/10] dt-bindings: net: dsa: utilize base definitions for standard dsa switches To: Colin Foster , 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 Cc: John Crispin , Alexandre Belloni , Claudiu Manoil , Marek Vasut , Sean Wang , DENG Qingfang , Landen Chao , 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 , Rob Herring , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Andrew Lunn , George McCollister , Rob Herring References: <20221210033033.662553-1-colin.foster@in-advantage.com> <20221210033033.662553-5-colin.foster@in-advantage.com> Content-Language: en-US From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <20221210033033.662553-5-colin.foster@in-advantage.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 10.12.2022 06:30, 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 > switches with a reference to the new 'dsa.yaml#/$defs/ethernet-ports'. > > The scenario where DSA ports require additional properties can reference > '$dsa.yaml#' directly. This will allow switches to reference these standard > definitions of the DSA switch, but add additional properties under the port > nodes. > > Suggested-by: Rob Herring > Signed-off-by: Colin Foster > Reviewed-by: Linus Walleij > Reviewed-by: Florian Fainelli > Reviewed-by: Rob Herring > Acked-by: Alvin Šipraga # realtek > Acked-by: Arınç ÜNAL > --- > > v4 -> v5 > * Add Rob Reviewed, Arınç Acked > * Defer the removal of "^(ethernet-)?switch(@.*)?$" in dsa.yaml until a > later patch > * Undo the move of ethernet switch ports description in mediatek,mt7530.yaml > * Fix typos in commit message > > v3 -> v4 > * Rename "$defs/base" to "$defs/ethernet-ports" to avoid implication of a > "base class" and fix commit message accordingly > * Add the following to the common etherent-ports node: > "additionalProperties: false" > "#address-cells" property > "#size-cells" property > * Fix "etherenet-ports@[0-9]+" to correctly be "ethernet-port@[0-9]+" > * Remove unnecessary newline > * Apply changes to mediatek,mt7530.yaml that were previously in a separate patch > * Add Reviewed and Acked tags > > v3 > * New patch > > --- > .../bindings/net/dsa/arrow,xrs700x.yaml | 2 +- > .../devicetree/bindings/net/dsa/brcm,b53.yaml | 2 +- > .../devicetree/bindings/net/dsa/dsa.yaml | 22 +++++++++++++++++++ > .../net/dsa/hirschmann,hellcreek.yaml | 2 +- > .../bindings/net/dsa/mediatek,mt7530.yaml | 5 +---- > .../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, 32 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..5888e3a0169a 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/ethernet-ports > > 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..5bef4128d175 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/ethernet-ports > - if: > properties: > compatible: > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa.yaml b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > index 5efc0ee8edcb..9375cdcfbf96 100644 > --- a/Documentation/devicetree/bindings/net/dsa/dsa.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/dsa.yaml > @@ -58,4 +58,26 @@ oneOf: > > additionalProperties: true > > +$defs: > + ethernet-ports: > + description: A DSA switch without any extra port properties > + $ref: '#/' > + > + patternProperties: > + "^(ethernet-)?ports$": > + type: object > + additionalProperties: false > + > + properties: > + '#address-cells': > + const: 1 > + '#size-cells': > + const: 0 > + > + patternProperties: > + "^(ethernet-)?port@[0-9]+$": > + description: Ethernet switch ports > + $ref: dsa-port.yaml# > + unevaluatedProperties: false I've got moderate experience in json-schema but shouldn't you put 'type: object' here like you did for "^(ethernet-)?ports$"? > + > ... > diff --git a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml > index 73b774eadd0b..748ef9983ce2 100644 > --- a/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/hirschmann,hellcreek.yaml > @@ -7,7 +7,7 @@ $schema: http://devicetree.org/meta-schemas/core.yaml# > title: Hirschmann Hellcreek TSN Switch Device Tree Bindings > > allOf: > - - $ref: dsa.yaml# > + - $ref: dsa.yaml#/$defs/ethernet-ports > > maintainers: > - Andrew Lunn > diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > index f2e9ff3f580b..20312f5d1944 100644 > --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > @@ -157,9 +157,6 @@ patternProperties: > patternProperties: > "^(ethernet-)?port@[0-9]+$": > type: object This line was being removed on the previous version. Must be related to above. > - description: Ethernet switch ports > - > - unevaluatedProperties: false > > properties: > reg: Arınç