net: emaclite: Support multiple phys connected to one MDIO bus
authorMichal Simek <michal.simek@xilinx.com>
Thu, 30 May 2013 00:28:04 +0000 (00:28 +0000)
committerDavid S. Miller <davem@davemloft.net>
Fri, 31 May 2013 00:08:43 +0000 (17:08 -0700)
commite0a3bc65448c01289a74329ddf6c84d8c0594e59
treea2e5a459acd9854d461e66c525aa06c25dc85793
parentccfecdfe16a872ed3e8322ea48e34502568eb849
net: emaclite: Support multiple phys connected to one MDIO bus

For system which contains at least two ethernet IP where
one IP manage MDIO bus with several PHYs.

Example dts node:
ethernet_mac0: ethernet@81000000 {
compatible = "xlnx,xps-ethernetlite-1.00.a";
device_type = "network";
interrupt-parent = <&xps_intc_0>;
interrupts = < 1 0 >;
local-mac-address = [ 00 0a 35 00 db bb ];
phy-handle = <&ethernet_mac0_phy0>;
reg = < 0x81000000 0x10000 >;
xlnx,duplex = <0x1>;
xlnx,family = "spartan3e";
xlnx,include-internal-loopback = <0x0>;
xlnx,include-mdio = <0x1>;
xlnx,rx-ping-pong = <0x0>;
xlnx,tx-ping-pong = <0x0>;
ethernet_mac0_mdio {
#address-cells = <1>;
#size-cells = <0>;
ethernet_mac0_phy0: phy@1 {
reg = <0x1>;
} ;
ethernet_mac0_phy1: phy@3 {
reg = <0x3>;
} ;
} ;
} ;
ethernet_mac2: ethernet@81040000 {
compatible = "xlnx,xps-ethernetlite-1.00.a";
device_type = "network";
interrupt-parent = <&xps_intc_0>;
interrupts = < 11 0 >;
local-mac-address = [ 00 0a 35 00 db bb ];
phy-handle = <&ethernet_mac0_phy1>;
reg = < 0x81040000 0x10000 >;
xlnx,duplex = <0x1>;
xlnx,family = "spartan3e";
xlnx,include-internal-loopback = <0x0>;
xlnx,include-mdio = <0x0>;
xlnx,rx-ping-pong = <0x0>;
xlnx,tx-ping-pong = <0x0>;
} ;

Signed-off-by: Michal Simek <michal.simek@xilinx.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/xilinx/xilinx_emaclite.c