i.MX8MQ EVK not booting with latest mainline U-Boot

Hi Peng and Andrey,
Lukas reported that i.MX8MQ EVK does not boot with the latest U-Boot and I confirm the same here too.
We are following the instructions from doc/board/freescale/imx8mq_evk.rst
I haven't debugged this yet and I am wondering if you have any suggestions.
Thanks,
Fabio Estevam

Hello Fabio,
-----Original Message----- From: Fabio Estevam festevam@gmail.com Sent: Monday, February 22, 2021 3:45 AM To: Peng Fan peng.fan@nxp.com; ZHIZHIKIN Andrey <andrey.zhizhikin@leica- geosystems.com> Cc: Lukas Rusak lorusak@gmail.com; U-Boot-Denx u-boot@lists.denx.de Subject: i.MX8MQ EVK not booting with latest mainline U-Boot
This email is not from Hexagon’s Office 365 instance. Please be careful while clicking links, opening attachments, or replying to this email.
Hi Peng and Andrey,
Lukas reported that i.MX8MQ EVK does not boot with the latest U-Boot and I confirm the same here too.
Unfortunately, I do not poses the i.MX8MQ EVK HW so I never tested the boot process. There is not much I can contribute here.
We are following the instructions from doc/board/freescale/imx8mq_evk.rst
Perhaps the only thing I can suggest here is to check the documentation (ATF, OP-TEE and DDR firmware version and placement) and align it with `imx-boot` Makefile to see if they match.
Can somebody maybe share more info on which errors are observed during the boot? Any boot log would be helpful here as well.
I haven't debugged this yet and I am wondering if you have any suggestions.
Thanks,
Fabio Estevam
-- Andrey

Hi Andrey,
On Mon, Feb 22, 2021 at 5:52 AM ZHIZHIKIN Andrey andrey.zhizhikin@leica-geosystems.com wrote:
Can somebody maybe share more info on which errors are observed during the boot? Any boot log would be helpful here as well.
I investigated this boot issue. U-Boot 2020.04 works, but 2020.07 does not.
I run a git bisect and found that the guilty commit was:
commit c738adb8dbbf28a34f8574239a241e85d46f3877 Author: Kever Yang kever.yang@rock-chips.com Date: Mon Mar 30 11:56:17 2020 +0800
tool: Move ALIGN_MASK to header as common MACRO
The ALIGN code is need by many files who need handle structure or image align, so move the macro to imagetool.h file.
Signed-off-by: Kever Yang kever.yang@rock-chips.com Reviewed-by: Punit Agrawal punit1.agrawal@toshiba.co.jp Reviewed-by: Tom Rini trini@konsulko.com
The __ALIGN_MASK definition used in imx8image was not standard, so I restored it like this:
--- a/tools/imx8mimage.c +++ b/tools/imx8mimage.c @@ -32,6 +32,8 @@ static uint32_t rom_version = ROM_V1;
#define HDMI_FW_SIZE 0x17000 /* Use Last 0x1000 for IVT and CSF */ #define ALIGN_SIZE 0x1000 +#define ALIGN(x,a) __ALIGN_MASK((x), (__typeof__(x))(a) - 1, a) +#define __ALIGN_MASK(x,mask,mask2) (((x) + (mask)) / (mask2) * (mask2))
static uint32_t get_cfg_value(char *token, char *name, int linenr) {
and now the board boots again:
U-Boot SPL 2021.04-rc2-00090-gbbc0fcc302ba-dirty (Feb 22 2021 - 09:08:30 -0300) PMIC: PFUZE100 ID=0x10 Normal Boot Trying to boot from MMC2
U-Boot 2021.04-rc2-00090-gbbc0fcc302ba-dirty (Feb 22 2021 - 09:08:30 -0300)
CPU: Freescale i.MX8MQ rev2.0 at 1000 MHz Reset cause: POR Model: NXP i.MX8MQ EVK DRAM: 3 GiB MMC: FSL_SDHC: 0, FSL_SDHC: 1 Loading Environment from MMC... *** Warning - No block device, using default environment
In: serial Out: serial Err: serial Net: eth0: ethernet@30be0000 Hit any key to stop autoboot: 0 u-boot=> u-boot=> u-boot=> u-boot=> saveenv Saving Environment to MMC... No block device Failed (1) u-boot=>
I will submit the patch soon.
The issue now is that saving the environment to the SD card is no longer working.
I will investigate the SD card issue now.
Thanks,
Fabio Estevam

Hi Andrey,
On Mon, Feb 22, 2021 at 9:19 AM Fabio Estevam festevam@gmail.com wrote:
The issue now is that saving the environment to the SD card is no longer working.
I will investigate the SD card issue now.
This was caused by the following commit:
commit 247bbeb74c186963d9365db3136d0285618bd9a7 Author: Andrey Zhizhikin andrey.zhizhikin@leica-geosystems.com Date: Sat Dec 5 17:29:17 2020 +0000
ARM: dts: imx8m: increase off-on delay on the SD Vcc regulator
Some SD Card controller and power circuitry has increased capacitance, which keeps the internal logic remains powered after regulator is switch off. This is generally the case when card is switched to SD104 mode, where a power cycle should be performed. In case if the card internal logic remains powered, it causes a subsequent failure of mode transition, effectively leading to failed enumeration.
Introduce a delay of 20 msec in order to provide a possibility for internal card circuitry to drain voltages and perform a power cycle correctly.
Similar fix is done in commit c49d0ac38a76 ("ARM: dts: rmobile: Increase off-on delay on the SD Vcc regulator") targeted Renesas SOCs.
Signed-off-by: Andrey Zhizhikin andrey.zhizhikin@leica-geosystems.com Cc: Stefano Babic sbabic@denx.de
I will send a fix.
Thanks,
Fabio Estevam
participants (2)
-
Fabio Estevam
-
ZHIZHIKIN Andrey