From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
From: krachlatte <krachlatte1977@gmail.com>
Date: Wed, 17 May 2023 00:55:30 +0200
Subject: [ARCHEOLOGY] Improve SD card compatibility on Radxa E25 (#5165)

> X-Git-Archeology: - Revision 45c85878613108c238e491aa69650fcad1fba4bb: https://github.com/armbian/build/commit/45c85878613108c238e491aa69650fcad1fba4bb
> X-Git-Archeology:   Date: Wed, 17 May 2023 00:55:30 +0200
> X-Git-Archeology:   From: krachlatte <krachlatte1977@gmail.com>
> X-Git-Archeology:   Subject: Improve SD card compatibility on Radxa E25 (#5165)
> X-Git-Archeology:
> X-Git-Archeology: - Revision f6a0c53d08f53aadd0588a571662dc199232825b: https://github.com/armbian/build/commit/f6a0c53d08f53aadd0588a571662dc199232825b
> X-Git-Archeology:   Date: Wed, 24 May 2023 10:39:21 +0200
> X-Git-Archeology:   From: Ricardo Pardini <ricardo@pardini.net>
> X-Git-Archeology:   Subject: manual e25 patch fix
> X-Git-Archeology:
---
 arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi | 12 ++++++++++
 arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts   |  2 ++
 2 files changed, 14 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi b/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-cm3i.dtsi
@@ -385,6 +385,17 @@ &sdhci {
 	status = "okay";
 };
 
+&sfc {
+	status = "okay";
+	flash@0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <108000000>;
+		spi-rx-bus-width = <2>;
+		spi-tx-bus-width = <2>;
+	};
+};
+
 &tsadc {
 	rockchip,hw-tshut-mode = <1>;
 	rockchip,hw-tshut-polarity = <0>;
@@ -405,4 +416,5 @@ &usb2phy1 {
 
 &usb_host0_xhci {
 	extcon = <&usb2phy0>;
+	dr_mode = "host";
 };
diff --git a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
index 111111111111..222222222222 100644
--- a/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3568-radxa-e25.dts
@@ -218,6 +218,8 @@ &usb_host0_ohci {
 };
 
 &usb_host0_xhci {
+	extcon = <&usb2phy0>;
+	dr_mode = "host";
 	status = "okay";
 };
 
-- 
Armbian

