Received: by 2002:a05:6358:11c7:b0:104:8066:f915 with SMTP id i7csp602613rwl; Fri, 7 Apr 2023 02:23:26 -0700 (PDT) X-Google-Smtp-Source: AKy350aJkm8l1n7awmvdyDMC5fH9o13SKfvXq0NCutRGis41+rowDaBthWqmwpKTsCwHrlevncRt X-Received: by 2002:a05:6a20:6387:b0:db:36f0:a5c2 with SMTP id m7-20020a056a20638700b000db36f0a5c2mr1959620pzg.59.1680859405968; Fri, 07 Apr 2023 02:23:25 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1680859405; cv=none; d=google.com; s=arc-20160816; b=qREZZA31GbmPjGqsOdlFi2EIbTtrAxv1zYswRY/+9f6rbN9Q3nQwm3/QicCxUyLl3T Xd+o/ppWItxjwFs52ePixKWn3FbNgrpPgNAkd+bz1gJlZjtNZWr9kyCgFULJDvoLKSvo wvFoILBhftO8f8XAApkPsMdxpeTHd3t9L300r2IxQ967BOIQZ7V4bz9C3MjtVMrWXf/c Yh5N2uVL8WQqtZ6BZMXxUpebvgl006vBQ0VfqvyqQ89fFpJZhBektrDBHo+sxH0fnM1e t5gZBqLaMab5uQ/fSOrZSZubwL/0oZpMzYQz4kvVDoIhJ7uTavm5o5xyU5IHPpmGZIfj JsWw== ARC-Message-Signature: i=1; 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=6BxRk1PJc+XW+qEn8Ij5zM9MBUl9XatvAPXfsp+KF0k=; b=dSD62rgN6TUxIHdAC7jW9NA8QQfA/m1nCDfx/W2pHsFeaeOSN2zbTB8wUi8phY87YO YDeJxqWTqjNPSn0zceREaTR01IlASxCQX8GXFvT+4NhAlfq+F8oGL+D0EGSKhKKU0Bkh kWBpRHgDZmNh7Y/U13owkQx0F9TVEucNaki70MRZ9rwNO4zijcDisczlwIzhWJ1Bf+0j 6V6f16X97GIFVJZz4Nmu0ZCdkrfgFvx2IxrLoaxV+n92/FbMiQ3u7BkU7m+zmvLlUaOu SLDr5R0Zexh39xWWPCGJH2zdYT4OulPbC95NnAXBV1zXg9YiclUzO1841bbB0+NHfvxt 6fJg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=nkw+ddyc; 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=linaro.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id r202-20020a632bd3000000b005144b3c3e50si3208059pgr.68.2023.04.07.02.23.15; Fri, 07 Apr 2023 02:23:25 -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=@linaro.org header.s=google header.b=nkw+ddyc; 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=linaro.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S240132AbjDGJHd (ORCPT + 99 others); Fri, 7 Apr 2023 05:07:33 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55630 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240497AbjDGJHX (ORCPT ); Fri, 7 Apr 2023 05:07:23 -0400 Received: from mail-ej1-x62c.google.com (mail-ej1-x62c.google.com [IPv6:2a00:1450:4864:20::62c]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B2B07A5FB for ; Fri, 7 Apr 2023 02:07:19 -0700 (PDT) Received: by mail-ej1-x62c.google.com with SMTP id a640c23a62f3a-949062abf62so210290366b.2 for ; Fri, 07 Apr 2023 02:07:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1680858438; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :from:to:cc:subject:date:message-id:reply-to; bh=6BxRk1PJc+XW+qEn8Ij5zM9MBUl9XatvAPXfsp+KF0k=; b=nkw+ddycbW5GjtdYGmkun62fRdFQENsmzY6BQjEiOlj8CA7TBenBvvXCinnKeAVPnW e3WureIZ4KLMhI/pJRQaDe7kvwwjrRtW3RLdcLBm2604TpgQLsn5FBK3s4XG2IxOfxwV qhiX67+b7XRHjv5s////3QhTRmAkz3WgSplFukprZLA/nFDKK3TSPWBVR5eonu9kO7fN Irm9/TTEtC/nyGuzI5xnvumhfqfGUUNf3JiZLwkS8SZZGV+cV8944LvYPQFwYv2bYB9d taRWaETWQxS88AOebWZD2RNJx9gFFMQgKMJJu7LoS+4tiAaFmEqgpP3cNs/2NDjd+1bH EiYg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680858438; h=content-transfer-encoding:in-reply-to:from:references:cc:to :content-language:subject:user-agent:mime-version:date:message-id :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=6BxRk1PJc+XW+qEn8Ij5zM9MBUl9XatvAPXfsp+KF0k=; b=Z2D8b/0yM7prlhpTSwm244CaduEYZy63c1tsZX6XZ9Du8n/2oTP5E6qtYV4f6hxXLS I7FuLR0la6Dprv5lon9fRA8+QiYBznPSvqYI1JAjA/CoNt9rA3Al5xfdrejN3NaQMEPm T1v21DW+T/UnUad12ko31wu2/wvGv4dbdYt7BacSy7RprdQSvlZ4LY9oqRfzOx9SfEiH y/z4kDlN+oqAIxCduhUrcwvPnhWF7c+E1DThm7BNzNMkIrxLzDGCIDaSHa6Ogi2TL3n9 3NF9JfLxPZst3W3kXupi5uAxlESwrvwdBb1GHwhQUVcm0wbnVg61WM/ZeHVxc+YuRSnK hr+w== X-Gm-Message-State: AAQBX9f3kZ9kA4zLypVoq8chpk3UvSTq6efU6E0GeAd+4ckPiM7l612l odPbcN+a2OSIy9i3vDfKvCpBaw== X-Received: by 2002:a50:fb8b:0:b0:4fd:29a1:6a58 with SMTP id e11-20020a50fb8b000000b004fd29a16a58mr2318193edq.19.1680858437893; Fri, 07 Apr 2023 02:07:17 -0700 (PDT) Received: from ?IPV6:2a02:810d:15c0:828:14a3:366:3172:3c37? ([2a02:810d:15c0:828:14a3:366:3172:3c37]) by smtp.gmail.com with ESMTPSA id b20-20020a056402351400b004bf5981ef3dsm1619711edd.94.2023.04.07.02.07.16 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 07 Apr 2023 02:07:17 -0700 (PDT) Message-ID: <951841d3-59a4-fa86-5b45-46afdb2942dd@linaro.org> Date: Fri, 7 Apr 2023 11:07:16 +0200 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: =?UTF-8?B?QXLEsW7DpyDDnE5BTA==?= , 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> From: Krzysztof Kozlowski In-Reply-To: <5b3a10ff-e960-1c6e-3482-cb25200c83c6@arinc9.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 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? > >> >> 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. Best regards, Krzysztof