aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLu jicong <jiconglu58@gmail.com>2023-07-24 15:22:42 +0800
committerHauke Mehrtens <hauke@hauke-m.de>2023-07-26 12:15:20 +0200
commit7b40344ed6aba536004c9cf18efcfaf36d9a9f55 (patch)
tree2578240edc88e0ba3edb95139cf706437e1ad31e
parent4395236a100b558d96d0e836ddc76df19b33ddfb (diff)
uboot-rockchip: add FriendlyARM NanoPC T4 support
Add support for the FriendlyARM NanoPC T4. Reduce memory frequency to avoid random crash. Signed-off-by: Lu jicong <jiconglu58@gmail.com>
-rw-r--r--package/boot/uboot-rockchip/Makefile8
-rw-r--r--package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch24
2 files changed, 32 insertions, 0 deletions
diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
index 983edcb240..2d44c218f2 100644
--- a/package/boot/uboot-rockchip/Makefile
+++ b/package/boot/uboot-rockchip/Makefile
@@ -74,6 +74,13 @@ define U-Boot/rk3399/Default
ATF:=rk3399_bl31.elf
endef
+define U-Boot/nanopc-t4-rk3399
+ $(U-Boot/rk3399/Default)
+ NAME:=NanoPC T4
+ BUILD_DEVICES:= \
+ friendlyarm_nanopc-t4
+endef
+
define U-Boot/nanopi-r4s-rk3399
$(U-Boot/rk3399/Default)
NAME:=NanoPi R4S
@@ -96,6 +103,7 @@ define U-Boot/rockpro64-rk3399
endef
UBOOT_TARGETS := \
+ nanopc-t4-rk3399 \
nanopi-r4s-rk3399 \
rock-pi-4-rk3399 \
rockpro64-rk3399 \
diff --git a/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch b/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch
new file mode 100644
index 0000000000..7d2161ae42
--- /dev/null
+++ b/package/boot/uboot-rockchip/patches/105-nanopc-t4-fix-memory-unstability.patch
@@ -0,0 +1,24 @@
+From 445502bc21ecf1b5120faee785cea578b810c759 Mon Sep 17 00:00:00 2001
+From: Lu jicong <jiconglu58@gmail.com>
+Date: Wed, 5 Jul 2023 17:13:55 +0800
+Subject: [PATCH] rockchip: rk3399: nanopc-t4: use 1600MHz sdram config
+
+Current 1866MHz sdram config is too high for NanoPC-T4.
+On this frequency, its lpddr3 sdram becomes unstable,
+causing memtest failures and random kernel crashes.
+
+Signed-off-by: Lu jicong <jiconglu58@gmail.com>
+---
+ arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi b/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi
+index 17201bcf41..8b6c9059ab 100644
+--- a/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi
++++ b/arch/arm/dts/rk3399-nanopc-t4-u-boot.dtsi
+@@ -4,4 +4,4 @@
+ */
+
+ #include "rk3399-nanopi4-u-boot.dtsi"
+-#include "rk3399-sdram-lpddr3-samsung-4GB-1866.dtsi"
++#include "rk3399-sdram-lpddr3-4GB-1600.dtsi"