[PATCH 13/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus

2017-02-16 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI plus.
It uses an external PHY rtl8211e via RGMII.

This patch create the needed regulator, emac and phy nodes.

Signed-off-by: Corentin Labbe 
---
 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 36 
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts 
b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index 8c40ab7..17b2b92 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -58,6 +58,18 @@
enable-active-high;
gpio = < 6 11 GPIO_ACTIVE_HIGH>;
};
+
+   reg_gmac_3v3: gmac-3v3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = "default";
+   pinctrl-0 = <_power_pin_orangepi>;
+   regulator-name = "gmac-3v3";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   startup-delay-us = <10>;
+   enable-active-high;
+   gpio = < 3 6 GPIO_ACTIVE_HIGH>;
+   };
 };
 
  {
@@ -86,8 +98,32 @@
pins = "PG11";
function = "gpio_out";
};
+
+   gmac_power_pin_orangepi: gmac_power_pin@0 {
+   allwinner,pins = "PD6";
+   allwinner,function = "gpio_out";
+   allwinner,drive = ;
+   allwinner,pull = ;
+   };
 };
 
  {
usb3_vbus-supply = <_usb3_vbus>;
 };
+
+ {
+   ext_rgmii_phy: ethernet-phy@1 {
+   reg = <0>;
+   };
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_rgmii_pins>;
+   phy-supply = <_gmac_3v3>;
+   phy-handle = <_rgmii_phy>;
+   phy-mode = "rgmii";
+
+   allwinner,leds-active-low;
+   status = "okay";
+};
-- 
2.10.2



[PATCH 13/21] ARM: dts: sun8i: Enable dwmac-sun8i on the Orange Pi plus

2017-02-16 Thread Corentin Labbe
The dwmac-sun8i hardware is present on the Orange PI plus.
It uses an external PHY rtl8211e via RGMII.

This patch create the needed regulator, emac and phy nodes.

Signed-off-by: Corentin Labbe 
---
 arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts | 36 
 1 file changed, 36 insertions(+)

diff --git a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts 
b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
index 8c40ab7..17b2b92 100644
--- a/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
+++ b/arch/arm/boot/dts/sun8i-h3-orangepi-plus.dts
@@ -58,6 +58,18 @@
enable-active-high;
gpio = < 6 11 GPIO_ACTIVE_HIGH>;
};
+
+   reg_gmac_3v3: gmac-3v3 {
+   compatible = "regulator-fixed";
+   pinctrl-names = "default";
+   pinctrl-0 = <_power_pin_orangepi>;
+   regulator-name = "gmac-3v3";
+   regulator-min-microvolt = <330>;
+   regulator-max-microvolt = <330>;
+   startup-delay-us = <10>;
+   enable-active-high;
+   gpio = < 3 6 GPIO_ACTIVE_HIGH>;
+   };
 };
 
  {
@@ -86,8 +98,32 @@
pins = "PG11";
function = "gpio_out";
};
+
+   gmac_power_pin_orangepi: gmac_power_pin@0 {
+   allwinner,pins = "PD6";
+   allwinner,function = "gpio_out";
+   allwinner,drive = ;
+   allwinner,pull = ;
+   };
 };
 
  {
usb3_vbus-supply = <_usb3_vbus>;
 };
+
+ {
+   ext_rgmii_phy: ethernet-phy@1 {
+   reg = <0>;
+   };
+};
+
+ {
+   pinctrl-names = "default";
+   pinctrl-0 = <_rgmii_pins>;
+   phy-supply = <_gmac_3v3>;
+   phy-handle = <_rgmii_phy>;
+   phy-mode = "rgmii";
+
+   allwinner,leds-active-low;
+   status = "okay";
+};
-- 
2.10.2