The Bananapi M64 has an RTL8211E PHY connected to the EMAC using
RGMII. The PHY is powered by DCDC1 through SW @ 3.3V.

The EMAC driver is already enabled in the defconfig.

This patch adds a U-boot specific dtsi file for the board adding
an enabled EMAC node. The binding used here is the old revision
currently supported in U-boot. The U-boot driver has not been
updated to support the new binding.

Signed-off-by: Chen-Yu Tsai <w...@csie.org>
---
 arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi | 39 ++++++++++++++++++++++++
 1 file changed, 39 insertions(+)
 create mode 100644 arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi

diff --git a/arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi 
b/arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi
new file mode 100644
index 000000000000..f80a4255c0c1
--- /dev/null
+++ b/arch/arm/dts/sun50i-a64-bananapi-m64-u-boot.dtsi
@@ -0,0 +1,39 @@
+#include "sunxi-u-boot.dtsi"
+
+/ {
+       aliases {
+               ethernet0 = &emac;
+       };
+
+       soc {
+               emac: ethernet@01c30000 {
+                       compatible = "allwinner,sun50i-a64-emac";
+                       reg = <0x01c30000 0x2000>, <0x01c00030 0x4>;
+                       reg-names = "emac", "syscon";
+                       interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_HIGH>;
+                       #address-cells = <1>;
+                       #size-cells = <0>;
+                       pinctrl-names = "default";
+                       pinctrl-0 = <&rgmii_pins>;
+                       phy-mode = "rgmii";
+                       phy = <&phy1>;
+                       status = "okay";
+
+                       phy1: ethernet-phy@1 {
+                               reg = <1>;
+                       };
+               };
+       };
+};
+
+&pio {
+       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.15.0

_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to