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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9F64DC4332F for ; Thu, 5 May 2022 20:29:39 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1385860AbiEEUdR (ORCPT ); Thu, 5 May 2022 16:33:17 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47166 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1384948AbiEEUdO (ORCPT ); Thu, 5 May 2022 16:33:14 -0400 Received: from mail-wm1-x32e.google.com (mail-wm1-x32e.google.com [IPv6:2a00:1450:4864:20::32e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 113CC5F8F5 for ; Thu, 5 May 2022 13:29:32 -0700 (PDT) Received: by mail-wm1-x32e.google.com with SMTP id p7-20020a05600c358700b00393e80c59daso4482562wmq.0 for ; Thu, 05 May 2022 13:29:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; h=message-id:date:mime-version:user-agent:subject:content-language:to :cc:references:from:in-reply-to:content-transfer-encoding; bh=Nhiu0fngZGCp2SeeUlWWgcjMH+09fel050MQuuk+CH0=; b=c1oSeU4BaXTY3ReYOr/uFAyO9izBH2dG1Qlnf+8Hr8Uw3vUsoKOHenuz7wpGz1G3lv ym40wpjP1R1uTQtgYd8gikEnTIRqUlXoWrvkAnzPHg8AGFpeocUHG2kgkwMQX9NL3etq +mxfkjnSDJDdW3HnR8hp/i6C1WPmJXk+LFZvFqsi3IRZIzWwmnN90bnnpRzXLIKPG6Zc eHtIJrBosNasWd3p+NDNF3vx4pBQ+ez3FTfArfU5wI/onzupOfKc35+xFiIfqWc6qqRh q7Ut2jUxdfhmab/DvgF8OIAbxIYnzwpEPb49AiYU/N0TsdomVI/zvfwD+IaQxuFI+dnI g5xw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:message-id:date:mime-version:user-agent:subject :content-language:to:cc:references:from:in-reply-to :content-transfer-encoding; bh=Nhiu0fngZGCp2SeeUlWWgcjMH+09fel050MQuuk+CH0=; b=VQvKR7CDIuvpPC310g7LVTJcqNUFWPKA0v/rK3jmF779qNKntzm97knR43Rb98WdFD 8z/UZv1JPTIooaSF96Ch2EG6lHJOmoRNUdQlFJLsnH7EZ4zdsfgQRF+Xi9FyNlZ/7TvJ mj28o3BZ/JPlqgo4wvCUUUan4HlqGEk3YfgL3NaOTZuJdyN3rzzYlbPzNltCQk4JTGyD 19GxKL3OT552DbnWxvLqD75Ihk6Uw5Ezl552u7LqW0M07/FqQVi1FPlS2pjNAFY09shj Siow6pka1MZpZ+eco2td0LfqWMWc/kaVfR6lcyJWnMSqZCBH/+V2M00ghTsgHQwjmIJc bRUA== X-Gm-Message-State: AOAM533kBH0upmTsQILSdnpeAqYqCZCXV720hzZ5hqznDpA4tDjG3a6V IjKtMTASQhOf+XYl/NDMfG4Jkg== X-Google-Smtp-Source: ABdhPJyTndqxOkEr/uFOGU4QF0R1aF80DfUbLWNbePR/UUOLh1w33usRsZPRT7oIn/7Jas5VFkmrmQ== X-Received: by 2002:a7b:cd15:0:b0:394:497d:ad1c with SMTP id f21-20020a7bcd15000000b00394497dad1cmr35505wmj.182.1651782570542; Thu, 05 May 2022 13:29:30 -0700 (PDT) Received: from [192.168.0.222] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id n13-20020a056000170d00b0020c5253d911sm2035574wrc.93.2022.05.05.13.29.29 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Thu, 05 May 2022 13:29:30 -0700 (PDT) Message-ID: <6d45f060-85e6-f3ff-ef00-6c68a2ada7a1@linaro.org> Date: Thu, 5 May 2022 22:29:28 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.8.1 Subject: Re: [RFC v2] dt-bindings: net: dsa: convert binding for mediatek switches Content-Language: en-US To: Frank Wunderlich , linux-mediatek@lists.infradead.org Cc: Frank Wunderlich , Andrew Lunn , Vivien Didelot , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , Sean Wang , Landen Chao , DENG Qingfang , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Greg Ungerer , =?UTF-8?Q?Ren=c3=a9_van_Dorst?= , Mauro Carvalho Chehab References: <20220505150008.126627-1-linux@fw-web.de> From: Krzysztof Kozlowski In-Reply-To: <20220505150008.126627-1-linux@fw-web.de> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 05/05/2022 17:00, Frank Wunderlich wrote: > From: Frank Wunderlich > > Convert txt binding to yaml binding for Mediatek switches. > > Signed-off-by: Frank Wunderlich Thank you for your patch. There is something to discuss/improve. > + const: 1 > + > + "#size-cells": > + const: 0 > + > + core-supply: > + description: | Drop | everywhere where it is not needed (so in all places, AFAICT) > + Phandle to the regulator node necessary for the core power. > + > + "#gpio-cells": > + description: | > + Must be 2 if gpio-controller is defined. Skip description, it's obvious from the GPIO controller schema. > + const: 2 > + > + gpio-controller: > + type: boolean > + description: | > + if defined, MT7530's LED controller will run on GPIO mode. > + > + "#interrupt-cells": > + const: 1 > + > + interrupt-controller: > + type: boolean > + > + interrupts: > + maxItems: 1 > + > + io-supply: > + description: | > + Phandle to the regulator node necessary for the I/O power. > + See Documentation/devicetree/bindings/regulator/mt6323-regulator.txt > + for details for the regulator setup on these boards. > + > + mediatek,mcm: > + type: boolean > + description: | > + if defined, indicates that either MT7530 is the part on multi-chip > + module belong to MT7623A has or the remotely standalone chip as the > + function MT7623N reference board provided for. > + > + reset-gpios: > + description: | > + Should be a gpio specifier for a reset line. Skip description. > + maxItems: 1 > + > + reset-names: > + description: | > + Should be set to "mcm". Skip description. > + const: mcm > + > + resets: > + description: | > + Phandle pointing to the system reset controller with line index for > + the ethsys. > + maxItems: 1 > + > +required: > + - compatible > + - reg > + > +allOf: > + - $ref: "dsa.yaml#" > + - if: > + required: > + - mediatek,mcm > + then: > + required: > + - resets > + - reset-names > + else: > + required: > + - reset-gpios > + > + - if: > + required: > + - interrupt-controller > + then: > + required: > + - interrupts > + > + - if: > + properties: > + compatible: > + items: > + - const: mediatek,mt7530 > + then: > + required: > + - core-supply > + - io-supply > + > + > +patternProperties: patternProperties go before allOf, just after regular properties. > + "^(ethernet-)?ports$": > + type: object Also on this level: unevaluatedProperties: false > + > + patternProperties: > + "^(ethernet-)?port@[0-9]+$": > + type: object > + description: Ethernet switch ports > + > + properties: > + reg: > + description: | > + Port address described must be 6 for CPU port and from 0 to 5 for user ports. This looks like not wrapped @80 character. > + > + unevaluatedProperties: false > + > + allOf: > + - $ref: dsa-port.yaml# > + - if: > + properties: > + label: > + items: > + - const: cpu > + then: > + required: > + - reg > + - phy-mode > + > +unevaluatedProperties: false Best regards, Krzysztof