build/patch/kernel/archive/rockchip64-6.1/overlays-03-add-rk3318-box-emmc-ddr.patch

65 lines
2.2 KiB
Diff

From 026b39ef85792467bdf1681e5abfca9a5231516f Mon Sep 17 00:00:00 2001
From: Paolo Sabatino <paolo.sabatino@gmail.com>
Date: Sat, 17 Apr 2021 16:29:00 +0000
Subject: [PATCH 3/4] rk3318-box: add eMMC DDR support device tree overlay for
rk3318-box
---
arch/arm64/boot/dts/rockchip/overlay/Makefile | 3 ++-
.../dts/rockchip/overlay/README.rockchip-overlays | 6 ++++++
.../overlay/rockchip-rk3318-box-emmc-ddr.dts | 14 ++++++++++++++
3 files changed, 22 insertions(+), 1 deletion(-)
create mode 100644 arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-emmc-ddr.dts
diff --git a/arch/arm64/boot/dts/rockchip/overlay/Makefile b/arch/arm64/boot/dts/rockchip/overlay/Makefile
index 8e9ff2ef1..565ef20ac 100644
--- a/arch/arm64/boot/dts/rockchip/overlay/Makefile
+++ b/arch/arm64/boot/dts/rockchip/overlay/Makefile
@@ -11,7 +11,8 @@ dtbo-$(CONFIG_ARCH_ROCKCHIP) += \
rockchip-uart4.dtbo \
rockchip-dwc3-0-host.dtbo \
rockchip-w1-gpio.dtbo \
- rockchip-rk3318-box-led-conf1.dtbo
+ rockchip-rk3318-box-led-conf1.dtbo \
+ rockchip-rk3318-box-emmc-ddr.dtbo
scr-$(CONFIG_ARCH_ROCKCHIP) += \
rockchip-fixup.scr
diff --git a/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-emmc-ddr.dts b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-emmc-ddr.dts
new file mode 100644
index 000000000..b8f139099
--- /dev/null
+++ b/arch/arm64/boot/dts/rockchip/overlay/rockchip-rk3318-box-emmc-ddr.dts
@@ -0,0 +1,14 @@
+/dts-v1/;
+/plugin/;
+
+/ {
+
+ fragment@0 {
+ target = <&emmc>;
+ __overlay__ {
+ status = "okay";
+ mmc-ddr-1_8v;
+ };
+ };
+
+};
--
2.25.1
diff --git a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
index 1c645a9b8..01fa6f4ee 100644
--- a/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
+++ b/arch/arm64/boot/dts/rockchip/overlay/README.rockchip-overlays
@@ -123,3 +123,9 @@ or enabling the internal pull-up
Activates led/gpio configuration for rk3318 tv box boards with signature
YX_RK3328 and clones
+
+### rk3318-box-emmc-ddr
+
+Activates eMMC DDR capability for rk3318 tv box boards. Probably all the eMMC chips
+nowadays support DDR mode, but its reliability heavily depends upon the quality
+of board wiring