All of lore.kernel.org
 help / color / mirror / Atom feed
From: arnd@arndb.de (Arnd Bergmann)
To: linux-arm-kernel@lists.infradead.org
Subject: [PATCH] stmmac: Add device-tree support
Date: Wed, 14 Mar 2012 13:07:55 +0000	[thread overview]
Message-ID: <201203141307.55808.arnd@arndb.de> (raw)
In-Reply-To: <4F60832E.6060100@st.com>

On Wednesday 14 March 2012, Giuseppe CAVALLARO wrote:
> On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 15:05 Mon 12 Mar     , Stefan Roese wrote:
> >> This patch adds support to configure the STMMAC ethernet driver via
> >> device-tree instead of platform_data.
> >>
> >> Currently, only the properties needed on SPEAr600 are provided. All
> >> other properties should be added once needed on other platforms.
> >>
> >> Signed-off-by: Stefan Roese <sr@denx.de>
> >> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> >> Cc: Viresh Kumar <viresh.kumar@st.com>
> >> ---
> >>  Documentation/devicetree/bindings/net/stmmac.txt   |   38 +++++++++++
> >>  .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   66 +++++++++++++++++++-
> >>  2 files changed, 103 insertions(+), 1 deletion(-)
> >>  create mode 100644 Documentation/devicetree/bindings/net/stmmac.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
> >> new file mode 100644
> >> index 0000000..386a47f
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/net/stmmac.txt
> >> @@ -0,0 +1,38 @@
> >> +* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
> >> +
> >> +Required properties:
> >> +- compatible: Should be "stm,gmac"
> 
> > this IP have 2 version at least the GMAC for the second generation and mac for
> > the first generation
> 
> yes you are right. STMMAC supports two device generations I named:
> dwma10/100 and dwmac1000 (gmac).
> 
> Concerning the latter, we support several different versions of the
> synopsys GMAC cores ... from 3.30 to 3.61a.
> 
> For example, stx7108 and Stx7109 have the same GMAC core (also SPEAr600
> IIRC).
> SPEAr13xx has 3.50a
> New ST SoC Stxh415 has the 3.60a. etc.

In that case, you should definitely list the exact device versions in the
compatible string, like:

compatible = "stm,spear600-gmac", "snps,dw-gmac-3.50a", "snps,dw-gmac";

When we have other socs with the same version, that lets us add quirks
for the specific version by checking the compatible property once in the
driver.

It also sounds to me that the entire stmmac driver should live in the
drivers/net/ethernet/synopsys directory, not stmicro, but that is a
different issue.


	Arnd

WARNING: multiple messages have this Message-ID (diff)
From: Arnd Bergmann <arnd@arndb.de>
To: linux-arm-kernel@lists.infradead.org
Cc: Giuseppe CAVALLARO <peppe.cavallaro@st.com>,
	Stefan Roese <sr@denx.de>,
	Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>,
	devicetree-discuss@ozlabs.org, netdev@vger.kernel.org
Subject: Re: [PATCH] stmmac: Add device-tree support
Date: Wed, 14 Mar 2012 13:07:55 +0000	[thread overview]
Message-ID: <201203141307.55808.arnd@arndb.de> (raw)
In-Reply-To: <4F60832E.6060100@st.com>

On Wednesday 14 March 2012, Giuseppe CAVALLARO wrote:
> On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
> > On 15:05 Mon 12 Mar     , Stefan Roese wrote:
> >> This patch adds support to configure the STMMAC ethernet driver via
> >> device-tree instead of platform_data.
> >>
> >> Currently, only the properties needed on SPEAr600 are provided. All
> >> other properties should be added once needed on other platforms.
> >>
> >> Signed-off-by: Stefan Roese <sr@denx.de>
> >> Cc: Giuseppe Cavallaro <peppe.cavallaro@st.com>
> >> Cc: Viresh Kumar <viresh.kumar@st.com>
> >> ---
> >>  Documentation/devicetree/bindings/net/stmmac.txt   |   38 +++++++++++
> >>  .../net/ethernet/stmicro/stmmac/stmmac_platform.c  |   66 +++++++++++++++++++-
> >>  2 files changed, 103 insertions(+), 1 deletion(-)
> >>  create mode 100644 Documentation/devicetree/bindings/net/stmmac.txt
> >>
> >> diff --git a/Documentation/devicetree/bindings/net/stmmac.txt b/Documentation/devicetree/bindings/net/stmmac.txt
> >> new file mode 100644
> >> index 0000000..386a47f
> >> --- /dev/null
> >> +++ b/Documentation/devicetree/bindings/net/stmmac.txt
> >> @@ -0,0 +1,38 @@
> >> +* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)
> >> +
> >> +Required properties:
> >> +- compatible: Should be "stm,gmac"
> 
> > this IP have 2 version at least the GMAC for the second generation and mac for
> > the first generation
> 
> yes you are right. STMMAC supports two device generations I named:
> dwma10/100 and dwmac1000 (gmac).
> 
> Concerning the latter, we support several different versions of the
> synopsys GMAC cores ... from 3.30 to 3.61a.
> 
> For example, stx7108 and Stx7109 have the same GMAC core (also SPEAr600
> IIRC).
> SPEAr13xx has 3.50a
> New ST SoC Stxh415 has the 3.60a. etc.

In that case, you should definitely list the exact device versions in the
compatible string, like:

compatible = "stm,spear600-gmac", "snps,dw-gmac-3.50a", "snps,dw-gmac";

When we have other socs with the same version, that lets us add quirks
for the specific version by checking the compatible property once in the
driver.

It also sounds to me that the entire stmmac driver should live in the
drivers/net/ethernet/synopsys directory, not stmicro, but that is a
different issue.


	Arnd

  reply	other threads:[~2012-03-14 13:07 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-12 14:05 [PATCH] stmmac: Add device-tree support Stefan Roese
2012-03-12 14:05 ` Stefan Roese
2012-03-12 14:34 ` Rob Herring
2012-03-12 14:34   ` Rob Herring
2012-03-12 15:06   ` Stefan Roese
2012-03-12 15:06     ` Stefan Roese
2012-03-12 15:14     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:14       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:30     ` Giuseppe CAVALLARO
2012-03-12 15:30       ` Giuseppe CAVALLARO
2012-03-12 16:23       ` Stefan Roese
2012-03-12 16:23         ` Stefan Roese
2012-03-12 16:46         ` Giuseppe CAVALLARO
2012-03-12 16:46           ` Giuseppe CAVALLARO
2012-03-12 20:07           ` Rob Herring
2012-03-12 20:07             ` Rob Herring
2012-03-12 17:02       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 17:02         ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 14:38 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 14:38   ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:25   ` Stefan Roese
2012-03-12 15:25     ` Stefan Roese
2012-03-12 15:17     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-12 15:17       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 11:38   ` Giuseppe CAVALLARO
2012-03-14 11:38     ` Giuseppe CAVALLARO
2012-03-14 13:07     ` Arnd Bergmann [this message]
2012-03-14 13:07       ` Arnd Bergmann
2012-03-14 13:16       ` Giuseppe CAVALLARO
2012-03-14 13:16         ` Giuseppe CAVALLARO
2012-03-14 13:37         ` Stefan Roese
2012-03-14 13:37           ` Stefan Roese
2012-03-14 16:26     ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-14 16:26       ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-15  8:45       ` Giuseppe CAVALLARO
2012-03-15  8:45         ` Giuseppe CAVALLARO

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=201203141307.55808.arnd@arndb.de \
    --to=arnd@arndb.de \
    --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.