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 14812C6FD20 for ; Wed, 22 Mar 2023 00:49:46 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id E811185CB5; Wed, 22 Mar 2023 01:49:43 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.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; secure) header.d=mailbox.org header.i=@mailbox.org header.b="c6VMOZ6/"; dkim=pass (2048-bit key) header.d=mailbox.org header.i=@mailbox.org header.b="utZmKLeC"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id 163C9859B6; Wed, 22 Mar 2023 01:49:42 +0100 (CET) Received: from mout-p-101.mailbox.org (mout-p-101.mailbox.org [IPv6:2001:67c:2050:0:465::101]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 5633B85C6D for ; Wed, 22 Mar 2023 01:49:38 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=pass (p=reject dis=none) header.from=mailbox.org Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=marek.vasut@mailbox.org Received: from smtp202.mailbox.org (smtp202.mailbox.org [IPv6:2001:67c:2050:b231:465::202]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-384) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by mout-p-101.mailbox.org (Postfix) with ESMTPS id 4Ph8xq6SNsz9sc0; Wed, 22 Mar 2023 01:49:35 +0100 (CET) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679446176; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zYEuGVR3gDiJXMrPJSZNc9oDFr4Va92/URlF1kQfv+Q=; b=c6VMOZ6/tPHOvCWP1EcdHGtFrWMx1zfZVZPBKCsa2aDxiufLS4tEE22V9FA6X6/5lQSI/D BpwRRSr9b5pQHn/BOpdzt1+pIHWNjYXKuNJvIasJRY2hiQO7JcfmquHpKXVKkDk7TRiuqp NInq+KbiEH8mL12cArKHXj29M+IXbD2mcJ1VxYiO4FvkUBJiYyzfrJimCA5adhcuog2rGr 93XwxCd8ayb0lyzZ2e4Hc4XBfvTHqyHoSaaAZfLZmfFErhFMm46XV8CUwydI0piYiLRYFw 4VmGv3FZvcf2sZur/ZXyfiK5Vk/KBQ7rsjtYEnsOZ5KmT2DIzKjD0YMHBOzm3A== Message-ID: <975301ba-0c65-d05e-7c4b-ef666005abcc@mailbox.org> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=mailbox.org; s=mail20150812; t=1679446173; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=zYEuGVR3gDiJXMrPJSZNc9oDFr4Va92/URlF1kQfv+Q=; b=utZmKLeCe+NTVOgWw63ZXG0VPh/Icp0incxwQPFV5W8lrQ+NyGWrc3WXNCi02mV+e6N/jx 7hUryGYS1dzSsycVXAI9gc23zlBfRCY4FhRNxWIrPe5ZSfloV8JLfr9S0WiThCtanx1ZLC WTeGtyxEwucDWbKKAQF377IbggdCgh7FQMW4//p9CAQT3T9r8RMnLHT0Jj8YcoUVovueHN qGytG+GXw9zeDEURS/ZaJcutAb4z08JZW0vYoYWS1bYLJtrFH0RotXvlyQXUQN/v2JoYJk wuTDL/VNGQ5ynfg8RUWQcxpBS4Pg3dzC56wD/TKCc/CodxtTgpYxstWwbT8ymw== Date: Wed, 22 Mar 2023 01:49:32 +0100 MIME-Version: 1.0 Subject: Re: [PATCH 1/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SGMII_2500 with SGMII and speed Content-Language: en-US To: =?UTF-8?Q?Marek_Beh=c3=ban?= , Marek Vasut Cc: u-boot@lists.denx.de, Ariel D'Alessandro , Joe Hershberger , Ramon Fried , Stefan Roese , Tim Harvey , Vladimir Oltean References: <20230319170647.28149-1-marek.vasut+renesas@mailbox.org> <20230319204506.5d4548e8@thinkpad> From: Marek Vasut In-Reply-To: <20230319204506.5d4548e8@thinkpad> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-MBO-RS-ID: ecf45b7cb68c511e98f X-MBO-RS-META: eo8ketk1i8gyk9zcc6e93e7i8fnyoyso X-Rspamd-Queue-Id: 4Ph8xq6SNsz9sc0 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 3/19/23 20:45, Marek BehĂșn wrote: > 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... Thanks for the detailed explanation, I sent a V2 where I remove the SGMII 2500 . I hope I got the differences right in the V2 commit message.