On 2019-09-19 4:56 a.m., Simon South wrote:
I've been unable so far to boot NetBSD on my PINE64 ROCK64 (v2.0, Rockchip RK3328) using U-Boot built with its own TPL...
This definitely seems memory-related: After enabling the "mtest" command (patch attached) and running the memory test at the U-Boot shell I see all kinds of errors:

    Testing 02000000 ... 03ffffff:
    Iteration:      1
FAILURE (read/write) @ 0x020014c0: expected 0x00000299, actual 0x00000219)

FAILURE (read/write) @ 0x02001580: expected 0x000002b1, actual 0x00000231)

FAILURE (read/write) @ 0x02001680: expected 0x000002d1, actual 0x00000251)

FAILURE (read/write) @ 0x02001e40: expected 0x000003c9, actual 0x00000349)
    ...

Using the Rockchip TPL instead the memory test runs fine.

Is anyone else able to reproduce this?

My guess is the supplied configuration parameters (in arch/arm/dts/rk3328-sdram-lpddr3-1600.dtsi) for the RK3328's SDRAM controller aren't a match for the SpecTek LPDDR3 module on the 4GB ROCK64. (The Rockchip TPL seems to apply a different configuration, but also claims to drive the memory at only 333MHz.)

Assuming I'm on the right track here, what's the likelihood I'd be able to determine from the SpecTek datasheet how the SDRAM controller's configuration should be tweaked to get this working?

--
Simon South
si...@simonsouth.net
diff --git a/configs/rock64-rk3328_defconfig b/configs/rock64-rk3328_defconfig
index 3ab0af1158..90061498c9 100644
--- a/configs/rock64-rk3328_defconfig
+++ b/configs/rock64-rk3328_defconfig
@@ -28,6 +28,8 @@ CONFIG_SPL_ATF=y
 CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
 CONFIG_CMD_BOOTZ=y
 CONFIG_CMD_GPT=y
+CONFIG_CMD_MEMTEST=y
+CONFIG_SYS_ALT_MEMTEST=y
 CONFIG_CMD_MMC=y
 CONFIG_CMD_SF=y
 CONFIG_CMD_USB=y
diff --git a/include/configs/rk3328_common.h b/include/configs/rk3328_common.h
index 3ff3331c80..3c09fd94b9 100644
--- a/include/configs/rk3328_common.h
+++ b/include/configs/rk3328_common.h
@@ -29,6 +29,9 @@
 #define CONFIG_SYS_SDRAM_BASE		0
 #define SDRAM_MAX_SIZE			0xff000000
 
+#define CONFIG_SYS_MEMTEST_START	0x02000000
+#define CONFIG_SYS_MEMTEST_END		0x03ffffff
+
 #ifndef CONFIG_SPL_BUILD
 
 #define ENV_MEM_LAYOUT_SETTINGS \
_______________________________________________
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot

Reply via email to