ARM: kirkwood: add gigabit ethernet and mvmdio device tree nodes
authorSebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Sun, 7 Jul 2013 20:34:56 +0000 (22:34 +0200)
committerJason Cooper <jason@lakedaemon.net>
Thu, 25 Jul 2013 20:54:04 +0000 (20:54 +0000)
This patch adds mv643xx_eth and mvmdio device tree nodes for DT enabled
Kirkwood boards. Phy nodes are also added with reg property set on a
per-board basis.

Signed-off-by: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Signed-off-by: Jason Cooper <jason@lakedaemon.net>
27 files changed:
arch/arm/boot/dts/kirkwood-cloudbox.dts
arch/arm/boot/dts/kirkwood-db.dtsi
arch/arm/boot/dts/kirkwood-dnskw.dtsi
arch/arm/boot/dts/kirkwood-dockstar.dts
arch/arm/boot/dts/kirkwood-dreamplug.dts
arch/arm/boot/dts/kirkwood-goflexnet.dts
arch/arm/boot/dts/kirkwood-guruplug-server-plus.dts
arch/arm/boot/dts/kirkwood-ib62x0.dts
arch/arm/boot/dts/kirkwood-iconnect.dts
arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
arch/arm/boot/dts/kirkwood-is2.dts
arch/arm/boot/dts/kirkwood-km_kirkwood.dts
arch/arm/boot/dts/kirkwood-lsxl.dtsi
arch/arm/boot/dts/kirkwood-mplcec4.dts
arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
arch/arm/boot/dts/kirkwood-ns2-common.dtsi
arch/arm/boot/dts/kirkwood-ns2.dts
arch/arm/boot/dts/kirkwood-ns2lite.dts
arch/arm/boot/dts/kirkwood-ns2max.dts
arch/arm/boot/dts/kirkwood-ns2mini.dts
arch/arm/boot/dts/kirkwood-openblocks_a6.dts
arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
arch/arm/boot/dts/kirkwood-topkick.dts
arch/arm/boot/dts/kirkwood-ts219-6281.dts
arch/arm/boot/dts/kirkwood-ts219-6282.dts
arch/arm/boot/dts/kirkwood-ts219.dtsi
arch/arm/boot/dts/kirkwood.dtsi

index 00c48d2..85eed62 100644 (file)
                gpios = <&gpio0 17 0>;
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index c87cfb8..ca8bf36 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@8 {
+               device_type = "ethernet-phy";
+               reg = <8>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 0afe1d0..f600ed7 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@8 {
+               device_type = "ethernet-phy";
+               reg = <8>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 7714742..915aca6 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               compatible = "marvell,88e1116";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 36c7ba3..300fbf8 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+
+       ethphy1: ethernet-phy@1 {
+               device_type = "ethernet-phy";
+               reg = <1>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};
index 31caa64..e9ba68e 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 1e642f3..e696c31 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               compatible = "marvell,88e1121";
+               reg = <0>;
+       };
+
+       ethphy1: ethernet-phy@1 {
+               device_type = "ethernet-phy";
+               compatible = "marvell,88e1121";
+               reg = <1>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};
index 20c4b08..69019b8 100644 (file)
 
 
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@8 {
+               device_type = "ethernet-phy";
+               reg = <8>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 441204e..3d99164 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@11 {
+               device_type = "ethernet-phy";
+               reg = <11>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 00a7bfe..b08c733 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy1: ethernet-phy@11 {
+               device_type = "ethernet-phy";
+               reg = <11>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               speed = <1000>;
+               duplex = <1>;
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};
index c3f036b..ff9be45 100644 (file)
@@ -30,3 +30,5 @@
                };
        };
 };
+
+&ethphy0 { reg = <8>; };
index 5d9f5ea..466280b 100644 (file)
                i2c-gpio,delay-us = <2>;        /* ~100 kHz */
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 31b17f5..93397b1 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+
+       ethphy1: ethernet-phy@8 {
+               device_type = "ethernet-phy";
+               reg = <8>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};
index 6179333..def825f 100644 (file)
        };
 };
 
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@1 {
+               device_type = "ethernet-phy";
+               reg = <1>;
+       };
+
+       ethphy1: ethernet-phy@2 {
+               device_type = "ethernet-phy";
+               reg = <2>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
+
+&eth1 {
+       status = "okay";
+       ethernet1-port@0 {
+               phy-handle = <&ethphy1>;
+       };
+};
index ad6ade7..716b203 100644 (file)
                 };
         };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 2afac04..e7b8017 100644 (file)
        };
 
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy {
+               device_type = "ethernet-phy";
+                /* overwrite reg property in board file */
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index b50e93d..e93276d 100644 (file)
@@ -30,3 +30,5 @@
                };
        };
 };
+
+&ethphy0 { reg = <8>; };
index af8259f..34f5e69 100644 (file)
@@ -30,3 +30,5 @@
                };
        };
 };
+
+&ethphy0 { reg = <0>; };
index 85f24d2..f834c55 100644 (file)
@@ -49,3 +49,5 @@
                };
        };
 };
+
+&ethphy0 { reg = <8>; };
index 329e530..b6b66ea 100644 (file)
@@ -50,3 +50,5 @@
                };
        };
 };
+
+&ethphy0 { reg = <0>; };
index 38dc851..7235f0c 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index f7143f1..f55a145 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index f2052d7..184b8c5 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy@0 {
+               device_type = "ethernet-phy";
+               reg = <0>;
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 6dd1038..222435d 100644 (file)
@@ -50,4 +50,6 @@
                        gpios = <&gpio0 16 1>;
                };
        };
-};
\ No newline at end of file
+};
+
+&ethphy0 { reg = <8>; };
index 6fdc5ff..510c555 100644 (file)
@@ -58,4 +58,6 @@
                        gpios = <&gpio1 5 1>;
                };
        };
-};
\ No newline at end of file
+};
+
+&ethphy0 { reg = <0>; };
index 0c9a94c..102eaeb 100644 (file)
                };
        };
 };
+
+&mdio {
+       status = "okay";
+
+       ethphy0: ethernet-phy {
+               device_type = "ethernet-phy";
+                /* overwrite reg property in board file */
+       };
+};
+
+&eth0 {
+       status = "okay";
+       ethernet0-port@0 {
+               phy-handle = <&ethphy0>;
+       };
+};
index 9809fc1..e3f3f71 100644 (file)
                        clocks = <&gate_clk 17>;
                        status = "okay";
                };
+
+               mdio: mdio-bus@72004 {
+                       compatible = "marvell,orion-mdio";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x72004 0x84>;
+                       interrupts = <46>;
+                       clocks = <&gate_clk 0>;
+                       status = "disabled";
+
+                       /* add phy nodes in board file */
+               };
+
+               eth0: ethernet-controller@72000 {
+                       compatible = "marvell,kirkwood-eth";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x72000 0x4000>;
+                       clocks = <&gate_clk 0>;
+                       marvell,tx-checksum-limit = <1600>;
+                       status = "disabled";
+
+                       ethernet0-port@0 {
+                               device_type = "network";
+                               compatible = "marvell,kirkwood-eth-port";
+                               reg = <0>;
+                               interrupts = <11>;
+                               /* overwrite MAC address in bootloader */
+                               local-mac-address = [00 00 00 00 00 00];
+                               /* set phy-handle property in board file */
+                       };
+               };
+
+               eth1: ethernet-controller@76000 {
+                       compatible = "marvell,kirkwood-eth";
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       reg = <0x76000 0x4000>;
+                       clocks = <&gate_clk 19>;
+                       marvell,tx-checksum-limit = <1600>;
+                       status = "disabled";
+
+                       ethernet1-port@0 {
+                               device_type = "network";
+                               compatible = "marvell,kirkwood-eth-port";
+                               reg = <0>;
+                               interrupts = <15>;
+                               /* overwrite MAC address in bootloader */
+                               local-mac-address = [00 00 00 00 00 00];
+                               /* set phy-handle property in board file */
+                       };
+               };
        };
 };