Received: by 2002:a05:7412:2a8c:b0:e2:908c:2ebd with SMTP id u12csp3249363rdh; Thu, 28 Sep 2023 06:53:40 -0700 (PDT) X-Google-Smtp-Source: AGHT+IFBFo3DwjpvDV2PsmVOA5OVbIHl3hLbNebW9+qYAF8o/GL9BjbxIiK6w7pVEi0HHPVN7zNs X-Received: by 2002:a05:6a21:33a4:b0:13f:13cb:bc50 with SMTP id yy36-20020a056a2133a400b0013f13cbbc50mr2325188pzb.25.1695909220547; Thu, 28 Sep 2023 06:53:40 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1695909220; cv=none; d=google.com; s=arc-20160816; b=FmiBwV6coRbsMuWQGBIm1xnKzihuYiqyb1mQ09GuXSDVSOuN2f8bhu+NkUKitNK67W P84hGiSga2S5Pj5nCJUfzw3Hee8MwbJKr9pELUs0FMCLI/xhrLVCJRUgfEltYphY7XCQ n3KI4Cts1d5maC08nYJB6fJuOi0smJzgrZJkrk+LzJUdWznxDV+KO2BRUKLXJMaF8Yhe Zna0jvlRBFDg6fNEFTtoMBIXR1OkFBZYS2La/JDFJlPd3y72AzzQWiR0/Kp9EDL+nf3V Se01p+myd3icYg1YMddlAvPpqLfFgohg5BDMM2B0ItrMoxvRlImIckx5HsduAtkReMWG CYPA== 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:dkim-signature; bh=UUWzaRFY0l5hWny9ZPlHlVAHGMs0fg/5ghQV9Xz0htM=; fh=5CHWFM5viytVs+flWhOkNaAbzusUvbhLAkNuRdKmqLE=; b=JES5d47IMsw+nCdQbV0/n6GgptUf7QWD2q0HJkpRfG9OqtYdd2ma4QHgHzWWWHSmDi WQi10xymEfY8WrPqXJdJNdYhP3Y0TzorGpiFYWTnPZINxmyMwetX3/xReMO6inqAmGWS yAT8e/Z72EhaAcE6RlHZ63mN8oWiDCrCG+80hh8M99sexcaM1Ux8+jG0CNeOdeovp9an jWKlguuNZvofWALw2/rxb8aoPn3tOgqAU6zm24TqCh28UZmQrJVlD+hlp45pZP1YUyMm HoTkHbTlHcJe/C2LM4SGKGbByvH9Hk625y11vgznxLptlceN4rmmVlO+hNOBWauDQQoO 3puA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lRZGCX4u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 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 howler.vger.email (howler.vger.email. [2620:137:e000::3:4]) by mx.google.com with ESMTPS id r14-20020a63440e000000b0056fbf85c743si18191632pga.790.2023.09.28.06.53.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 28 Sep 2023 06:53:40 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) client-ip=2620:137:e000::3:4; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=lRZGCX4u; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::3:4 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by howler.vger.email (Postfix) with ESMTP id 286AF84555A9; Thu, 28 Sep 2023 06:36:53 -0700 (PDT) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.10 at howler.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231875AbjI1Ngm (ORCPT + 99 others); Thu, 28 Sep 2023 09:36:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46822 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231868AbjI1Ngl (ORCPT ); Thu, 28 Sep 2023 09:36:41 -0400 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 31E2111F for ; Thu, 28 Sep 2023 06:36:40 -0700 (PDT) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 29908C433C9; Thu, 28 Sep 2023 13:36:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1695908199; bh=buWFvyKvzLE7yL9fD5WstGeTidrhh5FjGgosGmcwWnE=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=lRZGCX4uM6nkWatFx7vCXHkNlUNWjWo3yiUsyXT5+Lkn/x8HZJejO0I56+C12vAKX mJorU9/7Rn6Ix0Ka5F16XmmPqoZp9ssId88f4t8jGBd5LG3pi3bYUgRYoyrjq/dSho uY2qKIzOuhL41R7wpANqI/+vSXk08AD6BuvSdqIKwzx773+Z4U6NnerejQug+Kw1lB xByiAv/JNY1zsOIEfRX7SVieCdeeCAn5w8+m5gTLdMzUCJT55WBUK+tOSakelTU7FJ hgJuQcyIknhUrLOVHIfPUJ1dER7tKcRDGcTRvSbJiQ8GoVB5/Bm2tgTPp5vxcQ1ghX AMYeIKxgZBZ3A== Date: Thu, 28 Sep 2023 15:36:29 +0200 From: Simon Horman To: Vladimir Oltean Cc: netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org, "Russell King (Oracle)" , Heiner Kallweit , Andrew Lunn , Florian Fainelli , Madalin Bucur , Ioana Ciornei , Camelia Groza , Li Yang , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Sean Anderson , Maxime Chevallier , Vinod Koul , Kishon Vijay Abraham I Subject: Re: [RFC PATCH v2 net-next 03/15] phy: ethernet: add configuration interface for copper backplane Ethernet PHYs Message-ID: <20230928133629.GM24230@kernel.org> References: <20230923134904.3627402-1-vladimir.oltean@nxp.com> <20230923134904.3627402-4-vladimir.oltean@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230923134904.3627402-4-vladimir.oltean@nxp.com> X-Spam-Status: No, score=-4.4 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS 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 X-Greylist: Sender passed SPF test, not delayed by milter-greylist-4.6.4 (howler.vger.email [0.0.0.0]); Thu, 28 Sep 2023 06:36:53 -0700 (PDT) On Sat, Sep 23, 2023 at 04:48:52PM +0300, Vladimir Oltean wrote: > In Layerscape and QorIQ SoCs, compliance with the backplane Ethernet > protocol is bolted on top of the SerDes lanes using an external IP core, > that is modeled as an Ethernet PHY. This means that dynamic tuning of > the electrical equalization parameters of the link needs to be > communicated with the consumer of the generic PHY. > > Create a small layer of glue API between a networking PHY (dealing with > the AN/LT logic for backplanes) and a generic PHY by extending the > phy_configure() API with a new struct phy_configure_opts_ethernet. > > There are 2 directions of interest. In the "local TX training", the > generic PHY consumer gets requests over the wire from the link partner > regarding changes we should make to our TX equalization. In the "remote > TX training" direction, the generic PHY is the producer of requests, > based on its RX status, and the generic PHY consumer polls for these > requests until we are happy. Each request is also sent (externally to > the generic PHY layer) to the link partner board, for it to adjust its > TX equalization. > > struct phy_configure_opts_ethernet is valid when phy_set_mode_ext() has > been called with PHY_MODE_ETHERNET or PHY_MODE_ETHTOOL, same as with > other union phy_configure_opts types. > > Signed-off-by: Vladimir Oltean ... > +/** > + * struct phy_configure_opts_ethernet - Ethernet PHY configuration set nit: please include documentation of the structure members - type, local_tx, and remote_tx - here. > + * > + * This structure is used to represent the configuration state of an Ethernet > + * PHY (of various media types). > + */ > +struct phy_configure_opts_ethernet { > + enum ethernet_phy_configure_type type; > + union { > + struct c72_phy_configure_local_tx local_tx; > + struct c72_phy_configure_remote_tx remote_tx; > + }; > +}; ...