net: at91_ether add dt and pinctrl support
Subsystems (5)
v2 cover net: at91_ether add dt and pinctrl support
Hi,
v2: fix typo in doc + miising empty line
This patch serie add dt and pinctrl support to the at91 ether
this is need to use the network on at91rm9200 as we now have dt support on it
Jean-Christophe PLAGNIOL-VILLARD (2):
net: at91_ether: add dt support
net: at91_ether: add pinctrl support
Documentation/devicetree/bindings/net/cdns-emac.txt | 23 +++++++++++++++++++++++ drivers/net/ethernet/cadence/at91_ether.c | 84 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------- 2 files changed, 100 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/cdns-emac.txt
Best Regards,
J.
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel at lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH v2 1/2 net: at91_ether: add dt support
--- .../devicetree/bindings/net/cdns-emac.txt | 23 ++++++ drivers/net/ethernet/cadence/at91_ether.c | 73 ++++++++++++++++++-- 2 files changed, 89 insertions(+), 7 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/cdns-emac.txt
Documentation/devicetree/bindings/net/cdns-emac.txt new file +23 -0
@@ -0,0 +1,23 @@ +* Cadence EMAC Ethernet controller + +Required properties: +- compatible: Should be "cdns,[<chip>-]{emac}" + Use "cdns,at91rm9200-emac" Atmel at91rm9200 SoC. + or the generic form: "cdns,emac". +- reg: Address and length of the register set for the device +- interrupts: Should contain macb interrupt +- phy-mode: String, operation mode of the PHY interface. + Supported values are: "mii", "rmii". + +Optional properties: +- local-mac-address: 6 bytes, mac address + +Examples: + + macb0: ethernet at fffc4000 { + compatible = "cdns,at91rm9200-emac"; + reg = <0xfffc4000 0x4000>; + interrupts = <21>; + phy-mode = "rmii"; + local-mac-address = [3a 0e 03 04 05 06]; + };
drivers/net/ethernet/cadence/at91_ether.c +66 -7
109 lines not on this page · raw message
Signature · 1 line
1.7.10.4
PATCH v2 2/2 net: at91_ether: add pinctrl support
If no pinctrl available just report a warning as some architecture may not need to do anything.
--- drivers/net/ethernet/cadence/at91_ether.c | 11 +++++++++++ 1 file changed, 11 insertions(+)
drivers/net/ethernet/cadence/at91_ether.c +11 -0
@@ -34,6 +34,7 @@#include <linux/of.h> #include <linux/of_device.h> #include <linux/of_net.h> +#include <linux/pinctrl/consumer.h> #include "macb.h"
@@ -501,11 +502,21 @@ static int __init at91ether_probe(struct platform_device *pdev)struct phy_device *phydev;struct macb *lp;int res; +struct pinctrl *pinctrl; regs =platform_get_resource (pdev,IORESOURCE_MEM ,0 );if (!regs)return -ENOENT ; + pinctrl =devm_pinctrl_get_select_default (&pdev->dev); +if (IS_ERR (pinctrl)) { + res =PTR_ERR (pinctrl); +if (res == -EPROBE_DEFER ) +return res; + +dev_warn (&pdev->dev,"No pinctrl provided\n" ); + } + dev =alloc_etherdev (sizeof (struct macb ));if (!dev)return -ENOMEM ;
Signature · 1 line
1.7.10.4
David Miller
maintainerFrom: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
Date: Mon, 5 Nov 2012 08:30:15 +0100
Quoted 4 lines
Hi,
v2: fix typo in doc + miising empty line
Quoted 8 lines
This patch serie add dt and pinctrl support to the at91 ether
this is need to use the network on at91rm9200 as we now have dt support on it
Jean-Christophe PLAGNIOL-VILLARD (2):
net:at91_ether: add dt support
net:at91_ether: add pinctrl support
Series applied, thanks.