arm: sun8i: orangepi-2: Enable dwmac-sun8i
authorLABBE Corentin <clabbe.montjoie@gmail.com>
Wed, 31 May 2017 07:18:42 +0000 (09:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 1 Jun 2017 18:53:06 +0000 (14:53 -0400)
The dwmac-sun8i hardware is present on the Orange PI 2.
It uses the internal PHY.

This patch create the needed emac node.

Signed-off-by: Corentin Labbe <clabbe.montjoie@gmail.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
arch/arm/boot/dts/sun8i-h3-orangepi-2.dts

index 5b6d14555b7ccb8b537d35ea82a75d01b39e0833..cedd326b608900b8fe08e0dac03adf3d414b2f00 100644 (file)
@@ -54,6 +54,7 @@
        aliases {
                serial0 = &uart0;
                /* ethernet0 is the H3 emac, defined in sun8i-h3.dtsi */
+               ethernet0 = &emac;
                ethernet1 = &rtl8189;
        };
 
        status = "okay";
 };
 
+&emac {
+       phy-handle = <&int_mii_phy>;
+       phy-mode = "mii";
+       allwinner,leds-active-low;
+       status = "okay";
+};
+
 &ir {
        pinctrl-names = "default";
        pinctrl-0 = <&ir_pins_a>;