I want to replace 4G LPDDR4 but it cannot start on uboot stage with L4.19.35 bsp.
1) first use ddr tools to generate lpddr4_timing.c and replace uboot-imx\board\freescale\imx8mq_evk\lpddr4_timing.c
modify uboot-imx\include\configs\imx8mq_evk.h #define PHYS_SDRAM_SIZE 0xC0000000 /* 3GB DDR */ to 0x100000000 /* 4GB DDR */
finally it will stuck with
U-Boot 2019.04-4.19.35-1.1.0+g718e897 (Nov 12 2020 - 02:23:21 +0000)
CPU: Freescale i.MX8MQ rev2.1 1300 MHz (running at 800 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 45C
Reset cause: POR
Model: Freescale i.MX8MQ EVK
DRAM:
2) IMX8MM has a configuration option CONFIG_IMX8M_4G_LPDDR4=y . and it will use other file
uboot-imx\board\freescale\imx8mm_evk\Makefile
ifdef CONFIG_SPL_BUILD
obj-y += spl.o
ifdef CONFIG_IMX8M_4G_LPDDR4
obj-y += lpddr4_timing_4g.o
else
obj-$(CONFIG_IMX8M_LPDDR4) += lpddr4_timing.o
obj-$(CONFIG_IMX8M_DDR4) += ddr4_timing.o
endif
endif
I do not know how to generate lpddr4_timing_4g.c !
and it seem split 4G DDR to 3G and 1G in uboot-imx\include\configs\imx8mm_evk_android.h
#ifdef CONFIG_IMX8M_4G_LPDDR4
#undef PHYS_SDRAM_SIZE
#define PHYS_SDRAM_SIZE 0xC0000000 /* 3GB */
#define PHYS_SDRAM_2 0x100000000
#define PHYS_SDRAM_2_SIZE 0x40000000 /* 1GB */
#undef CONFIG_NR_DRAM_BANKS
#define CONFIG_NR_DRAM_BANKS 2
#endif
finally i add this modify to uboot-imx\include\configs\imx8mq_evk.h and add modiy uboot-imx\board\freescale\imx8mq_evk/imx8mq_evk.c
int dram_init_banksize(void)
{
printf("dram init banksize\n");
gd->bd->bi_dram[0].start = PHYS_SDRAM;
if (rom_pointer[1])
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE -rom_pointer[1];
else
gd->bd->bi_dram[0].size = PHYS_SDRAM_SIZE;
#if CONFIG_NR_DRAM_BANKS == 2
gd->bd->bi_dram[1].start = PHYS_SDRAM_2;
gd->bd->bi_dram[1].size = PHYS_SDRAM_2_SIZE;
#endif
return 0;
}
then the uboot can boot up ,but stuck in kernel .
[ 0.000000] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.000000] Internal error: synchronous external abort: 96000210 [#1] PREEMPT SMP
[ 0.000000] Modules linked in:
[ 0.000000] Process swapper (pid: 0, stack limit = 0x(____ptrval____))
[ 0.000000] CPU: 0 PID: 0 Comm: swapper Not tainted 4.19.35-1.1.0+gcecf053 #1
[ 0.000000] Hardware name: Freescale i.MX8MQ EVK PMIC BD71837 (DT)
[ 0.000000] pstate: 40000085 (nZcv daIf -PAN -UAO)
[ 0.000000] pc : __create_pgd_mapping+0x74/0x5c8
[ 0.000000] lr : map_kernel_segment+0x70/0xa4
[ 0.000000] sp : ffff0000096c3d60
[ 0.000000] x29: ffff0000096c3d60 x28: ffff000008080000
[ 0.000000] x27: ffff7dfffe636000 x26: ffff008000000000
[ 0.000000] x25: 0000000000000400 x24: ffff0000095567d4
if add
#if CONFIG_NR_DRAM_BANKS == 2
gd->ram_size += PHYS_SDRAM_2_SIZE;
#endif
in dram_init function ,It will stuck in uboot stage too.
int dram_init(void)
{
/* rom_pointer[1] contains the size of TEE occupies */
if (rom_pointer[1])
gd->ram_size = PHYS_SDRAM_SIZE - rom_pointer[1];
else
gd->ram_size = PHYS_SDRAM_SIZE;
#if CONFIG_NR_DRAM_BANKS == 2
gd->ram_size += PHYS_SDRAM_2_SIZE;
#endif
return 0;
}
U-Boot 2019.04-4.19.35-1.1.0+g718e897 (Nov 12 2020 - 02:23:21 +0000)
CPU: Freescale i.MX8MQ rev2.1 1300 MHz (running at 800 MHz)
CPU: Industrial temperature grade (-40C to 105C) at 45C
Reset cause: POR
Model: Freescale i.MX8MQ EVK
DRAM:
I don’t know what is the difference between IMX8MM and IMX8MQ in 4G LPDDR4, can anyone give some suggestions to adapt IMX8MQ to 4G LPDDR4
解決済! 解決策の投稿を見る。
Hi coindu
one can try to remove OPTee as described in sect.5.6.11 OP-TEE enablement
Yocto Guide included in Documentation
also please check if attached patch is applied in that case.
Best regards
igor
Hi coindu
one can try to remove OPTee as described in sect.5.6.11 OP-TEE enablement
Yocto Guide included in Documentation
also please check if attached patch is applied in that case.
Best regards
igor