armbian_build/patch/kernel/archive/sunxi-dev-6.14/update-cubie-a5e-dts.patch

162 lines
3.7 KiB
Diff

From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: John Doe <john.doe@somewhere.on.planet>
Date: Sat, 15 Mar 2025 17:18:05 -0300
Subject: Patch sun55i-a527-radxa-a5e.dts Add gmac0/1 wifi
Signed-off-by: John Doe <john.doe@somewhere.on.planet>
---
arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts | 99 ++++++++++
1 file changed, 99 insertions(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
index 912e1bda974c..8cf16035796e 100644
--- a/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
+++ b/arch/arm64/boot/dts/allwinner/sun55i-a527-radxa-a5e.dts
@@ -11,16 +11,38 @@ / {
model = "Radxa A5E";
compatible = "radxa,cubie-a5e", "allwinner,sun55i-a527";
aliases {
serial0 = &uart0;
+ mmc0 = &mmc0;
+ mmc1 = &mmc1;
+ mmc2 = &mmc2;
+ ethernet0 = &gmac0;
+ ethernet1 = &gmac1;
+ ethernet2 = &wlan;
};
chosen {
stdout-path = "serial0:115200n8";
};
+ leds {
+ compatible = "gpio-leds";
+
+ led-0 {
+ label = "radxa:green:power";
+ gpios = <&r_pio 0 4 GPIO_ACTIVE_LOW>; /* PL4 */
+ linux,default-trigger = "heartbeat";
+ };
+
+ led-1 {
+ label = "radxa:blue:user";
+ gpios = <&r_pio 0 5 GPIO_ACTIVE_LOW>; /* PL5 */
+ linux,default-trigger = "default-on";
+ };
+ };
+
ext_osc32k: ext-osc32k-clk {
#clock-cells = <0>;
compatible = "fixed-clock";
clock-frequency = <32768>;
clock-output-names = "ext_osc32k";
@@ -42,10 +64,20 @@ reg_usb_vbus: vbus {
regulator-max-microvolt = <5000000>;
vin-supply = <&reg_vcc5v>;
gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
enable-active-high;
};
+
+ reg_3v3_wifi: 3v3-wifi {
+ compatible = "regulator-fixed";
+ regulator-name = "3v3-wifi";
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ vin-supply = <&reg_vcc5v>;
+ gpio = <&r_pio 0 7 GPIO_ACTIVE_HIGH>; /* PL7 */
+ enable-active-high;
+ };
};
&ehci0 {
status = "okay";
};
@@ -59,10 +91,27 @@ &mmc0 {
cd-gpios = <&pio 5 6 (GPIO_ACTIVE_LOW | GPIO_PULL_DOWN)>; /* PF6 */
bus-width = <4>;
status = "okay";
};
+&mmc1_pins {
+ drive-strength = <40>;
+};
+
+&mmc1 {
+ vmmc-supply = <&reg_3v3_wifi>;
+ bus-width = <4>;
+ non-removable;
+ // todo: investigate why clock above 40MHz makes data errors
+ max-frequency = <35000000>;
+ status = "okay";
+
+ wlan: wifi@1 {
+ reg = <1>;
+ };
+};
+
&ohci0 {
status = "okay";
};
&ohci1 {
@@ -295,5 +344,55 @@ &usb_otg {
&usbphy {
usb0_vbus-supply = <&reg_vcc5v>;
usb1_vbus-supply = <&reg_usb_vbus>;
status = "okay";
};
+
+&gmac0 {
+ phy-mode = "rgmii";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&gmac0_pins_default>;
+ pinctrl-1 = <&gmac0_pins_sleep>;
+ sunxi,phy-clk-type = <0>;
+ tx-delay = <2>;
+ rx-delay = <4>;
+ gmac3v3-supply = <&reg_cldo3>;
+ status = "okay";
+};
+
+&mdio0 {
+ compatible = "allwinner,sunxi-mdio";
+ #address-cells = <1>;
+ #size-cells = <0>;
+ reg = <0x04500048 0x8>;
+ status = "okay";
+
+ gmac0_phy0: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1>;
+ reset-gpios = <&pio 7 8 GPIO_ACTIVE_LOW>; /* PH8 */
+ reset-assert-us = <10000>;
+ reset-deassert-us = <150000>;
+ };
+};
+
+&gmac1 {
+ phy-mode = "rgmii";
+ pinctrl-names = "default", "sleep";
+ pinctrl-0 = <&gmac1_pins_default>;
+ pinctrl-1 = <&gmac1_pins_sleep>;
+ aw,soc-phy25m;
+ tx-delay = <3>;
+ rx-delay = <4>;
+ dwmac3v3-supply = <&reg_cldo3>;
+ status = "okay";
+
+ mdio1: mdio1@1 {
+ gmac1_phy0: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <0x1>;
+ reset-gpios = <&pio 9 16 GPIO_ACTIVE_LOW>; /* PJ16 */
+ reset-assert-us = <10000>;
+ reset-deassert-us = <150000>;
+ };
+ };
+};
--
Created with Armbian build tools https://github.com/armbian/build