Luo Ji [Thu, 11 Jan 2018 08:49:03 +0000 (16:49 +0800)]
MA-11108 [Android] decrypt lock store fail on imx7d
Macro FASTBOOT_ENCRYPT_LOCK can't be enabled because
of the order of header files.
Change-Id: Id46b2f595e316b70b71ec957d196e36b9eecc297
Signed-off-by: Luo Ji <ji.luo@nxp.com>
Ye Li [Wed, 10 Jan 2018 08:42:39 +0000 (02:42 -0600)]
MLK-17357-2 lpi2c: Add bus busy error handling
When doing "i2c dev 4; i2c probe" with ENET daughter card connected on iMX8QXP MEK
board, we met a i2c bus busy issue, that the BBF of lpi2c always show busy, but the
master is idle, and stop is detected (SDF set).
This patch addes a handling to re-init the lpi2c master for this case. Then the issue
can be worked around.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 10 Jan 2018 08:37:29 +0000 (02:37 -0600)]
MLK-17357-1 dts: imx8qxp_mek: set the i2c mux register offset to 0
The i2c mux PCA9646 does not have register offset. We should read/write
its control register immediately following the i2c device address.
Use u-boot,i2c-offset-len to set the register offset length to 0.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 8 Jan 2018 14:09:43 +0000 (08:09 -0600)]
MLK-17313-3 imx8mq_evk: Add USB PD power sink support
Enable the TCPC driver for i.MX8MQ EVK board. When booting with dead battery,
the TCPC driver will setup USB PD connection to negotiate the power with PD
power charger.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Jun Li <jun.li@nxp.com>
Ye Li [Mon, 8 Jan 2018 14:08:57 +0000 (08:08 -0600)]
MLK-17313-2 imx8qm/qxp mek: Update codes to use new TCPC interfaces
Since the TCPC driver is updated, change the QM/QXP MEK board level codes
accordingly to use new interfaces.
Because the typec circuit on iMX8QM/QXP MEK boards only support power role
as source, so set the CONFIG_USB_TCPC_PD_SINK_DISABLE.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Jun Li <jun.li@nxp.com>
Ye Li [Mon, 8 Jan 2018 14:05:51 +0000 (08:05 -0600)]
MLK-17313-1 tcpc: Add support for power sink in dead battery
To add support for power sink when booting in dead battery, we
have to setup PD connection with PD source and send/receive PD messages
to negotiate a proper voltage and current.
This patch refactors the TCPC driver with this new function and also
keep DFP mode support for USB host.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Jun Li <jun.li@nxp.com>
Ye Li [Thu, 4 Jan 2018 15:17:57 +0000 (09:17 -0600)]
MLK-17348 xhci: Reset endpoint when endpoint is halted
When testing a poor USB disk "Transcend JetFlash XPGMC7W5 ", sometime we
will get TRB TX error during getting string descriptors, then the usb process
aborts due to the context state changed to halted.
Actually when the endpoint context state is halted, we can send reset endpoint
command to put it to stopped state, then set TR dequeue pointer for following
doorbell ring to re-run it. This patch adds this error recovery mechanism.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 5 Jan 2018 02:55:03 +0000 (20:55 -0600)]
MLK-17345 mxc_ocotp: Update redundancy banks for mx7ulp B0
On mx7ulp B0, beside bank 0 and 1, the fuse bank 9, 10, 28 are changed to
Redundancy mode not ECC, so they can support to program different bits of
a word in multiple times.
Signed-off-by: Ye Li <ye.li@nxp.com>
Haoran.Wang [Fri, 29 Dec 2017 08:35:56 +0000 (16:35 +0800)]
MA-10983 Load HDMI firmware before boot
Load HDMI firmware to make HDMI module work.
The firmware stored in /system partition.
Now choose the target boot slot's system partition
to load the firmware.
Change-Id: Icfcd5f6c8237ee0c8875317395cf86c07d53c58e
Signed-off-by: Haoran.Wang <elven.wang@nxp.com>
Luo Ji [Wed, 3 Jan 2018 05:50:58 +0000 (13:50 +0800)]
MA-10967 Add append bootargs env in uboot
Add 'append_bootargs' to hold some paramemters which need to be
appended to bootargs.
Change-Id: I80f18a421dea270cc8f555fe1b2799a5eb00aadc
Signed-off-by: Luo Ji <ji.luo@nxp.com>
Peng Fan [Tue, 28 Nov 2017 02:08:08 +0000 (10:08 +0800)]
arm64 :show_regs: show the address before relocation
After relocation, when error happends, it is hard to track
ELR and LR with asm file objdumped from elf file.
So subtract the gd->reloc_off the reflect the compliation address.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
(cherry picked from commit
082693f4f02ad7a9de192e73feae34e28856b8e3)
Peng Fan [Fri, 29 Dec 2017 06:20:15 +0000 (14:20 +0800)]
MLK-17303-2 imx: 8qm: Fix ENET1 build
Fix ENET1 build and enablement.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 29 Dec 2017 07:06:14 +0000 (15:06 +0800)]
MLK-17303-1 imx: 8qxp: Fix ENET1 enablement
Fix build error.
Correct ENET1 enablement, Define CONFIG_FEC_ENET_DEV 1, to enable
ENET1 on Base board.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 29 Dec 2017 03:27:58 +0000 (21:27 -0600)]
MLK-17324 DTS: imx8qm_mek: Add USBOTG1 node
Since android needs the USB OTG port on base board to run fastboot,
add the USBOTG1 node to imx8qm mek DTS, so that the OTG can work on
reworked board.
Tested-by: Chen Guoyin <guoyin.chen@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 15 Dec 2017 07:28:06 +0000 (01:28 -0600)]
MLK-17292 mx7ulp: Set A7 core frequency to 500Mhz for B0 chip
The normal target frequency for ULP A7 core is 500Mhz, but now ROM
set the core frequency to 413Mhz. So change it to 500Mhz in u-boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 22 Dec 2017 06:30:29 +0000 (00:30 -0600)]
MLK-17278 imx8qxp_mek: Enable USB OTG port on base board
The USB OTG port on MEK base board is not enabled at default, due to the default
design connects it to M2 connector for BT/WIFI.
Since most boards have reworked it, we enable it to support both host and device
mode in u-boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Han Xu [Wed, 20 Dec 2017 18:29:38 +0000 (12:29 -0600)]
MLK-17254: imx8qxp: configs: change the NAND ENV offset to avoid overlap
There is the 8M block sized NAND chip on QXP board, the previous 64MB
u-boot environment offset overlapped with the boot image location.
Changed the offset from 64MB to 120MB to avoid the overlap.
Signed-off-by: Han Xu <han.xu@nxp.com>
Ye Li [Wed, 20 Dec 2017 10:28:32 +0000 (04:28 -0600)]
MLK-17272 imx8mq_evk: Fix build warnings with usb power
Fix build warnings below, because the imx8m_usb_power is not declared
board/freescale/imx8mq_evk/imx8m_evk.c: In function ‘board_usb_init’:
board/freescale/imx8mq_evk/imx8m_evk.c:205:2: warning: implicit
declaration of function ‘imx8m_usb_power’ [-Wimplicit-function-declaration]
imx8m_usb_power(index, true);
^~~~~~~~~~~~~~~
drivers/usb/host/xhci-imx8m.c: In function ‘xhci_hcd_init’:
drivers/usb/host/xhci-imx8m.c:123:3: warning: implicit declaration of
function ‘imx8m_usb_power’ [-Wimplicit-function-declaration]
imx8m_usb_power(ctr_data[index].usb_id, false);
^~~~~~~~~~~~~~~
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 20 Dec 2017 09:42:55 +0000 (03:42 -0600)]
MLK-17262 video: Fix build break when CONFIG_VIDEO_IMX_HDP_LOAD is not selected
Met build errors below when CONFIG_VIDEO_IMX_HDP_LOAD is not selected. Because the u-boot
make script checks the "$(obj-y) $(obj-m) $(obj-) $(subdir-m) $(lib-target)" for built-in target.
aarch64-poky-linux-ld.bfd: cannot find drivers/video/imx/built-in.o: No such file or directory
scripts/Makefile.build:359: recipe for target 'drivers/video/built-in.o' failed
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
zhang sanshan [Wed, 20 Dec 2017 07:30:48 +0000 (15:30 +0800)]
MA-10933 [Android] android daily build failed
BSP add HDP firmware loading for video.
android daily build for the configure is not align with BSP.
align BSP uboot configure.
Change-Id: I56ce146a40eeed63e71795870d48387385903f8a
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Oliver Brown [Wed, 13 Dec 2017 23:14:58 +0000 (17:14 -0600)]
MLK-17205-3 video: imx: hdp: Adding configs for HDP firmware loading
Added default environment for hdp loading.
Added hdp loading as default for iMX8QM ARM2 and MEK boards.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Wed, 13 Dec 2017 23:12:45 +0000 (17:12 -0600)]
MLK-17205-2 video: imx: hdp: Adding HDP firmware loading to the build
Adding the HDP firmware loading to the build.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Oliver Brown [Wed, 13 Dec 2017 23:09:14 +0000 (17:09 -0600)]
MLK-17205-1 video: imx: hdp: Adding support for HDP firmware loading
This adds a command to load the HDP firmware and supporting libraries.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Haibo Chen [Tue, 19 Dec 2017 06:46:55 +0000 (14:46 +0800)]
MLK-17239 mmc: fsl_esdhc: fix sd/mmc ddr mode clock setting issue
When sd/mmc work at DDR mode, like HS400/HS400ES/DDR52/DDR50 mode,
the actual clock rate is just half of the expected clock.
This patch set the DDR_EN bit first for DDR mode, hardware divide
the usdhc clock automatically, then follow the original sdr clock
setting method.
This patch also remove the unused variable 'is_ddr'.
Acked-by: Li Ye <ye.li@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Ye Li [Mon, 18 Dec 2017 09:05:41 +0000 (03:05 -0600)]
MLK-17236 imx8qm_mek: Enable base board power
Since SCFW switches off the base board at default, we need to turn on it
in u-boot, so that perpherals on base board can work.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Leonard Crestez [Wed, 29 Nov 2017 12:56:54 +0000 (14:56 +0200)]
imx8qm_arm2: Add xen boot commands
These commands try to be as generic as possible and avoid duplicating
argument values used for regular boot.
The fdt_file parameter still needs to be set to a .dtb for dom0. Booting
xen with stock dtb would require more hacks, for example lpuart
interrupt-parent = <&wu> needs to be removed.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Ye Li [Fri, 15 Dec 2017 01:56:40 +0000 (19:56 -0600)]
MLK-17210 usb: imx8m: Add PU power on/off to USB
ATF will power off all PUs at default, so for USB, we enable
its PU power for both host and device modes in board_usb_init and
disable the power when usb is stop in board_usb_cleanup.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Li Jun <jun.li@nxp.com>
Ye Li [Wed, 13 Dec 2017 06:22:09 +0000 (00:22 -0600)]
MLK-17200-3 mx7ulp: Select the SCG1 APLL PFD as a system clock source
Due to the APLL out glitch issue TKT332232, the APLLCFG PLLS bit must be set
to select SCG1 APLL PFD for generating system clock to align with the design.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 13 Dec 2017 06:20:15 +0000 (00:20 -0600)]
MLK-17200-2 mx7ulp: Remove SNVS LP settings for B0
Since i.MX7ULP B0 moves the SNVS LP into M4 domain, A core can't access
it. So check the CPU rev and not apply the settings for B0.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 13 Dec 2017 06:16:31 +0000 (00:16 -0600)]
MLK-17200-1 mx7ulp: Add CPU revision check for B0
Since there is no register for CPU revision, we use ROM version to
check the A0 or B0 chip.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Haibo Chen [Wed, 13 Dec 2017 02:56:10 +0000 (10:56 +0800)]
MLK-17189 imx8qxp: change the USDHC_CLK_ROOT source from AVPLL
Currently, the DPLL of conn ss is not stable, will cause usdhc
data CRC error. So here change USDHC_CLK_ROOT source from AVPLL
as a workaround. And config USDHC1_CLK_ROOT to 333MHz, USDHC2_CLK_ROOT
to 200MHz. This workaround do not impact SD performance, but decrease
the eMMC performance, HS400ES work clock change from 198MHz to 166MHz,
read performance drop about 10%, write performance drop about 6%.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Haibo Chen [Mon, 4 Dec 2017 09:35:13 +0000 (17:35 +0800)]
MLK-17076 mmc: fsl_esdhc: fix the wrong sd/mmc clock frequency setting
Change the pre_div to value 1, otherwise the actual sd/mmc clock
frequency is always half of the expect frequency.
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
Ye Li [Tue, 12 Dec 2017 06:02:19 +0000 (00:02 -0600)]
MLK-17153-2 imx8mq_arm2: Resolve malloc memory problem for SPL NAND boot
When using SPL NAND boot, the required malloc memory is larger than SD/eMMC boot.
Since we have used out OCRAM (for ATF) and OCRAM_S, there is no enough memory could be
allocated.
The solution is moving the malloc memory pool to DDR. The malloc pool is initialized in
board_init_r, so we moved the VDD_DRAM adjustment and DDR init to board_init_f. Then the DDR
can setup before memory pool initialization. Because the i2c and PMIC driver needs to malloc
data, this change has to enable malloc_f pool by setting CONFIG_MALLOC_F_ADDR to previous
malloc address on OCRAM_S.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 12 Dec 2017 05:49:53 +0000 (23:49 -0600)]
MLK-17153-1 nand: Update SPL MXS NAND mini driver
Update the mini driver to add support for getting ecc info from ONFI and
support read image data from page unaligned NAND address.
Signed-off-by: Ye Li <ye.li@nxp.com>
Luo Ji [Thu, 7 Dec 2017 09:04:59 +0000 (17:04 +0800)]
MA-10872 Write vaild size of gpt image for i.MX8
The offset of u-boot for i.MX8 boards is 33k bytes, writing whole gpt
image (34k) will break u-boot when the board is booted with SD card.
This patch only write vaild part (first 17k bytes) of gpt into SD card
and will keep backup gpt at the last LBA.
Change-Id: Iac5d337fb11a3e3ad2a9686efbfbacf9523dae58
Signed-off-by: Luo Ji <ji.luo@nxp.com>
Teo Hall [Mon, 11 Dec 2017 18:27:06 +0000 (12:27 -0600)]
MLK-17119 i.MX8QM DDR4 ARM2 Support
Add support for DDR4 board in u-boot.
Main changes are the SD card slot and ddr
type
Signed-off-by: Teo Hall <teo.hall@nxp.com>
Peng Fan [Mon, 11 Dec 2017 04:55:19 +0000 (12:55 +0800)]
MLK-17145 imx: mx6qpsabresd: use mx6qp.cfg for optee support
Use mx6qp.cfg for optee support.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Sun, 10 Dec 2017 02:01:30 +0000 (10:01 +0800)]
MLK-17143 imx8qxp: mek: add xen env
Add xen env, "run xenboot" to boot xen.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 15 Nov 2017 06:58:18 +0000 (00:58 -0600)]
MLK-17109-4 imx8mq_arm2: Add i.MX8MQ DDR3L and DDR4 ARM2 boards support
Add board codes, configurations, DTS and DDR initialization codes for the
DDR3L and DDR4 ARM2 boards.
Supported modules
- DDR3L ARM2: Two RANK DDR3L, QSPI B, eMMC/SD, RMII ENET, UART.
- DDR4 ARM2: Two RANK DDR4, SD, NAND, RGMII ENET, UART.
NAND read/write/erase is ok in u-boot, NAND SPL boot will be tested later
when tool is ready.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 16 Nov 2017 04:58:05 +0000 (22:58 -0600)]
MLK-17109-3 mxs_nand: Add support for i.MX8M
Update the gpmi/apbh_dma/bch drivers and relevant registers for i.MX8M.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 15 Nov 2017 06:46:16 +0000 (00:46 -0600)]
MLK-17109-2 spi_flash: Add gd25q16c to flash ids table
The i.MX8MQ DDR3L ARM2 boards uses gd25q16c flash device, add its id
to spi flash ids table.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 15 Nov 2017 06:44:30 +0000 (00:44 -0600)]
MLK-17109-1 imx8m: clock: Add more frequencies support in dram pll init function
Add 400Mhz, 600Mhz and 800Mhz frequencies for dram pll init function to
support DDR3L/DDR4/LPDDR4.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 8 Dec 2017 07:53:58 +0000 (01:53 -0600)]
MLK-17131 serial: lpuart: Enable RX and TX FIFO
Enable the RX and TX FIFO in LPUART driver to avoid the input lost
during u-boot boot up.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 8 Dec 2017 06:30:37 +0000 (00:30 -0600)]
MLK-17127 DTS: imx8qm_mek: Update fec pad settings
Sync the FEC1 and FEC2 pad settings with latest kernel DTS
(commit
a67f777dfb805fa72ffe31911a18d8c0a9683f73)
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by Fugang Duan <fugang.duan@nxp.com>
Ye Li [Tue, 5 Dec 2017 07:16:08 +0000 (01:16 -0600)]
MLK-17086 bootm: Add authentication to optee image
When IMX_OPTEE is enabled for secure boot, update bootm to authenticate the optee
image and the kernel zImage before booting into optee.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Fri, 8 Dec 2017 05:12:25 +0000 (13:12 +0800)]
MLK-17123 imx: fix mfgtool bootcmd
Fix mfgtool bootcmd error
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Fugang Duan [Thu, 7 Dec 2017 01:42:24 +0000 (09:42 +0800)]
MLK-17093 imx8qm/qxp: enable control bit for RGMII interface RX clock delay
Due to RGMII interface timing requirement for imx8qm/qxp mek and arm2
board, it needs to enable RX clock delay.
It should not depend on HW default status since kernel may clear the
bit only on imx8qm/qxp platforms, then reboot test will cause uboot
networking failed.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Bai Ping [Mon, 4 Dec 2017 04:49:13 +0000 (12:49 +0800)]
MLK-17082-02 imx: add optee support for imx6sl
Add defconfig for tee support;
Enable the TZASC support;
Add env config for tee support.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Bai Ping [Mon, 4 Dec 2017 02:50:33 +0000 (10:50 +0800)]
MLK-17082-01 imx: add optee support for imx6sll
Add different defconfig for optee;
Enable the TZASC support;
Add env config for tee support.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 4 Dec 2017 07:29:20 +0000 (15:29 +0800)]
MLK-17050 imx8m: print out atf commit
Print out atf commit in U-Boot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Jian Li [Mon, 4 Dec 2017 02:30:46 +0000 (10:30 +0800)]
MLK-17055 imx8mq: evk: update DDR seting for display flickering issue
1. With this change, no flickering when LCDIF + MIPI-DSI
in 720p60 single display case
2. With this change, no flickering when DCSS in 4kp60
while running 4x memtester at the same time
side effect:
GPU resolve performance downgrade ~20%, no obvious impact
to non-resolve GPU cases.
Signed-off-by: Jian Li <jian.li@nxp.com>
Breno Lima [Tue, 14 Nov 2017 22:10:45 +0000 (20:10 -0200)]
imx: imx7 Support for Manufacturing Protection
This code was originally developed by Raul Cardenas <raul.casas@nxp.com>
and modified to be applied in U-Boot imx_v2017.03.
More information about the initial submission can be seen
in the link below:
https://lists.denx.de/pipermail/u-boot/2016-February/245273.html
i.MX7D has an a protection feature for Manufacturing process.
This feature uses asymmetric encryption to sign and verify
authenticated software handled between parties. This command
enables the use of such feature.
The private key is unique and generated once per device.
And it is stored in secure memory and only accessible by CAAM.
Therefore, the public key generation and signature functions
are the only functions available for the user.
The manufacturing-protection authentication process can be used to
authenticate the chip to the OEM's server.
Command usage:
Print the public key for the device.
- mfgprot pubk
Generates Signature over given data.
- mfgprot sign <data_address> <data_size>
Signed-off-by: Raul Ulises Cardenas <raul.casas@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Fabio Estevam <fabio.estevam@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 1 Dec 2017 07:28:58 +0000 (01:28 -0600)]
MLK-17048 imx8mq_evk: Fix SD CD pad issue in SPL
The EVK board does not use external pull up resistor for SD CD pin, it requires
the pad to be configured as pull up, otherwise the signal level is always low even
the card is not inserted.
This patch configures the pad of CD and RESET to pull up to align with kernel,
although there is already a external pull up for RESET.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 30 Nov 2017 07:32:39 +0000 (01:32 -0600)]
MLK-17044-3 booti: Add kernel image authentication for secure boot
When secure boot is enabled, add authenticate_image in booti to authenticate
kernel image.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 30 Nov 2017 07:29:54 +0000 (01:29 -0600)]
MLK-17044-2 HAB: Add SIP call for ARM64 platform
When current EL is not EL3, the direct calling to HAB will fail because
CAAM/SNVS can't initialize at non-secure mode. In this case, we use
SIP call to run the HAB in ATF.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 30 Nov 2017 07:23:56 +0000 (01:23 -0600)]
MLK-17044-1 imx-common: Adding new argument for SIP call interface
Need to pass total 5 arguments for SIP HAB call, so update the interface
to add new argument.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 29 Nov 2017 06:21:12 +0000 (00:21 -0600)]
MLK-17021 imx8m: Fix thermal temp printed not aligning with kernel
The TMU calibration data in u-boot DTB is not updated, so the temperature
we got in u-boot won't exceed 40C.
This patch updates the TMU node with latest kernel DTB
(commit
ee0a9fbdca80b058c00d74c6afa70558f6c1dcc6)
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 28 Nov 2017 06:21:08 +0000 (00:21 -0600)]
MLK-17011 imx8qm/qxp: Fix wrong boot type for flexspi
The codes use the QSPI when booting from Flexspi, this cause u-boot prints
out unknown device if we boot from Flexspi NOR.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Wed, 29 Nov 2017 03:11:15 +0000 (11:11 +0800)]
MLK-17018 Correct Copyright
Correct Copyright
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 24 Nov 2017 07:33:21 +0000 (01:33 -0600)]
MLK-16974 imx8m: Modify kernel DTB to limit USB to high-speed for mfgtool
We found USB issue when using super-speed for mfgtool, temporally work around
the problem to use high-speed only.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Li Jun <jun.li@nxp.com>
Leonard Crestez [Wed, 22 Nov 2017 11:51:15 +0000 (13:51 +0200)]
MLK-16944: imx8qm/qxp: Add leading zeros to SCFW commit hash
This fixes SCFW commits with leading zeros like
0245582bf4a58289e25c59fb0befe84923ca6742 being displayed as "
245582b".
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 22 Nov 2017 09:01:14 +0000 (03:01 -0600)]
MLK-16940 imx8m: Disable more HDMI and display nodes for mfgtool
When running mfgtool, the HDMI FW won't be loaded. U-boot has to disable these
new added HDMI and display relevant nodes in DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 22 Nov 2017 08:57:05 +0000 (02:57 -0600)]
MLK-16939 imx8mq_evk: Change u-boot init stack address and size
Current u-boot init stack on mScale EVK is from 0x40f00000 to 0x41000000.
This address overlays with kernel load address. When running mfgtool, the
loaded kernel will be overwritten by this stack. So we change the init stack
to the first 512KB DDR memory.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Wed, 22 Nov 2017 04:45:01 +0000 (12:45 +0800)]
MLK-16933 imx8m: clock: set NAND_USDHC_BUS_CLK_ROOT to sys pll1 266M
Set NAND_USDHC_BUS_CLK_ROOT to sys pll1 266M
Signed-off-by: Peng Fan <peng.fan@nxp.com>
zhang sanshan [Wed, 22 Nov 2017 04:18:57 +0000 (12:18 +0800)]
MA-10703 [Android] use the usb_ep_queue for muti request
It need to send muti data through usb for fastboot commands(fastboot getcar all)
this patch use usb_ep_queue to queue usb data.
Change-Id: I5fd256868ac43163a21417a0634dd194e31f3eb7
Signed-off-by: Li Jun <jun.li@nxp.com>
Ye Li [Wed, 22 Nov 2017 02:37:21 +0000 (20:37 -0600)]
MLK-16931 imx8m: hab: Fix secure boot build warning
Found HAB build warnings on mScale, those relate to ARM 64 bits conversion.
arch/arm/imx-common/hab.c: In function ‘csf_is_valid’:
arch/arm/imx-common/hab.c:556:18: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
!chk_bounds((const uint8_t *)ivt_initial->csf,
^
In file included from arch/arm/imx-common/hab.c:14:0:
arch/arm/imx-common/hab.c:557:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
HAB_HDR_LEN(*(const struct hab_hdr *)ivt_initial->csf),
^
./arch/arm/include/asm/imx-common/hab.h:177:40: note: in definition of macro ‘HAB_HDR_LEN’
((size_t)(((const struct hab_hdr *)&(hdr))->len[0] << 8) \
^~~
arch/arm/imx-common/hab.c:557:17: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
HAB_HDR_LEN(*(const struct hab_hdr *)ivt_initial->csf),
^
./arch/arm/include/asm/imx-common/hab.h:178:41: note: in definition of macro ‘HAB_HDR_LEN’
+ (size_t)((const struct hab_hdr *)&(hdr))->len[1])
^~~
arch/arm/imx-common/hab.c:563:12: warning: cast to pointer from integer of different size [-Wint-to-pointer-cast]
csf_hdr = (const uint8_t *)ivt_initial->csf;
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 22 Nov 2017 02:29:38 +0000 (20:29 -0600)]
MLK-16930 imx6: hab: Fix secure boot build error and warning
Found secure boot build error and warning for some i.MX6 platforms without
CONFIG_ROM_UNIFIED_SECTIONS defined. Fix them in this patch.
In file included from arch/arm/imx-common/hab.c:14:0:
arch/arm/imx-common/hab.c: In function ‘hab_rvt_report_event’:
./arch/arm/include/asm/imx-common/hab.h:152:59: error: ‘HAB_RVT_BASE_ARM64’ undeclared (first use in this function)
^
arch/arm/imx-common/hab.c:23:29: note: in expansion of macro ‘HAB_RVT_REPORT_EVENT_ARM64’
((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT_ARM64) : \
^
arch/arm/imx-common/hab.c:153:30: note: in expansion of macro ‘hab_rvt_report_event_p’
hab_rvt_report_event_func = hab_rvt_report_event_p;
^
./arch/arm/include/asm/imx-common/hab.h:152:59: note: each undeclared identifier is reported only once for each function it appears in
^
arch/arm/imx-common/hab.c:23:29: note: in expansion of macro ‘HAB_RVT_REPORT_EVENT_ARM64’
((hab_rvt_report_event_t *)HAB_RVT_REPORT_EVENT_ARM64) : \
arch/arm/imx-common/hab.c:126:23: warning: 'gd_save' defined but not used [-Wunused-variable]
static volatile gd_t *gd_save;
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Tue, 21 Nov 2017 05:46:55 +0000 (23:46 -0600)]
MLK-16921 imx8mq_evk: Change kernel load address to 0x40480000
The u-boot running address is 0x40200000, and the image size is larger than 512KB.
If we set kernel load address to 0x40280000, when using mfgtool, the kernel loading
will overwrite the u-boot image in DDR and cause u-boot crash.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 21 Nov 2017 05:20:46 +0000 (13:20 +0800)]
MLK-16895 imx8: use netboot when mmcboot fail
Use netboot when mmcboot fail.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 20 Nov 2017 06:54:45 +0000 (00:54 -0600)]
MLK-16903 imx8m: Add reset_cpu to use external WDOG_B for reset
The WDT is enabled for WDOG in current u-boot reset, this cause external WDOG_B
and internal WDOG_RESET_B_DEB both asserted for timeout. To avoid any unpredictable
behavior, change to use the WDOG_B only.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Richard Zhu [Fri, 3 Nov 2017 05:52:55 +0000 (13:52 +0800)]
MLK-16889 PCI: imx: disable the ltssm when link is down
Disable the LTSSM when link is down.
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Peng Fan [Mon, 20 Nov 2017 01:57:54 +0000 (09:57 +0800)]
MLK-16899 imx8mq: evk: Add back LPDDR4 performance register settings
Add back LPDDR4 performance register settings
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 16 Nov 2017 12:08:58 +0000 (20:08 +0800)]
MLK-16880 imx8mq: evk: fix init ram space
Fix init ram space. Otherwise uboot will override ATF stack space
and cause unexpected issues.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Utkarsh Gupta [Sat, 18 Nov 2017 01:23:08 +0000 (19:23 -0600)]
MLK-14945 HAB: Check if IVT valid before authenticating image
For proper authentication users must check the IVT before authenticating the
kernel image. If the IVT DCD pointer is not 0, display an error as shown below
and return a boot failure.
Authenticate image from DDR location 0x12000000...
Error: DCD pointer must be 0
Authenticate zImage Fail, Please check
Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Utkarsh Gupta [Sat, 18 Nov 2017 01:20:33 +0000 (19:20 -0600)]
MLK-16703: HAB : Check if CSF is valid before authenticating image
For proper authentication users must check if the CSF is valid. This patch
calls the csf_is_valid function prior to authenticating the image to parse
the CSF and returns a failure if an invalid command is found as shown below.
Authenticate image from DDR location 0x12000000...
Check CSF for Write Data command before authenticating image
Error - WRITE Data command found
Authenticate zImage Fail, Please check
Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Han Xu [Thu, 16 Nov 2017 22:57:29 +0000 (16:57 -0600)]
MLK-16882: imx8qxp: config: add NAND boot environment
add the nand boot related environments for i.MX8QXP ARM2 board.
Signed-off-by: Han Xu <han.xu@nxp.com>
zhang sanshan [Thu, 16 Nov 2017 07:38:11 +0000 (15:38 +0800)]
MA-10633 [Android] enlarge the timeout for waiting DATA0
600ms is not enough to erase erase_grp_size for some sdcard.
enlarge to to 1200ms.
Change-Id: Ic980794fa3064f92b479b87380e694f853f83c6a
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
ji.luo [Wed, 15 Nov 2017 05:20:44 +0000 (13:20 +0800)]
MA-10621 Fix no error returned when lock/unlock fail
Make do_fastboot_unlock() and fastboot_lock() return FbLockState
type and correct the compare logic in cb_flashing().
Change-Id: I6df6f39a8aa3197299daa0d64408ac72a54fb5e9
Signed-off-by: ji.luo <ji.luo@nxp.com>
Ye Li [Thu, 16 Nov 2017 05:29:33 +0000 (23:29 -0600)]
MLK-16831 imx8m: Remove cpu-idle-states property from kernel FDT for rev A0
Since i.MX8M A0 has HW issue in CPU idle, we must disable the function
when running on A0 chip. This patch checks the CPU rev and remove the
"cpu-idle-states" from cpu nodes to disable the CPU idle.
Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Bai Ping <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Richard Liu [Tue, 14 Nov 2017 12:30:38 +0000 (20:30 +0800)]
MA-10622 add android configure to support mx8qm mek board
Add android configure to support mx8qm mek board on android build.
Change-Id: I6dd885258f58c2f81b81bba87ca56184c653b9a1
Signed-off-by: Richard Liu <xuegang.liu@nxp.com>
Ye Li [Thu, 9 Nov 2017 05:23:04 +0000 (23:23 -0600)]
MLK-16758-4 SPL: Add HAB image authentication to FIT
Introduce two board level callback functions to FIT image loading process, and
a SPL_FIT_FOUND flag to differentiate FIT image or RAW image.
Implement functions in imx common SPL codes to call HAB funtion
to authenticate the FIT image. Generally, we have to sign multiple regions
in FIT image:
1. Sign FIT FDT data (configuration)
2. Sign FIT external data (Sub-images)
Because the CSF supports to sign multiple memory blocks, so that we can use one
signature to cover all regions in FIT image and only authenticate once.
The authentication should be done after the entire FIT image is loaded into
memory including all sub-images.
We use "-p" option to generate FIT image to reserve a space for FIT IVT
and FIT CSF, also this help to fix the offset of the external data (u-boot-nodtb.bin,
ATF, u-boot DTB).
The signed FIT image layout is as below:
--------------------------------------------------
| | | | | | | |
| FIT | FIT | FIT | | U-BOOT | ATF | U-BOOT |
| FDT | IVT | CSF | | nodtb.bin | | DTB |
| | | | | | | |
--------------------------------------------------
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 9 Nov 2017 05:14:48 +0000 (23:14 -0600)]
MLK-16787-3 SPL: Add FIT data-position property support
For external data, FIT has a optional property "data-position" which
can set the external data to a fixed offset to FIT beginning.
Add the support for this property in SPL FIT.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 9 Nov 2017 03:43:56 +0000 (21:43 -0600)]
MLK-16787-2 iMX8M: Add support to enable CONFIG_SECURE_BOOT
Add some SOC level codes and build configurations to use HAB lib for
CONFIG_SECURE_BOOT, like adding the SEC_CONFIG fuse, enable fuse driver,
CAAM clock function, and add CAAM secure RAM to MMU table.
The FSL_CAAM is temporally not enabled for iMX8M when CONFIG_SECURE_BOOT is set,
because we don't need the CAAM driver for SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 9 Nov 2017 03:25:44 +0000 (21:25 -0600)]
MLK-16787-1 HAB: Update hab codes to support ARM64 and i.MX8M
There are some changes to support ARM64 i.MX8M platform in this patches:
1. The hab_rvt base and function vectors are different as i.MX6/7
2. Need to bypass an workaround for i.MX6 to fix problem in MMU.
3. The x18 register needed save & restore before calling any HAB API. According
to ARM procedure call spec, the x18 is caller saved when it is used as
temporary register. So calling HAB API may scratch this register, and
cause crash once accessing the gd pointer.
On ARMv7, the r9 is callee saved when it is used as variable register. So
no need to save & restore it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Sun, 12 Nov 2017 11:33:22 +0000 (19:33 +0800)]
MLK-16802 imx8m: correct mmu mapping
ATF has been moved to OCRAM, it is no longer in DRAM, so
let Uboot could use that space.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 10 Nov 2017 08:38:23 +0000 (16:38 +0800)]
MLK-16794 imx8qxp: support ddr3 arm2 board
Support DDR3 ARM2 board.
Most parts are same as LPDDR4 ARM2 board, so share code
with LPDDR4 ARM2.
The DRAM size is 1GB on DDR3 ARM2 board.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 10 Nov 2017 06:39:23 +0000 (00:39 -0600)]
MLK-16795 imx8mq_evk: Rename SPL DDR files and public functions
Change to use more generic name for DDR files and public functions used in SPL,
not specified to LPDDR4.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 10 Nov 2017 07:49:56 +0000 (01:49 -0600)]
MLK-16797 imx8qm/qxp: Fix memory bank size calculation issue
The calculation of memory bank size is wrong when the memory on the board is
less than 2GB. It causes memory bank exceeding the real DDR end, and cause
crash in kernel. Fix the issue in this patch.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 10 Nov 2017 05:31:43 +0000 (13:31 +0800)]
MLK-16753-9 imx: mx7: add optee support
Add different defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.
mx7d arm2 board not supported now.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 10 Nov 2017 05:29:49 +0000 (13:29 +0800)]
MLK-16753-8 imx: mx6ul/ull: add optee support
Add different defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Nov 2017 01:14:12 +0000 (09:14 +0800)]
MLK-16753-7 imx: mx6sx: add optee support
Add different defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Nov 2017 01:10:52 +0000 (09:10 +0800)]
MLK-16753-6 imx: mx6sabresd: add optee support
Add different defconfigs
Enable Trustzone.
Update env to runtime boot OP-TEE.
To 6QP SDB, TZASC enabled, need board rework and new ddr script.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 9 Nov 2017 01:04:01 +0000 (09:04 +0800)]
MLK-16753-5 imx: mx6qsabreauto: add optee support
Add defconfigs.
Enable Trustzone.
Update env to runtime boot OP-TEE.
To 6QP AUTO, TZASC not enabled now.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 3 Nov 2017 09:40:24 +0000 (17:40 +0800)]
MLK-16753-4 tools: imximage: add SET_BIT command
Add SET_BIT command
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 10 Nov 2017 04:52:49 +0000 (12:52 +0800)]
MLK-16753-3 imx: reserve the high 32M
To i.MX6/7, the high 32M is reserved for OP-TEE case.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 2 Nov 2017 08:01:19 +0000 (16:01 +0800)]
MLK-16753-2 imx-common: add IMX_OPTEE entry
Add IMX_OPTEE Kconfig entry
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 2 Nov 2017 05:47:24 +0000 (13:47 +0800)]
MLK-16753-1 imx8m: add optee node according to runtime status
If TEE is enabled according to rom_pointer[0,1] passed to BL33
from ATF, uboot need to add the optee node in dts to let
Kernel could probe the TEE driver.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Han Xu [Thu, 9 Nov 2017 23:02:20 +0000 (17:02 -0600)]
MLK-16793: imx8qxp: config: fix the nand partition size and env offset
considering the boot binary/kernel size becomes larger, increase the
boot and kernel partition size and accordingly change the offset when
reading data.
Also changed the extra Android misc partition size to 8M which is block
size aligned.
Signed-off-by: Han Xu <han.xu@nxp.com>
Peng Fan [Tue, 7 Nov 2017 08:57:56 +0000 (16:57 +0800)]
MLK-16773 imx8m: spl: implement wdog reset
Implement wdog reset in SPL stage.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Zhang Bo [Mon, 6 Nov 2017 06:54:34 +0000 (14:54 +0800)]
MA-10587 [Android]u-boot: Remove build warning in f_fastboot.c
The warnings in f_fastboot.c is because the size of a pointer is 64bits,
while the variables in header structure is 32bits. Need to convert manually
at first.
The function partition_table_valid() is useful only when CONFIG_FSL_FASTBOOT and
CONFIG_FASTBOOT_LOCK are defined.
Change-Id: I480f254465096bd61b9075dff0d3fb6ab4bc44af
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>