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 <redacted>
Cc: Giuseppe Cavallaro <redacted>
Cc: Viresh Kumar <redacted>
---
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
@@ -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
+- reg: Address and length of the register set for the device
+- interrupt-parent: Should be the phandle for the interrupt controller
+ that services interrupts for this device
+- interrupts: Should contain the STMMAC interrupts
+- interrupt-names: Should contain the interrupt names "macirq"
+ "eth_wake_irq" if this interrupt is supported in the "interrupts"
+ property
optionnal
+- phy-mode: String, operation mode of the PHY interface.
+ Supported values are: "mii", "rmii", "gmii", "rgmii".
+- phy-addr: MDIO address of the PHY
+
+Optional properties:
+- stm,prog-burst-len: Specify the burst length
+- stm,has-gmac: Indicates that the controller supports 1000Mbps
@@ -66,6 +118,7 @@ static int stmmac_pltfr_probe(struct platform_device *pdev) if (unlikely(ret)) goto out_unmap; }+#endif priv = stmmac_dvr_probe(&(pdev->dev), plat_dat, addr); if (!priv) {
@@ -73,6 +126,10 @@ static int stmmac_pltfr_probe(struct platform_device *pdev) goto out_unmap; }+ /* Get MAC address if available (DT) */+ if (mac)+ memcpy(priv->dev->dev_addr, mac, ETH_ALEN);+ /* Get the MAC information */ priv->dev->irq = platform_get_irq_byname(pdev, "macirq"); if (priv->dev->irq == -ENXIO) {
--
1.7.9.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Giuseppe CAVALLARO <hidden> Date: 2012-03-14 11:38:22
On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 15:05 Mon 12 Mar , Stefan Roese wrote:
quoted
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 <redacted>
Cc: Viresh Kumar <redacted>
---
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
@@ -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.
quoted
+- reg: Address and length of the register set for the device
+- interrupt-parent: Should be the phandle for the interrupt controller
+ that services interrupts for this device
+- interrupts: Should contain the STMMAC interrupts
+- interrupt-names: Should contain the interrupt names "macirq"
+ "eth_wake_irq" if this interrupt is supported in the "interrupts"
+ property
optionnal
yes
note that there will be a new field for lpi IRQ as well
quoted
+- phy-mode: String, operation mode of the PHY interface.
+ Supported values are: "mii", "rmii", "gmii", "rgmii".
+- phy-addr: MDIO address of the PHY
+
+Optional properties:
+- stm,prog-burst-len: Specify the burst length
+- stm,has-gmac: Indicates that the controller supports 1000Mbps
this IP support more mode 10/100/300/1000
has_gmac was used to understand on devices w/o the HW cap registers if
the core is a gmac... another useful parameter could be : enh_desc
In fact, there are several possible HW configurations:
gmac core + enh desc
gmac core + norm_desc
mac core + norm_des
...
W/o cap register (present in new cores newer than 3.50) we need to pass
this info from the plt.
@@ -66,6 +118,7 @@ static int stmmac_pltfr_probe(struct platform_device *pdev) if (unlikely(ret)) goto out_unmap; }+#endif priv = stmmac_dvr_probe(&(pdev->dev), plat_dat, addr); if (!priv) {
@@ -73,6 +126,10 @@ static int stmmac_pltfr_probe(struct platform_device *pdev) goto out_unmap; }+ /* Get MAC address if available (DT) */+ if (mac)+ memcpy(priv->dev->dev_addr, mac, ETH_ALEN);+ /* Get the MAC information */ priv->dev->irq = platform_get_irq_byname(pdev, "macirq"); if (priv->dev->irq == -ENXIO) {
--
1.7.9.2
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Wednesday 14 March 2012, Giuseppe CAVALLARO wrote:
On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 15:05 Mon 12 Mar , Stefan Roese wrote:
quoted
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 <redacted>
Cc: Viresh Kumar <redacted>
---
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
@@ -0,0 +1,38 @@+* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)++Required properties:+- compatible: Should be "stm,gmac"
quoted
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
From: Giuseppe CAVALLARO <hidden> Date: 2012-03-14 13:16:56
On 3/14/2012 2:07 PM, Arnd Bergmann wrote:
On Wednesday 14 March 2012, Giuseppe CAVALLARO wrote:
quoted
On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 15:05 Mon 12 Mar , Stefan Roese wrote:
quoted
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 <redacted>
Cc: Viresh Kumar <redacted>
---
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
@@ -0,0 +1,38 @@+* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)++Required properties:+- compatible: Should be "stm,gmac"
quoted
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";
looks good to me
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.
I had also proposed to rename it from stmmac to synmac.
peppe
Arnd
--
To unsubscribe from this list: send the line "unsubscribe netdev" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Stefan Roese <sr@denx.de> Date: 2012-03-14 13:37:42
On Wednesday 14 March 2012 14:16:56 Giuseppe CAVALLARO wrote:
quoted
quoted
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";
looks good to me
So whats the Synopsys version for SPEAr600?
"snps,dw-gmac-3.50a" ???
Perhaps you should add this info for all supported SoC's into the device
driver? Or even better into the devicetree bindings Documentation?
Thanks,
Stefan
On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 15:05 Mon 12 Mar , Stefan Roese wrote:
quoted
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 <redacted>
Cc: Viresh Kumar <redacted>
---
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
@@ -0,0 +1,38 @@+* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)++Required properties:+- compatible: Should be "stm,gmac"
quoted
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).
no PM the PM was only since 7108 IIRC
7109 use mac not gmac IIRC it's 7105 that start to use the GMAC with 300Mbps
max
SPEAr13xx has 3.50a
New ST SoC Stxh415 has the 3.60a. etc.
quoted
quoted
+- reg: Address and length of the register set for the device
+- interrupt-parent: Should be the phandle for the interrupt controller
+ that services interrupts for this device
+- interrupts: Should contain the STMMAC interrupts
+- interrupt-names: Should contain the interrupt names "macirq"
+ "eth_wake_irq" if this interrupt is supported in the "interrupts"
+ property
optionnal
yes
note that there will be a new field for lpi IRQ as well
quoted
quoted
+- phy-mode: String, operation mode of the PHY interface.
+ Supported values are: "mii", "rmii", "gmii", "rgmii".
+- phy-addr: MDIO address of the PHY
+
+Optional properties:
+- stm,prog-burst-len: Specify the burst length
+- stm,has-gmac: Indicates that the controller supports 1000Mbps
this IP support more mode 10/100/300/1000
has_gmac was used to understand on devices w/o the HW cap registers if
the core is a gmac... another useful parameter could be : enh_desc
this need to manage via compatible
Best Regards,
J.
From: Giuseppe CAVALLARO <hidden> Date: 2012-03-15 08:45:31
On 3/14/2012 5:26 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
On 12:38 Wed 14 Mar , Giuseppe CAVALLARO wrote:
quoted
On 3/12/2012 3:38 PM, Jean-Christophe PLAGNIOL-VILLARD wrote:
quoted
On 15:05 Mon 12 Mar , Stefan Roese wrote:
quoted
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 <redacted>
Cc: Viresh Kumar <redacted>
---
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
@@ -0,0 +1,38 @@+* STMicroelectronics 10/100/1000 Ethernet driver (GMAC)++Required properties:+- compatible: Should be "stm,gmac"
quoted
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).
no PM the PM was only since 7108 IIRC
Sorry! you are right :-)
7109 has the mac10/100 (databook 1.91) and 7105/8 have the gmac databook
3.30.
peppe
7109 use mac not gmac IIRC it's 7105 that start to use the GMAC with 300Mbps
max
quoted
SPEAr13xx has 3.50a
New ST SoC Stxh415 has the 3.60a. etc.
quoted
quoted
+- reg: Address and length of the register set for the device
+- interrupt-parent: Should be the phandle for the interrupt controller
+ that services interrupts for this device
+- interrupts: Should contain the STMMAC interrupts
+- interrupt-names: Should contain the interrupt names "macirq"
+ "eth_wake_irq" if this interrupt is supported in the "interrupts"
+ property
optionnal
yes
note that there will be a new field for lpi IRQ as well
quoted
quoted
+- phy-mode: String, operation mode of the PHY interface.
+ Supported values are: "mii", "rmii", "gmii", "rgmii".
+- phy-addr: MDIO address of the PHY
+
+Optional properties:
+- stm,prog-burst-len: Specify the burst length
+- stm,has-gmac: Indicates that the controller supports 1000Mbps
this IP support more mode 10/100/300/1000
has_gmac was used to understand on devices w/o the HW cap registers if
the core is a gmac... another useful parameter could be : enh_desc
this need to manage via compatible
Best Regards,
J.