To align aiy_imx8mq uboot used by uuu with other platforms, a defconfig
used to configure and build uboot used by uuu is added.
This "imx8mq_aiy_android_uuu_defconfig" for now is a copy of below file:
imx8mq_aiy_android_defconfig
Change-Id: I7c96297fa13fa7bb02117ceee8675e95f86e7b60
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Since FS_FAT has been removed from uboot for Android Auto to minimize
image size, disable FS_FAT write feature for Android Auto uboot.
Change-Id: I8740735b68759bfd62d53cf7f08287a098b481c4
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
Change to use wMaxPacketSize of current speed EP desc for request
length wrap up.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Remove the gadget driver speed check, and set its max_speed to
be USB_SPEED_HIGH.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
If one of functions is not super speed capable, we need force the udc
to be high speed, this is an equivalent implementation of
usb_gadget_udc_set_speed() in kernel but simple, which set the gadget
max_speed to be high speed, so afterwards when start gadget duc can
set the HW to be USB 2.0 mode.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Keep high speed for SPL, but for normal uboot, enable super speed.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Change the dwc3 device mode to be super speed capable.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Remove high speed force and set it to super speed by default.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Set its max_speed to be super speed.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Add super speed EP config.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
This patch is to add usb gadget super speed support in common
driver, including BOS descriptor and select the super speed
descriptor from function driver.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Tested-by: faqiang.zhu <faqiang.zhu@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Error: Invalid FAT entry: 0x3ffffffa
create file
when Long file name cross root dir cluster boundry, this issue
happen.
get_long_file_name have not consider fat12/16 case, which rootdir
locate before data area. and try to get next clust directly. Only
FAT32's root dir is located in data area
Signed-off-by: Frank Li <Frank.Li@nxp.com>
There is no need to have an extra hab directory under doc/imx/:
- doc/imx/hab/ahab/
- doc/imx/hab/habv4/
Remove extra hab directory for a cleaner documentation structure.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
The current U-Boot implementation includes SPL targets for i.MX8QM and
i.MXQXP MEK boards:
- imx8qxp_mek_spl_defconfig
- imx8qxp_mek_spl_fspi_defconfig
- imx8qm_mek_spl_defconfig
- imx8qm_mek_spl_fspi_defconfig
The U-Boot proper and ATF are included in an additional container being
necessary a different procedure for signing the flash.bin image.
Add a step-by-step guide covering the signing procedure.
Add a CSF example for the 3rd container.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Add AHAB secure boot step-by-step guide for i.MX8 and i.MX8x families
devices.
Add 3 CSF example files:
- Example to sign flash.bin only using SRK keys.
- Example to sign flash.bin using a subordinate SGK key.
- Example to sign Linux image only using SRK keys.
Signed-off-by: Clement Le Marquis <clement.lemarquis@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
The AHAB is currently supported in i.MX8QXP and i.MX8QM devices.
Add an introductory document containing the following topics:
- AHAB Secure Boot Architecture
- System Control Unit (SCU) introduction
- Security Controller (SECO) introduction
- i.MX8/8x secure boot flow
- AHAB PKI tree generation
- SRK Table and SRK Hash generation
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Reviewed-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
The previous LPCG register addresses seem wrong. By checking the LPCG with
JTAG, the ipg_clk, ipg_s_clk, and perclk uses one register as the standard
implementation method, not use 3 registers.
Signed-off-by: Ye Li <ye.li@nxp.com>
Due to dcss is disabled on iMX8MQLite, the hdmi won't work, we have
to disable all hdmi relavent nodes. The sound-hdmi-arc is missed in
previous patch.
Signed-off-by: Ye Li <ye.li@nxp.com>
Open configs to enable trusty for imx8mm_evk and also
add new config imx8mm_evk_android_trusty_defconfig based
on imx8mm_evk_android_defconfig.
Test: Trusty starts ok.
Change-Id: Iaea90de21f886ed23082a5e8e8d2fa7fb139a9cb
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Write magic number in board early init, and clear magic when booting
Linux.
This is to let XEN know the current EL1 code is U-Boot or Linux
when reset/reboot. This is just a workaround because CM41 could not
communicate with XEN now, even XEN knows that EL1 is reseting/rebooting.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
To support partition reboot, the u-boot has to enable clocks by LPCG.
The LPCG will reset to default value only when the subsystem is totally
power off and reset. However, the resources in one subsystem may belong
to different partitions, so the partition reboot may not reboot the entire
subsystem.
Powers, clocks/lpcg, GPR, IP may not reset depends on various cases and
HW design. Thus, AP software has to ensure everything is reset by SW
itself to support such above cases.
Signed-off-by: Ye Li <ye.li@nxp.com>
Each module may have one or more lpcg registers for SW/HW enabling its
clocks. Add lpcg register address and its driver for accessing lpcg.
Signed-off-by: Ye Li <ye.li@nxp.com>
When moving to support partition reboot or android auto on XEN,
linux kernel will runs into runtime suspend state, and the usb
will be configured to low power suspend state by Linux.
Then we reboot and runs into U-Boot, however the usb already in
suspended state and uboot not able to lock the phy pll,
after clearing PHCD to out of suspended state, the phy pll could be
locked and fastboot works.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Suggested-by: Li Jun <jun.li@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Pass bt mac address from uboot cmdline to write
ro.boot.btmacaddr property for bluetooth hal to parse
BDADDR which is composed from ro.boot.serialno,
or it will fall back to persist property seted in init.rc.
Change-Id: If6886596c79c699b8530d3249b1cc98f19aad51f
Signed-off-by: yang.tian <yang.tian@nxp.com>
Print the func name instead of null buffer.
Test: boot on imx8qm_mek.
Change-Id: I883a9cebb2981b7e2451c00ed27000baf40097bf
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Now "is_boot_from_usb()" can work for imx6, imx7 and imx8, use this
function to judge whether boot from USB, and then return
FASTBOOT_UNLOCK.
This can save some time for imx8 to flash images if the board is
locked.
Change-Id: Iaa63f326f33400f2fdf13bf2e175cd9ac7d60317
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
When change lock status, misc partition, which stores data generated
by users, is erased.
Before, we take different actions on misc partition for Android and
Android Things. The situation of Android Auto is not handled.
Change-Id: Ia290b8e351b7a688d7a3a562cd30fca858e5a30c
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
The get_boot_device will return USB type from ROM info if booting from
serial download, so change the is_boot_from_usb to use this function.
Signed-off-by: Ye Li <ye.li@nxp.com>
Because the ROM info on iMX7D does not set device type to USB when booting
from serial download mode, we have to use the mechanism on mx6 to implement
the is_boot_from_usb. The original implementation is checking USB controller
register, it can't work correctly after any USB functionality is run in u-boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Rename the gd flag GD_FLG_ARCH_MX6_USB_BOOT to GD_FLG_ARCH_IMX_USB_BOOT,
and move it to mach-imx/sys_proto.h since we will also use it on mx7.
Signed-off-by: Ye Li <ye.li@nxp.com>
This will reduce some image size for Android Auto.
Test: build and boot on imx8qm_mek.
Change-Id: I023801a542f83398126d5af23c0a1eb2080c5063
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Enable the memory operation commands because we need them
sometimes, this won't increase much boot time.
Test: build and boot on imx8qm_mek.
Change-Id: Idad8de845203c3d958dd58c58b17b7d8a5d65b4f
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Add commands to write/read vbmeta public key to/from secure
storage. The vbmeta public key can only be set once.
Comands to set the public key:
fastboot stage <path-to-your-public-key>
fastboot oem set-public-key
Test: build and boot on imx8qxp_mek.
Change-Id: Id3ad4aa5aacef4fc8443f6a2d6ccb931310970ca
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Secure storage is ready in trusty so we should read/write the rollback
index from rpmb.
But for borads without rpmb key, read/write the rpmb will fail and will
block the following avb verify process. In this case, check if the rpmb
key has been set and always return AVB_IO_RESULT_OK for the boards without
rpmb key.
Test: build and boot pass on imx8qm_mek.
Change-Id: I10c438e56d049ae97ebedfc446c8202642630d8b
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Add a warning message before programming any fuses which are ECC
protected on imx8qm/imx8qxp. Also protect any gaps in fuse indexes
Signed-off-by: Teo Hall <teo.hall@nxp.com>
now the uboot used by uuu is compiled indepently from the one flashed to
the board, and for imx6 and imx7, defconfig from BSP team is used to
configure the uboot for uuu, so there is no need to unlock the device
when flash the board.
Change-Id: Ieefbd67e095dd51eab87e9a32b586cdf88f05d81
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
to handle situations that it is not allowed to unlock but the board is
already unlocked, unlock logic is modified in this patch
Change-Id: I90b22c2dfbc1c64ed9514032986e98b27526c7b9
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
compile waring info is as below:
arch/arm/mach-imx/imx8/parser.c: In function ‘mmc_load_image_parse_container’:
arch/arm/mach-imx/imx8/parser.c:244:1: warning: control reaches end of non-void function [-Wreturn-type]
}
^
previouse patch change ID:
I40a791d5b5b1eba6a0170d6853626fb546be4b2c
Change-Id: Ia605df11beab42e720fff6442a11b1e4b25ac209
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
uuu doesn't parse SPL+FIT format for mek_8q platforms. this patch
delete SPL and FIT related configurations in defconfig file for uuu
uboot.
Change-Id: If7c352a60a1534b1a5af9f0b661953c9c60191dc
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
defconfig files for uuu uboot and uboot flashed to board need to be
different.
because ab slot feature need to be used, defconfig of BSP team won't
be used.
this patch add for defconfig files for uuu uboot used on imx8. these
two files are directly copied from the files below:
1. imx8qm_mek_android_defconfig
2. imx8qxp_mek_android_defconfig
3. imx8mm_evk_android_defconfig
4. imx8mq_evk_android_defconfig
they are respectively be pasted as:
1. imx8qm_mek_android_uuu_defconfig
2. imx8qxp_mek_android_uuu_defconfig
3. imx8mm_evk_android_uuu_defconfig
4. imx8mq_evk_android_uuu_defconfig
Change-Id: I483593beb99477f1821c529254856d372d274661
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
The SPL loads the FIT image FDT part to an address related with the device
block length. This length is 512 for SD/MMC and is 1 for other devices
like SDP, NOR, NAND, SPI, etc.
When signing FIT image, we use fixed address caculated by SD/MMC block length
to sign FDT part. Thus, when booting through uuu, this causes mismatch and
gets authentication failed.
Fix the issue by providing a override function for this FIT buffer address.
When secure boot is enabled, adjust the addresses of other devices to be same
with SD/MMC.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Get build warning below because the CONFIG_SERIAL_TAG is not defined.
drivers/usb/gadget/f_fastboot.c: In function ‘fastboot_setup’:
drivers/usb/gadget/f_fastboot.c:1768:2: warning: ‘serialnr.high’ is used
uninitialized in this function [-Wuninitialized]
sprintf(serial, "%08x%08x", serialnr.high, serialnr.low);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
drivers/usb/gadget/f_fastboot.c:1768:2: warning: ‘serialnr.low’ is used
uninitialized in this function [-Wuninitialized]
Signed-off-by: Ye Li <ye.li@nxp.com>
Open configs to enable uuu for imx8mq_aiy.
Test: uuu flash ok on imx8mq_aiy.
Change-Id: I2c4a1010bf9b32f7cf706e9fa2f75133cf173b35
Signed-off-by: Ji Luo <ji.luo@nxp.com>
Add support for new target imx8mq_aiy.
Test: build and boot ok on imx8mq_aiy.
Change-Id: I7bb8b66e5235a7122073dcfb4cdc7f165036b9a6
Signed-off-by: Ji Luo <ji.luo@nxp.com>