Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp1964934iog; Sun, 19 Jun 2022 03:45:08 -0700 (PDT) X-Google-Smtp-Source: AGRyM1sS0/T5RNHb2DbwjLMVwSWlpNaRjEDqCpHuyu26eydQJrF4SRrv/HIjIAJGLTIepPOqmXk2 X-Received: by 2002:a17:90a:31c1:b0:1ec:729f:36b7 with SMTP id j1-20020a17090a31c100b001ec729f36b7mr14313141pjf.123.1655635508176; Sun, 19 Jun 2022 03:45:08 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1655635508; cv=none; d=google.com; s=arc-20160816; b=0asy+9B4rIv235yJcg8kQPi5ZsiMfGU6jeL1Ah10slMN+u0NFs+ual+nZeBhAb7IwI QxvCTb2+vqHnj8qIPT/c8uIXxgfJLfBSYW3Gakf63Z0ZvRRFneqKPcKxlYPzEuW2YwbT JcSdZ1NE2fxxaK0ag0wbxaZXpU++o5NvXHt3BnNoLeWyB2v8Ro2BP0xWJq3mjqpGzYEE Wv1a2npOyOGeEyo3c1q4tY3ilscixTU1f5e5DUPx2vXyxgUjkKKFU1D1lksmS5nSlnI/ RgqyRGBrFgVNVMoHOMk9bS/8osDPfgmRBxA1LLxSw1uycU2y+eFbLsjm6oV6nnE97KFo gStg== 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=z8RjPpmzYY4c08OMGBiWyta3keTSURLb/GMoAlL3sWs=; b=W5kP9U2QpZf/SYRW0q1/FFpHW1rzUjO4xIWGbNFNWzRtaptsTnO9MKdo19vuUeUQhh PTmjUbrlBEEVjqR9EJ0OZnncOMCsRu1NW22YKzqOmfWfRyJASXxY9OXLz4dA76M8TSSk Tpq8cdIhOGBmwRQTVRbsHqR9RcG+0NDV0KNkEhVxvaTTHXZ+XokcPi4Z8w2xYJim+ram taO7zZOmJfQ9NunXFacVrTIFf8WOB3HtAKoiLzmv2uMG7XXwfCQInJlckzb7yURnAj2L +3ylNLJJ7fLD91btJIsZhGSfEt9mfDk8tZMJ2+8dvGsgiDSHW1Afhjq6eoFNH8O6G06F pISw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=O9sUUbuj; 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 m189-20020a6326c6000000b003ab8abd9630si13358930pgm.376.2022.06.19.03.44.55; Sun, 19 Jun 2022 03:45:08 -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=O9sUUbuj; 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 S234289AbiFSKd3 (ORCPT + 99 others); Sun, 19 Jun 2022 06:33:29 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50036 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233877AbiFSKd1 (ORCPT ); Sun, 19 Jun 2022 06:33:27 -0400 Received: from mail-ed1-x52e.google.com (mail-ed1-x52e.google.com [IPv6:2a00:1450:4864:20::52e]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 47CD6D134 for ; Sun, 19 Jun 2022 03:33:26 -0700 (PDT) Received: by mail-ed1-x52e.google.com with SMTP id z11so5288997edp.9 for ; Sun, 19 Jun 2022 03:33:26 -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=z8RjPpmzYY4c08OMGBiWyta3keTSURLb/GMoAlL3sWs=; b=O9sUUbujmWyeq8RZwNEI96ELznnKbdGmc4AreZY1Zj5JxaBvR4FBT9HnZId73KZKcL 5xz45buWMVZWlhVt3U0IFsWyzuUtUWzhN52xy5wk8kXLbnmiGxY7rsledJLhclERSEu4 zyCZusJ4rFvlBkUZX6ZC2xTNA2Qq5dItdlT9YoF/aIot8/yaz0RcGYZNkSAKROOBHxHI Iwnz83tuAbNSqVRK3LN9JJLNXF0+xWb0/ONPeEJYf/1/M6LwAHBxRffKd6lrZ9r5dIph m6xQ1NuPwScI+KWuaRyRqJ2K4dOYfPaqOcnyJDnKL2GAnudxEqIAVTPg1m++a8mikBYg aFeQ== 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=z8RjPpmzYY4c08OMGBiWyta3keTSURLb/GMoAlL3sWs=; b=upsp4EHEDJnEwJdVS8VVS3EcCscoa4kh8pm/j5eGPJMcgZhi1nXJfpEHOwwx2JyTOD CLGvPyWuRtLRkzAw3BIghsfD3G7od4K3I7G1j4g220vZZRJIpi/LN8gLZfnGP3hzCd7F gFbOWHuunwXZYb67RvVRfvaowrAmAHKMq8lRe3fP/0pGMabKvYyOvlk3ok0XWqDzg/N/ TnOM49VocAzbWTxaO9LZOZZrr2BPXHa2gobmNFDtlydRohVz3L0BSZma6tv8/muzV9Bv uKO0ISV4pdnlj+TVR8kWrFYjfeC/HP0sDJR1+2lOhBxzJ+mAOEMQ55EkSvTcZFEFdfam tRWw== X-Gm-Message-State: AJIora9jnM42rQ9jLdH455sBiMiNWdZK2LO3EUHQLIWrWdpfikMpRIrP mlXE8GR/j53mNCsgImqVSiQk2jQo0EnnSw== X-Received: by 2002:a05:6402:1cc2:b0:434:f631:d7f3 with SMTP id ds2-20020a0564021cc200b00434f631d7f3mr78228edb.171.1655634804797; Sun, 19 Jun 2022 03:33:24 -0700 (PDT) Received: from [192.168.0.206] (xdsl-188-155-176-92.adslplus.ch. [188.155.176.92]) by smtp.gmail.com with ESMTPSA id v18-20020a170906293200b006fece722508sm4328852ejd.135.2022.06.19.03.33.22 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Sun, 19 Jun 2022 03:33:23 -0700 (PDT) Message-ID: <9c0513dd-67ce-0d6a-f2a5-58e981f0d55c@linaro.org> Date: Sun, 19 Jun 2022 12:33:22 +0200 MIME-Version: 1.0 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0 Subject: Re: [PATCH net-next 02/28] dt-bindings: net: fman: Add additional interface properties Content-Language: en-US To: Sean Anderson , "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Russell King , Eric Dumazet , Krzysztof Kozlowski , Rob Herring , devicetree@vger.kernel.org References: <20220617203312.3799646-1-sean.anderson@seco.com> <20220617203312.3799646-3-sean.anderson@seco.com> <4b305b67-7bc1-d188-23b8-6e5c7e81813b@seco.com> From: Krzysztof Kozlowski In-Reply-To: <4b305b67-7bc1-d188-23b8-6e5c7e81813b@seco.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,NICE_REPLY_A,RCVD_IN_DNSWL_NONE, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=ham 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 18/06/2022 17:55, Sean Anderson wrote: > Hi Krzysztof, > > On 6/17/22 9:16 PM, Krzysztof Kozlowski wrote: >> On 17/06/2022 13:32, Sean Anderson wrote: >>> At the moment, MEMACs are configured almost completely based on the >>> phy-connection-type. That is, if the phy interface is RGMII, it assumed >>> that RGMII is supported. For some interfaces, it is assumed that the >>> RCW/bootloader has set up the SerDes properly. The actual link state is >>> never reported. >>> >>> To address these shortcomings, the driver will need additional >>> information. First, it needs to know how to access the PCS/PMAs (in >>> order to configure them and get the link status). The SGMII PCS/PMA is >>> the only currently-described PCS/PMA. Add the XFI and QSGMII PCS/PMAs as >>> well. The XFI (and 1GBase-KR) PCS/PMA is a c45 "phy" which sits on the >>> same MDIO bus as SGMII PCS/PMA. By default they will have conflicting >>> addresses, but they are also not enabled at the same time by default. >>> Therefore, we can let the default address for the XFI PCS/PMA be the >>> same as for SGMII. This will allow for backwards-compatibility. >>> >>> QSGMII, however, cannot work with the current binding. This is because >>> the QSGMII PCS/PMAs are only present on one MAC's MDIO bus. At the >>> moment this is worked around by having every MAC write to the PCS/PMA >>> addresses (without checking if they are present). This only works if >>> each MAC has the same configuration, and only if we don't need to know >>> the status. Because the QSGMII PCS/PMA will typically be located on a >>> different MDIO bus than the MAC's SGMII PCS/PMA, there is no fallback >>> for the QSGMII PCS/PMA. >>> >>> MEMACs (across all SoCs) support the following protocols: >>> >>> - MII >>> - RGMII >>> - SGMII, 1000Base-X, and 1000Base-KX >>> - 2500Base-X (aka 2.5G SGMII) >>> - QSGMII >>> - 10GBase-R (aka XFI) and 10GBase-KR >>> - XAUI and HiGig >>> >>> Each line documents a set of orthogonal protocols (e.g. XAUI is >>> supported if and only if HiGig is supported). Additionally, >>> >>> - XAUI implies support for 10GBase-R >>> - 10GBase-R is supported if and only if RGMII is not supported >>> - 2500Base-X implies support for 1000Base-X >>> - MII implies support for RGMII >>> >>> To switch between different protocols, we must reconfigure the SerDes. >>> This is done by using the standard phys property. We can also use it to >>> validate whether different protocols are supported (e.g. using >>> phy_validate). This will work for serial protocols, but not RGMII or >>> MII. Additionally, we still need to be compatible when there is no >>> SerDes. >>> >>> While we can detect 10G support by examining the port speed (as set by >>> fsl,fman-10g-port), we cannot determine support for any of the other >>> protocols based on the existing binding. In fact, the binding works >>> against us in some respects, because pcsphy-handle is required even if >>> there is no possible PCS/PMA for that MAC. To allow for backwards- >>> compatibility, we use a boolean-style property for RGMII (instead of >>> presence/absence-style). When the property for RGMII is missing, we will >>> assume that it is supported. The exception is MII, since no existing >>> device trees use it (as far as I could tell). >>> >>> Unfortunately, QSGMII support will be broken for old device trees. There >>> is nothing we can do about this because of the PCS/PMA situation (as >>> described above). >>> >>> Signed-off-by: Sean Anderson >> >> Thanks for the patch but you add too many new properties. The file >> should be converted to YAML/DT schema first. > > Perhaps. However, conversion to yaml is a non-trivial task, especially for > a complicated binding such as this one. I am more than happy to rework this > patch to be based on a yaml conversion, but I do not have the bandwidth to > do so myself. I understand. Although since 2020 - since when we expect the bindings to be in YAML - this file grew by 6 properties, because each person extends it instead of converting. Each person uses the same excuse... You add here 5 more, so it would be 11 new properties in total. > > If you have any comments on the binding changes themselves, that would be > much appreciated. Maybe Rob will ack it, but for me the change is too big to be accepted in TXT, so no from me. Best regards, Krzysztof