Received: by 2002:a05:7412:419a:b0:f3:1519:9f41 with SMTP id i26csp280250rdh; Thu, 23 Nov 2023 04:01:57 -0800 (PST) X-Google-Smtp-Source: AGHT+IE8c556bIKl57EiGg1/YTr9ioiQ3KdkM2LwxsPZkPgXPfc89qrvIQWvBEwhQTb1guCRiJTt X-Received: by 2002:a05:6a20:28a0:b0:187:9521:92b9 with SMTP id q32-20020a056a2028a000b00187952192b9mr4404270pzf.53.1700740917344; Thu, 23 Nov 2023 04:01:57 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1700740917; cv=none; d=google.com; s=arc-20160816; b=LaoN5sjjDuPP0VkfGO3zXakxKZuQ3/UwxoyqSW0MlSnla58IoOKFbsgD7s0zUO7uQV 7lJRgZfXy4LaS3yd8TbWj9Kj8dpITvpoSr2evXRkcnAN/MPbnpqWOhqSMavrKlP4E6Ix DKoMxKfvZLwv6koJWmpYVtEoN09GceQ8jAT45GY+LbN+Zeoblet/0ZvlRSqSa8xBlcGw hQfYmbHf+bkCVHn72cB8Ve+2iysAbCZOxwfFm5WLmk1IELxfLXOQ5ZmapyJ8VGLrT8te st01DdZPeMzH00q5tyzJ9rZd0mPLDYyXBiJOwZ+v7PkM590glDLGD+nnaTOz3Epcesug SZKw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:in-reply-to:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :dkim-signature; bh=tjOG3IUarrrhmsM7mzYA0wffrVbKcTF1Zf9Q1kyefhs=; fh=coM8qcc5wCr1uf+FRqkVnGQZpUE3Udm78hv3ZS8K6Nw=; b=noefyAQOa0M9EeKVRCRBS71WcoiuVhPNNMU6K+RxBwaFLrE1BlvJz7yyBxWNLh4wkt BtFcSKcHRIzSqIUZglXFmxNhAYaCiuGltZp0oaZ7r54ESjm3duL6hsyhv6eXBUxEIV9Z Pq6jEg7gsb09jlrlncfFpdr+7SltBUuKUGcTxRfLKxjeKEcUUfdDaP8JGmcMVgy+OlQd jtyrrNkLnupjV5zZSfy2CsZc0DQ3DH6Bdv7cGOplMRNWVjLvtNvZHP/xDZQQKm4MtAS+ FK3uLRlY3uRqeHNrQ2ZxQx0KhE8E9lJ12JOJ7zT4Vmhlgv78AJl30yzDxH8i7mqHS//m SViQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="oGdIzS/Z"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Return-Path: Received: from morse.vger.email (morse.vger.email. [23.128.96.31]) by mx.google.com with ESMTPS id t34-20020a056a0013a200b006be1fc3ee86si1129704pfg.234.2023.11.23.04.01.51 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 23 Nov 2023 04:01:57 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) client-ip=23.128.96.31; Authentication-Results: mx.google.com; dkim=fail (test mode) header.i=@armlinux.org.uk header.s=pandora-2019 header.b="oGdIzS/Z"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.31 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=armlinux.org.uk Received: from out1.vger.email (depot.vger.email [IPv6:2620:137:e000::3:0]) by morse.vger.email (Postfix) with ESMTP id E9E0980847BE; Thu, 23 Nov 2023 04:01:45 -0800 (PST) X-Virus-Status: Clean X-Virus-Scanned: clamav-milter 0.103.11 at morse.vger.email Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1345198AbjKWMBN (ORCPT + 99 others); Thu, 23 Nov 2023 07:01:13 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46776 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1345193AbjKWMBK (ORCPT ); Thu, 23 Nov 2023 07:01:10 -0500 Received: from pandora.armlinux.org.uk (pandora.armlinux.org.uk [IPv6:2001:4d48:ad52:32c8:5054:ff:fe00:142]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 090D698; Thu, 23 Nov 2023 04:01:17 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=armlinux.org.uk; s=pandora-2019; h=Sender:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=tjOG3IUarrrhmsM7mzYA0wffrVbKcTF1Zf9Q1kyefhs=; b=oGdIzS/Z0rkfKOlbhFssglTAY0 4ou1QIfNoAf4/5fOpEgd5DUsTMsIKMU4CXckJxO4ugwlRPwE7Dg36GL7wtt08TVHvG0T8xkwFqNwb tYiujWn9KvPlntJUfbdchZ1XcA0zCCo2BHeWqfrn6TsD5qXjvwk5+Vt9wd5oRm3ZZaAGyvbcZLw+S KAHuiUlrhy8qTQMlnsfe022i9Ry80s/svb5Qydx/s1AIhYafT25deoQQA0ELp33noffjgkvRum65i CW5/37GVoVRNkX7DqOaqztvIuMKNiPfQIexipHxc4ZSBhLYXby7JKq3vjgazdiTVkDv0aKfs5IGhz cFmBzjHQ==; Received: from shell.armlinux.org.uk ([fd8f:7570:feb6:1:5054:ff:fe00:4ec]:56140) by pandora.armlinux.org.uk with esmtpsa (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1r68OF-0001WC-1c; Thu, 23 Nov 2023 12:01:03 +0000 Received: from linux by shell.armlinux.org.uk with local (Exim 4.94.2) (envelope-from ) id 1r68OF-0006By-7q; Thu, 23 Nov 2023 12:01:03 +0000 Date: Thu, 23 Nov 2023 12:01:03 +0000 From: "Russell King (Oracle)" To: Jie Luo Cc: Andrew Lunn , davem@davemloft.net, edumazet@google.com, kuba@kernel.org, pabeni@redhat.com, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, hkallweit1@gmail.com, corbet@lwn.net, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org Subject: Re: [PATCH v5 3/6] net: phy: at803x: add QCA8084 ethernet phy support Message-ID: References: <20231118062754.2453-1-quic_luoj@quicinc.com> <20231118062754.2453-4-quic_luoj@quicinc.com> <1eb60a08-f095-421a-bec6-96f39db31c09@lunn.ch> <1d4d7761-6b42-48ec-af40-747cb4b84ca5@lunn.ch> <316fb626-4dc3-4540-9cc4-e45840e36f77@quicinc.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: Sender: Russell King (Oracle) X-Spam-Status: No, score=-0.6 required=5.0 tests=DKIM_INVALID,DKIM_SIGNED, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on morse.vger.email 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 (morse.vger.email [0.0.0.0]); Thu, 23 Nov 2023 04:01:46 -0800 (PST) On Thu, Nov 23, 2023 at 06:57:59PM +0800, Jie Luo wrote: > On 11/21/2023 7:52 PM, Russell King (Oracle) wrote: > > Ultimately, you will need a way to use inband signalling with Cisco > > SGMII for 10M/100M/1G speeds, and then switch to 2500base-X when > > operating at 2.5G speeds, and that is done via the PHY driver > > updating phydev->interface. > > > > What we do need is some way for the PHY to also tell the PCS/MAC > > whether inband should be used. This is something I keep bringing up > > and now that we have PCS drivers revised to use the value from > > phylink_pcs_neg_mode() _and_ a consistent implementation amongst them > > we can now think about signalling to PCS drivers whether inband mode > > needs to be turned off when switching between modes. > > Yes, we can switch the interface mode according to the current link > speed in the pcs driver. > but the issue is that the phy-mode i specified for the PHYLINK, > if phy-mode is sgmii, the support capability is limited to maximum > capability 1G during the PHYLINK setup and i can't configure it to 2.5G > dynamically, if the phy-mode is 2500base-x, then PHY capability will > be modified to only support 2.5G, other speeds can't be linked up. So you need my patches that add "possible_interfaces" to phylib so you can tell phylink that you will be switching between SGMII and 2500base-X. Please see the RFC posting of those patches I sent yesterday and try them out - you will need to modify your phylib driver to fill in phydev->possible_interfaces. > > There have been patches in the past that allow inband mode to be > > queried from phylib, and this is another important component in > > properly dealing with PHYs that need to use inband signalling with > > Cisco SGMII, but do not support inband signalling when operating at > > 2.5G speeds. The problem when operating at 2.5G speed is that the > > base-X protocols are normally for use over fibre, which is the media, > > and therefore the ethtool Autoneg bit should define whether inband > > gets used or not. However, in the case of a PHY using 2500base-X, > > the Autoneg bit continues to define whether autonegotiation should > > be used on the media, and in this case it's the media side of the > > PHY rather than the 2500base-X link. > > > > So, when using a 2500base-X link to a PHY, we need to disregard the > > Autoneg bit, but that then raises the question about how we should > > configure it - and one solution to that would be to entire of phylib > > what the PHY wants to do. Another is to somehow ask the PCS driver > > whether it supports inband signalling at 2500base-X, and resolve > > those capabilities. > > For the qca808x PHY, when it is linked in 2.5G, the autoneg is also > disabled in PCS hardware, so the sgmii+ of qca808x PHY is almost > same as 2500base-X. Not "almost". It _is_ the same. This is the point I've been trying to get across to you. Without inband signalling, 1000base-X and SGMII (when operating at 1G) are _identical_ and entirely compatible. You've said that your 2.5G "SGMII" mode has inband signalling disabled, and thus it without inband signalling, 2500base-X and this 2.5G mode are again identical and entirely compatible. There's no "almost" about it. -- RMK's Patch system: https://www.armlinux.org.uk/developer/patches/ FTTP is here! 80Mbps down 10Mbps up. Decent connectivity at last!