From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CF7CEC6FD1F for ; Sun, 19 Mar 2023 19:45:21 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 4667385997; Sun, 19 Mar 2023 20:45:19 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (2048-bit key; unprotected) header.d=kernel.org header.i=@kernel.org header.b="f+BqBOpl"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 6A61E859E3; Sun, 19 Mar 2023 20:45:17 +0100 (CET) Received: from ams.source.kernel.org (ams.source.kernel.org [145.40.68.75]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5A6B385548 for ; Sun, 19 Mar 2023 20:45:14 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=kernel.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=kabel@kernel.org Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id 1045BB80B53; Sun, 19 Mar 2023 19:45:14 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 17E59C433D2; Sun, 19 Mar 2023 19:45:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1679255112; bh=gqm3zpJjwU6FNgSFKh90cOIbpv/YsPvh54o+cW6Bm7A=; h=Date:From:To:Cc:Subject:In-Reply-To:References:From; b=f+BqBOpl5coE/iJLUlKXQbnvx/3L/cMqtLNMEwcTJREfiTCcS5pjqrxbukAYAWvZZ pickATqBZVmVH2hsm/zMyh5fJiF6xdYRWtps9uX6BKtTPll4ncOf+cw0vjtlxOSUIE udr4gsxE8ULivI7GEm7AKDX6UBfw/1q/K4YmExXu3xCaZ4ZgysVUftfjKcorx4szt1 3fCuI3Ph1NNTiIKHzopZT67L31rLkbcW3MzsbG6Ewq+m26ZdWKjs6KQB+IMwzIjCNs 1AW7mD37kzGvAMbK26u/i6BRHy/9bY2RRNIgfa1hSDKasBoG9xTYYr5vdPKB8UawG4 FiToapuyhiBNw== Date: Sun, 19 Mar 2023 20:45:06 +0100 From: Marek =?UTF-8?B?QmVow7pu?= To: Marek Vasut Cc: u-boot@lists.denx.de, "Ariel D'Alessandro" , Joe Hershberger , Ramon Fried , Stefan Roese , Tim Harvey , Vladimir Oltean Subject: Re: [PATCH 1/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SGMII_2500 with SGMII and speed Message-ID: <20230319204506.5d4548e8@thinkpad> In-Reply-To: <20230319170647.28149-1-marek.vasut+renesas@mailbox.org> References: <20230319170647.28149-1-marek.vasut+renesas@mailbox.org> X-Mailer: Claws Mail 4.1.0 (GTK 3.24.35; x86_64-pc-linux-gnu) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean On Sun, 19 Mar 2023 18:06:45 +0100 Marek Vasut wrote: > Replace PHY_INTERFACE_MODE_SGMII_2500 with PHY_INTERFACE_MODE_SGMII and > phydev->speed check where applicable. The PHY_INTERFACE_MODE_SGMII_2500 > does not exist in Linux, so remove it from U-Boot too. > > Signed-off-by: Marek Vasut SGMII cannot operate on 2500mbps. As I explained to the author who added PHY_INTERFACE_MODE_SGMII_2500 to U-Boot (and the conversation didn't lead anywhere then), what I think happened here is that for some reason Marvell sometimes calls 2500base-x mode SGMII_2500. Meaning that they incorrectly interchange the names 2500base-x and sgmii_2500 as if they were the same thing. This is probably due to how 1000base-x and SGMII are similar and they do the same with those. The thing is, 1000base-x and SGMII are different protocols / interface modes. The difference is that they have different autonegotiation. SGMII allows also for speed autonegotiation, whilst 1000base-x only for flow control. The bits in the clause 37 link ability advertisement word have different meaning for 1000base-x than for sgmii. When SGMII negotiates lower speed, the actual serdes frequency does not change. The lower speed of 100mbps or 10mbps is achieved by repeating the word 10 or 100 times. The 2500base-x mode works the same way as 1000base-x mode, but at 2.5x the frequency. Calling it sgmii-2500 is wrong because it would mean that it also allows for lower speeds by repeating the words. In reality it is possible, on many controllers you can set SGMII mode at 2.5x normal frequency and then instead of 1000/100/10mbps speeds achieve 2500/250/25mbps. But this is not standardized anyway. Marek, your patch does a good thing getting rid of the sgmii-2500 constant, but you are still leaving the possibility of 2500mbps speed in SGMII mode... Marek