All of lore.kernel.org
 help / color / mirror / Atom feed
From: antoine.tenart@free-electrons.com (Antoine Tenart)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support
Date: Tue, 9 Jan 2018 16:17:35 +0100	[thread overview]
Message-ID: <20180109151735.GB23676@kwain> (raw)
In-Reply-To: <20180109144447.GI17719@n2100.armlinux.org.uk>

Hi Russell,

On Tue, Jan 09, 2018 at 02:44:48PM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote:
> > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2
> > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses
> > nearly the same code path.
> 
> Sorry, also...

Comments always welcomed :)

> > @@ -4668,6 +4692,10 @@ static void mvpp2_port_mii_gmac_configure_mode(struct mvpp2_port *port)
> >  		 */
> >  		val |= MVPP2_GMAC_CONFIG_GMII_SPEED |
> >  		       MVPP2_GMAC_CONFIG_FULL_DUPLEX;
> > +	else if (port->phy_interface == PHY_INTERFACE_MODE_2500BASEX)
> > +		val |= MVPP2_GMAC_CONFIG_GMII_SPEED |
> > +		       MVPP2_GMAC_CONFIG_MII_SPEED |
> > +		       MVPP2_GMAC_CONFIG_FULL_DUPLEX;
> 
> I think you'll find you don't need to set MII_SPEED here, since
> MII_SPEED selects between 10 and 100, GMII_SPEED always takes
> precidence selecting 1000, and 2500 is done by the comphy
> increasing the clocks by 2.5x.

I just had a look at the datasheet, and as you say it seems GMII_SPEED
takes over MII_SPEED. I'll see if there is a corner case here or if
selecting MII_SPEED doesn't make sense, and update accordingly.

Thanks!
Antoine

-- 
Antoine T?nart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

WARNING: multiple messages have this Message-ID (diff)
From: Antoine Tenart <antoine.tenart@free-electrons.com>
To: Russell King - ARM Linux <linux@armlinux.org.uk>
Cc: Antoine Tenart <antoine.tenart@free-electrons.com>,
	davem@davemloft.net, kishon@ti.com, andrew@lunn.ch,
	gregory.clement@free-electrons.com, mw@semihalf.com,
	stefanc@marvell.com, ymarkman@marvell.com,
	thomas.petazzoni@free-electrons.com,
	miquel.raynal@free-electrons.com, nadavh@marvell.com,
	netdev@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support
Date: Tue, 9 Jan 2018 16:17:35 +0100	[thread overview]
Message-ID: <20180109151735.GB23676@kwain> (raw)
In-Reply-To: <20180109144447.GI17719@n2100.armlinux.org.uk>

Hi Russell,

On Tue, Jan 09, 2018 at 02:44:48PM +0000, Russell King - ARM Linux wrote:
> On Tue, Jan 09, 2018 at 09:59:45AM +0100, Antoine Tenart wrote:
> > This patch adds the 2500Base-X PHY mode support in the Marvell PPv2
> > driver. 2500Base-X is quite close to 1000Base-X and SGMII modes and uses
> > nearly the same code path.
> 
> Sorry, also...

Comments always welcomed :)

> > @@ -4668,6 +4692,10 @@ static void mvpp2_port_mii_gmac_configure_mode(struct mvpp2_port *port)
> >  		 */
> >  		val |= MVPP2_GMAC_CONFIG_GMII_SPEED |
> >  		       MVPP2_GMAC_CONFIG_FULL_DUPLEX;
> > +	else if (port->phy_interface == PHY_INTERFACE_MODE_2500BASEX)
> > +		val |= MVPP2_GMAC_CONFIG_GMII_SPEED |
> > +		       MVPP2_GMAC_CONFIG_MII_SPEED |
> > +		       MVPP2_GMAC_CONFIG_FULL_DUPLEX;
> 
> I think you'll find you don't need to set MII_SPEED here, since
> MII_SPEED selects between 10 and 100, GMII_SPEED always takes
> precidence selecting 1000, and 2500 is done by the comphy
> increasing the clocks by 2.5x.

I just had a look at the datasheet, and as you say it seems GMII_SPEED
takes over MII_SPEED. I'll see if there is a corner case here or if
selecting MII_SPEED doesn't make sense, and update accordingly.

Thanks!
Antoine

-- 
Antoine Ténart, Free Electrons
Embedded Linux and Kernel engineering
http://free-electrons.com

  reply	other threads:[~2018-01-09 15:17 UTC|newest]

Thread overview: 25+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-09  8:59 [PATCH net-next v3 0/4] net: mvpp2: 1000BaseX and 2500BaseX support Antoine Tenart
2018-01-09  8:59 ` Antoine Tenart
2018-01-09  8:59 ` Antoine Tenart
2018-01-09  8:59 ` [PATCH net-next v3 1/4] phy: add 2.5G SGMII mode to the phy_mode enum Antoine Tenart
2018-01-09  8:59   ` Antoine Tenart
2018-01-09  8:59 ` [PATCH net-next v3 2/4] phy: cp110-comphy: 2.5G SGMII mode Antoine Tenart
2018-01-09  8:59   ` Antoine Tenart
2018-01-09  8:59   ` Antoine Tenart
2018-01-09  8:59 ` [PATCH net-next v3 3/4] net: mvpp2: 1000baseX support Antoine Tenart
2018-01-09  8:59   ` Antoine Tenart
2018-01-09  8:59   ` Antoine Tenart
2018-01-09  8:59 ` [PATCH net-next v3 4/4] net: mvpp2: 2500baseX support Antoine Tenart
2018-01-09  8:59   ` Antoine Tenart
2018-01-09 14:13   ` Andrew Lunn
2018-01-09 14:13     ` Andrew Lunn
2018-01-09 14:42   ` Russell King - ARM Linux
2018-01-09 14:42     ` Russell King - ARM Linux
2018-01-09 15:11     ` Antoine Tenart
2018-01-09 15:11       ` Antoine Tenart
2018-01-09 14:44   ` Russell King - ARM Linux
2018-01-09 14:44     ` Russell King - ARM Linux
2018-01-09 15:17     ` Antoine Tenart [this message]
2018-01-09 15:17       ` Antoine Tenart
2018-01-09 15:54       ` Antoine Tenart
2018-01-09 15:54         ` Antoine Tenart

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=20180109151735.GB23676@kwain \
    --to=antoine.tenart@free-electrons.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.