[PATCH 5/6] dts: sunxi: v3s: enable emac support

Andreas Rehn rehn.andreas86 at gmail.com
Wed May 19 21:42:07 CEST 2021


h3 and v3s have internal phys and can share the same driver.
Furthermore sun8i-v3s-emac is not available, use sun8i-h3-emac instead
- add emac pins
- enable emac for licheepi-zero-dock as it provides a ethernet port

Signed-off-by: Andreas Rehn <rehn.andreas86 at gmail.com>
---
 arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts | 11 +++++++++++
 arch/arm/dts/sun8i-v3s.dtsi                   | 10 +++++++++-
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts b/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts
index db5cd0b857..083ac11b94 100644
--- a/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts
+++ b/arch/arm/dts/sun8i-v3s-licheepi-zero-dock.dts
@@ -49,6 +49,10 @@
 	compatible = "licheepi,licheepi-zero-dock", "licheepi,licheepi-zero",
 		     "allwinner,sun8i-v3s";
 
+	aliases {
+		ethernet0 = &emac;
+	};
+
 	leds {
 		/* The LEDs use PG0~2 pins, which conflict with MMC1 */
 		status = "disabled";
@@ -94,3 +98,10 @@
 		voltage = <800000>;
 	};
 };
+
+&emac {
+	allwinner,leds-active-low;
+	status = "okay";
+	pinctrl-names = "default";
+	pinctrl-0 = <&emac_rgmii_pins>;
+};
diff --git a/arch/arm/dts/sun8i-v3s.dtsi b/arch/arm/dts/sun8i-v3s.dtsi
index 0c73416769..35cc4d63f7 100644
--- a/arch/arm/dts/sun8i-v3s.dtsi
+++ b/arch/arm/dts/sun8i-v3s.dtsi
@@ -342,6 +342,14 @@
 				function = "csi";
 			};
 
+			emac_rgmii_pins: emac-rgmii-pins {
+				pins = "PD0", "PD1", "PD2", "PD3", "PD4",
+					   "PD5", "PD7", "PD8", "PD9", "PD10",
+					   "PD12", "PD13", "PD15", "PD16", "PD17";
+				function = "emac";
+				drive-strength = <40>;
+			};
+
 			i2c0_pins: i2c0-pins {
 				pins = "PB6", "PB7";
 				function = "i2c0";
@@ -468,7 +476,7 @@
 		};
 
 		emac: ethernet at 1c30000 {
-			compatible = "allwinner,sun8i-v3s-emac";
+			compatible = "allwinner,sun8i-h3-emac";
 			syscon = <&syscon>;
 			reg = <0x01c30000 0x10000>;
 			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
-- 
2.25.1



More information about the U-Boot mailing list