105 lines
2.7 KiB
Diff
105 lines
2.7 KiB
Diff
From 668d61ecb2ec13cc6a5583fa47047012fdbefd47 Mon Sep 17 00:00:00 2001
|
|
From: Jernej Skrabec <jernej.skrabec@gmail.com>
|
|
Date: Mon, 14 Jun 2021 20:48:15 +0200
|
|
Subject: [PATCH 080/153] arm64:dts: sun50i-h616-x96-mate T95 eth & sd card
|
|
hack
|
|
|
|
Signed-off-by: Jernej Skrabec <jernej.skrabec@gmail.com>
|
|
---
|
|
.../dts/allwinner/sun50i-h616-x96-mate.dts | 21 ++++++++++++++-
|
|
.../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 26 +++++++++++++++++++
|
|
2 files changed, 46 insertions(+), 1 deletion(-)
|
|
|
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
|
index 07424c28b..31c8bf0e1 100644
|
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-x96-mate.dts
|
|
@@ -15,6 +15,7 @@ / {
|
|
compatible = "hechuang,x96-mate", "allwinner,sun50i-h616";
|
|
|
|
aliases {
|
|
+ ethernet0 = &emac1;
|
|
serial0 = &uart0;
|
|
};
|
|
|
|
@@ -40,13 +41,31 @@ &ehci2 {
|
|
status = "okay";
|
|
};
|
|
|
|
+&emac1 {
|
|
+ pinctrl-names = "default";
|
|
+ pinctrl-0 = <&rmii_pins>;
|
|
+ phy-mode = "rmii";
|
|
+ phy-handle = <&rmii_phy>;
|
|
+ phy-supply = <®_aldo1>;
|
|
+ allwinner,rx-delay-ps = <3100>;
|
|
+ allwinner,tx-delay-ps = <700>;
|
|
+ status = "okay";
|
|
+};
|
|
+
|
|
&ir {
|
|
status = "okay";
|
|
};
|
|
|
|
+&mdio1 {
|
|
+ rmii_phy: ethernet-phy@1 {
|
|
+ compatible = "ethernet-phy-ieee802.3-c22";
|
|
+ reg = <1>;
|
|
+ };
|
|
+};
|
|
+
|
|
&mmc0 {
|
|
vmmc-supply = <®_dcdce>;
|
|
- cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>; /* PF6 */
|
|
+ broken-cd;
|
|
bus-width = <4>;
|
|
status = "okay";
|
|
};
|
|
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
|
index 944ff2747..45359b0d3 100644
|
|
--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
|
+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
|
|
@@ -247,6 +247,13 @@ mmc2_pins: mmc2-pins {
|
|
bias-pull-up;
|
|
};
|
|
|
|
+ rmii_pins: rmii-pins {
|
|
+ pins = "PA0", "PA1", "PA2", "PA3", "PA4",
|
|
+ "PA5", "PA6", "PA7", "PA8", "PA9";
|
|
+ function = "emac1";
|
|
+ drive-strength = <40>;
|
|
+ };
|
|
+
|
|
/omit-if-no-ref/
|
|
spi0_pins: spi0-pins {
|
|
pins = "PC0", "PC2", "PC4";
|
|
@@ -546,6 +553,25 @@ mdio0: mdio {
|
|
};
|
|
};
|
|
|
|
+ emac1: ethernet@5030000 {
|
|
+ compatible = "allwinner,sun50i-h616-emac";
|
|
+ syscon = <&syscon 1>;
|
|
+ reg = <0x05030000 0x10000>;
|
|
+ interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
|
|
+ interrupt-names = "macirq";
|
|
+ resets = <&ccu RST_BUS_EMAC1>;
|
|
+ reset-names = "stmmaceth";
|
|
+ clocks = <&ccu CLK_BUS_EMAC1>;
|
|
+ clock-names = "stmmaceth";
|
|
+ status = "disabled";
|
|
+
|
|
+ mdio1: mdio {
|
|
+ compatible = "snps,dwmac-mdio";
|
|
+ #address-cells = <1>;
|
|
+ #size-cells = <0>;
|
|
+ };
|
|
+ };
|
|
+
|
|
usbotg: usb@5100000 {
|
|
compatible = "allwinner,sun50i-h616-musb",
|
|
"allwinner,sun8i-h3-musb";
|
|
--
|
|
2.35.3
|
|
|