Peng Fan [Wed, 9 May 2018 05:59:54 +0000 (13:59 +0800)]
MLK-18243-16 arm: dts: add imx8mm dtsi and binding files
Sync dts from 4.14.98 Linux kernel commit
e88899128d81ea8b82dfd7d294572f21c388e568
("MLK-21424 can: flexcan: fix normal CAN can't receive
remote frame after setting fd mode").
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
0e7a5484878338d0dff871b6d21092a0479f07b4)
(cherry picked from commit
54a97f31802ea568e04285e0f18689811eecedcb)
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 18 Apr 2019 06:33:38 +0000 (23:33 -0700)]
MLK-18243-15 spi: fspi: Fix 3bytes access
The address size is 3 bytes when using BAR mode, but the driver
supposes the 4bytes mode is enabled and uses 4 bytes address. This
cause address issue.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Wed, 9 May 2018 05:52:20 +0000 (13:52 +0800)]
MLK-18243-14 spi: fspi: init unused LUT to 0
If not initialize unused LUT to 0, the value is random which might
cause qspi command failure.
On i.MX8QM/QXP, it works ok because ROM inittialize them to 0, but on
i.MX8MM, ROM not initialize them, so let's do it here.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
c4bd49c7b249073415f052fb28cd5a4ad374a318)
(cherry picked from commit
bce752cfe43b3378dbd84b64d46f1d1818e0300f)
Peng Fan [Wed, 9 May 2018 05:48:59 +0000 (13:48 +0800)]
MLK-18243-12 arm: imx8m: add cpu revision for i.MX8MM
Add cpu revision for i.MX8MM
Add helper function
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
5fdfc7d73157a5eb9254b43f65edd1bb5f13fd16)
(cherry picked from commit
e33f0d97423c29e130ddecbd8d7567ca8bf1826d)
Ye Li [Wed, 9 May 2018 05:37:22 +0000 (13:37 +0800)]
MLK-18243-11 arm: imx8m: get cpu chip id for i.MX8MM
Using the cpu chip id in DIGPROG registers 0x824110
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
330051b4fbcdda201b67a94e72345ec47bd85a96)
(cherry picked from commit
dcc51cc1fe69b0dcdc6a6e4f76743f927fe49b47)
Peng Fan [Wed, 9 May 2018 07:50:07 +0000 (15:50 +0800)]
MLK-18243-10 arm: imx8m: soc: enable SCTR clock before timer init
To i.MX8MM SCTR clock is disabled by ROM, so before timer init
need to enable it.
To i.MX8MQ, it does not hurt the clock is enabled again.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
2347541e9e79f833716fe88f7de860b5704b5e48)
(cherry picked from commit
f5cfd600cfa58d4a768e94c29aaa890fd39a2d63)
Ye Li [Thu, 1 Nov 2018 01:37:45 +0000 (18:37 -0700)]
MLK-20051-2 imx8mq_arm2: Split DDR to two banks for iMX8MQ DDR4 ARM2
Because the iMX8MQ DDR4 ARM2 has 4GB DDR. To fit new MMU settings, we split
it to two banks. The first bank has 3GB DDR, reach to 4GB memory map.
The second bank has 1GB DDR, is beyond 4GB memory map.
Notice: there is no OPTEE for ARM2 board. The trust zone setting in OPTEE
for iMX8MQ EVK is not match with DDR size on ARM2 board. So ARM2 Only can
work without OPTEE.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 18 Apr 2019 06:00:01 +0000 (23:00 -0700)]
MLK-20051-1 imx8m: Fix MMU table issue for OPTEE memory
When running with OPTEE, the MMU table in u-boot does not remove the OPTEE
memory from its settings. So ARM speculative prefetch in u-boot may access
that OPTEE memory. Due to trust zone is enabled by OPTEE and that memory
is set to secure access, then the speculative prefetch will fail and cause
various memory issue in u-boot.
The fail address register and int_status register in trustzone has logged
that speculative access from u-boot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 9 May 2018 03:21:46 +0000 (11:21 +0800)]
MLK-18243-5 arm: mach-imx: iomux: add i.MX8MM PE property
i.MX8MM has a PE property, it does not have LVTTL
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
96169c1f2de1ac90a244166ab5bb6c874cdfd6bd)
(cherry picked from commit
6ccb18feb68644292ed0df02588e775ffa942872)
Peng Fan [Wed, 9 May 2018 03:16:50 +0000 (11:16 +0800)]
MLK-18243-4 arm: imx8m: add pin header for i.MX8MM
Add pin header file for i.MX8MM
To IMX8MM_PAD_NAND_WE_B_USDHC3_CLK, IOMUX_CONFIG_SION needs to be
selected.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
e5d3d27f79df1c3a2b8261929e666e6bfdb69abc)
(cherry picked from commit
1127c7f41b967cffd041905254adb426bde0c48a)
Ye Li [Mon, 22 Apr 2019 08:32:21 +0000 (01:32 -0700)]
MLK-21845-3 imx8m: Append HDMI Firmware only for imx8mq
Since only i.MX8MQ needs HDMI firmware packing into boot image. Change
the imximage.cfg with CONFIG_IMX8MQ used.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 18 Apr 2019 05:46:02 +0000 (22:46 -0700)]
MLK-21845-2 imx8mm: add clk support for i.MX8MM
Introduce clk implementation for i.MX8MM, including pll configuration,
pll decoding, ccm configuration.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 18 Apr 2019 03:37:43 +0000 (20:37 -0700)]
MLK-21845-1 imx8mq: restructure clock
i.MX8MQ and i.MX8MM use different analog pll design, but they
share same ccm design. Add clock_imx8mq.h for i.MX8MQ and
keep common part in clock.h
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 18 Apr 2019 02:33:15 +0000 (19:33 -0700)]
MLK-18243-2 arm: imx8m: add regs definition for i.MX8MM
Move the original imx-regs.h to imx-regs-imx8mq.h
Introduce a new file dedicated for i.MX8MM
Use CONFIG_IMX8MQ/M to choose the header in imx-regs.h
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Wed, 9 May 2018 02:55:02 +0000 (10:55 +0800)]
MLK-18243-1 arm: Kconfig: Add i.MX8MM Kconfig entry
i.MX8MM is one variant of i.MX8M, so add IMX8MM entry and
change the previous i.MX8MQ boards to select IMX8MQ.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f20e63c5e16fe84ece2686c7c16e2ba2f2862378)
(cherry picked from commit
b4cd0b4267ec25d6d929df9f278cc248e6ecb133)
Ye Li [Wed, 23 May 2018 05:43:00 +0000 (22:43 -0700)]
MLK-18387 pmic: Add pmic driver for
BD71837
The iMX8MM EVK board uses BD71837MWV pmic. Add its driver to u-boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e9a3bec2e95a4b2b4641223c8ee4ebd8da76d7f9)
Ye Li [Wed, 23 May 2018 02:00:19 +0000 (19:00 -0700)]
MLK-18384 imx8mq: Add mfgtool boot check
Need to define the is_boot_from_usb, so that u-boot can check whether
it is booted for mfgtool.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
f3d2fba8183ac9b9274348f9bbe4c85da266984d)
Aymen Sghaier [Thu, 3 May 2018 12:19:57 +0000 (14:19 +0200)]
MLK-18044-5: crypto: caam: Add secure memory vid 3 support
In i.MX8M platforms the secure memory block has a newer version
than those used in i.MX6/7 platforms, this patch update the driver
to use the correct registers offsets.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit
0daa9c142a1809b473d101f6db9700574ce3d522)
(cherry picked from commit
7184ec3307c4347a7a7765ba72415580cd65c341)
Aymen Sghaier [Thu, 3 May 2018 10:17:53 +0000 (12:17 +0200)]
MLK-18044-4: crypto: caam: Fix pointer size to 32bit for i.MX8M
The CAAM block used in i.MX8M is 32 bits address size but when the flag
PHYS_64BIT is enabled for armv8, the CAAM driver will try to use a
wrong pointer size.
This patch fixes this issue.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit
9e1ef25c121240cf3f6a142058e617dd7df0030b)
(cherry picked from commit
1733916155ca319be754c45861130df327d8a57d)
Aymen Sghaier [Wed, 2 May 2018 08:34:27 +0000 (10:34 +0200)]
MLK-18044-3: crypto: Add blob command support for i.MX8M platforms
This patch enable blob command for mScale platforms.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit
895669394f6aae633abf6ea3f327d6093562edde)
(cherry picked from commit
bac8ed98778c93ef43ce9093efa3b9999d650576)
Aymen Sghaier [Tue, 1 May 2018 16:42:21 +0000 (18:42 +0200)]
MLK-18044-2: crypto: caam: Fix build warnings pointer casting
Enabling CAAM driver for i.MX8M platforms, a 64 bits architecture,
lead to casting warnings: from/to pointer to/from integer with
different size. This patch fix these warnings
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit
d02fbc7d2957f4788ced017ccf17fd35ab968121)
(cherry picked from commit
79e90af14af32e86fd7efd3c84e09a0bd572ab5b)
Aymen Sghaier [Tue, 1 May 2018 09:37:22 +0000 (11:37 +0200)]
MLK-18044-1: crypto: caam: Add CAAM support to i.MX8M platforms
This patch enable CAAM support for i.MX8M platforms.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit
1fc92e6e34b06bdee81240ce06326aca1d9c02d8)
(cherry picked from commit
b0f889b77b367b69aa0778b1d03a2ec30fdee243)
Franck LENORMAND [Wed, 2 May 2018 10:01:56 +0000 (12:01 +0200)]
MLK-18043 4/4: imx7ulp: Enable support for cmd blob
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit
03cb71cd22ff6ab1e2005a4bcb183c65f49b6e4e)
(cherry picked from commit
5d797db35da7fa3f7971df8811b6a1e800786ced)
Franck LENORMAND [Wed, 2 May 2018 10:16:36 +0000 (12:16 +0200)]
MLK-18043 2/4: caam: enable support for iMX7ULP
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit
5f429339ab5a5f0d1f00a2880ce05cf479f11ba5)
(cherry picked from commit
c26db25a130ef1f0abd43a3133877f74431eb217)
Franck LENORMAND [Wed, 2 May 2018 10:16:25 +0000 (12:16 +0200)]
MLK-18043 1/4: caam: change JR running loop
Signed-off-by: Franck LENORMAND <franck.lenormand@nxp.com>
(cherry picked from commit
6503c1ed0264fc61945c2b3b5948b793f104fc32)
(cherry picked from commit
d1d10af5a15473377fefbca56c1dac293fb06f3b)
Leonard Crestez [Fri, 27 Apr 2018 11:49:01 +0000 (14:49 +0300)]
MLK-18172-2: imx8: Introduce xenlinux_addr for dom0 kernel
Avoid overloading variable meaning and overlap with hdp_addr.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
(cherry picked from commit
9e4b3e80b4b2f40bb35a2c8f1b5ede9868788a34)
(cherry picked from commit
7dea0df52f0100f2b363b79d793f271fac5b6fab)
Leonard Crestez [Thu, 26 Apr 2018 19:17:45 +0000 (22:17 +0300)]
MLK-18172-1: imx8qm_mek: Load hdmi fw before dom0 kernel for xenboot
Xen boot writes ${filesize} to /chosen/module but if HDMI fw is present
then the size of hdmitxfw.bin is written instead of the size of dom0
kernel.
Signed-off-by: Leonard Crestez <leonard.crestez@nxp.com>
(cherry picked from commit
8823d52896aedf740899c59db3da73f8478c40ed)
(cherry picked from commit
0efebadd915a999030c2462be9c714db3ae51895)
guoyin.chen [Sun, 22 Apr 2018 10:41:20 +0000 (18:41 +0800)]
MA-11789 Flash system.img failed due to erasing timeout
Flash system partition with fastboot will earse the partition firstly
The 1.2s timeout will fail on some SD Card.
Enlarge it to 5s to make it works for most of sdcard
Change-Id: I285df411c7a07025251fd19f4c8e8b549bee2421
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
(cherry picked from commit
642d77fb6d6412095faa6584eeef7bb0132cae57)
(cherry picked from commit
49ae851ccd00a027d122338d7b39402135041ad8)
Ye Li [Wed, 25 Apr 2018 09:45:32 +0000 (02:45 -0700)]
MLK-18129-2 imx8qxp: Add secure boot environment
Add the secure boot relevant environment variables to ARM2 and MEK.
When CONFIG_AHAB_BOOT is enabled, we will switch to boot in this
new way:
1. Load the OS container to address 0x98000000
2. Using auth_cntr to authenticate the OS container. It will load the
kernel and FDT to destination address.
3. Using booti to boot kernel.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
545c8fe112244f20377e97921389c86eacc8551f)
(cherry picked from commit
cba5acebbe6be0736f229ef719b1a1e5835e1a5f)
Ye Li [Wed, 25 Apr 2018 09:33:58 +0000 (02:33 -0700)]
MLK-18129-1 imx8: ahab: Add secure boot support
Add function and new command "auth_cntr" for secure boot support.
When booting with life cycle set to OEM closed, we need to use
this function to authenticate the OS container and load kernel & FDT
from OS container to their destination.
Users can set CONFIG_AHAB_BOOT=y to enable the feature. It is not
set at default.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
3b0496c267a4c09ff5b790ccf8e4f658af460c6c)
(cherry picked from commit
1c83e14fb8e8ceec99f2c42ee1442596d8ffe517)
Leonard Crestez [Wed, 29 Nov 2017 12:56:54 +0000 (14:56 +0200)]
MLK-18168 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>
(cherry picked from commit
4c671ef548e2b7f352be184215306766ebc1cc45)
(cherry picked from commit
d705425c698a71fb070a04b327248bac00681111)
Peng Fan [Wed, 11 Apr 2018 07:53:18 +0000 (15:53 +0800)]
MLK-17998 configs: imx8qxp_mek: add xenmmcboot and xennetboot
Add xenmmcboot and xennetboot command.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
13f791db9a2bd0fe442115e77c91e8a56a4cf217)
(cherry picked from commit
f71b5a989d0292e17f8a5ad526ea8faa3d28ea60)
Peng Fan [Tue, 20 Mar 2018 03:17:53 +0000 (11:17 +0800)]
MLK-17842 imx8: introduce partition cmd
Add partition API cmd support.
And parse dtb support, see
arch/arm64/boot/dts/freescale/fsl-imx8qm-mek-dom0.dts for example.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f61119240922ad13fd573f16c02361d7228fbd67)
(cherry picked from commit
ef488a85953398838c5242aed66c917547f7f918)
Ye Li [Wed, 17 Apr 2019 09:26:12 +0000 (02:26 -0700)]
MLK-21831-5 sci_api: Update SCFW API for partition
Add relevants SCFW APIs used in imx8 partition implementation
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 17 Apr 2019 08:53:36 +0000 (01:53 -0700)]
MLK-21831-4 sci_api: Update SCFW API for ahab
Add relevants SCFW APIs used in AHAB implementation
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Tue, 13 Mar 2018 01:46:39 +0000 (09:46 +0800)]
MLK-17786: imx8qm: add xen boot script
Add XEN boot script to ease booting.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
2fd813fcfcb82f28f353fbdc727765d6e848bfd7)
(cherry picked from commit
28caf1e050765a040b1290c210b40563b30cca3c)
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>
(cherry picked from commit
d5f756f0de780d6e8db2f43f8388083f9454dcac)
(cherry picked from commit
9c9f854b7a5952f66423145ea18c77a9dfb0a99c)
Breno Lima [Fri, 23 Mar 2018 20:25:15 +0000 (17:25 -0300)]
MLK-17919: imx: Avoid hardcoded Job Ring Max size
Prior instantiating RNG we have to ensure if the CAAM job rings are
available. Avoid hardcoded job ring max size and use the definition at
fsl_sec.h
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b81379d3d2228760cc061a56c3c610b4e9fa9783)
(cherry picked from commit
f2e2f48f64264f06ed0a20e23903852e0a0fd8f9)
Breno Lima [Fri, 23 Mar 2018 20:21:38 +0000 (17:21 -0300)]
MLK-17918: imx: Ensure CAAM clock is enabled prior getting out_jr_size
Prior calling sec_in32() we have to ensure CAAM clock is enabled, the
function sec_in32() is reading CAAM registers and if CAAM clock is disabled
the system will hang.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c4da7540e7548f36c6ad90292db7057b828a7956)
(cherry picked from commit
e7832c25579cedafe53b1973550664f654d38894)
Breno Lima [Fri, 23 Mar 2018 20:17:04 +0000 (17:17 -0300)]
MLK-17917: imx: Avoid hardcoded output ring size register offset (ORSR)
The CAAM output ring size register offset is currently defined in fsl_sec.h
as FSL_CAAM_ORSR_JRa_OFFSET, use this definition to avoid hardcoded value in
i.MX common code.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
9d381708210270a1cf9bf25924c8932c436967e8)
(cherry picked from commit
42db685ace092bedc569cd2c846b51b393630759)
Breno Lima [Fri, 23 Mar 2018 20:05:47 +0000 (17:05 -0300)]
MLK-17915: cmd: blob: Instantiate RNG before running CMD_BLOB
U-Boot can instantiate CAAM RNG if needed by crypto operations.
Call sec_init() prior running a blob operation to ensure
RNG is correctly instantiated.
Make sure CAAM clock is enabled and check if a job ring is
available for that operation.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b2b745515d06f05ea288524e26cf2389d6924ff2)
(cherry picked from commit
fe33f7296336b7364fb24ad21b0be32eb5810262)
Breno Lima [Fri, 23 Mar 2018 19:25:33 +0000 (16:25 -0300)]
MLK-17914: cmd: blob: Add SECURE_BOOT and CAAM supported SoCs as dependency
In order to build CMD_BLOB on i.MX CAAM supported devices it's
necessary to select SECURE_BOOT. Add SECURE_BOOT and CAAM supported
SoCs as dependency.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
4afb519038d190687cac6d410e9ad65d0655f1c0)
(cherry picked from commit
acda6159eefbefaee15b19568fd1c4665c047432)
Breno Lima [Tue, 14 Nov 2017 22:10:45 +0000 (20:10 -0200)]
MLK-18169 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>
(cherry picked from commit
db2dbf622d3c711b2fbd85e6814992e023479dad)
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>
(cherry picked from commit
4341d35cc99a6226f2671e15154d3148ebf49c47)
Oliver Brown [Mon, 29 Jan 2018 20:25:58 +0000 (14:25 -0600)]
MLK-17404-7 config: Adding support for i.MX8M HDMI splash
Adding support for i.MX8M HDMI splash screen
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
d8aac64be7d83847cff8a2235e1be677964a1a9d)
(cherry picked from commit
a84dedb3516d14f947dccf6a5e177b00d0509017)
Oliver Brown [Mon, 29 Jan 2018 20:23:56 +0000 (14:23 -0600)]
MLK-17404-6 video: Adding i.MX8 HDMI support to configuration
Adding i.MX8 HDMI support to build configuration.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
2edbbe51df0817876b943760a272640e3c9bff70)
(cherry picked from commit
0857e58bc7eaea5da6cdde14cdd8f72293a83273)
Ye Li [Fri, 20 Apr 2018 06:37:28 +0000 (23:37 -0700)]
MLK-17404-5 board: freescale: Adding support for i.MX8MQ EVK display
Adding basic display support for splash screen.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
31058332c273d181390560ae2b88209b628f5842)
(cherry picked from commit
367e8bdaf391dc83455ef2e7e28d6dbf00dbbe2c)
Ye Li [Fri, 20 Apr 2018 06:28:13 +0000 (23:28 -0700)]
MLK-17404-4 arch: arm: Adding support for i.MX8M display
Adding Display support for splash screen.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
8733549494dfa18d9317d76a8fabad8b41e6dcf6)
(cherry picked from commit
18d86b0683b57da3b778cc15ee214bd92ee35ac2)
Oliver Brown [Mon, 29 Jan 2018 20:11:06 +0000 (14:11 -0600)]
MLK-17404-3 arch: arm: Adding support for i.MX8M HDMI
Adding basic HDMI support for i.MX8M for splash screen.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
390a15a523c5aefb99008a5f67d6c8f9ec7ef63c)
(cherry picked from commit
d0569911819015931bc26686aa854a62e04fc530)
Oliver Brown [Mon, 29 Jan 2018 20:08:44 +0000 (14:08 -0600)]
MLK-17404-2 include: Adding header for i.MX8 HDMI support
Adding header file for i.MX8 HDMI support
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
42f1298bdeac2e37d30ce4c1265696b3c46fb107)
(cherry picked from commit
80a5d47915da7bcb87fa40b80051d687a0f756b4)
Oliver Brown [Mon, 29 Jan 2018 20:05:05 +0000 (14:05 -0600)]
MLK-17404-1 video: imx: hdp: Adding support for HDMI splash screen
Adding HDMI support for splash screen.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
a95018c0d3b0ac8f0893b9408ae598324de4a530)
(cherry picked from commit
485bccc47619fdaf967f893dd672ccc9d375a8af)
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>
(cherry picked from commit
432e5b4347841095c3b5a8a0d106f35deadd006e)
(cherry picked from commit
cb78a32fa8eb8c37932be003ebe4fa1f8c46c1d5)
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>
(cherry picked from commit
d4702582552aa1921fce58329ae40c24481fba3a)
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>
(cherry picked from commit
94c9c7022c5b6cffb74bb2e34336cffc2790d0d8)
Ye Li [Wed, 17 Apr 2019 06:05:05 +0000 (23:05 -0700)]
MLK-18161-19 imx8qxp_arm2: Enable HS400 Enhanced mode and SDR104 for ARM2 board
There is eMMC5.1 chip on imx8qxp ARM2 board, enable the HS400 Enhanced
mode(ES) support and SD3.0 SDR104 support.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 18 Apr 2018 10:34:31 +0000 (03:34 -0700)]
MLK-16034-03: support NAND on i.MX8QXP ARM2 board
NAND module is pin conflict with SD/eMMC on i.MX8QXP ARM2 board,
add new config to disable SD/eMMC when booting from NAND.
Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
0a498b1f591fb00a0187650446e0de81dd3453ad)
Ye Li [Wed, 17 Apr 2019 02:59:56 +0000 (19:59 -0700)]
MLK-21844-2 MXS_NAND: Add clock support for iMX8
Since iMX8 has enabled clock uclass, we can parse the clocks from DTB
and enable them in GPMI driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 17 Apr 2019 02:56:12 +0000 (19:56 -0700)]
MLK-21844-1 DTS: fsl-imx8dx: Add APBH-DMA clock to GPMI node
Since the apbh-dma driver does not support DM, we add its clock to
GPMI node. So when GPMI is probed, its driver can help to enable
the clock.
Signed-off-by: Ye Li <ye.li@nxp.com>
Han Xu [Wed, 19 Jul 2017 16:43:08 +0000 (11:43 -0500)]
MLK-16034-02: enable GPMI NAND driver for i.MX8
enable the GPMI NAND driver for i.MX8, the major changes
- register defination for i.mx8
- Makefile change for misc.c
- DMA structure must be 32bit address
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
474c4270108551647c7064a23abdc2e11d7f37ab)
(cherry picked from commit
029cce25cce94c30dd0305bb9b17ba7f939ee1af)
Han Xu [Wed, 19 Jul 2017 16:40:59 +0000 (11:40 -0500)]
MLK-16034-01: change the maximum oob size
change the maximum oob size to 1872 for the MT29F128G08CBCCB raw NAND
chip on i.MX8QXP
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
58dee6ac965000f93693c36c93fb3d453293c43f)
(cherry picked from commit
d297f33f4719502aa415dc7c7002c437a6af6c28)
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>
(cherry picked from commit
ab1895fb5e38d216ff86de292a44776099d159ab)
(cherry picked from commit
de084efbc91de971f10c745bbc94f960cdb813a9)
Ye Li [Tue, 16 Apr 2019 09:47:18 +0000 (02:47 -0700)]
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>
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>
(cherry picked from commit
3c3a9e90faa2c3bbb1bcd9adac5915cfd6f2f204)
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>
(cherry picked from commit
6cb839cabb42b81e37214e00448fc5dac89fd1f1)
(cherry picked from commit
468509f86a2d040398aa6b019bb6644bfb0ef11c)
Peng Fan [Sat, 7 May 2016 08:58:24 +0000 (16:58 +0800)]
MLK-12693-2 nand: mxs: correct bitflip for erased NAND page
This patch is a porting of
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=
e4dacc44d22e9474ec456cb330df525cd805ea38
"
i.MX6QP and i.MX7D BCH module integrated a new feature to detect the
bitflip number for erased NAND page. So for these two platform, set the
erase threshold to gf/2 and if bitflip detected, GPMI driver will
correct the data to all 0xFF.
Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q
with the one for i.MX6QP.
"
In this patch, i.MX6UL is added and threshold changed to use ecc_strength.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
489929be0221bb7d4c46bb5bc6083650b78f73e0)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
37d7f9614aa357f270312d7ceaab0f7006dc5aea)
(cherry picked from commit
5f50a850dd42d28b6105ee7e1b4b1822e7ba569b)
Peng Fan [Fri, 6 May 2016 04:13:38 +0000 (12:13 +0800)]
MLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error
This patch is porting from linux:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=
3d42fcece496224fde59f9343763fb2dfc5b0768
"
We may meet the bitflips in reading an erased page(contains all 0xFF),
this may causes the UBIFS corrupt, please see the log from Elie:
-----------------------------------------------------------------
[ 3.831323] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[ 3.845026] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[ 3.858710] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[ 3.872408] UBI error: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read 16384 bytes
...
[ 4.011529] UBIFS error (pid 36): ubifs_recover_leb: corrupt empty space LEB 27:237568, corruption starts at 9815
[ 4.021897] UBIFS error (pid 36): ubifs_scanned_corruption: corruption at LEB 27:247383
[ 4.030000] UBIFS error (pid 36): ubifs_scanned_corruption: first 6569 bytes from LEB 27:247383
-----------------------------------------------------------------
This patch does a check for the uncorrectable failure in the following steps:
[0] set the threshold.
The threshold is set based on the truth:
"A single 0 bit will lead to gf_len(13 or 14) bits 0 after the BCH
do the ECC."
For the sake of safe, we will set the threshold with half the gf_len, and
do not make it bigger the ECC strength.
[1] count the bitflips of the current ECC chunk, assume it is N.
[2] if the (N <= threshold) is true, we continue to read out the page with
ECC disabled. and we count the bitflips again, assume it is N2.
(We read out the whole page, not just a chunk, this makes the check
more strictly, and make the code more simple.)
[3] if the (N2 <= threshold) is true again, we can regard this is a erased
page. This is because a real erased page is full of 0xFF(maybe also has
several bitflips), while a page contains the 0xFF data will definitely
has many bitflips in the ECC parity areas.
[4] if the [3] fails, we can regard this is a page filled with the '0xFF'
data.
"
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
ceb324a2914487aa517a6c70a06a20b5e3438fda)
(cherry picked from commit
026751697e41c7376414a8716cf0ea4bf998b85f)
(cherry picked from commit
93b481f07b8cb59c733f420bebea77ac484f9036)
Ye Li [Tue, 16 Apr 2019 04:06:04 +0000 (21:06 -0700)]
MLK-12601: mtd: gpmi: provide the option to use legacy bch geometry
Provide an option in DT to use legacy bch geometry, which compatible
with the 3.10 kernel bch setting. To enable the feature, adding
"fsl,legacy-bch-geometry" under gpmi-nand node.
NOTICE: The feature must be enabled/disabled in both u-boot and kernel.
Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye.Li [Wed, 13 Jan 2016 02:06:59 +0000 (10:06 +0800)]
MLK-12214 NAND:apbh_dma: Fix logically dead code issue
The list_first_entry always assumes the list is not empty, it won't return NULL pointer when
the list is empty. So the "if (pdesc == NULL)" becomes a dead code. Fix the issue by calling
the list_empty before the list_first_entry.
(Coverity CID 29934)
Signed-off-by: Ye.Li <ye.li@nxp.com>
(cherry picked from commit
ff3923f294cc2e15f436d7520b4042736b1b48a6)
(cherry picked from commit
64c6a7b5d621080b8bd948c061a4f223a8c2d886)
(cherry picked from commit
b9846931a2196fa2bf29a9cb0304d11e96c2c40a)
Ye Li [Tue, 16 Apr 2019 03:50:53 +0000 (20:50 -0700)]
MLK-11719-4: mtd: gpmi: change the BCH layout setting for large oob NAND
The code change updated the NAND driver BCH ECC layout algorithm to
support large oob size NAND chips(oob > 1024 bytes) and proposed a new
way to set ECC layout.
Current implementation requires each chunk size larger than oob size so
the bad block marker (BBM) can be guaranteed located in data chunk. The
ECC layout always using the unbalanced layout(Ecc for both meta and
Data0 chunk), but for the NAND chips with oob larger than 1k, the driver
cannot support because BCH doesn’t support GF 15 for 2K chunk.
The change keeps the data chunk no larger than 1k and adjust the ECC
strength or ECC layout to locate the BBM in data chunk. General idea for
large oob NAND chips is
1.Try all ECC strength from the minimum value required by NAND spec to
the maximum one that works, any ECC makes the BBM locate in data chunk
can be chosen.
2.If none of them works, using separate ECC for meta, which will add one
extra ecc with the same ECC strength as other data chunks. This extra
ECC can guarantee BBM located in data chunk, of course, we need to check
if oob can afford it.
Previous code has two methods for ECC layout setting, the
legacy_calc_ecc_layout and calc_ecc_layout_by_info, the difference
between these two methods is, legacy_calc_ecc_layout set the chunk size
larger chan oob size and then set the maximum ECC strength that oob can
afford. While the calc_ecc_layout_by_info set chunk size and ECC
strength according to NAND spec. It has been proved that the first
method cannot provide safe ECC strength for some modern NAND chips, so
in current code,
1. Driver read NAND parameters first and then chose the proper ECC
layout setting method.
2. If the oob is large or NAND required data chunk larger than oob size,
chose calc_ecc_for_large_oob, otherwise use calc_ecc_layout_by_info
3. legacy_calc_ecc_layout only used for some NAND chips does not contains
necessary information. So this is only a backup plan, it is NOT
recommended to use these NAND chips.
Signed-off-by: Han Xu <b45815@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Breno Lima [Mon, 15 Oct 2018 17:11:26 +0000 (14:11 -0300)]
MLK-19945 mx6dq: hab: Fix chip version in hab.h code
Since commit
8891410c729b ("MLK-19848 mx6dq: Fix chip version issue for
rev1.3") it's not possible to call the HAB API functions on i.MX6DQ
SoC Rev 1.3:
Authenticate image from DDR location 0x12000000...
undefined instruction
pc : [<
412c00dc>] lr : [<
8ff560bc>]
reloc pc : [<
c8b6d0dc>] lr : [<
178030bc>]
sp :
8ef444a8 ip :
126e8068 fp :
8ff59aa8
r10:
8ffd51e4 r9 :
8ef50eb0 r8 :
006e8000
r7 :
00000000 r6 :
126ea01f r5 :
0000002b r4 :
126e8000
r3 :
412c00dd r2 :
00000001 r1 :
00000001 r0 :
00000063
Flags: nzCv IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
The hab.h code is defining the HAB API base address according to the
old SoC revision number, thus failing when calling the HAB API
authenticate_image() function.
Fix this issue by using mx6dq rev 1.3 instead of mx6dq rev 1.5.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
adc4d93e6e1726f111e86ca74fb76215215dbc86)
Breno Lima [Tue, 9 Oct 2018 02:25:20 +0000 (23:25 -0300)]
MLK-19876 imx: hab: Enable hab.c to authenticate additional images in open configuration
Currently it's not possible to authenticate additional boot images in HAB
open configuration.
The hab.c code is checking if the SEC_CONFIG[1] fuse is programmed prior
to calling the hab_authenticate_image() API function. Users cannot check
if their additional boot images has been correctly signed prior to closing
their device.
Enable hab.c to authenticate additional boot images in open mode so HAB
events can be retrieved through get_hab_status() function.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
15d3e93bd16b5375f4dbf525ce61f0912ece4c0b)
Ye Li [Mon, 20 Aug 2018 07:00:33 +0000 (00:00 -0700)]
MLK-19263-4 hab: Change calling to ROM API failsafe
Modify to use hab_rvt_failsafe function for failsafe ROM API, not
directly call its ROM address. This function will wrap the sip call for iMX8M
platforms.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
d6b9992db082920b55c08d33df1cb03942939e7f)
Utkarsh Gupta [Tue, 3 Apr 2018 00:41:16 +0000 (19:41 -0500)]
MLK-17935: imx: HAB: Validate IVT before authenticating image
Calling csf_is_valid() with an un-signed image may lead to data abort
as the CSF pointer could be pointing to a garbage address when accessed
in HAB_HDR_LEN(*(const struct hab_hdr *)(ulong)ivt_initial->csf).
Authenticate image from DDR location 0x80800000...
Check CSF for Write Data command before authenticating image
data abort
pc : [<
fff5494c>] lr : [<
fff54910>]
reloc pc : [<
8780294c>] lr : [<
87802910>]
sp :
fdf45dc8 ip :
00000214 fp :
00000000
r10:
fffb6170 r9 :
fdf4fec0 r8 :
00722020
r7 :
80f20000 r6 :
80800000 r5 :
80800000 r4 :
00720000
r3 :
17a5aca3 r2 :
00000000 r1 :
80f2201f r0 :
00000019
Flags: NzcV IRQs off FIQs off Mode SVC_32
Resetting CPU ...
resetting ...
To avoid such errors during authentication process, validate IVT structure
by calling validate_ivt function which checks the following values in an IVT:
IVT_HEADER = 0x4X2000D1
ENTRY != 0x0
RES1 = 0x0
DCD = 0x0 /* Recommended */
SELF != 0x0 /* Absoulute address of IVT */
CSF != 0x0
RES2 = 0x0
This commit also checks if Image's start address is 4 byte aligned.
commit "
0088d127 MLK-14945 HAB: Check if IVT valid before authenticating image"
removed as this patch addresses the issue.
Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
(cherry picked from commit
dabffd1b04df3b0393ef6a9a35b5fd816edd8c63)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b4bda0ae3c5c5be0524148c1bcdfea908da859d6)
Ye Li [Wed, 11 Apr 2018 14:09:06 +0000 (07:09 -0700)]
MLK-17585 imx8/imx8m: Disable TRUST_OF_CHAIN for secure boot
In the board common directory, the CONFIG_TRUST_OF_CHAIN is automatically
enabled once the CONFIG_SECURE_BOOT is set. Since we don't support this
trust chain on all i.MX8 platforms, modify the Kconfig to disable it.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
0eea75587e40d461cdddd215bc582526b1529bf6)
Ye Li [Wed, 11 Apr 2018 14:06:42 +0000 (07:06 -0700)]
MLK-18159-12 imx: cmd_dek: Enable DEK only for chips supporting CAAM
Since cmd_dek is using CAAM JR, so enable the CMD_DEK only when
HAS_CAAM is set
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
8a552c8d98df953c13a0144972b8c16ed7684e92)
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>
(cherry picked from commit
f29a143cdb8c74566113737e9be7e1bcd8c625f4)
(cherry picked from commit
1e33f493a55dad7e016f948b932000ec295c6df4)
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>
(cherry picked from commit
bca4e251b6083476e987d92c428136a1c81bcb0b)
(cherry picked from commit
e31a75cc78ad2d5e6ab5d58851058ab57de1566d)
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>
(cherry picked from commit
a0cba5678b10827bc4b5e4fb2e40945a5c332baa)
(cherry picked from commit
330a3108e3806fc2b9fa500f84ebfb4feb821c6d)
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.
4. Add SEC_CONFIG fuse for iMX8M
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
5f6ef97a9d13361895180df7014f4e4fb48a5875)
(cherry picked from commit
465407632f436cb55db1d261ee0adb7458220045)
Ye Li [Tue, 8 Mar 2016 14:03:47 +0000 (22:03 +0800)]
MLK-12500-1 HAB: Add kernel image authentication in image loading
To support the trust boot chain, we integrate the authentication
into the kernel image loading process. The kernel image will be verified
at its load address. So when signing the kernel image, we need to
use this load address which may change on different platforms.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
3c118b8d6bbe1a25ca8c8bafeb528309f16fc73d)
(cherry picked from commit
fd9a9759ed9b3a9fc26b18aff00880382213b1ca)
(cherry picked from commit
98d4faefdb83579d4a5a170e06af5efb64ad2b3c)
Ye Li [Wed, 11 Apr 2018 10:30:19 +0000 (03:30 -0700)]
MLK-18158 imx: hab: Add function to authenticate kernel image
When loading kernel image, the image size is parsed from header, so it
does not include the CSF and IVT.
Add back the authenticate_image function to wrap the imx_hab_authenticate_image
with calculating IVT offset and full image size.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
86bf433c3d6940ce71749e97a37efbff5ac7a79f)
Ye Li [Wed, 17 Apr 2019 05:29:30 +0000 (22:29 -0700)]
MLK-21842-4 imx8mq_evk: Add QSPI NOR support
Add QSPI NOR relavant configurations and QSPI clock init to board
codes
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 11 Apr 2018 03:37:16 +0000 (20:37 -0700)]
MLK-16238-3 imx8m_evk: enable TMU
Update defconfig to enable TMU for i.MX8M EVK board.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
339bc1a3a377d52c027ccdb146fe7f1cd0c28882)
Ye Li [Tue, 22 Aug 2017 01:43:55 +0000 (20:43 -0500)]
MLK-16238-2 imx: Update CPU info print to support TMU
Current cpu info common function in imx-common only supports imx-thermal, update
the codes to also support TMU.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
878a4ff40987742a30cf8990b2da98205fd6cff5)
(cherry picked from commit
be6ab22634214f36716c239413b9203ab1123376)
Ye Li [Mon, 21 Aug 2017 10:41:12 +0000 (05:41 -0500)]
MLK-16238-1 thermal: Add TMU driver for i.MX8M
Porting the TMU driver from kernel and supporting DM in the driver.
Users need to provide the TMU node and sensors nodes in DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f883de99b93de8c2fadd382d8cf961667bacd038)
(cherry picked from commit
8e09d0f0ab33d9a52098546b147d41c4c2598c0d)
Ye Li [Wed, 11 Apr 2018 02:20:32 +0000 (19:20 -0700)]
MLK-18159-11 imx8mq_evk: Add Typec USB port and USB host support
i.MX8MQ EVK has two USB ports, the port 0 is typec, the port 1 is host.
This patch enables both device and host mode (xhci) for typec port by setting tcpc
to relevant UFP/DFP mode. For port 1, it is only supports the host mode (xhci).
PD charge is enabled at default on typec port for the dead battery. In this case,
the typec port only works in device mode.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
27345e2b5e85c11b361dffda37172ad1f141d7ba)
Ye Li [Wed, 11 Apr 2018 07:50:16 +0000 (00:50 -0700)]
MLK-18159-10 xhci-imx8m: Add DM USB support
Since the CONFIG_BLK is defined by DM MMC, to support USB storage,
we have to use DM USB. Add the basic DM support for xhci-imx8m driver.
Also update DTSi to add USB alias seq.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
bff4001d090fabf76d0a9a2060c0dc1386b3cab8)
Li Jun [Mon, 24 Jul 2017 16:05:20 +0000 (00:05 +0800)]
MLK-16066-1 usb: host: add imx8m xhci host driver
imx8mq usb xhci is a dwc3 based controller, its synopsys PHY
can be controlled by usbmix glue layer. imx8mq has 2 USB3 instance,
this patch enables both two USB3 controllers.
Reviewed-by : Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit
cb77028d960277df2dc357a86e6851da74924c1a)
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
5a6326b0498115ca524537d5695ccd582d335157)
Ye Li [Wed, 11 Apr 2018 02:33:53 +0000 (19:33 -0700)]
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>
(cherry picked from commit
20e8f5ab5e18fa578283ad232e500a47e71fdd28)
Li Jun [Fri, 25 Aug 2017 17:49:51 +0000 (01:49 +0800)]
MLK-16273-1 usb: dwc3: add suspend clock setting interface
Some dwc3 based USB3 IP may have a wrong default suspend clk
setting, so add an interface to correct it by board setting.
Acked-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit
240b636718313e03db505a713e66e3f893cb7727)
(cherry picked from commit
ac64f460533f734ac5b2659f8e8ba9fbdd56e539)
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>
(cherry picked from commit
df89948806c38e38119767a67ef0e18f24ac886b)
(cherry picked from commit
3a17aa1659fbfe675b74ada60a481d93bb557cdc)
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>
(cherry picked from commit
e31f99c05c37ac35080e415cfd8c8e2a1c96f865)
(cherry picked from commit
6134c7ee3967fe303bdb2bb7e981ac698b909c5d)
Ye Li [Wed, 23 Aug 2017 09:40:58 +0000 (04:40 -0500)]
MLK-16246 imx8mq_evk: Update DTB to disable DCSS and HDMI for mfgtool
When booting for mfgtool, we need to disable DCSS and HDMI since the HDMI
firmware won't be loaded by mfgtool. Add the detect in u-boot and update the
DTB.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
1d01cec0296d56ba8436941864d8da81013e0732)
(cherry picked from commit
89512c1b28add9daf8001c51a44b9da826cbb9ad)
Ye Li [Wed, 17 Apr 2019 03:19:42 +0000 (20:19 -0700)]
MLK-21843 fsl_qspi: Fix QSPI driver to adapt spi-mem
After switched to spi-mem the data format passed by xfer is changed for
erase. The address of erase is moved to data phase in SPI_XFER_END.
Update the driver to fix the erase issue
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 12 Apr 2019 09:33:41 +0000 (02:33 -0700)]
MLK-21842-3 imx8mq_evk: Fix ENET GPR selection bit
Only the GPR0 bit[13] is used as GPR_ENET1_TX_CLK_SEL, bit[17] is reserved
on imx8mq. So we don't need to clear bit[17].
Add the definition of bit[13] in register file.
Also fix the size of gpr array, should be 48 not 47.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 16 Apr 2019 09:17:12 +0000 (02:17 -0700)]
MLK-21842-2 ddr: imx8m: Fix ddr4 driver build issue
Since the parameter of dram_pll_init is changed, update to use new.
Also remove non-existed header file.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 12 Apr 2019 09:05:36 +0000 (02:05 -0700)]
MLK-21842-1 DTS: imx8mq: Update DTS files for imx8mq and imx8mq EVK
Update thermal node properties, i2c pinmux, usdhc pinmux,
uart nodes, qspi node, gpmi/apbh-dma nodes and alias.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 16 Apr 2018 06:47:44 +0000 (23:47 -0700)]
MLK-18159-6 imx8m: add IMX_BOOTAUX kconfig for imx8m
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c8c5c3469f6ffa4789ae9e10c4a97c232657493c)
Ye Li [Mon, 16 Apr 2018 03:13:22 +0000 (20:13 -0700)]
MLK-18159-5 imx8m: Enable wdog reset for i.MX8MQ
We will use watch dog to reset system for i.MX8MQ not through the PSCI.
Build watchdog driver for imx8mq.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e953113b7f253849d1d43385748287cdfd8eaa63)
Ye Li [Wed, 11 Apr 2018 07:53:11 +0000 (00:53 -0700)]
MLK-18159-3 imx: spl: Add eMMC boot support
When boot from eMMC, SPL needs to switch to boot partition for
image loading, have to ensure MMCSD_MODE_EMMCBOOT is used for eMMC port.
So we have to know whether it is boot from eMMC or SD and select corresponding
spl boot mode.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
751e49b3e6baee2b3c7793143853b9da8d78b5a9)