Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp630222rwl; Fri, 7 Apr 2023 02:58:33 -0700 (PDT) X-Google-Smtp-Source: AKy350YMJV3O+4y341DXeHmxg4QqocUOchdzzkMy4AllKCs+QT5GmPYNZxu3WMlnc9NiJkZmY+cP X-Received: by 2002:a62:7b94:0:b0:5ce:ef1b:a86 with SMTP id w142-20020a627b94000000b005ceef1b0a86mr1917705pfc.2.1680861512701; Fri, 07 Apr 2023 02:58:32 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1680861512; cv=pass; d=google.com; s=arc-20160816; b=C4+3FvP1FWsexVSHPVIpr3ELmJuRoEbuujtPr9ByuQV5QCH1Ksaq+ObxhAvhimzHXS UDI/InkZjbEsBESR/HtVTSf879VykB9RB+rgKf0+Wlo5QY+4clX3Ip2x2InjmvGkzd1H Js9e1PcKMs/Ti677qnT7wl9MGZHXN6kPY2FoNxjiGcsUUhTKDMial5MpcEvXq2NKxudK RiQ7pyr+YM/rRWAbxxdcJoO3E/LIpQpde2I8OxnjC3ToPzqx6LgRBQ3Hp7+tXlxP/2Ya bF2aQWvxbaWsbXOi5Sdmj2QqbwnmdA3AjrjK8Rk1t1DhmchLb0YbhxS0zORpC4eEh2YD 9MjA== 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 :references:cc:to:content-language:subject:user-agent:mime-version :date:message-id:dkim-signature; bh=mmgW4edYlUnyxLuwyv+RhMeMNoN0f2U2QoMCWe0iOyU=; b=aZkzGyfajjWDeyZpNb6NiCinsr41ZowG4xX7X3BLys+EYSmsJLNNYptSfJeTMqAH3W v/sHc24E618bRm78LD1No3La/zwDtFJ4Fc2e5AtMTrY/I9PCIhghfODZ4rI1OrYhZZTW clLWzKwAzWwN7dmivads8ekbW/ja5K183YFxjad9G83DeubkrMAjTu/pdDR6I9Z9btgk 4I4pXJg8S5qZElcIOTttawB9E86L/qHR7m57uX0pciQ2VburZPvL4r3clOXLoxIrjzGq vC6OxLNiKM6UmMnFvi113LxCRbo4UBLAeS9jQFfSwedH319yy9otP+286JnO1oRxGjQm 9zGQ== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@arinc9.com header.s=zmail header.b=VP1bH1Sb; 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 w4-20020a656944000000b0050bcfe667e7si3169305pgq.474.2023.04.07.02.58.19; Fri, 07 Apr 2023 02:58:32 -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; dkim=pass header.i=@arinc9.com header.s=zmail header.b=VP1bH1Sb; 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 S239421AbjDGJrE (ORCPT + 99 others); Fri, 7 Apr 2023 05:47:04 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59384 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229437AbjDGJrD (ORCPT ); Fri, 7 Apr 2023 05:47:03 -0400 Received: from sender4-op-o10.zoho.com (sender4-op-o10.zoho.com [136.143.188.10]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 36EC51721; Fri, 7 Apr 2023 02:47:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680860782; cv=none; d=zohomail.com; s=zohoarc; b=eBTYQ58vhgLgJ4yHfjiHgtJlGFjyAESluw6BNI9VBH5VQR6zqkymV5P4XN8VfnotRf6TJJPBDn5CONQlz8VkMRCcgJ4R9l1InItL8Ud0HBvexc8+uyLa8OSgmL+CfMrlP2EJiW4GOFrSWUd1XViYS5gKsZUrl1vVnFj0vM1W+bw= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.com; s=zohoarc; t=1680860782; h=Content-Type:Content-Transfer-Encoding:Cc:Date:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:To; bh=mmgW4edYlUnyxLuwyv+RhMeMNoN0f2U2QoMCWe0iOyU=; b=eVom5K6RyjeM2xe4T2tXSDGQ03nQ9gtC8ejvyc/iCvWWf7I4lO5dc6SGFe1yVTCc2vLYELVid26V2R28/bXOnD7502mNaBidHISMBo8GEyyfdMyVf8uCGbPB5Kj4a/YanAncljYw608MewcFj9uzRooLn3ZwdY11/jHz86Cuhps= 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=1680860782; 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=mmgW4edYlUnyxLuwyv+RhMeMNoN0f2U2QoMCWe0iOyU=; b=VP1bH1Sbx6pTq9Kefa1rc9NVAak3gRAr6CeVg1qZoECgJA8CIW0I78wk41fXtDoZ yNUs4exZsnDYl+2zE5zMrAAyvIOIUUMS9NII3Hz5Vjdzj29txsbpploTVhgKOCM0odx 413Pz23s8WrQ/Avqhcn/T4IX7KuKrx6gLmDV43nw= Received: from [10.10.10.3] (149.91.1.15 [149.91.1.15]) by mx.zohomail.com with SMTPS id 168086078067680.0988150323908; Fri, 7 Apr 2023 02:46:20 -0700 (PDT) Message-ID: <5a92419c-4d2c-a169-687b-026dc6094cd8@arinc9.com> Date: Fri, 7 Apr 2023 12:46:14 +0300 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0 Subject: Re: [PATCH 3/7] dt-bindings: net: dsa: mediatek,mt7530: add port bindings for MT7988 Content-Language: en-US To: Krzysztof Kozlowski , Andrew Lunn , Florian Fainelli , Vladimir Oltean , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Matthias Brugger , AngeloGioacchino Del Regno , Daniel Golle , Landen Chao , DENG Qingfang , Sean Wang Cc: erkin.bozoglu@xeront.com, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-mediatek@lists.infradead.org References: <20230406080141.22924-1-arinc.unal@arinc9.com> <20230406080141.22924-3-arinc.unal@arinc9.com> <23c8c4b5-baaa-b72b-4103-b415d970acf2@linaro.org> <5b3a10ff-e960-1c6e-3482-cb25200c83c6@arinc9.com> <951841d3-59a4-fa86-5b45-46afdb2942dd@linaro.org> From: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= In-Reply-To: <951841d3-59a4-fa86-5b45-46afdb2942dd@linaro.org> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-ZohoMailClient: External X-Spam-Status: No, score=-2.2 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS autolearn=unavailable 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 7.04.2023 12:07, Krzysztof Kozlowski wrote: > On 06/04/2023 21:18, Arınç ÜNAL wrote: >> On 6.04.2023 22:07, Krzysztof Kozlowski wrote: >>> On 06/04/2023 10:01, arinc9.unal@gmail.com wrote: >>>> From: Arınç ÜNAL >>>> >>>> The switch on MT7988 has got only port 6 as a CPU port. The only phy-mode >>>> to be used is internal. Add this. >>>> >>>> Some bindings are incorrect for this switch now, so move them to more >>>> specific places. >>>> >>>> Address the incorrect information of which ports can be used as a user >>>> port. Any port can be used as a user port. >>>> >>>> Signed-off-by: Arınç ÜNAL >>>> --- >>>> .../bindings/net/dsa/mediatek,mt7530.yaml | 63 ++++++++++++++----- >>>> 1 file changed, 46 insertions(+), 17 deletions(-) >>>> >>>> diff --git a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> index 7045a98d9593..605888ce2bc6 100644 >>>> --- a/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> +++ b/Documentation/devicetree/bindings/net/dsa/mediatek,mt7530.yaml >>>> @@ -160,22 +160,6 @@ patternProperties: >>>> "^(ethernet-)?port@[0-9]+$": >>>> type: object >>>> >>>> - properties: >>>> - reg: >>>> - description: >>>> - Port address described must be 5 or 6 for CPU port and from 0 to 5 >>>> - for user ports. >>>> - >>>> - allOf: >>>> - - if: >>>> - required: [ ethernet ] >>>> - then: >>>> - properties: >>>> - reg: >>>> - enum: >>>> - - 5 >>>> - - 6 >>>> - >>> >>> I have doubts that the binding is still maintainable/reviewable. First, >>> why do you need all above patterns after removal of entire contents? >> >> The 'type: object' item is still globally used. I'd have to define that >> on each definitions, I suppose? > > Doesn't it come from dsa.yaml/dsa-port.yaml schema? It comes from dsa.yaml#/$defs/ethernet-ports which this schema already refers to. I'll remove the patterns above. Though 'type: object' is not there for "^(ethernet-)?port@[0-9]+$". I think I should add it there as the dsa-port.yaml schema defines the properties of the DSA switch port object. So the value matching the "^(ethernet-)?port@[0-9]+$" regular expression is expected to be an object conforming to the structure defined in dsa-port.yaml. Does that make sense? > >> >>> >>> Second, amount of if-then-if-then located in existing blocks (not >>> top-level) is quite big. I counted if-then-using defs, where defs has >>> patternProps-patternProps-if-then-if-then-properties.... OMG. :) >> >> Yup, not much to do if we want to keep the information. I'm still >> maintaining this though. ¯\_(ツ)_/¯ > > Maybe it should be split into few bindings sharing common part. Agreed, I think it makes sense to split this to MT7530, MT7531, and MT7988. I will do this after this series. Arınç