Skip to contentSkip to conversation

arm64: allwinner: h6: orangepi-one-plus: Add Ethernet support

PATCH Superseded Jagan Teki 2 participants 3 messages Aug 7, 2018

Subsystems (2)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Jagan Teki

author
#0 lore raw

PATCH 1/1 arm64: allwinner: h6: orangepi-one-plus: Add Ethernet support

Add Ethernet support for orangepi-one-plus board,
- Ethernet port connected via RTL8211E PHY
- GMAC_EN is connected via PD6
- GMAC-3V supplied from ALDO2 regulator

---
 .../allwinner/sun50i-h6-orangepi-one-plus.dts | 29 +++++++++++++++++++
 1 file changed, 29 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts +29 -0
index 0612c19cd994..eca5b7ea0d6d 100644
@@ -21,6 +21,35 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	reg_gmac_3v3: gmac-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-gmac-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <100000>;
+		enable-active-high;
+		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+		vin-supply = <&reg_aldo2>;
+	};
+};
+
+&emac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ext_rgmii_pins>;
+	phy-mode = "rgmii";
+	phy-handle = <&ext_rgmii_phy>;
+	phy-supply = <&reg_gmac_3v3>;
+	allwinner,rx-delay-ps = <200>;
+	allwinner,tx-delay-ps = <200>;
+	status = "okay";
+};
+
+&mdio {
+	ext_rgmii_phy: ethernet-phy at 1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+	};
 };
 
 &mmc0 {
Signature · 1 line
2.18.0.321.gffc6fa0e3
#1 lore raw

? 2018?8?7? GMT+08:00 ??3:18:39, Jagan Teki <[email protected]> ??:

Quoted 4 lines

Add Ethernet support for orangepi-one-plus board,
- Ethernet port connected via RTL8211E PHY
- GMAC_EN is connected via PD6
- GMAC-3V supplied from ALDO2 regulator

Is the prequisite patchset merged?

Quoted 48 lines

---
.../allwinner/sun50i-h6-orangepi-one-plus.dts | 29 +++++++++++++++++++

1 file changed, 29 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts index 0612c19cd994..eca5b7ea0d6d 100644

arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts +29 -0
@@ -21,6 +21,35 @@
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
+
+	reg_gmac_3v3: gmac-3v3 {
+		compatible = "regulator-fixed";
+		regulator-name = "vcc-gmac-3v3";
+		regulator-min-microvolt = <3300000>;
+		regulator-max-microvolt = <3300000>;
+		startup-delay-us = <100000>;
+		enable-active-high;
+		gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>; /* PD6 */
+		vin-supply = <&reg_aldo2>;
+	};
+};
+
+&emac {
+	pinctrl-names = "default";
+	pinctrl-0 = <&ext_rgmii_pins>;
+	phy-mode = "rgmii";
+	phy-handle = <&ext_rgmii_phy>;
+	phy-supply = <&reg_gmac_3v3>;
+	allwinner,rx-delay-ps = <200>;
+	allwinner,tx-delay-ps = <200>;
+	status = "okay";
+};
+
+&mdio {
+	ext_rgmii_phy: ethernet-phy at 1 {
+		compatible = "ethernet-phy-ieee802.3-c22";
+		reg = <1>;
+	};
 };
 
 &mmc0 {
author
#2 lore raw
Quoted 9 lines · Icenowy Zheng

? 2018?8?7? GMT+08:00 ??3:18:39, Jagan Teki <[email protected]> ??:

Quoted 4 lines

Add Ethernet support for orangepi-one-plus board,
- Ethernet port connected via RTL8211E PHY
- GMAC_EN is connected via PD6
- GMAC-3V supplied from ALDO2 regulator

Is the prequisite patchset merged?

Not yet, I guess. Do you suggest to squash if not?