[U-Boot] [PATCH v2 2/2] sunxi: A64/Pine64: (re-)add sun8i emac DT nodes

Andre Przywara andre.przywara at arm.com
Tue May 23 10:09:09 UTC 2017


As the kernel DT does not have an Ethernet driver and bindings, lets
add the DT bindings for U-Boot's sun8i EMAC Ethernet driver as a U-Boot
specific DT include.
This re-adds the nodes that got lost when syncing the kernel DT to U-Boot.
Compared to the former bits it slightly updates the DT nodes to adapt to
the new DT (clock and reset nodes), but keeps the rest the same to let it
work with the existing U-Boot driver.

Signed-off-by: Andre Przywara <andre.przywara at arm.com>
---
 arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi | 50 +++++++++++++++++++++++++
 1 file changed, 50 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi

diff --git a/arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi b/arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi
new file mode 100644
index 0000000..9c61bea
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-pine64-plus-u-boot.dtsi
@@ -0,0 +1,50 @@
+/ {
+	aliases {
+		ethernet0 = &emac;
+	};
+
+	soc {
+		emac: ethernet at 01c30000 {
+			compatible = "allwinner,sun50i-a64-emac";
+			reg = <0x01c30000 0x2000>, <0x01c00030 0x4>;
+			reg-names = "emac", "syscon";
+			interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+			resets = <&ccu RST_BUS_EMAC>;
+			reset-names = "ahb";
+			clocks = <&ccu CLK_BUS_EMAC>;
+			clock-names = "ahb";
+			#address-cells = <1>;
+			#size-cells = <0>;
+			pinctrl-names = "default";
+			pinctrl-0 = <&rgmii_pins>;
+			phy-mode = "rgmii";
+			phy = <&phy1>;
+			status = "okay";
+
+			phy1: ethernet-phy at 1 {
+				reg = <1>;
+			};
+		};
+	};
+};
+
+&pio {
+	rmii_pins: rmii_pins {
+		allwinner,pins = "PD10", "PD11", "PD13", "PD14",
+				 "PD17", "PD18", "PD19", "PD20",
+				 "PD22", "PD23";
+		allwinner,function = "emac";
+		allwinner,drive = <3>;
+		allwinner,pull = <0>;
+	};
+
+	rgmii_pins: rgmii_pins {
+		allwinner,pins = "PD8", "PD9", "PD10", "PD11",
+				 "PD12", "PD13", "PD15",
+				 "PD16", "PD17", "PD18", "PD19",
+				 "PD20", "PD21", "PD22", "PD23";
+		allwinner,function = "emac";
+		allwinner,drive = <3>;
+		allwinner,pull = <0>;
+	};
+};
-- 
2.9.0



More information about the U-Boot mailing list