Received: by 2002:a05:6358:16cd:b0:dc:6189:e246 with SMTP id r13csp1301150rwl; Fri, 4 Nov 2022 12:12:16 -0700 (PDT) X-Google-Smtp-Source: AMsMyM76dKQhkS1BwQMTLHlQpS1moSNjweqFkNFh5lZ/fq2BkKH0ObCWjlWyNcQgRUF37ZDHA6ik X-Received: by 2002:a17:903:244a:b0:187:10f1:9f91 with SMTP id l10-20020a170903244a00b0018710f19f91mr33761795pls.37.1667589136286; Fri, 04 Nov 2022 12:12:16 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1667589136; cv=none; d=google.com; s=arc-20160816; b=dVKwW7XRrNr4dHx4OqjoKUqkO6zLdi9jof9F4dW3bABXneLW552HvdrLoIQHxNjfM1 Rr4ic162+A+e1wDBqc8p05TSRz8t+rvt1npLdJ9BEg5jdhRC5xGAmblWhvvJqvc5F8Nl JWTAb9Wzi+4x24j6gQyjpdu6hjPcHks6NXaMUgLacxnBNAvXr3EzDprOhTn1VH4wWyV/ +23PFRm0Y8WdQqgPUKQdUJyX+7M3eiHYtRolc9tP+lYuXG4Nf52c9JHdDpuUspbY/ves NwjlgrKhw0sluvx4b3tcTsqYKN3vpxwq3H1bZVhZM54KVkUK0a5E8Qk/oy+OvzPBdDdg FI6w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date; bh=JFZemGAiz+864ig6tHEwR4+zzxKN7GhJUHozYh5QjjI=; b=ZCbbXKRDkRvZTMHDCyYAKnM0T/8dv/LtCxxF3Ltwjd6D8833KHmNGHZZfETy2DMAXq ejlqWhuy5JbCQUBTm8FjKeiABO7NW8HCquW/BqX13EDh5TTbZN56XhUhqQVS91fgmhSS RAhgMNaRBOyJmA0XK9x8ohxzvQk64s0RAMqGsm8vkzmqvicLug+gl2rR+YjDFdWdTSEg oU87NcTOJvrPS5W7mPvrptM1DL0WjUdlJeHt/ABYMaXxLqJgReWWgP5rAMX4liQg/+eY wVw0fCpx6k5ddOJGMBV+DaYKkSfViI4aOS2EUKepbUf38oecvIhtaLTyxAx8JO4CM8NU kEkQ== ARC-Authentication-Results: i=1; mx.google.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id w184-20020a6382c1000000b0044b5e15db73si346119pgd.249.2022.11.04.12.12.02; Fri, 04 Nov 2022 12:12:16 -0700 (PDT) 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; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229588AbiKDSub (ORCPT + 96 others); Fri, 4 Nov 2022 14:50:31 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36784 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229471AbiKDSu3 (ORCPT ); Fri, 4 Nov 2022 14:50:29 -0400 Received: from mail-oi1-f180.google.com (mail-oi1-f180.google.com [209.85.167.180]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9BA375F70; Fri, 4 Nov 2022 11:50:28 -0700 (PDT) Received: by mail-oi1-f180.google.com with SMTP id g10so6069001oif.10; Fri, 04 Nov 2022 11:50:28 -0700 (PDT) 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=JFZemGAiz+864ig6tHEwR4+zzxKN7GhJUHozYh5QjjI=; b=GG/jE/pffRQmCB2QL+cRGeYDbEZl+QSXz2A9L2QDFJu4PZ9xgrYD3bxMrKiLGzpD+F YZyBUpUrQUFB/Ls6E8l20JhgLbQaN3D5Bcyw9pFMFvGi8uE/eIcZbM0pmYfum8Z1P62p lu8sgIRGS6q+Rm0He2A10M7ABFDM4ow7jQurenkvpoe7AnCcjAAvLVjbUysKo515yneZ cCNqy4S983rHpUizGQFR4LA0Mj5nkONR+PdlJIwLomTVxFx7COl5bIwQtj2A1CriKkoe bbm53k3rX7s1FcZugzTw27xdNrG4G9TApeKU66V/RO/4PNAmcotoQ0huYsISZwvez8NG mPLw== X-Gm-Message-State: ACrzQf39tKJwsCG8/B6/Sne7Es9oBBe+lNVYl1y14Ddf0Wv2vTvdEiZT mI6hfwt6a+0fSHjiVdop5w== X-Received: by 2002:a54:4016:0:b0:35a:3878:f22a with SMTP id x22-20020a544016000000b0035a3878f22amr9656904oie.47.1667587827748; Fri, 04 Nov 2022 11:50:27 -0700 (PDT) Received: from robh_at_kernel.org (66-90-144-107.dyn.grandenetworks.net. [66.90.144.107]) by smtp.gmail.com with ESMTPSA id 2-20020aca2102000000b0035173c2fddasm1726258oiz.51.2022.11.04.11.50.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Nov 2022 11:50:27 -0700 (PDT) Received: (nullmailer pid 2243197 invoked by uid 1000); Fri, 04 Nov 2022 18:50:28 -0000 Date: Fri, 4 Nov 2022 13:50:28 -0500 From: Rob Herring To: Colin Foster Cc: linux-mediatek@lists.infradead.org, linux-arm-kernel@lists.infradead.org, netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, Alexandre Belloni , Claudiu Manoil , John Crispin , Sean Wang , DENG Qingfang , Landen Chao , =?iso-8859-1?Q?n=E7_=DCNAL?= , Matthias Brugger , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , Vladimir Oltean , Florian Fainelli , Vivien Didelot , Andrew Lunn , Krzysztof Kozlowski Subject: Re: [PATCH v2 net-next 5/6] dt-bindings: net: add generic ethernet-switch-port binding Message-ID: <20221104185028.GB2133300-robh@kernel.org> References: <20221104045204.746124-1-colin.foster@in-advantage.com> <20221104045204.746124-6-colin.foster@in-advantage.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20221104045204.746124-6-colin.foster@in-advantage.com> X-Spam-Status: No, score=-1.4 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS autolearn=no 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 Thu, Nov 03, 2022 at 09:52:03PM -0700, Colin Foster wrote: > The dsa-port.yaml binding had several references that can be common to all > ethernet ports, not just dsa-specific ones. Break out the generic bindings > to ethernet-switch-port.yaml they can be used by non-dsa drivers. > > Signed-off-by: Colin Foster > Suggested-by: Vladimir Oltean > --- > > v1 -> v2 > * Remove accidental addition of > "$ref: /schemas/net/ethernet-switch-port.yaml" which should be kept > out of dsa-port so that it doesn't get referenced multiple times > through both ethernet-switch and dsa-port. > > --- > .../devicetree/bindings/net/dsa/dsa-port.yaml | 27 +----------- > .../bindings/net/ethernet-switch-port.yaml | 44 +++++++++++++++++++ > .../bindings/net/ethernet-switch.yaml | 4 +- > MAINTAINERS | 1 + > 4 files changed, 49 insertions(+), 27 deletions(-) > create mode 100644 Documentation/devicetree/bindings/net/ethernet-switch-port.yaml > > diff --git a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml > index 10ad7e71097b..d97fb87cccb0 100644 > --- a/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml > +++ b/Documentation/devicetree/bindings/net/dsa/dsa-port.yaml > @@ -4,7 +4,7 @@ > $id: http://devicetree.org/schemas/net/dsa/dsa-port.yaml# > $schema: http://devicetree.org/meta-schemas/core.yaml# > > -title: Ethernet Switch port Device Tree Bindings > +title: DSA Switch port Device Tree Bindings > > maintainers: > - Andrew Lunn > @@ -14,13 +14,7 @@ maintainers: > description: > Ethernet switch port Description > > -allOf: > - - $ref: /schemas/net/ethernet-controller.yaml# > - > properties: > - reg: > - description: Port number > - > label: > description: > Describes the label associated with this port, which will become > @@ -57,25 +51,6 @@ properties: > - rtl8_4t > - seville > > - phy-handle: true > - > - phy-mode: true > - > - fixed-link: true > - > - mac-address: true > - > - sfp: true > - > - managed: true > - > - rx-internal-delay-ps: true > - > - tx-internal-delay-ps: true > - > -required: > - - reg > - > # CPU and DSA ports must have phylink-compatible link descriptions > if: > oneOf: > diff --git a/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml > new file mode 100644 > index 000000000000..cb1e5e12bf0a > --- /dev/null > +++ b/Documentation/devicetree/bindings/net/ethernet-switch-port.yaml > @@ -0,0 +1,44 @@ > +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) > +%YAML 1.2 > +--- > +$id: http://devicetree.org/schemas/net/ethernet-switch-port.yaml# > +$schema: http://devicetree.org/meta-schemas/core.yaml# > + > +title: Ethernet Switch port Device Tree Bindings > + > +maintainers: > + - Andrew Lunn > + - Florian Fainelli > + - Vivien Didelot > + > +description: > + Ethernet switch port Description > + > +$ref: ethernet-controller.yaml# > + > +properties: > + reg: > + description: Port number > + > + phy-handle: true > + > + phy-mode: true > + > + fixed-link: true > + > + mac-address: true > + > + sfp: true > + > + managed: true > + > + rx-internal-delay-ps: true > + > + tx-internal-delay-ps: true I know this is just copied, but these have no effect on validation. I assume what they are meant to be is these are the subset of ethernet-controller.yaml which are allowed, but that would only work with 'additionalProperties: false'. That wouldn't work because we also want to users to extend this with custom properties. What's needed here is a list of properties not allowed: disallowed-prop: false Or we can just allow anything from ethernet-controller.yaml and drop this list. > + > +required: > + - reg > + > +additionalProperties: true > + > +...