]> asedeno.scripts.mit.edu Git - linux.git/commitdiff
ARM: dts: sun8i: a83t: Enable Ethernet on two boards
authorChen-Yu Tsai <wens@csie.org>
Fri, 8 Dec 2017 07:31:57 +0000 (15:31 +0800)
committerMaxime Ripard <maxime.ripard@free-electrons.com>
Fri, 8 Dec 2017 09:06:40 +0000 (10:06 +0100)
The Cubietruck Plus has a Realtek RTL8211E RGMII PHY tied to the EMAC.
The AXP818 PMIC's regulators provide main power and secondary signaling
voltages to the PHY. The latter is always on, as it also supplies the
pingroup on the SoC, which has other uses.

The Bananapi M3 has a Realtek RTL8211E RGMII PHY tied to the EMAC.
The AXP818 PMIC's SW regulators provides power to the PHY.

This patch enables Ethernet with the EMAC on both these boards by
enabling the emac node and setting all the required properties.
A proper ethernet alias is added as well.

Signed-off-by: Chen-Yu Tsai <wens@csie.org>
Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
arch/arm/boot/dts/sun8i-a83t-bananapi-m3.dts
arch/arm/boot/dts/sun8i-a83t-cubietruck-plus.dts

index c606af3dbfedf9351aed99313917b3f9e85e98c4..6550bf0e594bfc86dd0ecae329325ba6055e6cd9 100644 (file)
@@ -52,6 +52,7 @@ / {
        compatible = "sinovoip,bpi-m3", "allwinner,sun8i-a83t";
 
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
        };
 
@@ -88,6 +89,24 @@ &ehci0 {
        /* TODO GL830 USB-to-SATA bridge downstream w/ GPIO power controls */
 };
 
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emac_rgmii_pins>;
+       phy-supply = <&reg_sw>;
+       phy-handle = <&rgmii_phy>;
+       phy-mode = "rgmii";
+       allwinner,rx-delay-ps = <700>;
+       allwinner,tx-delay-ps = <700>;
+       status = "okay";
+};
+
+&mdio {
+       rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;
index 7f0a3f6d0cf238ad5786ed8088d2b306e16ab63e..6da08cd0e1079584ff13a0bae2d92fbe5bb06c0b 100644 (file)
@@ -52,6 +52,7 @@ / {
        compatible = "cubietech,cubietruck-plus", "allwinner,sun8i-a83t";
 
        aliases {
+               ethernet0 = &emac;
                serial0 = &uart0;
        };
 
@@ -154,6 +155,22 @@ &ehci1 {
        status = "okay";
 };
 
+&emac {
+       pinctrl-names = "default";
+       pinctrl-0 = <&emac_rgmii_pins>;
+       phy-supply = <&reg_dldo4>;
+       phy-handle = <&rgmii_phy>;
+       phy-mode = "rgmii";
+       status = "okay";
+};
+
+&mdio {
+       rgmii_phy: ethernet-phy@1 {
+               compatible = "ethernet-phy-ieee802.3-c22";
+               reg = <1>;
+       };
+};
+
 &mmc0 {
        pinctrl-names = "default";
        pinctrl-0 = <&mmc0_pins>;