linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Vladimir Oltean <olteanv@gmail.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Marcin Wojtas <mw@semihalf.com>,
	linux-kernel@vger.kernel.org, netdev@vger.kernel.org,
	davem@davemloft.net, kuba@kernel.org, linux@armlinux.org.uk,
	jaz@semihalf.com, gjb@semihalf.com, upstream@semihalf.com,
	Samer.El-Haj-Mahmoud@arm.com, jon@solid-run.com, tn@semihalf.com,
	rjw@rjwysocki.net, lenb@kernel.org
Subject: Re: [net-next: PATCH v3 1/6] Documentation: ACPI: DSD: describe additional MAC configuration
Date: Thu, 24 Jun 2021 00:42:18 +0300	[thread overview]
Message-ID: <20210623214218.eaq4uflmxnkbl4dw@skbuf> (raw)
In-Reply-To: <YNOW+mQNEmSRx/6V@lunn.ch>

Hi Andrew,

On Wed, Jun 23, 2021 at 10:18:02PM +0200, Andrew Lunn wrote:
> > +MAC node example with a "fixed-link" subnode.
> > +---------------------------------------------
> > +
> > +.. code-block:: none
> > +
> > +	Scope(\_SB.PP21.ETH1)
> > +	{
> > +	  Name (_DSD, Package () {
> > +	    ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
> > +		 Package () {
> > +		     Package () {"phy-mode", "sgmii"},
> > +		 },
> > +	    ToUUID("dbb8e3e6-5886-4ba6-8795-1319f52a966b"),
> > +		 Package () {
> > +		     Package () {"fixed-link", "LNK0"}
> > +		 }
> > +	  })
> 
> At least in the DT world, it is pretty unusual to see both fixed-link
> and phy-mode. You might have one of the four RGMII modes, in order to
> set the delays when connecting to a switch. But sgmii and fixed link
> seems very unlikely, how is sgmii autoneg going to work?

SGMII autoneg is supposed to be disabled if you have a fixed-link, and
there is nothing unusual in that kind of setup.
There are 3 types of phylink setups:

MLO_AN_INBAND: there might or might not be a phy-handle, but SGMII
               autoneg should be enabled and the MAC should be
               reconfigured automatically (in hardware) to the right
               speed/duplex based on that
MLO_AN_PHY: there is a phy-handle but SGMII autoneg should be disabled*
            and the MAC should be reconfigured (forced) in software to
            the speed/duplex determined by reading the PHY MDIO
            registers
MLO_AN_FIXED: there is no phy-handle or phy_device, but the driver
              should do the same thing, the speed/duplex is configured
              by management (in this case DT/ACPI)

*there appears to be some debate here, since the "managed" property is
phylink-specific and therefore a phylib driver will not necessarily
disable its in-band autoneg, but this is what the existing phylink_pcs
drivers in drivers/net/pcs/ do and I think there's nothing wrong with
settling on that if phylink is being used. It does create some interesting
questions though when a driver is being converted from phylib to phylink,
since the meaning of the existing firmware bindings suddenly changes.

An SGMII link with MLO_AN_FIXED is nothing unusual, it is in fact very
widespread as a way to reduce pin count compared to the parallel RGMII.
I suspect there are more DSA setups in the field with an SGMII fixed-link
than with RGMII fixed-link, due to practicality.

The 2 characteristic features of SGMII compared to 1000base-X are:
- customization of the 16-bit configuration word communicated via the
  clause 37 state machines. Those are bypassed in MLO_AN_PHY and
  MLO_AN_FIXED modes, true
- symbol replication at 10/100 speeds.

So since it is equally valid to have an SGMII fixed-link at 100Mbps or
10Mbps, it is just as valid to have an SGMII fixed-link at 1Gbps with
in-band autoneg disabled.

  parent reply	other threads:[~2021-06-23 21:42 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-06-21 17:30 [net-next: PATCH v3 0/6] ACPI MDIO support for Marvell controllers Marcin Wojtas
2021-06-21 17:30 ` [net-next: PATCH v3 1/6] Documentation: ACPI: DSD: describe additional MAC configuration Marcin Wojtas
2021-06-23 20:18   ` Andrew Lunn
2021-06-23 21:00     ` Marcin Wojtas
2021-06-23 21:36       ` Andrew Lunn
2021-06-23 21:42     ` Vladimir Oltean [this message]
2021-06-21 17:30 ` [net-next: PATCH v3 2/6] net: mdiobus: Introduce fwnode_mdbiobus_register() Marcin Wojtas
2021-06-23 20:22   ` Andrew Lunn
2021-06-23 22:10     ` Marcin Wojtas
2021-06-24 11:10       ` Marcin Wojtas
2021-06-21 17:30 ` [net-next: PATCH v3 3/6] net/fsl: switch to fwnode_mdiobus_register Marcin Wojtas
2021-06-23 20:24   ` Andrew Lunn
2021-06-21 17:30 ` [net-next: PATCH v3 4/6] net: mvmdio: add ACPI support Marcin Wojtas
2021-06-23 20:28   ` Andrew Lunn
2021-06-23 21:58     ` Marcin Wojtas
2021-06-24  1:24       ` Andrew Lunn
2021-06-21 17:30 ` [net-next: PATCH v3 5/6] net: mvpp2: enable using phylink with ACPI Marcin Wojtas
2021-06-23 20:37   ` Andrew Lunn
2021-06-23 21:45     ` Marcin Wojtas
2021-06-24  1:17       ` Andrew Lunn
2021-06-21 17:30 ` [net-next: PATCH v3 6/6] net: mvpp2: remove unused 'has_phy' field Marcin Wojtas
2021-06-23 11:56 ` [net-next: PATCH v3 0/6] ACPI MDIO support for Marvell controllers Marcin Wojtas

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=20210623214218.eaq4uflmxnkbl4dw@skbuf \
    --to=olteanv@gmail.com \
    --cc=Samer.El-Haj-Mahmoud@arm.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=gjb@semihalf.com \
    --cc=jaz@semihalf.com \
    --cc=jon@solid-run.com \
    --cc=kuba@kernel.org \
    --cc=lenb@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mw@semihalf.com \
    --cc=netdev@vger.kernel.org \
    --cc=rjw@rjwysocki.net \
    --cc=tn@semihalf.com \
    --cc=upstream@semihalf.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).