All of lore.kernel.org
 help / color / mirror / Atom feed
From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Lior Amsalem <alior@marvell.com>, Ike Pan <ike.pan@canonical.com>,
	Nadav Haklai <nadavh@marvell.com>,
	Ian Molton <ian.molton@codethink.co.uk>,
	Lennert Buytenhek <kernel@wantstofly.org>,
	David Marlin <dmarlin@redhat.com>,
	Rami Rosen <rosenr@marvell.com>,
	Yehuda Yitschak <yehuday@marvell.com>,
	Jani Monoses <jani.monoses@canonical.com>,
	Tawfik Bayouk <tawfik@marvell.com>,
	Dan Frazier <dann.frazier@canonical.com>,
	Eran Ben-Avi <benavi@marvell.com>, Li Li <li.li@canonical.com>,
	Leif Lindholm <leif.lindholm@arm.com>,
	Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>,
	Jason Cooper <jason@lakedaemon.net>,
	Arnd Bergmann <arnd@arndb.de>, Jon Masters <jcm@redhat.com>,
	Ben Dooks <ben-linux@fluff.org>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	linux-arm-kernel@lists.infradead.org,
	Chris Van Hoof <vanhoof@canonical.com>,
	Nicolas Pitre <nico@fluxnic.net>,
	netdev@vger.k
Subject: Re: [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit
Date: Wed, 5 Sep 2012 09:32:14 +0200	[thread overview]
Message-ID: <20120905093214.379ef16c@skate> (raw)
In-Reply-To: <20120904183125.GB14683@lunn.ch>

Hello Andrew,

Le Tue, 4 Sep 2012 20:31:25 +0200,
Andrew Lunn <andrew@lunn.ch> a écrit :

> I've used Marvell switch chipsets, which have a phy polling unit,
> PPU. This sounds very similar. You can do a lot with the PPU, but when
> you want to configure subsets of auto-negotiation rates/duplex modes,
> or fixed speeds/duplex modes, the PPU could not do it. You had to
> disable the PPU and configure the PHY directly.
> 
> I see you have some of the ethtools API calls implemented, but not the
> ones needed for auto-neg and rates/duplex mode configurations. Does
> the neta PPU support this, or will you need to export the MDIO bus for
> these sorts of configuration options?

There's nothing named 'PPU' in the datasheet for Armada XP/370, but the
Ethernet controller registers indeed allow to change the
auto-negotiation, duplex and speed without talking to the PHY.

In addition to the GMAC_STATUS register (offset 0x2C10) that the driver
currently uses to find out the state of the link (up/down, speed,
duplex), there is a "Port Auto-Negotiation Configuration
Register" (offset 0x2C0C), which allows to set:

 * Manual duplex or auto duplex detection
 * If manual duplex, choose full/half
 * Manual or automatic detection of flow control
 * If manual flow control, decide the flow control value
 * Manual or automatic detection of speed
 * If manual speed, set the speed value

And a few other things. So indeed, we can configure the PHY parameters
without having to talk to the PHY directly.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

WARNING: multiple messages have this Message-ID (diff)
From: thomas.petazzoni@free-electrons.com (Thomas Petazzoni)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit
Date: Wed, 5 Sep 2012 09:32:14 +0200	[thread overview]
Message-ID: <20120905093214.379ef16c@skate> (raw)
In-Reply-To: <20120904183125.GB14683@lunn.ch>

Hello Andrew,

Le Tue, 4 Sep 2012 20:31:25 +0200,
Andrew Lunn <andrew@lunn.ch> a ?crit :

> I've used Marvell switch chipsets, which have a phy polling unit,
> PPU. This sounds very similar. You can do a lot with the PPU, but when
> you want to configure subsets of auto-negotiation rates/duplex modes,
> or fixed speeds/duplex modes, the PPU could not do it. You had to
> disable the PPU and configure the PHY directly.
> 
> I see you have some of the ethtools API calls implemented, but not the
> ones needed for auto-neg and rates/duplex mode configurations. Does
> the neta PPU support this, or will you need to export the MDIO bus for
> these sorts of configuration options?

There's nothing named 'PPU' in the datasheet for Armada XP/370, but the
Ethernet controller registers indeed allow to change the
auto-negotiation, duplex and speed without talking to the PHY.

In addition to the GMAC_STATUS register (offset 0x2C10) that the driver
currently uses to find out the state of the link (up/down, speed,
duplex), there is a "Port Auto-Negotiation Configuration
Register" (offset 0x2C0C), which allows to set:

 * Manual duplex or auto duplex detection
 * If manual duplex, choose full/half
 * Manual or automatic detection of flow control
 * If manual flow control, decide the flow control value
 * Manual or automatic detection of speed
 * If manual speed, set the speed value

And a few other things. So indeed, we can configure the PHY parameters
without having to talk to the PHY directly.

Best regards,

Thomas
-- 
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com

  reply	other threads:[~2012-09-05  7:32 UTC|newest]

Thread overview: 34+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-09-04 13:06 net: Network driver for the Armada 370 and Armada XP ARM Marvell SoCs Thomas Petazzoni
2012-09-04 13:06 ` Thomas Petazzoni
2012-09-04 13:06 ` [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit Thomas Petazzoni
2012-09-04 13:06   ` Thomas Petazzoni
2012-09-04 14:36   ` Arnd Bergmann
2012-09-04 14:36     ` Arnd Bergmann
2012-09-04 15:56     ` Thomas Petazzoni
2012-09-04 15:56       ` Thomas Petazzoni
2012-09-04 18:31       ` Andrew Lunn
2012-09-04 18:31         ` Andrew Lunn
2012-09-05  7:32         ` Thomas Petazzoni [this message]
2012-09-05  7:32           ` Thomas Petazzoni
2012-09-05 15:25   ` Florian Fainelli
2012-09-05 15:25     ` Florian Fainelli
2012-09-04 13:06 ` [PATCH 2/4] net: mvneta: update MAINTAINERS file for the mvneta maintainers Thomas Petazzoni
2012-09-04 13:06   ` Thomas Petazzoni
2012-09-04 13:06 ` [PATCH 3/4] arm: mvebu: add Ethernet controllers using mvneta driver for Armada 370/XP Thomas Petazzoni
2012-09-04 13:06   ` Thomas Petazzoni
2012-09-04 13:06 ` [PATCH 4/4] arm: mvebu: enable Ethernet controllers on Armada 370/XP eval boards Thomas Petazzoni
2012-09-04 13:06   ` Thomas Petazzoni
2012-10-23 16:54 [PATCH v3] Network driver for the Armada 370 and Armada XP ARM Marvell SoCs Thomas Petazzoni
2012-10-23 16:54 ` [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit Thomas Petazzoni
2012-10-23 16:54   ` Thomas Petazzoni
2012-10-25  3:06   ` David Miller
2012-10-25  3:06     ` David Miller
2012-10-25  6:21     ` Thomas Petazzoni
2012-10-25  6:21       ` Thomas Petazzoni
2012-10-26 10:03 [PATCH v4] Network driver for the Armada 370 and Armada XP ARM Marvell SoCs Thomas Petazzoni
2012-10-26 10:03 ` [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit Thomas Petazzoni
2012-10-26 10:03   ` Thomas Petazzoni
2012-10-30 12:07   ` Nobuhiro Iwamatsu
2012-10-30 12:07     ` Nobuhiro Iwamatsu
2012-10-30 12:28     ` Thomas Petazzoni
2012-10-30 12:28       ` Thomas Petazzoni
2012-10-31 11:12   ` Florian Fainelli
2012-10-31 11:12     ` Florian Fainelli

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=20120905093214.379ef16c@skate \
    --to=thomas.petazzoni@free-electrons.com \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --cc=arnd@arndb.de \
    --cc=ben-linux@fluff.org \
    --cc=benavi@marvell.com \
    --cc=dann.frazier@canonical.com \
    --cc=dmarlin@redhat.com \
    --cc=gregory.clement@free-electrons.com \
    --cc=ian.molton@codethink.co.uk \
    --cc=ike.pan@canonical.com \
    --cc=jani.monoses@canonical.com \
    --cc=jason@lakedaemon.net \
    --cc=jcm@redhat.com \
    --cc=kernel@wantstofly.org \
    --cc=leif.lindholm@arm.com \
    --cc=li.li@canonical.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=nadavh@marvell.com \
    --cc=netdev@vger.k \
    --cc=nico@fluxnic.net \
    --cc=rosenr@marvell.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tawfik@marvell.com \
    --cc=vanhoof@canonical.com \
    --cc=yehuday@marvell.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 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.