Netdev Archive on lore.kernel.org
help / color / mirror / Atom feed
From: Madalin Bucur <madalin.bucur@nxp.com>
To: "Pali Rohár" <pali@kernel.org>
Cc: Andrew Lunn <andrew@lunn.ch>, Scott Wood <oss@buserror.net>,
	Rob Herring <robh+dt@kernel.org>,
	Michael Ellerman <mpe@ellerman.id.au>,
	Benjamin Herrenschmidt <benh@kernel.crashing.org>,
	Russell King <rmk+kernel@armlinux.org.uk>,
	"netdev@vger.kernel.org" <netdev@vger.kernel.org>,
	"devicetree@vger.kernel.org" <devicetree@vger.kernel.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>,
	"Camelia Alexandra Groza (OSS)" <camelia.groza@oss.nxp.com>
Subject: RE: Unsupported phy-connection-type sgmii-2500 in arch/powerpc/boot/dts/fsl/t1023rdb.dts
Date: Fri, 4 Jun 2021 19:13:06 +0000	[thread overview]
Message-ID: <AM6PR04MB39763699AE044A8B95D83D8DEC3B9@AM6PR04MB3976.eurprd04.prod.outlook.com> (raw)
In-Reply-To: <20210604173244.qonw5wsn3pq6gyjf@pali>

> -----Original Message-----
> From: Pali Rohár <pali@kernel.org>
> Sent: 04 June 2021 20:33
> To: Madalin Bucur <madalin.bucur@nxp.com>
> Cc: Andrew Lunn <andrew@lunn.ch>; Igal Liberman
> <Igal.Liberman@freescale.com>; Shruti Kanetkar <Shruti@freescale.com>;
> Emil Medve <Emilian.Medve@freescale.com>; Scott Wood <oss@buserror.net>;
> Rob Herring <robh+dt@kernel.org>; Michael Ellerman <mpe@ellerman.id.au>;
> Benjamin Herrenschmidt <benh@kernel.crashing.org>; Russell King
> <rmk+kernel@armlinux.org.uk>; netdev@vger.kernel.org;
> devicetree@vger.kernel.org; linux-kernel@vger.kernel.org; Camelia
> Alexandra Groza (OSS) <camelia.groza@oss.nxp.com>
> Subject: Re: Unsupported phy-connection-type sgmii-2500 in
> arch/powerpc/boot/dts/fsl/t1023rdb.dts
> 
> Hello!
> 
> On Friday 04 June 2021 07:35:33 Madalin Bucur wrote:
> > > -----Original Message-----
> > > From: Pali Rohár <pali@kernel.org>
> > > Sent: 03 June 2021 22:49
> > > To: Andrew Lunn <andrew@lunn.ch>
> > > Cc: Igal Liberman <Igal.Liberman@freescale.com>; Shruti Kanetkar
> > > <Shruti@freescale.com>; Emil Medve <Emilian.Medve@freescale.com>;
> Scott
> > > Wood <oss@buserror.net>; Rob Herring <robh+dt@kernel.org>; Michael
> > > Ellerman <mpe@ellerman.id.au>; Benjamin Herrenschmidt
> > > <benh@kernel.crashing.org>; Madalin Bucur <madalin.bucur@nxp.com>;
> Russell
> > > King <rmk+kernel@armlinux.org.uk>; netdev@vger.kernel.org;
> > > devicetree@vger.kernel.org; linux-kernel@vger.kernel.org
> > > Subject: Re: Unsupported phy-connection-type sgmii-2500 in
> > > arch/powerpc/boot/dts/fsl/t1023rdb.dts
> > >
> > > On Thursday 03 June 2021 17:12:31 Andrew Lunn wrote:
> > > > On Thu, Jun 03, 2021 at 04:34:53PM +0200, Pali Rohár wrote:
> > > > > Hello!
> > > > >
> > > > > In commit 84e0f1c13806 ("powerpc/mpc85xx: Add MDIO bus muxing
> support
> > > to
> > > > > the board device tree(s)") was added following DT property into DT
> > > node:
> > > > > arch/powerpc/boot/dts/fsl/t1023rdb.dts fm1mac3: ethernet@e4000
> > > > >
> > > > >     phy-connection-type = "sgmii-2500";
> > > > >
> > > > > But currently kernel does not recognize this "sgmii-2500" phy mode.
> > > See
> > > > > file include/linux/phy.h. In my opinion it should be "2500base-x"
> as
> > > > > this is mode which operates at 2.5 Gbps.
> > > > >
> > > > > I do not think that sgmii-2500 mode exist at all (correct me if
> I'm
> > > > > wrong).
> > > >
> > > > Kind of exist, unofficially. Some vendors run SGMII over clocked at
> > > > 2500. But there is no standard for it, and it is unclear how inband
> > > > signalling should work. Whenever i see code saying 2.5G SGMII, i
> > > > always ask, are you sure, is it really 2500BaseX? Mostly it gets
> > > > changed to 2500BaseX after review.
> > >
> > > So this is question for authors of that commit 84e0f1c13806. But it
> > > looks like I cannot send them emails because of following error:
> > >
> > > <Minghuan.Lian@freescale.com>: connect to
> freescale.com[192.88.156.33]:25:
> > > Connection timed out
> > >
> > > Do you have other way how to contact maintainers of that DTS file?
> > > arch/powerpc/boot/dts/fsl/t1023rdb.dts
> > >
> > > > PHY mode sgmii-2500 does not exist in mainline.
> > >
> > > Yes, this is reason why I sent this email. In DTS is specified this
> mode
> > > which does not exist.
> > >
> > > > 	Andrew
> >
> > Hi, the Freescale emails no longer work, years after Freescale joined
> NXP.
> > Also, the first four recipients no longer work for NXP.
> >
> > In regards to the sgmii-2500 you see in the device tree, it describes
> SGMII
> > overclocked to 2.5Gbps, with autonegotiation disabled.
> >
> > A quote from a long time ago, from someone from the HW team on this:
> >
> > 	The industry consensus is that 2.5G SGMII is overclocked 1G SGMII
> > 	using XAUI electricals. For the PCS and MAC layers, it looks exactly
> > 	like 1G SGMII, just with a faster clock.
> 
> SGMII supports 1 Gbps speed and also 100 / 10 Mbps by repeating frame 10
> or 100 times.
> 
> So... if this HW has 2.5G SGMII (sgmii-2500) as 2.5x overclocked SGMII,
> does it mean that 2.5G SGMII supports 25 Mbps and 250 Mbps speeds by
> repeating frame 10 and 100 times (like for 1G SGMII)?

I had the same curiosity at the time - no, it does not support anything
other than 2.5G in this mode, so all that flexibility of SGMII is gone.
It seems it was a HW "hack" of sorts to get more speed.

> > The statement that it does not exist is not accurate, it exists in HW,
> and
> > it is described as such in the device tree. Whether or not it is
> properly
> > treated in SW it's another discussion. In 2015, when this was submitted,
> > there were no other 2.5G compatibles in use, if I'm not mistaken.
> 
> Yea, I understand. If at that time there was no sw support, "something"
> was chosen.
> 
> > 2500Base-X started to be added to device trees four years later, it
> should
> > be compatible/interworking but it is less specific on the actual
> implementation
> > details (denotes 2.5G speed, 8b/10b coding, which is true for this
> overclocked
> > SGMII). If they are compatible, SW should probably treat them in the
> same manner.
> 
> 1000base-x and SGMII are not same modes. E.g. SGMII support 10 Mbps
> while 1000base-x not. So in my opinion 1000base-x and SGMII should not
> be treated as the same mode (in SW).
> 
> I'm not sure how what exactly SGMII-2500 supports, but as 2500base-x
> does not support 25 Mbps speed I do not think that SGMII-2500 is same as
> 2500base-x.

Seems to interoperate though, as PHYs that do not list this SGMII 2500 as
a supported mode work with this overclocked SGMII IP (with SGMII AN disabled).
If this disabling was not required, it could have been declared as SGMII,
(the overclocking is done by the HW config registers). But when the HW runs
in normal SGMII mode, it uses AN, and when configured for this sgmii-2500
it does not use AN, so the driver needs to know about it, to disable AN.
From the networking stack's perspective, it looks like a 2500Base-X device.

> But now I'm totally confused by all these modes, so I hope that somebody
> else tries to explain what kernel expects and how kernel treats these
> modes.
> 
> > There were some discussions a while ago about the mix or even confusion
> between
> > the actual HW description (that's what the dts is supposed to do) and
> the settings
> > one wants to represent in SW (i.e. speed) denoted loosely by
> denominations like
> > 10G Base-R.
> >
> > Regards,
> > Madalin

  reply	other threads:[~2021-06-04 19:13 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-03 14:34 Pali Rohár
2021-06-03 15:12 ` Andrew Lunn
2021-06-03 19:48   ` Pali Rohár
2021-06-04  7:35     ` Madalin Bucur
2021-06-04 17:32       ` Pali Rohár
2021-06-04 19:13         ` Madalin Bucur [this message]
2021-06-04 19:27       ` Russell King (Oracle)
2021-06-04 19:39         ` Madalin Bucur
2021-06-04 20:00           ` Russell King (Oracle)
2021-06-04 21:37             ` Madalin Bucur
2021-06-04 20:23           ` Andrew Lunn
2021-06-04 21:47             ` Madalin Bucur
2021-06-04 23:34               ` Pali Rohár
2021-06-05  0:33                 ` Russell King (Oracle)
2021-06-05 12:26                   ` Vladimir Oltean
2021-06-05 12:50                     ` What is inside GPON SFP module? (Was: Re: Unsupported phy-connection-type sgmii-2500 in arch/powerpc/boot/dts/fsl/t1023rdb.dts) Pali Rohár
2021-06-05 13:04                       ` Hauke Mehrtens
2021-06-05 13:31                         ` What is inside GPON SFP module? Pali Rohár
2021-06-05 14:17                           ` Hauke Mehrtens
2021-06-05 14:41                         ` What is inside GPON SFP module? (Was: Re: Unsupported phy-connection-type sgmii-2500 in arch/powerpc/boot/dts/fsl/t1023rdb.dts) Russell King (Oracle)
2021-06-08 10:33                           ` What is inside GPON SFP module? Pali Rohár
2021-06-19 20:35                 ` Unsupported phy-connection-type sgmii-2500 in arch/powerpc/boot/dts/fsl/t1023rdb.dts Pali Rohár
2021-07-04 13:43                 ` [PATCH] powerpc/fsl/dts: Fix phy-connection-type for fm1mac3 Pali Rohár
2021-07-14 17:11                   ` Scott Wood
2021-08-27 11:38                     ` Pali Rohár
2021-09-28 21:39                       ` Pali Rohár
2021-09-29 14:25                         ` Andrew Lunn
2021-10-02  9:06                           ` Pali Rohár
2021-06-04 23:18         ` Unsupported phy-connection-type sgmii-2500 in arch/powerpc/boot/dts/fsl/t1023rdb.dts Pali Rohár

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=AM6PR04MB39763699AE044A8B95D83D8DEC3B9@AM6PR04MB3976.eurprd04.prod.outlook.com \
    --to=madalin.bucur@nxp.com \
    --cc=andrew@lunn.ch \
    --cc=benh@kernel.crashing.org \
    --cc=camelia.groza@oss.nxp.com \
    --cc=devicetree@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mpe@ellerman.id.au \
    --cc=netdev@vger.kernel.org \
    --cc=oss@buserror.net \
    --cc=pali@kernel.org \
    --cc=rmk+kernel@armlinux.org.uk \
    --cc=robh+dt@kernel.org \
    --subject='RE: Unsupported phy-connection-type sgmii-2500 in arch/powerpc/boot/dts/fsl/t1023rdb.dts' \
    /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

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).