Ye Li [Tue, 19 Feb 2019 08:13:41 +0000 (00:13 -0800)]
MLK-20945-6 spl: Fix DM_SPI_FLASH build error in SPL
SPL should not use DM_SPI_FLASH, this is already cleaned in
Makefile.uncmd_spl, but not in config_uncmd_spl.h
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
cf8468482ec3cceb05700a326df044dc41f38793)
Ye Li [Tue, 19 Feb 2019 08:07:33 +0000 (00:07 -0800)]
MLK-20945-5 imx8: Select boot device dynamically
For fspi build, we will enable both SPL NOR support and SPL SPI
support. SPL will dynamically check the resource owner then
select corresponding boot device.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
675cc6031033fbe5e7d8cfe01ebe1dedfd6c1b96)
Ye Li [Tue, 19 Feb 2019 08:03:04 +0000 (00:03 -0800)]
MLK-20945-4 imx8: Update container parser for RAW NOR SPL
Since FSPI is assigned to M4 partition, A core only can read it from its
memory-map address. So we have to enable SPL NOR which won't access
flexspi driver.
Update SPL container parser for the RAW NOR support.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
7ea7a16fd892558098fb8cbea134ac275d1220d3)
Ye Li [Tue, 19 Feb 2019 07:51:46 +0000 (23:51 -0800)]
MLK-20945-3 imx_virt_i2c: Add DM_FLAG_IGNORE_POWER_ON flag
When we probe device with virtual i2c driver, it will definitely
fail to power up the PD. Becasue the resource is owned by M4. So
set this driver to ignore the power up result
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
7f753d1b5950015b11be58aa937e5c14b9f26d7a)
Ye Li [Tue, 19 Feb 2019 07:48:02 +0000 (23:48 -0800)]
MLK-20945-2 dm: device: Check the power up result in probe
If a device has relevant power domain, we will check the power up
result in probing the device. If the power up is failed, the device_probe
will return failure immediately.
The only exception is the new FLAG (DM_FLAG_IGNORE_POWER_ON) is set by driver
to indicate ignore the power up result.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
8524ca764d8fbd05da1593abfed62bb075c50cd4)
Ye Li [Tue, 19 Feb 2019 07:34:52 +0000 (23:34 -0800)]
MLK-20945-1 imx8-power-domain: Check owned resource in power on
When fspi is assigned to M4, we have to let the fspi probe failed when
its power domain is failed to power up. Because not all devices have power
domain (for example, external devices on the board). Current checking
resource owner in power domain probe is not good, change to check it in
power on.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b62b82ad595a744f07306db4b88d644ae024872a)
Ye Li [Mon, 18 Feb 2019 02:26:03 +0000 (18:26 -0800)]
MLK-20939 imx_virt_i2c: Add a STOP flag for last message
Add a new private flag I2C_M_SRTM_STOP(0x0200) to indicate if STOP
is needed for current message.
When reading/writing registers for slave devices, generally we have two messages,
the first message writes the register address, second message reads/writes the value.
Only the last message needs STOP. But previously M4 sends STOP for each message,
this causes some slave devices treat it as end of transfer. Then, second message won't
have any effect. To solve the problem, we introduce this private STOP flag, so M4 can
STOP according to the flag.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
e8f70409620da897917dfa29dbe65be82c9129fd)
Oliver Brown [Fri, 15 Feb 2019 16:13:27 +0000 (10:13 -0600)]
MLK-17405 iMX8QM: Change HDMI TX clocks.
The HDMI digital PLL, bus clock and core clock need to change to match the
settings used by the Linux driver. This allows the SECO to start and
initialize the HDMI/DP firmware.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
d2713d11afc35bc2ce546f9bd065cc7477ee65cc)
Oliver Brown [Thu, 14 Feb 2019 14:13:34 +0000 (08:13 -0600)]
MLK-17405 iMX8QM: Add athentication for HDMI/DP firmware
Add firmware athentication to the hdp and hdprx load functions.
If hdp_authenticate_fw is set to yes, the hdp tx firmware is athenticated.
If hdprx_authenticate_fw is set to yes, the hdp rx firmware is athenticated.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
(cherry picked from commit
6c0246888012c50127b40f1ab6fa6d581f725f7a)
Ye Li [Thu, 31 Jan 2019 06:44:50 +0000 (22:44 -0800)]
MLK-20886-12: imx8qxp_mek: Enable i2c and i2c mux virtual drivers
Update the defconfig files for imx8qxp MEK to enable i2c and
i2c mux virtual drivers.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f2d75f7925108d4cc89c8cd4f1d9f735803c8ad1)
Ye Li [Sun, 28 Apr 2019 11:12:34 +0000 (04:12 -0700)]
MLK-21850-2 imx_virt_i2c: Add DM_FLAG_IGNORE_DEFAULT_CLKS flag
When we probe device with virtual i2c driver, assigning default clock
will definitely return false, becasue the resource is owned by M4. So
set this driver to ignore the default clocks
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Sun, 28 Apr 2019 11:08:43 +0000 (04:08 -0700)]
MLK-21850-1 dm: device: Check driver flag before setting default clocks
Add a new driver FLAG (DM_FLAG_IGNORE_DEFAULT_CLKS). If any driver
is set with this flag, then when probing the device, we will skip
setting the default clocks.
This is useful when clock driver can't work with some device driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 31 Jan 2019 06:34:48 +0000 (22:34 -0800)]
MLK-20886-9 pinctrl-scu: Check the pad partition before set pinmux
If a pad is not owned by current partition we should not set its
pinmux.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
547636514f8ae8b456f2351bc84cb7fb7b5fa3f3)
Ye Li [Thu, 31 Jan 2019 06:32:53 +0000 (22:32 -0800)]
MLK-20886-8 DTS: imx8qxp_mek: Update for virtual i2c and i2c mux driver
Add compatible strings and properties to i2c1 node for using virtual
i2c and i2c mux drivers
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
9dbdbec24b2d0cd67d16cf93034b3ab60bb312bc)
Ye Li [Thu, 31 Jan 2019 06:31:02 +0000 (22:31 -0800)]
MLK-20886-7 DTS: imx8qm/qxp: Add MU8 and MU9 nodes
We use MU8 and MU9 to communicate with M4_0 and M4_1 in u-boot. Add
relevant nodes for the MU driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b06674a91991fe3bfe5a2f6000195cb8546c72a6)
Ye Li [Thu, 31 Jan 2019 06:24:15 +0000 (22:24 -0800)]
MLK-20886-6 imx8qm/qxp: Implement runtime i2c driver binding
When a i2c device is binding with drivers, we check whether current
partition ownes the resource. If not owned, the binding to local lpi2c
driver will fail, otherwise binding to virtual i2c driver will fail.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
81dd157fd0ba476c994e95a63515cb65164f1e87)
Ye Li [Thu, 31 Jan 2019 06:09:23 +0000 (22:09 -0800)]
MLK-20886-5 imx8qm/qxp: Implement VService function and buffer pagetable
Override the board_imx_vservice_find_mu for finding MU device for
virtual devices. The matching logic is if the M4_0 partition ownes
the resource of the device, we select MU8 for this Vservice channel.
Otherwise, if the M4_1 partition ownes the resource, we select MU9.
We reuse the kernel RPMSG Vring buffer for VService buffer, because it is
shared between OS partition and M4 partition. The pagetable is needed for
this region, since it is not in memregs of OS partition.
board_imx_vservice_get_buffer is also overriden is this patch to divide
VService buffer for MU8 and MU9.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
4358b4cdfc4752822066d480dd1c10086c211be7)
Ye Li [Thu, 31 Jan 2019 06:05:43 +0000 (22:05 -0800)]
MLK-20886-4 lpi2c: Provide override binding function
We provide override binding function, so the ARCH level can use it
to determine if it is ok to bind with lpi2c driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b19418270a3d532eacb1069606fa2ab100e04601)
Ye Li [Thu, 31 Jan 2019 05:50:31 +0000 (21:50 -0800)]
MLK-20886-3 i2c: Add virtual i2c and virtual i2c mux drivers
Add virtual i2c driver which replies on the VService to send SRTM i2c
messages with M4.
For each output on i2c mux, M4 side abstracts a i2c bus with special bus
id. The virtual i2c mux follows basic mux design, but uses dedicated flag
to pass the abstract bus id for the mux output to virtual i2c driver.
Virtual i2c and virtual i2c mux will bind nodes with compatible string
"fsl,imx-virt-i2c" and "fsl,imx-virt-i2c-mux".
To support binding local i2c driver or virtual i2c driver at runtime. We
provides a override function for the driver bind. ARCH level is responsible
to implement it.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
25095e9f0d9816c22da97945b66439dfa277aa2b)
Ye Li [Thu, 31 Jan 2019 05:31:27 +0000 (21:31 -0800)]
MLK-20886-2 imx: Add Virtual service glue layer
We use a glue layer to link the low level MU driver and virtual drivers.
This glue layer is named to virtual service (iMX VService). Virtual service
provides unified interfaces for setup connection with M4, get message buffer
and send/receive message, etc.
Multiple virtual drivers (i2c, gpio, etc)
|
iMX Vservice
|
imx_mu_m4 driver
For each virtual device, by default, the Vservice uses the device node property
"fsl,vservice-mu" to specify the MU node handler. A override function is also provided,
so te ARCH level can define its rule. We will use the override function for dynamically
select MU on 8QM/QXP.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 31 Jan 2019 05:21:35 +0000 (21:21 -0800)]
MLK-20886-1 misc: MU: Add MU driver to communicate with M4
Add a common iMX MU driver in misc uclass to communicate with M4.
The MU message format is defined to use 4 words as below, the driver
will use all 4 TR/RR in MU to pass one message
|WORD 0 | WORD 1 | WORD 2 | WORD 3 |
|SEQ | TYPE | PAYLOAD ADDRESS | PAYLOAD LENGTH |
- SEQ:
A sequence id starts from 0 and increases for each request message
- TYPE:
0x1: Request. Message sent from AP will set to this value.
0x2: Response. Message responded from M4 set to this value.
0x3: MU A side is ready.
0x4: MU B side is ready.
- PAYLOAD ADDRESS:
A pointer to the memory address where the uplayer message is stored
- PAYLOAD LENGTH:
The uplayer message length
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
aba0e51cc397e1d98be950f9c15619de06ebf782)
Ye Li [Sun, 28 Apr 2019 10:00:38 +0000 (03:00 -0700)]
MLK-21831-6 imx8: scu_api: Add new SCFW API
Update SCFW API to get resource owner and check whether a partition
is started.
Signed-off-by: Ye Li <ye.li@nxp.com>
Utkarsh Gupta [Tue, 5 Feb 2019 21:58:16 +0000 (15:58 -0600)]
MLK-20787: imx: hab: Display All HAB events via hab_status command
Add ability for hab_status command to show All HAB events and not just
HAB failure events
Signed-off-by: Utkarsh Gupta <utkarsh.gupta@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
a9fdc0e4efa5c50ae194f7862d87cf53608afd8c)
Ye Li [Thu, 24 Jan 2019 07:42:57 +0000 (23:42 -0800)]
MLK-20794-1 imx8: Change kernel FDT updating for fused parts
Before booting kernel, we check all nodes in kernel FDT whether they
are owned in our partition. If it is not owned, we will disable it in FDT.
For fused iMX8X 17x17 parts, like DC0 is disabled, SCFW only disable SC_R_DC_0,
other sub-modules in DC0 SS are still assign to our partition. Since DC0 is fused,
we actually can't access these sub-modules.
This patch changes the algorithm to check resources along the power domain tree to the
top node of that SS power domain. If any resource in the PD tree is not owned, we will
disable the peripheral node.
For example, the i2c0_mipi_lvds1 peripheral node, according to power domain tree,
we checks resources: SC_R_MIPI_1_I2C_0 --> SC_R_MIPI_1 --> SC_R_DC_0. When SC_R_DC_0
is not owned, we will disable the i2c0_mipi_lvds1 peripheral node from FDT.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
da636e4b8eda4698be6e2e53767cc1a598aadb0b)
Ye Li [Fri, 18 May 2018 02:49:03 +0000 (19:49 -0700)]
MLK-18393 imx8: Check the eDMA channels and update DTB
Since M4 will arrange some eDMA channels to its partition, the A core
can't use them. We have to remove these eDMA channels from DTB dynamically.
Different like other resources, disabling the eDMA channels require to modify
the edma nodes by removing relevant registers, interrupts configurations, and
adjust dma channels number.
This patch searches the edma nodes from kernel DTB, checks the channels by
binding their registers base address with their resource IDs. Then update
the reg, interrupts, interrupt-names and dma-channels properties.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by : Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit
37efd38e5306680047ab9545f271716fea15fa95)
Peng Fan [Wed, 30 May 2018 01:48:34 +0000 (09:48 +0800)]
MLK-18435-2 power: imx8: remove the resource owned check before poewr off
For all the devices used and set ACTIVE in U-Boot, U-Boot needs
to power off all of them without the check of resource owner.
When we create software partition before booting Linux, the resource
own checkw will return false, and cause the power domain not powered
off. If without the check of resource owner, the power domain in
the other software partition could be powered off with parent
partition could access child partition resources.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
3e29e8adace18035850be9d56cc277c64a221e85)
(cherry picked from commit
81e64d882c2904f5aa38121d020f6e21e142aaf8)
Flynn xu [Sat, 19 Jan 2019 00:52:09 +0000 (19:52 -0500)]
MLK-20775: imx8qm/qxp: change xenlinux_addr to avoid memory conflict
When booting M4 with alt_config enabled, M4 will reserve 128MB for
video framebuffer from 0x88000000 to its partition, but Dom0 linux
loading address is 0x85000000, which will cause confict, so change
xenlinux_addr from 0x85000000 to 0x92000000.
Signed-off-by: Flynn xu <flynn.xu@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
a6792ed6e578f4a5585dfc4370e3dbf348a4c8fd)
Ye Li [Fri, 26 Apr 2019 09:30:58 +0000 (02:30 -0700)]
MLK-21849-7 imx8qm_arm2: Update ARM2 board configurations for SPL
To support booting from SD/eMMC and flexspi from SPL, update relevant
SPL configurations, like SPL base address, runtime memory address, SPL
load offset, etc.
Also enable relevant SPL driver for SD/eMMC boot and flexspi boot.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 09:25:55 +0000 (02:25 -0700)]
MLK-21849-6 DTS: imx8qm_arm2: Update DTS file for supporting SPL
Add -u-boot.dtsi for LPDDR4 ARM2 board DTS file and DDR4 ARM2 board DTS file.
In the board level -u-boot.dtsi, add the "u-boot,dm-spl" for SPL boot relative
device nodes and its pinconfig, regulator and power domain nodes.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 09:22:00 +0000 (02:22 -0700)]
MLK-21848-11 imx8qm_mek: Update board configurations for SPL
To support booting from SD/eMMC and flexspi from SPL, update relevant
configurations, like SPL base address, runtime memory address, SPL
load offset, etc.
Also enable relevant SPL driver for SD/eMMC boot and flexspi boot,
remove useless driver to save SPL size.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 09:21:06 +0000 (02:21 -0700)]
MLK-21849-5 DTS: imx8qm_device: Fix flexspi node assigned-clock issue
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 09:17:56 +0000 (02:17 -0700)]
MLK-21849-4 DTS: imx8qm_mek: Update DTS file for supporting SPL
Since there are some board leve DTS nodes needing "u-boot,dm-spl", we
have to use -u-boot.dtsi for each board DTS file. So discard the
SOC level -u-boot.dtsi
Add the "u-boot,dm-spl" for SPL boot relative device nodes and its pinconfig,
regulator and power domain nodes.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 04:34:06 +0000 (21:34 -0700)]
MLK-21849-3 imx8qxp_arm2: Add support for SPL boot
Add support for SD/eMMC, flexspi and NAND SPL boot
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 03:03:39 +0000 (20:03 -0700)]
MLK-21849-2 DTS: imx8qxp_arm2: Update iMX8QXP ARM2 board DTS files
Add -u-boot.dtsi for each board DTS file, so that we can enable the
"u-boot,dm-spl" to board related nodes
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 02:35:34 +0000 (19:35 -0700)]
MLK-21849-1 DTS: imx8qxp_mek: Add back the imx8qxp-mek-u-boot DTSi file
Since there are some regulator and pinconfig nodes need adding
"u-boot,dm-spl". These nodes are board related, we can't put them
in qxp-u-boot.dtsi. Change back the original way, using imx8qxp-mek-u-boot.dtsi
to cover all "u-boot,dm-spl"
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 06:15:31 +0000 (23:15 -0700)]
MLK-21848-10 imx8qxp_mek: Update defconfig files for SPL
1. Remove FIT support and enable TINY printf for saving SPL size.
2. Fix wrong SPL regulator driver enabled, show use fixed regulator not
gpio.
3. Add flexspi defconfig which uses SPI relevant SPL configs and disable
MMC, GPIO and regulator SPL drivers.
4. Enable the panic. Since we use PSCI to reset, but ATF is not boot when
SPL is running.
5. Use full malloc not simple malloc which has dedicated malloc pool
to support large pool size. The simple malloc size is also used by
early malloc which occupies the stack space. This causes we can't
have a large malloc pool
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 06:15:07 +0000 (23:15 -0700)]
MLK-21848-9 imx8qxp_mek: Update SPL base and SPL relevant configurations
Change the SPL base from OCRAM alias 0 to OCRAM 0x100000. We will jump
to OCRAM at early SPL init.
Also update the runtime memory address like: stack, BSS, malloc.
since the stack size includes a early malloc area which is increased
after using DM. In the new settings, We overlay the early malloc area
with real malloc area, so this can save 32KB size.
After container parser is enabled, need change SPL load offset accordingly
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 02:13:35 +0000 (19:13 -0700)]
MLK-21848-8 imx8: Jump from alias to OCRAM address at SPL init
When running SPL on iMX8, the A core starts at address 0
which is a alias to OCRAM 0x100000.
The alias only map first 96KB of OCRAM, so this require the
SPL size can't beyond 96KB. But when using SPL DM, the size increase
significantly and always beyonds 96KB.
So to fix the problem, we will change SPL linker address to OCRAM
address 0x100000. And then jump to the absolute address not the PC relative
address for entering OCRAM.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 01:58:45 +0000 (18:58 -0700)]
MLK-21848-7 serial_lpuart: Check CONFIG_SPL_CLK when using clk driver in SPL
Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will
check the CONFIG_SPL_CLK when building SPL
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 01:56:55 +0000 (18:56 -0700)]
MLK-21848-6 spi: fsl_fspi: Check CONFIG_SPL_CLK when using clk driver in SPL
Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will
check the CONFIG_SPL_CLK when building SPL
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 26 Apr 2019 01:39:12 +0000 (18:39 -0700)]
MLK-21848-5 fsl_esdhc: fix problem when using clk driver
Should use CONFIG_IS_ENABLED not IS_ENABLED for CLK driver, so it will
check the CONFIG_SPL_CLK when building SPL
Move init_clk_usdhc to non-clk driver case, since assigned-clocks properties
will initialize the clocks by clk driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 25 Apr 2019 04:58:44 +0000 (21:58 -0700)]
MLK-21847-2 pinctrl: imx8: remove DEVRES
When selecting imx8 pinctrl, we don't need to select DEVRES
Signed-off-by: Ye Li <ye.li@nxp.com>
Haibo Chen [Mon, 18 Mar 2019 08:01:45 +0000 (16:01 +0800)]
MLK-21176 mmc: correct the HS400 initialization process
After the commit
b9a2a0e2e9c0 ("mmc: Add support for downgrading
HS200/HS400 to HS mode"), it add a parameter in mmc_set_card_speed()
which indicates that the HS200/HS400 to HS downgrade is happening.
During the HS400 initialization, first select to HS200, and config
the related clock rate, then downgrade to HS mode. So here also need
to config the downgrade value to be true, make sure in the function
mmc_set_card_speed(), after switch to HS mode, first config the
clock rate, then read the EXT_CSD. Otherwise read EXT_CSD in HS mode
at wrong clock rate, e.g. 200MHz, may lead to uncertain result.
Test on i.MX8QM MEK board, some Micron eMMC will stuck in transfer
mode in this case, and USDHC will never get data transfer complete
status, cause the uboot hang.
Signed-off-by: Haibo Chen <haibo.chen@nxp.com>
(cherry picked from commit
0ba8e1c6efa2e9c34c9b54105d6c50ee293ec1d7)
Ye Li [Tue, 5 Mar 2019 08:37:42 +0000 (00:37 -0800)]
MLK-21053 imx8: Enable SPL authentication only when set CONFIG_AHAB_BOOT
Currently when SPL load 3rd container, it will do the authentication
unconditionally. But when running SPL on Xen, the seco authentication
is not supported, and cause failure in loading.
Change the parser codes to depend on CONFIG_AHAB_BOOT to do the
authentication.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
e38169a27fbe052561c5b369500e80477760ec3e)
Ye Li [Tue, 22 Jan 2019 13:07:33 +0000 (05:07 -0800)]
MLK-20798 imx8: spl: Fix container header parser issue
Current container parser only load 0x400 as container header size.
However, the signature block in container header may exceed 0x400 size,
when using certificate or 4096bits RSA keys to sign image, so we
have to load the entire header according to container length field.
Otherwise the container authentication will fail
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f435435f2e8367dc3f689d6ba946441a54acad0a)
Ye Li [Thu, 27 Dec 2018 05:51:51 +0000 (21:51 -0800)]
MLK-20664-2 imx8/imx8m: Disable the SPL RAW image support
The RAW image support must be disabled, otherwise a RAW image can be used
to bypass FIT image.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
ca7ebfcf0737699d5f62f97be4b0015c88108ae7)
Ye Li [Thu, 27 Dec 2018 05:45:54 +0000 (21:45 -0800)]
MLK-20664-1 imx8qxp: spl: Enable SPL container support for NAND
Add the NAND support to SPL container parser and enable it for imx8qxp arm2
nand reworked board.
The SPL NAND will read from nandfit mtdpart (128MB offset) to parsing the entire
boot image and get the 3rd container from it. This requires burning tool (uuu)
to program the entire boot image into nandfit.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
4b2850ccfd8b387590c9fb4abfffdd0ac5cc8e58)
Ye Li [Thu, 3 Jan 2019 08:50:24 +0000 (00:50 -0800)]
MLK-20559-6 f_sdp: Support searching and loading FIT or container image
Add support to f_sdp to search and load iMX8 container image or iMX8M
FIT image by new UUU command SDPV.
When using the SDPV, the uuu will continue to send out data after first
level boot loader used by ROM. This means uuu won't skip to the offset
of the second boot loader, and the padding data before second boot loader
will be sent out. So we have to search the FIT header or container header
in the buffer that SDP received.
The new BCD value is used by uuu to distinguish if the SPL supports the
SDPV.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
cddb0fde374769dccff44275a5072c5e28e41446)
Ye Li [Thu, 3 Jan 2019 08:46:09 +0000 (00:46 -0800)]
MLK-20559-5 f_sdp: Add a callback to clean up USB driver
Because SDP directly jumps to next level boot image, we'd better
clean up the USB driver before it. Implement a weak callback function,
that spl sdp can use it to clean up USB driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
1f6b3efc62cb277fd4316d8ed5115f47b09369a0)
Ye Li [Thu, 3 Jan 2019 08:41:07 +0000 (00:41 -0800)]
MLK-20559-4 f_sdp: Fix wrong usb request size
Because the buffer length of sdp usb request is 65, we have to allocate
65 bytes not 64 bytes. Otherwise there is potential buffer overflow.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
6ca3fc0bbdbcc6d870ceffa9d38c47d2e4edfee4)
Ye Li [Thu, 3 Jan 2019 06:58:15 +0000 (22:58 -0800)]
MLK-20559-3 f_sdp: Add high speed endpoint descriptor
Add HS endpoint descriptor for SDP. So that we can use high speed endpoint,
and the SDP device can send packet with 512 byte size.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
825c6f13b7e77b5c025293365f25c44d6fddc009)
Ye Li [Thu, 3 Jan 2019 06:40:23 +0000 (22:40 -0800)]
MLK-20559-2 spl: Enable cdns3 USB driver for SPL building
The imx8qm/qxp uses cdns3 USB driver. To support SPL SDP, we have
to enable the driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
18cbba9e33089fcaa1d8c45d1d17e79ef9d7e3a7)
Ye Li [Thu, 3 Jan 2019 06:37:49 +0000 (22:37 -0800)]
MLK-20559-1 spl_sdp: Add CONFIG_SPL_SDP_USB_DEV for USB device
Add a new configuration CONFIG_SPL_SDP_USB_DEV to specify the
usb index for spl sdp driver, so that we change use different device.
The default value is 0.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
dba0d7c7dc3b9b60043726931b1f635b725e9756)
Frank Li [Fri, 29 Jun 2018 08:34:28 +0000 (03:34 -0500)]
MLK-18707-1: SDP: use CONFIG_SDP_LOADADDR as default load address
if SDP_WRITE and SDP_JUMP addr is zero, use CONFIG_SDP_LOADADDR
as default address
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit
192a26dbcd88da7d1773bb6336d855c408239d4a)
(cherry picked from commit
7d24d618fc00cdd1f6e0f214a5b80d00cb6f9f18)
Frank Li [Thu, 9 Aug 2018 15:23:37 +0000 (10:23 -0500)]
MLK-19181-1: sdp: call board_usb_init at spl_sdp_load_image
Need initialize UDC before run sdp download
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit
ab6696c4f7ff3f13153e27b696fcbf38188b009a)
Ye Li [Thu, 27 Dec 2018 05:42:24 +0000 (21:42 -0800)]
MLK-20663 imx8: Fix malloc issue in container parser
The size used for malloc is wrong, the following read function will
read 1KB to the container header buffer not the size of the header.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
cedcc6634ba143f665bf5dac3926b1b74a403479)
Ye Li [Tue, 23 Apr 2019 08:47:11 +0000 (01:47 -0700)]
MLK-21856 imx8: Check the RevA ROM pass over info only in u-boot
Since we only support RevA booting without SPL, so move the ROM pass
over info checking to u-boot build. Because the we get CPU revision
from SCU, need moving it to arch_cpu_init_dm after SCFW driver is ready.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 25 Apr 2019 04:57:23 +0000 (21:57 -0700)]
MLK-20654-2 imx8: SPL: Move arch_cpu_init to board_init_f
Since we have data section save/restore in arch_cpu_init, need it
in early stage, so move arch_cpu_init to board_init_f
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 26 Dec 2018 08:28:31 +0000 (00:28 -0800)]
MLK-20654 imx8: Recover SPL data section for partition reboot
When doing partition reboot, the boot image won't be reloaded by ROM,
it is just CPU reset to boot entry. The SW has to keep the boot image
inside the RAM unchanged. It includes both the TEXT section and DATA
section.
For SPL, the problem is DATA section will be updated at runtime, so in
next partition reboot the data is not same as the initial value from
cold boot. If any code depends on the initial value, then it will have
problem.
This patch introduces a mechanism to recover the data section for partition
reboot. It adds a new section in image for saving data section. When from cold
boot, the data section will be saved to that new section at SPL early phase.
When from partition reboot, the data section will be restored from the new section.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
9e406ea46a93013b4b5370d0d45fe892e9f52583)
Bai Ping [Mon, 17 Dec 2018 08:10:37 +0000 (16:10 +0800)]
MLK-20602 imx8mq: Change clock source of GIC
Change the the GIC clock source to sys_pll2_200m.
Improve the IRQ response latency.
Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit
f4c76d52da9c272b275adf26145d033099cd1974)
Peng Fan [Wed, 12 Dec 2018 02:26:33 +0000 (10:26 +0800)]
MLK-20569 usb: ehci-mx6: configure usb out of suspend state
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>
(cherry picked from commit
999ae3e37bc8fea05ac984eb043dd925d80f1208)
Peng Fan [Wed, 28 Nov 2018 04:32:21 +0000 (12:32 +0800)]
MLK-20479 imx8mq: clear ocotp error bit
In case ocotp error bit is set, clear it.
This is a workaround to ocotp error bit.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
781f2d8febe954b2ef3e51b6a2eebcfbf24b08eb)
Peng Fan [Tue, 20 Nov 2018 02:04:16 +0000 (10:04 +0800)]
MLK-20414 imx8m: jailhouse: loadimage before mmcboot
Need loadimage before execute mmcboot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
016bb84267ff3882228ffbde64c2c670be7a8f16)
Silvano di Ninno [Wed, 21 Nov 2018 04:41:20 +0000 (05:41 +0100)]
TEE-329-2: OP-TEE: Allow u-boot to add optee node in dtb
If OP-TEE is loaded by ATF, u-boot will add
optee device tree node in th edtb so that
Linux can loads OP-TEE driver.
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
(cherry picked from commit
441c23698ffd5c90c6421113da55fae420072473)
Silvano di Ninno [Wed, 21 Nov 2018 04:36:49 +0000 (05:36 +0100)]
TEE-329-1: OP-TEE: Allow ATF to pass boot arg to u-boot
u-boot currently needs information from ATF to know if
OP-TEE os has been loaded.
this information is transmitted via bootargs.
this patch enables saving those bootargs into a structure.
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
(cherry picked from commit
697cfe9dbdc079b68d8b5685b728a7283c837607)
Abel Vesa [Wed, 7 Nov 2018 16:13:08 +0000 (18:13 +0200)]
MLK-20233 spl_spi: Add QSPI boot device support to the container parser
Before parsing the image header, try to check if there is a container and
validate it first. If no (valid) container then as a fall-through parse
the image as before.
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
2bd8277fd7eceed3aa4b07b6fe238b7beef62530)
Abel Vesa [Wed, 7 Nov 2018 16:12:22 +0000 (18:12 +0200)]
MLK-20233 imx8: Fix QSPI read in container parser
The check for CONFIG_SPL_SPI_LOAD is fixed, get rid of ret local variable
(that's actually a bug) and fix the length for the spi_flash_read call.
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
32adc4aed8864fe274de13f14f4e29759062ee1d)
Abel Vesa [Thu, 1 Nov 2018 15:02:48 +0000 (17:02 +0200)]
MLK-20233 arch: imx8: Add container parser for loading ATF and uboot proper
This intends to replace the FIT image support since that cannot be
authenticated. Instead, we append another container at the end of
flash.bin, this new one containing a new container with two
images representing the ATF and uboot proper.
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c853049068ba2026cf91a6268958913db379a432)
Teo Hall [Mon, 15 Oct 2018 22:03:45 +0000 (17:03 -0500)]
MLK-19877-1: iMX8: SPL: Add NAND SPL support
Add implementation necessary for supporting SPL loading image from NAND.
Signed-off-by: Teo Hall <teo.hall@nxp.com>
(cherry picked from commit
fe6af144930a0a32cbc4599635a96c8a629432a1)
Ye Li [Thu, 1 Nov 2018 07:30:47 +0000 (00:30 -0700)]
MLK-20160-1 usb: ehci-mx6: Fix PHY power up issue on iMX8 platforms
On iMX8 platforms like 8QM/QXP, we must power up the USB PHY resource
before accessing the PHY. However, current init flow access the USB PHY
in ehci_mx6_common_init prior than ehci_usb_phy_mode where the PHY is power
up.
Fix the issue by adding ehci_get_usb_phy function to parse the PHY address
from DTB and power up the PHY before ehci_mx6_common_init.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
477dd3a2cbd73a0ff67cbf15e1e6b7809864b516)
Ye Li [Thu, 25 Oct 2018 08:37:52 +0000 (01:37 -0700)]
MLK-20107 fspi: Keep the module enabled after probe
In flexspi driver, each sf command will disable the module in release bus
function. So reading from flexspi memory-map address using "md" command
can't work. When iMX8MM kicks M4 image to run flexspi NOR XIP,
this causes problem.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e92d831e5b1e149b23aeb1774c57d076ac246b1e)
Ye Li [Wed, 24 Oct 2018 08:08:26 +0000 (01:08 -0700)]
MLK-20057 usb: ehci-mx6: Fix usb type issue in DM driver
Currently the clocks and power of USB controller and USB PHY are both
controlled by ehci-mx6 driver in device probe. However, the function
"ehci_usb_ofdata_to_platdata" calls "ehci_usb_phy_mode"
to access PHY registers when "dr_mode" is set to OTG, both "dr_mode" and
"extcon" properties are not set in DTB. This may cause hang at accessing
USB PHY registers if the power and clocks are not enabled.
Change the usb type logic to more clear way:
1. plat->init_type: The requested USB mode type from uplayers
2. priv->init_type: The USB mode type specified by DTB or by the USB ID pin or
by external controller like tcpc or GPIO.
3. If two init_type are not same, return failure. Align with non-DM driver.
4. USB PHY access is moved after power and clock enabled.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
d62ffbb7fa3136062a977d4f8bdc0f03b464b8e4)
Ye Li [Mon, 22 Oct 2018 07:45:09 +0000 (00:45 -0700)]
MLK-20026 caam: Fix CAAM RNG init hang on imx8mq RevA
Found the imx8mq Rev A chip (B0 and B1 chips are ok) boot hang at CAAM RNG init.
The jobring 0 can't complete instantiation descriptor and spins on checking ORSFR_JR0.
In current implementation, the descriptor and jobring input and output base address locate
on TCM, because the driver uses raw_data array in jr_data_st structure as the buffer.
This seems cause the issue. If switched from TCM to OCRAM, the issue will go.
Since accessing TCM by CAAM is not very reliable. Add this patch to use OCRAM for SPL case.
The early malloc is ready on SPL before calling board_init_f. So we can use malloc to allocate
memory instead of the raw_data array.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
b12e170792c918efc7c371f86989d34fc397fe06)
Peng Fan [Thu, 11 Oct 2018 06:38:46 +0000 (14:38 +0800)]
MLK-19882 imx8qm/qxp: introduce dom0fdt_file env
Introduce dom0fdt_file env to let user could change
the dom0 dtb file.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
3d99b1667943658dafd4c3f5d98bab027aab9346)
Abel Vesa [Fri, 28 Sep 2018 15:02:49 +0000 (18:02 +0300)]
MLK-19789 mach-imx: imx8: Make the eMMC container offset SOC dependant
This is a hack for imx8qm-mek, since the offset of the flash.bin image
on eMMC differs when compared to imx8qxp-mek. Basically, the default value
is 32K, but for 8qm-mek it's 0. This can go away once the qm and qxp get
aligned (again) from this point of view.
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
e9f87deae7e8cb3e71012f85c488e0a0d108762a)
Ye Li [Tue, 23 Apr 2019 06:53:15 +0000 (23:53 -0700)]
MLK-21848-4 iMX8QXP/QM: SPL: Disable power domain before booting into next level
Disable the power domain for the devices we used in SPL before we booting
into ATF
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 19 Apr 2018 02:34:11 +0000 (19:34 -0700)]
MLK-18161-12 imx8qm/imx8qxp - Power down devices enabled by uboot before launching the kernel
Make sure that all devices that are powered up by uboot
are powered down before bringing up kernel.
Else the subsystem/device will never be powered down by SCFW even though
from the kernel's point of view it should be powered down.
Benefiting from power domain driver, We have implemented the function "power_off_pd_devices"
to power off all active devices. No need to explicitly power off them in board_quiesce_devices.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
3ab7cc26500eb78407bc6454a48f4d5f0ebf4f60)
Ye Li [Tue, 23 Apr 2019 07:10:32 +0000 (00:10 -0700)]
MLK-21848-3 DTS: imx8qm: Enable the flexspi node for SPL DM
Add the "u-boot,dm-spl;" property to flexspi0 node, so we can use
it in SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 23 Apr 2019 06:33:18 +0000 (23:33 -0700)]
MLK-21848-2 DTS: imx8qxp: Enable the flexspi node for SPL DM
Add the "u-boot,dm-spl;" property to flexspi0 node and its pd node,
so we can use it in SPL
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Thu, 7 Mar 2019 12:43:37 +0000 (12:43 +0000)]
MLK-21848-1 iMX8QXP/QM: SPL: enable dm-spl for pm
with u-boot,dm-spl added for imx8qx-pm node, and SPL_SIMPLE_BUS enabled,
the bind and probe code in board file could be removed.
Also we need to enlarge SYS_MALLOC_F_LEN to avoid calloc fail.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Abel Vesa [Mon, 17 Sep 2018 10:18:19 +0000 (13:18 +0300)]
MLK-19219-4 iMX8QXP/QM: Add support to get container image set size from QSPI
This transforms almost all related functions from mmc specific to device
independent. This allows the container size to be computed from QSPI and other
future devices that will be supported for boot.
Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c70afc348ee9fae242f00be56cde556822f93156)
Aymen Sghaier [Thu, 13 Sep 2018 16:19:13 +0000 (18:19 +0200)]
MLK-19053: crypto: caam: RNG4 TRNG errata
The TRNG as used in RNG4, used in CAAM has a documentation issue. The
effect is that it is possible that the entropy used to instantiate the
DRBG may be old entropy, rather than newly generated entropy. There is
proper programming guidance, but it is not in the documentation.
Signed-off-by: Aymen Sghaier <aymen.sghaier@nxp.com>
(cherry picked from commit
2aff5ffb2c4bb19106f3faa76415b51591cbc2b2)
Ye Li [Tue, 11 Sep 2018 06:03:55 +0000 (23:03 -0700)]
MLK-19526-5 imx8mq: Power down core 2/3 for iMX8MD
CPU 2/3 are fused on iMX8MD, power down the two cores in SPL to
save power.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
0fc24973f5f8d32d0925bf0cf1eb3d8b75ae18b4)
Ye Li [Mon, 10 Sep 2018 05:08:11 +0000 (22:08 -0700)]
MLK-19526-4 imx8mq: Disable Splash screen for old iMX8MQLite
Since iMX8MQLite has disabled DCSS and HDMI by fuse on old part.
We should check it when initialize HDMI splash screen and exit.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
2f56b7cb5155523a2be790b750b16e9d56efe1ae)
Ye Li [Tue, 11 Sep 2018 03:24:22 +0000 (20:24 -0700)]
MLK-19526-2 imx8mq: Update kernel DTB for iMX8MD and iMX8MQLite
Since VPU/HDMI are disabled on iMX8QLite, the CPU core 2/3 are disabled
on iMX8MD, we have to update kernel DTB to disable relevant nodes. The MIPI-DSI
can input from DCSS or LCDIF, so we need to check the input in DTB and only
The iMX8MQLite new part will not disable DCSS in fuse, but old will disable
DCSS. So the codes to check the DCSS fuse before disable relevant FDT nodes.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
79e8d0441d8c5cf8bde5ce1e332ffcb780c86986)
Ye Li [Tue, 11 Sep 2018 03:22:52 +0000 (20:22 -0700)]
MLK-19526-1 imx8mq: Add CPU ID for iMX8MD and iMX8MQLite
iMX8MQ has two variant versions: iMX8MD and iMX8MQLite. Add dummy CPU ID
for these two, and check the fuses to get correct versions.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
58b77b541311d4b1d7db787cc769a7ad23ecbc79)
Ranjani Vaidyanathan [Wed, 29 Aug 2018 22:55:13 +0000 (17:55 -0500)]
MLK-19477 iMX8QM: Power down HDMI_PLL_0 after firmware loading is done.
Need to power down HDMI_PLL_0 after HDMI firmware is loaded, else
resource is left ON when entering low power states thus impacting low
power number.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
(cherry picked from commit
93450bafc8dc7d9236c3f7520a2602e18c1d2ba3)
Ye Li [Thu, 6 Sep 2018 06:30:59 +0000 (23:30 -0700)]
MLK-19465 imx8mq: Fix cpu rev issue on B0.1 chip
We read the ROM version to determine the CPU revision before B1 chip.
The rom version is 4 bytes word, it has major version at low byte,
minor version at second byte.
On B0.1 chip, the value is 0x1020 not 0x20, if reading the word and comparing
with 0x20, the result is wrong.
Fix the issue by only reading the lowest byte for major version.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
8d0812e63155cca91ecb78c630a450e7d5e5fd00)
(cherry picked from commit
0377dc881a96b46d858643dfaa5f9ef0dd4acccc)
Ye Li [Mon, 3 Sep 2018 07:53:20 +0000 (00:53 -0700)]
MLK-19433-3 mxc_ocotp: Disable fuse sense for imx8mq B1
On iMX8MQ Rev B1, reading from fuse box is not allowed. The
OCOTP_READ_FUSE_DATA register is tied to magic number 0xff0055aa
for chip rev. So u-boot has to disable the fuse sense function for it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit
da95f60611e8859eba3e7ccb715fdce4d6376774)
(cherry picked from commit
4a8a24ae8b77e394911fd83374ef9c0a89cb9688)
Ye Li [Mon, 3 Sep 2018 07:46:09 +0000 (00:46 -0700)]
MLK-19433-2 imx8mq: Get chip rev for B1 revision
The mscale B1 uses OCOTP_HW_OCOTP_READ_FUSE_DATA register for chip id.
It returns a magic number 0xff0055aa.
Update get_cpu_rev to support this way, also enable OCOTP clock to allow
access OCOTP register.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
866631c2140b9352c6f74ec36d1a51fea40c0445)
(cherry picked from commit
11a44009a6d301df30ecda4209e79906a36a0981)
Ye Li [Tue, 21 Aug 2018 06:32:34 +0000 (23:32 -0700)]
MLK-19263-1 imx8m: Configure trustzone region 0 for non-secure access
Set trustzone region 0 to allow both non-secure and secure access when trust zone is enabled.
We found USB controller fails to access DDR if the default region 0 is secure access
only.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
ebdf2c75f3c820c74d7d9a5ee0993a0937cf3443)
Silvano di Ninno [Mon, 13 Aug 2018 12:04:46 +0000 (14:04 +0200)]
MLK-18502: imx8mm: Bypass ID SWAP when trustzone is enabled
Enable TZASC on i.MX 8mm.
There is a need on 8MM to enable
the BYPASS ID SWAP bit (GPR10 bit 1) in order
for GPU not to generated AXI bus errors.
Signed-off-by: Silvano di Ninno <silvano.dininno@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
76c9db3ccc8c6e8f719172254c4f9bbdbd12db23)
Peng Fan [Mon, 13 Aug 2018 06:06:36 +0000 (14:06 +0800)]
MLK-19203 configs: imx8qm_arm2: update xen boot args
Remove clk_ignore_unused
Enlarge dom0 memory to 2048M
Support booting 6 cores
support creating partition from parsing device tree
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
dff1ad048f0767a91c6e62904612b0f5ac9c52d7)
(cherry picked from commit
53d8f8832a38e64da7e6f07d04d37b9f3ce70536)
Ye Li [Tue, 14 Aug 2018 10:45:30 +0000 (03:45 -0700)]
MLK-19219-2 imx8qm/qxp: Add support to get container image set size
Add relevant functions and files to parse the container image set from mmc/sd
and get the total size of it. So we can get the offset of u-boot-atf.bin image
when it is padded to container image set at 1KB alignment position.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
02b9874427beffe6536e38519037e36f76b2ec9e)
Ye Li [Tue, 14 Aug 2018 10:52:16 +0000 (03:52 -0700)]
MLK-19219-1 spl: Add function to get u-boot raw sector
Add a weak function spl_mmc_get_uboot_raw_sector to get u-boot raw sector.
At default it returns CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_SECTOR. Users
can overwrite it to return customized offset.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
9f2ffbe41493fb9233d79e2933e337d7a6c2e20a)
Peng Fan [Mon, 6 Aug 2018 09:47:22 +0000 (17:47 +0800)]
MLK-19131 configs: imx8mm_evk: add jailhouse boot command
Add jailhouse env. Currently need to pass clk_ignore_unused to bootargs
to avoid linux root cell shutdown clocks used by inmates.
If only want a minimal clk being on in inmates, the clks could
be added in clk_inits_on in linux kernel drivers/clk/imx/clk-imx8mm.c
or use init-on-array under clk node.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
7732b3b87423069c1c31d25ec07201098062b717)
(cherry picked from commit
718b0792dfedcf68b6c2e93d3eefe499ec463433)
Ye Li [Thu, 26 Jul 2018 14:54:34 +0000 (07:54 -0700)]
MLK-19064 imx8qm: 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 flow:
1. Load the signed OS container to address 0x88000000
2. Using auth_cntr to authenticate the OS container. It will load the
kernel and FDT to destination addresses.
3. Using booti to boot kernel.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
eb47b72c1c89deddeaa3b3618d8c28aca05cd4ad)
(cherry picked from commit
e469bf980df3fa5c7d4e059aaaed4db296a0b002)
Peng Fan [Fri, 6 Jul 2018 06:07:02 +0000 (14:07 +0800)]
MLK-18793 imx8mq: config: add jailhouse env
Add jailhouse env. Currently need to pass clk_ignore_unused to bootargs
to avoid linux root cell shutdown clocks used by inmates.
If only want a minimal clk being on in inmates, the clks could
be added in clk_inits_on in linux kernel drivers/clk/imx/clk-imx8mq.c
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
0d33db00e96e7addb6910a7097a62222ff75480f)
(cherry picked from commit
56ea0d9280b22ce3e260851e88782cb877fad6ec)
Peng Fan [Mon, 23 Jul 2018 07:36:51 +0000 (15:36 +0800)]
MLK-19011-2 configs: imx8qm_mek: add jailhouse boot env
Add jailhouse boot env. run `jh_netboot` or `jh_mmcboot` to
boot Linux.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
2248152c7217ac78f4d399612679a45c54405502)
(cherry picked from commit
4b6b331c424c4d62844641c32c90915ebf5bf223)
Peng Fan [Mon, 23 Jul 2018 07:29:07 +0000 (15:29 +0800)]
MLK-19011-1 configs: imx8qxp_mek: add jailhouse boot env
Add jailhouse boot env. Use `run jh_netboot` or `jh_mmcboot`
to boot Linux.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
8a575a160b8e4f8cfdd79177a8f9551106395cf9)
(cherry picked from commit
864c2f9cb3463bfa715cbfd1d7ca16d8bd323003)