u-boot.lists.denx.de archive mirror
 help / color / mirror / Atom feed
From: "Marek Behún" <kabel@kernel.org>
To: Marek Vasut <marek.vasut+renesas@mailbox.org>
Cc: u-boot@lists.denx.de,
	"Ariel D'Alessandro" <ariel.dalessandro@collabora.com>,
	Joe Hershberger <joe.hershberger@ni.com>,
	Ramon Fried <rfried.dev@gmail.com>, Stefan Roese <sr@denx.de>,
	Tim Harvey <tharvey@gateworks.com>,
	Vladimir Oltean <vladimir.oltean@nxp.com>
Subject: Re: [PATCH 1/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SGMII_2500 with SGMII and speed
Date: Sun, 19 Mar 2023 20:45:06 +0100	[thread overview]
Message-ID: <20230319204506.5d4548e8@thinkpad> (raw)
In-Reply-To: <20230319170647.28149-1-marek.vasut+renesas@mailbox.org>

On Sun, 19 Mar 2023 18:06:45 +0100
Marek Vasut <marek.vasut+renesas@mailbox.org> 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 <marek.vasut+renesas@mailbox.org>

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

  parent reply	other threads:[~2023-03-19 19:45 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-03-19 17:06 [PATCH 1/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SGMII_2500 with SGMII and speed Marek Vasut
2023-03-19 17:06 ` [PATCH 2/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SFI with 5GBASER/10GBASER/XAUI Marek Vasut
2023-04-01 18:48   ` Ramon Fried
2023-03-19 17:06 ` [PATCH 3/3] net: phy: Synchronize PHY interface modes with Linux Marek Vasut
2023-04-01 18:48   ` Ramon Fried
2023-03-19 19:45 ` Marek Behún [this message]
2023-03-22  0:49   ` [PATCH 1/3] net: mvpp2: Replace PHY_INTERFACE_MODE_SGMII_2500 with SGMII and speed Marek Vasut

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230319204506.5d4548e8@thinkpad \
    --to=kabel@kernel.org \
    --cc=ariel.dalessandro@collabora.com \
    --cc=joe.hershberger@ni.com \
    --cc=marek.vasut+renesas@mailbox.org \
    --cc=rfried.dev@gmail.com \
    --cc=sr@denx.de \
    --cc=tharvey@gateworks.com \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.oltean@nxp.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).