From 1d3b852e52d85d96c9cd4491da3daf42e3aef760 Mon Sep 17 00:00:00 2001 From: Jun Nie Date: Wed, 8 May 2019 14:38:32 +0800 Subject: pico-imx7d: Reserve region of memory to OPTEE Subtracts CONFIG_OPTEE_TZDRAM_SIZE from the available DRAM size so that the OPTEE memory is not override during u-boot relocation. Note the OPTEE live in the end part of DRAM and OPTEE boot process will itself subtract the DRAM region it lives in from the memory map passed to Linux. Signed-off-by: Jun Nie Reviewed-by: Peng Fan --- board/technexion/pico-imx7d/pico-imx7d.c | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'board/technexion/pico-imx7d/pico-imx7d.c') diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index e63b19df6ed..5b357f265a1 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -63,6 +63,11 @@ int dram_init(void) { gd->ram_size = imx_ddr_size(); + /* Subtract the defined OPTEE runtime firmware length */ +#ifdef CONFIG_OPTEE_TZDRAM_SIZE + gd->ram_size -= CONFIG_OPTEE_TZDRAM_SIZE; +#endif + return 0; } -- cgit v1.2.3 From c72a23701bd9b15dab35e0d43c468ab051739af3 Mon Sep 17 00:00:00 2001 From: Jun Nie Date: Wed, 8 May 2019 14:38:36 +0800 Subject: pico-imx7d: enable boot without PMIC If PMIC is not probed successfully, it is still OK to boot with default configuration although power is not optimized. Default voltage of SW1A/SW1B is 1.1V/1.0V for PC32PF3000A1EP on pico according to table 42 of spec of PF3000 ver 9.0. Default mode of SW1A/SW1B is APS as expected(table 47). Signed-off-by: Jun Nie --- board/technexion/pico-imx7d/pico-imx7d.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'board/technexion/pico-imx7d/pico-imx7d.c') diff --git a/board/technexion/pico-imx7d/pico-imx7d.c b/board/technexion/pico-imx7d/pico-imx7d.c index 5b357f265a1..e3d75e549a6 100644 --- a/board/technexion/pico-imx7d/pico-imx7d.c +++ b/board/technexion/pico-imx7d/pico-imx7d.c @@ -85,8 +85,11 @@ int power_init_board(void) p = pmic_get("PFUZE3000"); ret = pmic_probe(p); - if (ret) - return ret; + if (ret) { + printf("Warning: Cannot find PMIC PFUZE3000\n"); + printf("\tPower consumption is not optimized.\n"); + return 0; + } pmic_reg_read(p, PFUZE3000_DEVICEID, ®); pmic_reg_read(p, PFUZE3000_REVID, &rev_id); -- cgit v1.2.3