We met u-boot hang when booting from eMMC fastboot on QM/QXP boards.
The hang happens on u-boot accessing USB2 PHY for checking USB boot.
The root cause is when putting AP image (u-boot-atf.bin) in first container,
the USB2 PHY reset bit won’t be set in CONN SS by SCFW, because this SS has been
powered on by SC ROM.
In normal boot case, we won't meet such issue. Because we put u-boot-atf.bin in second
container and AP ROM will boot up for loading this binary. When AP ROM completes the
loading, it calls “misc_boot_status” API to power off the boot device and also power
off the CONN SS. Then when u-boot enables any the module in CONN, the CONN SS will power
on again by SCFW and set the USB2 PHY reset bit.
Since the clock settings are different in SC ROM and SCFW, so it is suggested to power off
CONN SS when booting is completed. In this patch, we check the g_ap_mu field in pass over
structure which is used to pass into from SC ROM to AP ROM. This field is set only when AP
image is included in the second container. If this field is not set, we suppose the booting
only uses SC ROM, then u-boot calls "misc_boot_status" at early stage to power off
Signed-off-by: Ye Li <firstname.lastname@example.org>
Acked-by: Peng Fan <email@example.com>
(cherry picked from commit