Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp3441940iog; Mon, 27 Jun 2022 16:31:02 -0700 (PDT) X-Google-Smtp-Source: AGRyM1vtNEmjio7o8RRZGjrin0Yt37rZHLkY2/ddyRVgSgoSaNq3/RApPq6GPyYxlfGdDz11a5PM X-Received: by 2002:aa7:9470:0:b0:525:4214:bd9e with SMTP id t16-20020aa79470000000b005254214bd9emr500629pfq.11.1656372662485; Mon, 27 Jun 2022 16:31:02 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656372662; cv=none; d=google.com; s=arc-20160816; b=0xAUOYpcqzX0Yrh0D15tA8z6ynvecVM6nI/5C9Sqhpm3xqIK2+hcaQ5GY7qOW5eDdm 4BKHMGPO/tz5qa+2Oh/q9Vk0QMtLeLgwbPveekMbeih/jqX3bNVLmoaQhgkbufOQMRIQ 8cKZ9GaiJ94wQIXFGVW5VGWbxeGE0rSzPU8ctDIBKdu7wihDRTWPWSZ0ZcqoEuphPpEi xH5ynK4x4vijmKz3Nb2kzWHs7W5AAaJ/+tea1gSGuitvO3v0zVFSoTqFPgPZT/Hs4XVN n5w8Qmhdy0uwqM7ounjibzdzOwpATfH8zYTOzzpMnlE/DltWatbNON/GXZ2lu6mvA5dV rvpQ== 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=RsbxMGrAEPpDrcq9SD5GCJ241orHnQShiio8WLL4UIU=; b=VkPaaQklSzCfmvSYtSbClQEqxXSaz3627QX9q1mECUjM7MHQ0hImOIDYvejE3xc2ud w6ZRbKXzIAz0HynunKZNa9CzFYtvMHOcvd0vv/VrDOTpB5VLBQ9j269vySg54W3X94cI gIDVOPIJmdWdJKLoXycGXNBF6orGBxS0Stf8cLXvyTb24aAgmNzGgHipOEFWuZZ0mbKM 1tojXtUNZB2neFhhSlxxBlzpvePkgSasruAk2lgOCXXpPi4XaRB9Bj6DmH7c6EIGT7na CTd//nrN69B2KFxCswGzBpTfqcNFxxGHIUS3Uflfp5WK+9t2PwcXik5lsK7A5l+dlpUQ vg3g== ARC-Authentication-Results: i=1; mx.google.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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h26-20020a63211a000000b003fdbc3fb131si8317283pgh.696.2022.06.27.16.30.50; Mon, 27 Jun 2022 16:31:02 -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; 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=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S241194AbiF0XFy (ORCPT + 99 others); Mon, 27 Jun 2022 19:05:54 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:41456 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S240751AbiF0XFt (ORCPT ); Mon, 27 Jun 2022 19:05:49 -0400 Received: from mail-io1-f49.google.com (mail-io1-f49.google.com [209.85.166.49]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id A94FD22507; Mon, 27 Jun 2022 16:05:48 -0700 (PDT) Received: by mail-io1-f49.google.com with SMTP id u20so11201008iob.8; Mon, 27 Jun 2022 16:05:48 -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=RsbxMGrAEPpDrcq9SD5GCJ241orHnQShiio8WLL4UIU=; b=vosbjv9Rzy6oFghQx+giSZ32iDKT/5vZrxBqa9FuukA6j5Q7zOPTG/Sejx74FzMej7 3v4Gf2D+7iwxNOmZCCE8tYi0wyF6LM71ynZ8MY3z7Sx7p5Yag10buDDpkzOxfZuB7iHB jtqwnH9OVmhj2BwkoTr3RfV1rccKMF8k0hNDSH/8YCQJBC2rUkHNogRfjbqHUbcA5pKQ 73Xdvd2YFzNdnGVW1qc/+7Sh9VvodTAjYzK5HOAxS21aOlPquIYK+lO/kcOz8HhWzpXK 6m5OidXPFYeG9K1aLRSjtGoNGCGCZVvdJ1al+b327Fj1+3JhQmSq3zBRCM6dj2FpHVqi PNPw== X-Gm-Message-State: AJIora9qy1BoJBXBDXA+s3e0GiiENXs5thgLngsQeGMflpmOZm9x7GJ9 zzrIF/Jq3fxbsVcKt/C+1A== X-Received: by 2002:a02:a08d:0:b0:33c:6a7d:87db with SMTP id g13-20020a02a08d000000b0033c6a7d87dbmr7505895jah.64.1656371147890; Mon, 27 Jun 2022 16:05:47 -0700 (PDT) Received: from robh.at.kernel.org ([64.188.179.253]) by smtp.gmail.com with ESMTPSA id t64-20020a025443000000b0033b73557de4sm5156297jaa.93.2022.06.27.16.05.46 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 27 Jun 2022 16:05:47 -0700 (PDT) Received: (nullmailer pid 3134751 invoked by uid 1000); Mon, 27 Jun 2022 23:05:45 -0000 Date: Mon, 27 Jun 2022 17:05:45 -0600 From: Rob Herring To: Krzysztof Kozlowski Cc: Sean Anderson , "David S . Miller" , Jakub Kicinski , Madalin Bucur , netdev@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Paolo Abeni , Russell King , Eric Dumazet , Krzysztof Kozlowski , devicetree@vger.kernel.org Subject: Re: [PATCH net-next 02/28] dt-bindings: net: fman: Add additional interface properties Message-ID: <20220627230545.GA3128808-robh@kernel.org> References: <20220617203312.3799646-1-sean.anderson@seco.com> <20220617203312.3799646-3-sean.anderson@seco.com> <4b305b67-7bc1-d188-23b8-6e5c7e81813b@seco.com> <9c0513dd-67ce-0d6a-f2a5-58e981f0d55c@linaro.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <9c0513dd-67ce-0d6a-f2a5-58e981f0d55c@linaro.org> X-Spam-Status: No, score=-1.2 required=5.0 tests=BAYES_00, FREEMAIL_ENVFROM_END_DIGIT,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2, SPF_HELO_NONE,SPF_PASS,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 Sun, Jun 19, 2022 at 12:33:22PM +0200, Krzysztof Kozlowski wrote: > 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. Above my threshold for not first converting too. Really, I'm pretty close to saying no .txt file changes at all. Maybe compatible string updates only, people should be rewarded for not changing their h/w. Rob