All of lore.kernel.org
 help / color / mirror / Atom feed
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Lior Amsalem <alior@marvell.com>, Andrew Lunn <andrew@lunn.ch>,
	Ike Pan <ike.pan@canonical.com>,
	Albert Stone <albert.stone@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>, Jon Masters <jcm@redhat.com>,
	Ben Dooks <ben-linux@fluff.org>,
	Gregory Clement <gregory.clement@free-electrons.com>,
	Thomas Petazzoni <thomas.petazzoni@free-electrons.com>,
	Chris Van Hoof <vanhoof@ca
Subject: Re: [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit
Date: Tue, 4 Sep 2012 14:36:36 +0000	[thread overview]
Message-ID: <201209041436.36430.arnd@arndb.de> (raw)
In-Reply-To: <1346764004-16332-2-git-send-email-thomas.petazzoni@free-electrons.com>

On Tuesday 04 September 2012, Thomas Petazzoni wrote:
>  .../devicetree/bindings/net/marvell-neta.txt       |   24 +
>  drivers/net/ethernet/marvell/Kconfig               |   11 +
>  drivers/net/ethernet/marvell/Makefile              |    1 +
>  drivers/net/ethernet/marvell/mvneta.c              | 2732 ++++++++++++++++++++
>  drivers/net/ethernet/marvell/mvneta.h              |  496 ++++
>  5 files changed, 3264 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/marvell-neta.txt
>  create mode 100644 drivers/net/ethernet/marvell/mvneta.c
>  create mode 100644 drivers/net/ethernet/marvell/mvneta.h

I usually prefer putting the definitions into the .c file rather
than a separate header if there is only only file including it
anyway.

> diff --git a/Documentation/devicetree/bindings/net/marvell-neta.txt b/Documentation/devicetree/bindings/net/marvell-neta.txt
> new file mode 100644
> index 0000000..a031978
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/marvell-neta.txt
> @@ -0,0 +1,24 @@
> +* Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
> +
> +Required properties:
> +- compatible: should be "marvell,neta".
> +- reg: address and length of the register set for the device.
> +- interrupts: interrupt for the device
> +- phy-mode: String, operation mode of the PHY interface. Supported
> +  values are "sgmii" and "rmii".
> +- phy-addr: Integer, address of the PHY.
> +- device_type: should be "network".
> +- clock-frequency: frequency of the peripheral clock of the SoC.
> +
> +Example:
> +
> +eth@d0070000 {
> +               compatible = "marvell,neta";
> +               reg = <0xd0070000 0x2500>;
> +               interrupts = <8>;
> +               device_type = "network";
> +               clock-frequency = <250000000>;
> +               status = "okay";
> +               phy-mode = "sgmii";
> +               phy-addr = <25>;

I think we normally put the phy into a separate device node on an
mdio bus and then use the of_phy_* functions to connect it to
the ethernet device.

	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH 1/4] net: mvneta: driver for Marvell Armada 370/XP network unit
Date: Tue, 4 Sep 2012 14:36:36 +0000	[thread overview]
Message-ID: <201209041436.36430.arnd@arndb.de> (raw)
In-Reply-To: <1346764004-16332-2-git-send-email-thomas.petazzoni@free-electrons.com>

On Tuesday 04 September 2012, Thomas Petazzoni wrote:
>  .../devicetree/bindings/net/marvell-neta.txt       |   24 +
>  drivers/net/ethernet/marvell/Kconfig               |   11 +
>  drivers/net/ethernet/marvell/Makefile              |    1 +
>  drivers/net/ethernet/marvell/mvneta.c              | 2732 ++++++++++++++++++++
>  drivers/net/ethernet/marvell/mvneta.h              |  496 ++++
>  5 files changed, 3264 insertions(+)
>  create mode 100644 Documentation/devicetree/bindings/net/marvell-neta.txt
>  create mode 100644 drivers/net/ethernet/marvell/mvneta.c
>  create mode 100644 drivers/net/ethernet/marvell/mvneta.h

I usually prefer putting the definitions into the .c file rather
than a separate header if there is only only file including it
anyway.

> diff --git a/Documentation/devicetree/bindings/net/marvell-neta.txt b/Documentation/devicetree/bindings/net/marvell-neta.txt
> new file mode 100644
> index 0000000..a031978
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/net/marvell-neta.txt
> @@ -0,0 +1,24 @@
> +* Marvell Armada 370 / Armada XP Ethernet Controller (NETA)
> +
> +Required properties:
> +- compatible: should be "marvell,neta".
> +- reg: address and length of the register set for the device.
> +- interrupts: interrupt for the device
> +- phy-mode: String, operation mode of the PHY interface. Supported
> +  values are "sgmii" and "rmii".
> +- phy-addr: Integer, address of the PHY.
> +- device_type: should be "network".
> +- clock-frequency: frequency of the peripheral clock of the SoC.
> +
> +Example:
> +
> +eth at d0070000 {
> +               compatible = "marvell,neta";
> +               reg = <0xd0070000 0x2500>;
> +               interrupts = <8>;
> +               device_type = "network";
> +               clock-frequency = <250000000>;
> +               status = "okay";
> +               phy-mode = "sgmii";
> +               phy-addr = <25>;

I think we normally put the phy into a separate device node on an
mdio bus and then use the of_phy_* functions to connect it to
the ethernet device.

	Arnd

  reply	other threads:[~2012-09-04 14:36 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 [this message]
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
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=201209041436.36430.arnd@arndb.de \
    --to=arnd@arndb.de \
    --cc=albert.stone@canonical.com \
    --cc=alior@marvell.com \
    --cc=andrew@lunn.ch \
    --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=rosenr@marvell.com \
    --cc=sebastian.hesselbarth@gmail.com \
    --cc=tawfik@marvell.com \
    --cc=thomas.petazzoni@free-electrons.com \
    --cc=vanhoof@ca \
    --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.