Received: by 2002:a05:6a10:9848:0:0:0:0 with SMTP id x8csp3494784pxf; Mon, 5 Apr 2021 13:44:37 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyuSFnB3jB/kt1Kc7RWaspP+PA2/5L9/2dh4AKyfx+hUWNY5hm5IaeANkKZGfrQTXdvcpig X-Received: by 2002:a5e:da47:: with SMTP id o7mr7860851iop.166.1617655477229; Mon, 05 Apr 2021 13:44:37 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1617655477; cv=none; d=google.com; s=arc-20160816; b=MNiRpuo4hD3K9EcM/tY+r5F0BbrxZPGLCRwEnFUSsNkhxXpzTBkjdta+M61ng51E08 oD+mWSc2Sn3ysDp83vxhgyTdkTCXt2YjvRs3UmIQvlj2+k6v9VwVEGbeqWCk7dnJ1mhF pC7tITyeDmpMTLvCpnPOwjOhiHrlcBf+HswzjVwhWXu083tIE2hhGe9G0274iJ+BGRcY IB5Rbsd6Z48qrvwCjUJ9T8pjrX8TK2OmEC7/GdS9tNUEByFJpKcYT8QBHOa6sNRm+kB5 oQdMM+w//OZnX05yMLtiheDEgZFv/0mkm+f4V2GcguyUwBKmOJJXNXx86t4FY2IrLEOz 2Xew== 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=Ds+wrC5+3TI61M+K/KSeLGtnRe7ISdPUmldhHTHIMsY=; b=wJuy5uougxKQziSplWmRbAQv9DqAu1YRHUewVsexZ5gMI8x+GeaNKpgBLv+HhvklXM Gd1z9/UtFhNSi/gRpAkz7j3ktsyBOfwpaUAajNSJXakSrihUKeIIIHVInNxWKjbxguLu tkEGVvUVezzfCh4zrOBdIfE437hHOdGfcnnW+iAOz2LPdNhhOb6ngSLQVWRFqHRaLcmg 9IljyzmzpuHY0iTu9fLPZXaRacB8HKuc7utrAOKwgzHoIBueAU15KuYeEj2jZd+YyOHK lnoncCB/OhUL2Cw7N7yx0uZ2GsuUIQM3olbTUHnBE68Lrt9TtZMJ21elS0dDNUUpPsBN 92Zw== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id t13si15314500ios.96.2021.04.05.13.44.25; Mon, 05 Apr 2021 13:44:37 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S237208AbhDENL2 (ORCPT + 99 others); Mon, 5 Apr 2021 09:11:28 -0400 Received: from vps0.lunn.ch ([185.16.172.187]:33942 "EHLO vps0.lunn.ch" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235568AbhDENL1 (ORCPT ); Mon, 5 Apr 2021 09:11:27 -0400 Received: from andrew by vps0.lunn.ch with local (Exim 4.94) (envelope-from ) id 1lTP0W-00EvY7-HE; Mon, 05 Apr 2021 15:11:08 +0200 Date: Mon, 5 Apr 2021 15:11:08 +0200 From: Andrew Lunn To: Michael Sit Wei Hong Cc: peppe.cavallaro@st.com, alexandre.torgue@st.com, joabreu@synopsys.com, davem@davemloft.net, kuba@kernel.org, mcoquelin.stm32@gmail.com, linux@armlinux.org.uk, weifeng.voon@intel.com, boon.leong.ong@intel.com, qiangqing.zhang@nxp.com, vee.khee.wong@intel.com, fugang.duan@nxp.com, kim.tatt.chuah@intel.com, netdev@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, hkallweit1@gmail.com Subject: Re: [PATCH net-next v2 0/2] Enable 2.5Gbps speed for stmmac Message-ID: References: <20210405112953.26008-1-michael.wei.hong.sit@intel.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210405112953.26008-1-michael.wei.hong.sit@intel.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Apr 05, 2021 at 07:29:51PM +0800, Michael Sit Wei Hong wrote: > This patchset enables 2.5Gbps speed mode for stmmac. > Link speed mode is detected and configured at serdes power up sequence. > For 2.5G, we do not use SGMII in-band AN, we check the link speed mode > in the serdes and disable the in-band AN accordingly. > > Changes: > v1 -> v2 > patch 1/2 > -Remove MAC supported link speed masking > > patch 2/2 > -Add supported link speed masking in the PCS So there still some confusion here. ------------ -------- |MAC - PCS |---serdes---| PHY |--- copper ------------ -------- You have a MAC and an PCS in the stmmac IP block. That then has some sort of SERDES interface, running 1000BaseX, SGMII, SGMII overclocked at 2.5G or 25000BaseX. Connected to the SERDES you have a PHY which converts to copper, giving you 2500BaseT. You said earlier, that the PHY can only do 2500BaseT. So it should be the PHY driver which sets supported to 2500BaseT and no other speeds. You should think about when somebody uses this MAC with a different PHY, one that can do the full range of 10/half through to 2.5G full. What generally happens is that the PHY performs auto-neg to determine the link speed. For 10M-1G speeds the PHY will configure its SERDES interface to SGMII and phylink will ask the PCS to also be configured to SGMII. If the PHY negotiates 2500BaseT, it will configure its side of the SERDES to 2500BaseX or SGMII overclocked at 2.5G. Again, phylink will ask the PCS to match what the PHY is doing. So, where exactly is the limitation in your hardware? PCS or PHY? Andrew