Received: by 2002:a6b:500f:0:0:0:0:0 with SMTP id e15csp145248iob; Tue, 17 May 2022 21:46:55 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyu8LhbwTqesmMRxbJR9ZTSBykIHYMG2MzlFb3gpPfObcX674ELGQp/gbn1ffvlJmsra7Wi X-Received: by 2002:a05:6a00:cd4:b0:510:49f7:12a4 with SMTP id b20-20020a056a000cd400b0051049f712a4mr26100696pfv.59.1652849215607; Tue, 17 May 2022 21:46:55 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1652849215; cv=none; d=google.com; s=arc-20160816; b=gvUI4ediN8GpF28xfu+IHU5FRE564ajYaW/oPQdjuh6j4RtYtyJfzqPIaRmgzPxI1O PasTIAckF2CThRUyNFFnNDEA4yhx4Xe4MXJzSgUQT/B5V/VU9gbf2jZ3rlqmt9zguIoS 0hT2MbDPP0rl+PBWn3/XkHaFmvTU3BIm+EBh/KEwHDTTjj+8KUsLM3wYUlPW+VvEYCY1 cOdo22+RQS8TzoExCujbeFVs972BoJh7jNxfOZwPnh4XckjiXK424mcFl/5TGklLdxa8 3K760spgqugtb5cJHakawcV07jb9xxSM2yPEgCJ3IYMIxmTMwxYX1oyuB/VMUbd5t6BT qQTw== 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=ckNmPcl7fe5xiocWvQwlJ3B7sjwM65UrQXbcw0Qh69c=; b=Dh7S5iGiecb6CN9kjm2AUluh0p0X03LrYzDnIM+sEjRA5P2KosaK9mhwYoOQXdIrcZ P1Zfq9hRhWCelQ+M6Qt4P7TVq6ILbFjqWH6E6Nca/PQrfJ8xyKI+FHI68idCOMj/RdV5 SLQ+RyCO/HaGmKxADBXj2xWhULCUhL0DeVTvoV6hhZI0LJfMQstbpj6g5YsoZoXtgOZi B6Ndvw3W+9xhrVrskMBSWiNnLV7UsE3wbcNuV2N1i+d93MZIQhaNWh6rhSiwKQ9Hgfs2 ya+Xu605dPn9Op4+Gc8WIa9k9bIInLjJJyTEGFHzCZoBJe7wsuALvEXHUNsiLHoCG/FV pS8w== ARC-Authentication-Results: i=1; mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [23.128.96.19]) by mx.google.com with ESMTPS id om2-20020a17090b3a8200b001dc681e0252si1693881pjb.5.2022.05.17.21.46.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 21:46:55 -0700 (PDT) Received-SPF: softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) client-ip=23.128.96.19; Authentication-Results: mx.google.com; spf=softfail (google.com: domain of transitioning linux-kernel-owner@vger.kernel.org does not designate 23.128.96.19 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 6751710635F; Tue, 17 May 2022 20:58:51 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233927AbiERBzH (ORCPT + 99 others); Tue, 17 May 2022 21:55:07 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:49936 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229565AbiERBzC (ORCPT ); Tue, 17 May 2022 21:55:02 -0400 Received: from mail-oi1-f173.google.com (mail-oi1-f173.google.com [209.85.167.173]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id C3F4454BD7; Tue, 17 May 2022 18:55:01 -0700 (PDT) Received: by mail-oi1-f173.google.com with SMTP id w130so1127409oig.0; Tue, 17 May 2022 18:55:01 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=ckNmPcl7fe5xiocWvQwlJ3B7sjwM65UrQXbcw0Qh69c=; b=B57yfkwqMW8Hg8FpvgHOcG24D4SR2K1OGV6oQp79tT6nA6QuVkDBLfzQpPY1qYRBpu nWn7FTTQmde+pAdqpv1r9J7b/7HtFeKCaYE5y+14hgNgaoWt+q+dIoAc+klm57agpz9G WlmdpdAQ/+GmPIvTmNfoNH2xFspxyqNmCYMiUPwp4mWu5pROnMBXTAAA+OxMCLRNOiQI EIPqG9t6oeqFiRmj21ChmLUUfhfkCrXYbwwGYzbi75lemSYf2otHNGhCMQlPW5RXgV8u 1voglQSPWezJF+PZ5+NNO9Q3yAC6WZXqsbPMcVj+yTHc8p4iOKzs4bO+3rwhdobDiYeP 15xA== X-Gm-Message-State: AOAM533R6oG0VY6jwKi7rgzsgVxiHn07Ws7AT/MSPpK1Pt2ino74WLJw EVmw7ofxDDS4BzBqzCV11eqexvSDaA== X-Received: by 2002:a05:6808:188a:b0:326:7f5f:985c with SMTP id bi10-20020a056808188a00b003267f5f985cmr11975649oib.210.1652838901111; Tue, 17 May 2022 18:55:01 -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 b11-20020acab20b000000b00326414c1bb7sm362362oif.35.2022.05.17.18.54.59 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 17 May 2022 18:55:00 -0700 (PDT) Received: (nullmailer pid 2063166 invoked by uid 1000); Wed, 18 May 2022 01:54:59 -0000 Date: Tue, 17 May 2022 20:54:59 -0500 From: Rob Herring To: Frank Wunderlich Cc: Frank Wunderlich , linux-rockchip@lists.infradead.org, linux-mediatek@lists.infradead.org, Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Krzysztof Kozlowski , Matthias Brugger , Heiko Stuebner , Sean Wang , Landen Chao , DENG Qingfang , Peter Geis , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Greg Ungerer , =?iso-8859-1?Q?Ren=E9?= van Dorst , Mauro Carvalho Chehab Subject: Re: Re: [PATCH v3 1/6] dt-bindings: net: dsa: convert binding for mediatek switches Message-ID: <20220518015459.GB2049643-robh@kernel.org> References: <20220507170440.64005-1-linux@fw-web.de> <20220507170440.64005-2-linux@fw-web.de> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,MAILING_LIST_MULTI, RDNS_NONE,SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE 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 Wed, May 11, 2022 at 10:02:45AM +0200, Frank Wunderlich wrote: > Hi > > thanks for review > > > Gesendet: Dienstag, 10. Mai 2022 um 20:44 Uhr > > Von: "Rob Herring" > > On Sat, May 07, 2022 at 07:04:35PM +0200, Frank Wunderlich wrote: > > > From: Frank Wunderlich > > > > +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml > > > > +properties: > > > + compatible: > > > + enum: > > > + - mediatek,mt7530 > > > + - mediatek,mt7531 > > > + - mediatek,mt7621 > > > + > > > > > + "#address-cells": > > > + const: 1 > > > + > > > + "#size-cells": > > > + const: 0 > > > > I don't see any child nodes with addresses, so these can be removed. > > dropping this (and address-cells/size-cells from examples) causes errors like this (address-/size-cells set in mdio > node, so imho it should inherite): I think you are off a level. > Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.example.dts:34.25-35: Warning (reg_format): > /example-0/mdio/switch@0/ports/port@0:reg: property has invalid length (4 bytes) (#address-cells == 2, #size-cells == 1) That's for yet another level where 'ports' node need the properties. > Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.example.dtb: Warning (pci_device_reg): Failed prerequisite 'reg_format' > > > > + interrupt-controller: > > > + type: boolean > > > > Already has a type. Just: > > > > interrupt-controller: true > > > > > + > > > + interrupts: > > > + maxItems: 1 > > > > +patternProperties: > > > + "^(ethernet-)?ports$": > > > + type: object > > > > additionalProperties: false > > imho this will block address-/size-cells from this level too. looks like it is needed here too (for port-regs). > > > > + > > > + patternProperties: > > > + "^(ethernet-)?port@[0-9]+$": > > > + type: object > > > + description: Ethernet switch ports > > > + > > > + unevaluatedProperties: false > > > + > > > + properties: > > > + reg: > > > + description: > > > + Port address described must be 5 or 6 for CPU port and from 0 > > > + to 5 for user ports. > > > + > > > + allOf: > > > + - $ref: dsa-port.yaml# > > > + - if: > > > + properties: > > > + label: > > > + items: > > > + - const: cpu > > > + then: > > > + required: > > > + - reg > > > + - phy-mode > > > + > > > > + - if: > > > + required: > > > + - interrupt-controller > > > + then: > > > + required: > > > + - interrupts > > > > This can be expressed as: > > > > dependencies: > > interrupt-controller: [ interrupts ] > > ok, i will change this > > > > + ports { > > > > Use the preferred form: ethernet-ports > > current implementation in all existing dts and examples from old binding are "ports" only. > should they changed too? They don't have to be the schema allows both, but the example should be best practice. Rob