Ye Li [Sat, 6 Feb 2021 16:53:27 +0000 (08:53 -0800)]
LF-3483-6 arm: mach-imx: Allow to build mac.c for EQoS driver
i.MX8MP has one DWC EQoS controller, so allow to build mac.c when
only this driver is enabled.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 19 Feb 2021 02:01:09 +0000 (18:01 -0800)]
LF-3483-5 net: eqos: Add PHY reset control for i.MX platform
Parse the "phy-reset-gpios", "phy-reset-post-delay" and
"phy-reset-duration" properties from eqos node to control the
ethernet PHY reset at driver probe.
Reset PHY once is enough that can reduce the time cost to
get IP after the first time.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 6 Jan 2020 03:21:26 +0000 (19:21 -0800)]
MLK-23196 imx8mp_evk: Increase VDD_ARM to 0.95v Overdrive voltage
There is a frequency/timing limitation for SOC and ARM, if SOC is OD voltage/OD freq,
then ARM can't run at ND voltage/1.2Ghz, it may have timing risk from SOC to ARM.
Current VDD_SOC is set to 0.95v OD voltage in SPL, and kernel will increase bus
clocks to OD frequency before it increases ARM voltage. So to conform to the
limitation, we'd better increases VDD_ARM to OD voltage in SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit
f9fdb7a6134d8929c2291303c006f7380d97faa8)
(cherry picked from commit
543a0f1fdc2009fb24436b14a0488408c2f8341f)
faqiang.zhu [Mon, 13 Jan 2020 10:36:58 +0000 (18:36 +0800)]
MA-15300-4 flush fastboot usb request buf cache before data movement
when boot from A72, use fastboot to download images, the first usb
request buf to save image data may have problem with the cache, which
cause the last 64bytes of this packet to be wrong.
flush this cache before data movement to avoid this issue.
Change-Id: Ic0927f1ec90ec9fb4cecdf4055bc7f536ef5471a
Signed-off-by: faqiang.zhu <faqiang.zhu@nxp.com>
(cherry picked from commit
45119132756b951c6f52e27625c06f94e4f0db59)
(cherry picked from commit
467f1d9f0c133438500d1c151c52276152bf36bf)
Ye Li [Mon, 6 Jan 2020 08:39:19 +0000 (00:39 -0800)]
MLK-23209-3 imx: Update imx_get_mac_from_fuse for imx8mp
iMX8MP supports two ENET controllers, have to update the function to
enable loading two MAC addresses.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit
61aebe41d5ba5f569cea233dec09da04539179bb)
(cherry picked from commit
6431d94c66c7eb36a049d25d45ca4afe05033da3)
Ye Li [Wed, 25 Dec 2019 03:30:45 +0000 (19:30 -0800)]
MLK-23165-12 Update XHCI driver to support imx8MP PHY
Update PHY settings to select 24M ref clock and enable clock in
HSIOMIX GPR.
Reviewed-by: Jun Li <jun.li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
aa0f45fed58f891e246e6ec743a7de71eb69c911)
(cherry picked from commit
6375056baf59d271a06fdbbb5248706ebe4977fd)
Frank Li [Fri, 13 Dec 2019 20:36:01 +0000 (14:36 -0600)]
MLK-23124 fastboot: support duplicate uart console output to uuu
to enable it, in uuu script add below command
fb: ucmd setenv stdout serial,fastboot
uuu add -v opition.
output will show in uuu console
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit
a5e86802515221cdfa4b6d82e697cf9dc0d29a98)
(cherry picked from commit
e4bcf17c0c7eaf8365435927be43577a98deed78)
Ye Li [Wed, 11 Dec 2019 09:28:02 +0000 (01:28 -0800)]
MLK-23110-2 imx8qm/qxp: Remove SPL USB host driver and SPL ENV support
Remove both configs to save SPL size, since we have decoupled the
CI_UDC with EHCI driver
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
2b72e174551cbc25ad0d9d90136bfcb95c851951)
(cherry picked from commit
fae5ae95a04d157c591bc364505c1b5fb0b30bc4)
Ye Li [Wed, 11 Dec 2019 08:28:17 +0000 (00:28 -0800)]
MLK-23110-1 usb: Decouple the CI_UDC DM gadget driver with EHCI MX6 driver
On 2019.04 SPL, we enabled DM gadget driver for QM/QXP to support
dual USB ports. The CI_UDC DM gadget driver will call init function
inside EHCI mx6 driver, so when building SPL on iMX8QM/QXP with CI UDC
enabled, we have to enable usb host driver as well, and this introduces
about more than 40KB size to SPL.
Move the common codes to a independent file, so that both host driver
and gadget driver can call it, then decouple the host and gadget driver.
Note: the patch only applies to ci_udc gadget DM driver. For non-DM gadget
driver, it still depends ehci host interfaces.
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
1afed171a77b4c95cd4ea76f29d5a0a6bb199820)
(cherry picked from commit
6680499ca4d3a740df5c0aa5a5e66f6d93f827fb)
Jacky Bai [Thu, 17 Oct 2019 04:34:02 +0000 (12:34 +0800)]
MLK-22881 board: imx8mn: Update the DDR4 timing script on imx8mn ddr4 evk
On i.MX8MN, we can only support DLL-ON mode only, so update the timing
to support 2400mts & 1066mts setpoint.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c8347f8eb51e4a603ed5f1649129dd3a0a8ea9f9)
(cherry picked from commit
1466b915bb7df3942b4aa67ff9518a3dd461bf9c)
(cherry picked from commit
9532207ae26ffc7c2a25b964964a61ca8eb85613)
Han Xu [Tue, 19 Nov 2019 02:50:13 +0000 (20:50 -0600)]
MLK-22997: add nandfit_part env for uuu
Add the nandfit_part environment to notify uuu to burn flash.bin to
nandfit partition for iMX8QM/QX/MQ/MM platforms
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
79474268a4d7ec473435181b85176b266549f278)
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
8a5d712cb9ba6cf99c5b5a7da3b82b16ac101ccc)
Clement Faure [Wed, 13 Nov 2019 16:05:55 +0000 (17:05 +0100)]
MICRDEVOPS-61: imx6/imx7ulp: enable CONFIG_CMD_USB_MASS_STORAGE
Enable CONFIG_CMD_USB_MASS_STORAGE by default to enable UMS flashing.
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Acked-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
52fddd71c5fc2bf10d9e551197f90cf4096fbc71)
(cherry picked from commit
2b73a73ce53b8007afbfbb83332e8e16de0ad4e4)
Han Xu [Mon, 11 Nov 2019 15:37:29 +0000 (09:37 -0600)]
MLK-22954-4: configs: iMX6ULL add mtdparts config
add the mtdparts config for iMX6ULL
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
66430af4cee0e18a211244114ca4648342c7d995)
(cherry picked from commit
3a565150546931f2a5816c34a2380be3fb89fba7)
Han Xu [Tue, 12 Nov 2019 21:11:48 +0000 (15:11 -0600)]
MLK-22954-2: Kconfig: change the nandbcb Kconfig for iMX8QX
Add the ARCH_MX8 in Kconfig for supporting iMX8QX in nandbcb
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
a91c8b42b6d8385bbd09652a5e18e3c2286eb305)
(cherry picked from commit
7a57cfa932426984b996c3b4e34c7984a27968b4)
Breno Lima [Sun, 27 Oct 2019 00:28:58 +0000 (21:28 -0300)]
MLK-22907-3 fsl_mfgprot: Fix typo in sign_mppubk()
The signature is generated using manufacturing protection private key.
Fix typo in fsl_mfgprot.c.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
a14286a86fd73b6dcd2d15c3051c17653922a50f)
(cherry picked from commit
619e69d0891c4d2a0590de088048fe0b67277297)
Breno Lima [Sat, 19 Oct 2019 01:24:26 +0000 (22:24 -0300)]
MLK-22907-2 imx8: Add SECO manufacturing protection command support
i.MX8/8x devices support CAAM manufacturing protection through SECO
APIs, SECO FW generates P-384 private key in every OEM closed boot.
Add support for SECO enabled devices in mfgprot U-Boot command, the
following commands are available:
=> mfgprot pubk
=> mfgprot sign <data_addr> <size>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
1fdb9726fdc4642d0f24104ec2e4099d59569468)
(cherry picked from commit
18b06286d28d78b04fcef7a4b3bd8324f789bf32)
Li Jun [Fri, 8 Nov 2019 06:01:04 +0000 (14:01 +0800)]
MLK-22675 usb: dwc3: host: disable park mode for super speed
- Advantage of park mode
When only a single Async endpoint is active.
- Behavior of park mode
1. The controller prefetches data/TRBs to do 3 * burst_size worth
of packets.
2. When park mode is disabled there will be some delay between
bursts on the USB. This can be avoided if park mode is enabled
in cases of only one endpoint is active.
3. But this delay is significant only with systems of large
latencies.
4. We have noticed that in cases where a device NAKs often, it
tends to bring down the performance for a single endpoint case.
- Issue on "park mode"
1. LSP (List Processor) goes in and out of park mode irrespective
of the fact that there are more endpoints active. #LSP consider
that there is only one endpoint active.
2. This causes master scheduler and transaction handlers to think
that they are in park mode even though they are not. This is
because request to transaction handlers, generated by HSCH is
in park mode when the request is made
3. This causes a case where the master scheduler calculates wrongly
the number of TRB cache space available.
4. Because of the wrongly calculated number of TRB spaces, the core
fetches more TRBS than there is space for.
5. This causes overwriting the TRB cache area into the TRQ cache
area which is next to the TRB cache area.
6. This causes invalidating an entry in the TRQ
7. This causes transaction handlers to ignore a request in the TRQ
which it should have processed.
8. This causes the main scheduler to hang because it is waiting for
status from transaction handler.
9. This causes host controller to hang.
- Work Around
Disabling park mode for super speed by setting GUCTL1[17] to be 1.
The STAR number is
9001415732, which is target to be released around
May,2020.
Reviewed-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit
191211adfc8a797875079c228a10269c5b0d7e13)
(cherry picked from commit
ee96ccf8455a100488af6449ab941423c81b1789)
Ye Li [Tue, 29 Oct 2019 07:11:33 +0000 (00:11 -0700)]
MLK-22866 imx8: Remove the optee shared memory from DDR banks
Optee has 4MB shared memory at its top space which was assigned to
non-secure OS partition in ATF. By default this memory is added to
u-boot DDR banks and will pass to kernel. This means kernel has possibility
to allocate from this memory for system usage. At same time this memory is
used by optee and mem-remapped by optee kernel driver. So it is possible to
have conflict and cause kernel crash.
Fix the issue by removing the shared memory from u-boot DDR banks. Then it
is not visible for both u-boot and kernel and can avoid such issue.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit
164279c42de0d058b7abe198cc154ee683087e6a)
(cherry picked from commit
2c1016db0c08b8ade597146782c4267d77f77973)
Ye Li [Fri, 25 Oct 2019 08:28:48 +0000 (01:28 -0700)]
MLK-22851-3 imx8mq: Enable eMMC HS400 and SD UHS mode on EVK
iMX8MQ EVK board has a eMMC5.0 chip and supports SD3.0, so enable the UHS
and HS400 configs to enhance the eMMC/SD access.
The change also needs to set usdhc clock to 400Mhz, and add the off-on-delay-us
to SD reset pin, otherwise some SD cards will fail to select UHS mode in
re-initialization.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
57e1bc5f634be231b2bfd10cf0cbbff86dadd2e1)
(cherry picked from commit
ded7f2aa2354ef9f40a60bf333902437bf33a887)
Jacky Bai [Wed, 23 Oct 2019 05:31:19 +0000 (13:31 +0800)]
MLK-22832 board: imx8mn_evk: Fix the retention hang on imx8mn lpddr4 evk
The '0x20060' register is used for phy memory reset, should not be put
in the ddrphy config section, so remove it from the timing script,
otherwise, ddr retention can NOT work. Additionally, the'0xd0000'
register config in phy section is redundant, remove it too.
Signed-off-by: Jacky Bai <ping.bai@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
9d944032008fb37850aeb3d83f7de4e659fad319)
(cherry picked from commit
75e87a0af9b81d0b6c98234c8e33396360b3c629)
(cherry picked from commit
f3dc8af4b6fe1bd6ade5c2d45df0ca11beeec5e0)
Han Xu [Tue, 22 Oct 2019 17:24:39 +0000 (12:24 -0500)]
MLK-22827-1: mxs_nand: bch: add the missing bch register debug0
add the missing bch register debug0
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
0883946855f7e1eabe26787fbc8529ac412047e7)
(cherry picked from commit
56235ef0fd596ab9d1d0b15db3cf708d058da703)
Breno Lima [Mon, 14 Oct 2019 00:35:53 +0000 (21:35 -0300)]
MLK-22755 mx7ulp: wdog: Wait for WDOG unlock and reconfiguration to complete
According to i.MX7ULP Reference Manual we should wait for WDOG unlock
and reconfiguration to complete.
Section "59.5.3 Configure Watchdog" provides the following example:
DisableInterrupts; //disable global interrupt
WDOG_CNT = 0xD928C520; //unlock watchdog
while(WDOG_CS[ULK]==0); //wait until registers are unlocked
WDOG_TOVAL = 256; //set timeout value
WDOG_CS = WDOG_CS_EN(1) | WDOG_CS_CLK(1) | WDOG_CS_INT(1) |
WDOG_CS_WIN(0) | WDOG_CS_UPDATE(1);
while(WDOG_CS[RCS]==0); //wait until new configuration takes effect
EnableInterrupts; //enable global interrupt
Update U-Boot WDOG driver to align with i.MX7ULP reference manual.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
3ffee301cb4570e0e7681448ec434f0689bcbaa3)
(cherry picked from commit
c4c929bcb47895ea13057f375579bac5be656ef1)
Han Xu [Wed, 16 Oct 2019 22:24:18 +0000 (17:24 -0500)]
MLK-22766-1: imx6sx: configs: enable mtdparts for imx6sx sabreauto
Enable the mtdparts for imx6sx sabreauto platform
Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit
d76d7e0a28c04a51265b8777a82033bd2e74eda5)
(cherry picked from commit
7fc8bb70612f12b6aad57024a4bd54828d31f1e3)
Peng Fan [Fri, 19 Mar 2021 07:57:08 +0000 (15:57 +0800)]
MLK-22759-3 imx8mn: Add LPDDR4 EVK board support
Add support for iMX8MN LPDDR4 EVK board which uses 2GB LPDDR4 and
PCA9450B PMIC.
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
4e805c197be408954c50e5d1c7a492d1cf2c7c20)
Alice Guo [Fri, 11 Oct 2019 18:22:51 +0000 (02:22 +0800)]
MLK-22580-2: imx8mm-evk: config: add some dependencies and modify
dependency of CMD_NANDBCB`s default value
compiling nandbcb of imx8mm-evk depends on NAND and CMD_MTDPARTS
modify dependency of CMD_NANDBCB`s default value
Signed-off-by: Alice Guo <alice.guo@nxp.com>
(cherry picked from commit
1b14e8cbefdb0f8126ceb6a85b1fd0db142328e6)
(cherry picked from commit
31d900682a77b8dc0cd7112d66d898bbe52d5edb)
Breno Lima [Wed, 28 Aug 2019 22:10:09 +0000 (19:10 -0300)]
MLK-22570-2 doc: habv4: Add encrypted boot documentation for i.MX8M, i.MX8MM and i.MX8MN devices
Add HABv4 encrypted boot documentation for i.MX8M, i.MX8MM and i.MX8MN
family devices covering the following topics:
- How to encrypt and sign a flash.bin image.
- How to manage CAAM PRIBLOBs when using encrypted boot
- Add 4 CSF examples.
Reviewed-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Marius Grigoras <marius.grigoras@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
eee57255e0b0ea3a2808d3a2c19c8685afbac39b)
(cherry picked from commit
ca581bdeffd0b153342d275d2b23f5eb4d349ded)
Clement Faure [Fri, 30 Aug 2019 14:37:08 +0000 (11:37 -0300)]
MLK-22570-1 mx8mqevk: Add OP-TEE Device Tree Bindings
Currently is not possible to use dek_blob command in
mx8mq:
u-boot=> dek_blob 0x40400000 0x40401000 128
Cannot get OP-TEE device
Add OP-TEE Device Tree Bindings to fix this issue.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Clement Faure <clement.faure@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
f762fe218ec60025e2dfd6173efaa826286ba297)
(cherry picked from commit
ffc0afa58547e102f1231f0c42048d18923d84ec)
Ye Li [Tue, 27 Aug 2019 06:39:57 +0000 (23:39 -0700)]
MLK-22749 imx8mq: Add workaround to fix sticky bits lock up
On B1 chips with HAB v4.4, the sticky bits are not locked up in
HAB closed mode. We introduce a workaround in SPL to lock up
these bits and clear Manufacturing Protection Private Key for
secure boot.
For field return case, user has to build a SPL with
CONFIG_SECURE_STICKY_BITS_LOCKUP=n and set CONFIG_IMX_UNIQUE_ID to
part's unique id. When the UID check is passed, sticky bits are not
lockup and users can burn field return fuse. Otherwise the boot will
stop.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c98b47f1ff60e1f99807e24fd76053ad880f803e)
(cherry picked from commit
ce78751b8428228f32b77386cc6e9be8bcbba470)
Breno Lima [Thu, 10 Oct 2019 13:43:02 +0000 (10:43 -0300)]
MLK-22743 mx7ulp: Update unlock and refresh sequences in sWDOG driver
According to i.MX7ULP Reference Manual the second word write for both
UNLOCK and REFRESH operations must occur in maximum 16 bus clock.
The current code is using writel() function which has a DMB barrier to
order the memory access. The DMB between two words write may introduce
some delay in certain circumstance, causing a WDOG timeout due to 16 bus
clock window requirement.
Replace writel() function by __raw_writel() to achieve a faster memory
access and avoid such issue.
Signed-off-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
5dd8c46d68d3267e989f980598a4e3e2ed04d4f9)
(cherry picked from commit
8d99b70490c88b09b88e96291ecc468c22f91d22)
Frank Li [Tue, 8 Oct 2019 15:20:55 +0000 (10:20 -0500)]
MLK-22711-2: fastboot: emmc: update bootloader to offset 0 for RevC QXP chip
ROM update emmc offset to 0.
previous B0 is 32K.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
(cherry picked from commit
b642241380227b97f0fa434e3d38dc746adbd9e0)
(cherry picked from commit
2065bf0a12180f73eb918d09dbe809c10077b033)
(cherry picked from commit
61870feff7a4b28b0f78a3af5329e0e540713662)
Ye Li [Fri, 6 Sep 2019 08:21:00 +0000 (01:21 -0700)]
MLK-22622 imx8m: Enable the SError exception
To work with commit
2f3c920(imx8m: workaround ROM serror),
we need to enable the SError exception and install vector in SPL.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f05dd45251ca82cc54e13a616f00744c26faab53)
(cherry picked from commit
25d059411e702a4002f1aa157839001f796dd9f6)
Ye Li [Wed, 18 Sep 2019 08:56:34 +0000 (01:56 -0700)]
MLK-22654 mx7ulp: Update wdog disable sequence
Update the mx7ulp wdog disable sequence to avoid potential reset issue
in unlock or refresh sequence. Both sequence need two words write
to wdog CNT register in 16 bus clocks window, if miss the window,
the write will cause violation in wdog and reset the chip.
Current u-boot code is using writel() function which has a DMB barrier
to order the memory access. The DMB between two words write may introduce
some delay in certain circumstance, causing the wdog reset due to 16 bus
clock window requirement.
This patch replaces writel() function by __raw_writel() to avoid such issue,
and improve to check if watchdog is already disabled or unlocked.
Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Breno Lima <breno.lima@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
b8c99d5f5bcc5573d3394b68890db16b6bb5fc88)
(cherry picked from commit
29cf0fa20f54ca80e9ba4baf9eee3e53c1c634fa)
Sherry Sun [Mon, 9 Sep 2019 21:14:16 +0000 (17:14 -0400)]
MLK-22577-2: usb: cdns3: Change the max packetsize of interrupt endpoint
When use ep1out interrupt endpoint to receive data in sdp, the max
packetsize of ep1out is set to 1024. But in cdns3 gadget driver, the
max packetsize is limited to 512 bytes in high speed. So we can't
implement data download through ep1out of cdns3 driver, here need
change the max packesize of interrupt endpoints to 1024.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
17f321b4a32cfaac52339172dc354729e641451a)
(cherry picked from commit
9d81e87f6fc37b42c28694f3938b1e1c37879904)
Ye Li [Mon, 1 Jul 2019 10:58:29 +0000 (03:58 -0700)]
MLK-22556-1 spi: flexspi_nand: Add new flexspi nand driver
Add flexspi_nand driver which works on iMX flexspi controller to support
SPI NAND flash. This driver requires DM_SPI and follows SPI-MEM interfaces
to adapt to the SPI NAND framework.
Note: Current implementation limits to the 12-bit column address. This is
popular in main stream SPI NAND and flash devices supported in u-boot.
If device with larger page size (> 4096) needs to support, we have to change
the driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
d5c2580a245fa0cd4ae0012ceb5c8bd2f497f19c)
(cherry picked from commit
a56bf035b87d9fe1352c9a8293f91c9026552b1e)
Breno Lima [Tue, 27 Aug 2019 13:48:51 +0000 (10:48 -0300)]
MLK-22515 doc: habv4: mx8m: Remove u-boot.bin dependency
The u-boot.bin file is not included in flash.bin binary, remove it
from mx8m_mx8mm_secure_boot.txt guide.
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
92f238a1faaae3bbad27873704d33277f0663c40)
(cherry picked from commit
352c0f3699f453187aff4974197fe64a502d3053)
Breno Lima [Tue, 27 Aug 2019 11:39:15 +0000 (08:39 -0300)]
MLK-22513 doc: ahab: Update OS container image target
Commit
28dd37699022("imx8: Clean up targets") in imx-mkimage project
renamed flash_linux target to flash_kernel.
Update AHAB documentation to align with this change.
Reported-by: Frank Zhang <frank.zhang@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Breno Lima <breno.lima@nxp.com>
(cherry picked from commit
8713142afd953e89bb6aa460716692fbb0a6a413)
(cherry picked from commit
9905b167b07a1558dece08724c1d7d0655c5f866)
Ye Li [Tue, 6 Aug 2019 08:04:55 +0000 (01:04 -0700)]
MLK-22398-10 mx6sabresd: Enable PCIE IMX DM driver
Update the board codes and configs to enable PCIE IMX driver on all
imx6dql sabresd boards.
The always on regulators is powered up in board_init for enabling
"pcie_reg" regulator.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
c59e779f71008dede451d1a6185002701b5a34f0)
(cherry picked from commit
b09ab3855996b7a183182166975852a839bae5a8)
Ye Li [Fri, 22 May 2020 08:46:53 +0000 (01:46 -0700)]
MLK-24042-1 DTS: imx6qp-sdb: Fix wrong polarity of pcie reset gpio
The polarity of PCIE reset gpio is wrong in imx6qp-sdb DTS, which
causes PCIE link failed to setup on iMX6QP.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
4be1f338c71ec5a3668373496f355bf18aa67cc7)
Ye Li [Tue, 6 Aug 2019 07:27:38 +0000 (00:27 -0700)]
MLK-22398-9 DTS: imx6qdl: Update DTS for PCIE
Add pci0 alias and gpr property for pcie node.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
b660d986b2a0dacfdc4b358fb1d45b2882b10932)
(cherry picked from commit
1109867dc11be9d7e6d73de6e5542cc89d062b68)
Ye Li [Tue, 6 Aug 2019 08:02:41 +0000 (01:02 -0700)]
MLK-22398-8 mx6sxsdb: Enable PCIE IMX DM driver
Update the board codes and configs to enable pcie imx DM driver.
The pcie node in SDB board DTS reply on the alway on regulator
"reg_pcie". So power up the always on regulators in board_init.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
4271f767a42f2ccb6085aec3abf9197faf60bb9f)
(cherry picked from commit
145886450db0bf11e601c08499953f4bcff3c1d2)
Ye Li [Mon, 5 Aug 2019 06:17:20 +0000 (23:17 -0700)]
MLK-22398-6 imx8qxp_mek/8dxl_phantom: Enable PCIE on MEK board
Update the configs tp enable the PCIE iMX DM driver on imx8qxp and
imx8dxl_phantom MEK board.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
950f4cb84ee80f64abde5fb606ca1bf8719492f1)
(cherry picked from commit
3f74684abaeaf11c3ec35d2fa92ed8207c02d7b5)
Ye Li [Mon, 5 Aug 2019 06:16:15 +0000 (23:16 -0700)]
MLK-22398-5 DTS: imx8qxp_mek/8dxl_phantom: Add PCI alias and node
Add pci alias for pcieb.
Enable the pcieb node in MEK board and add relevant pin config and
regulator.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
36a57241a5af989f773980d3676337c8fc3e75a1)
(cherry picked from commit
fd26c2b67cdc8b389084bb83c69926a1b9752db5)
Ye Li [Tue, 30 Jul 2019 08:36:47 +0000 (01:36 -0700)]
MLK-22398-4 imx8qm_mek: Enable PCIE IMX DM driver on MEK board
Update the configs on iMX8QM MEK board to enable PCIE IMX DM driver.
Users can use "pci enum" command to enumerate the devices.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
cff95ce55e44ada8660242bf1524fdcc76cd5bbd)
(cherry picked from commit
0ef8edf9976b303d865c2040874dbaa699247c68)
Ye Li [Tue, 30 Jul 2019 08:36:13 +0000 (01:36 -0700)]
MLK-22398-3 DTS: imx8qm_mek: Add PCI alias and node for MEK board
Add PCI alias for pciea and pcieb.
Enable the pciea node in MEK board and add relevant pin config and
regulator
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
f755e125fc97096a7fc785271401c3ae0a0eee2e)
(cherry picked from commit
51c3590b6ea3208549ad03bd7e5496f2d2b7f9f5)
Ye Li [Tue, 30 Jul 2019 08:34:55 +0000 (01:34 -0700)]
MLK-22398-2 clk-imx8: Add pcie clocks for imx8qm/qxp
Add PCIE relevant clocks to clk-imx8 driver, so PCIE IMX driver can
set the clocks through DTB
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
cf86e72f32fdd25903b6afb5a803d6e9ccf7d15b)
(cherry picked from commit
221e1039d025b33016c3ebf7a38001d92020cc71)
Ye Li [Tue, 30 Jul 2019 08:34:07 +0000 (01:34 -0700)]
MLK-22398-1 pcie_imx: Update PCIE IMX driver
Update PCIE IMX DM driver supports iMX8QM/QXP and
iMX6QDL/QP/SX. Non-DM driver supports iMX6QDL/QP/SX.
The changes in DM parses cfg/mem/io ranges, gpios, regulators and
clocks (imx8 only) from DTS for RC mode, and set iATU mapping for
each regions.
The original iATU mapping sets full PCI region to CFG space. iATU
translates MEM/IO TLP to CFG TLP when the address is falled into
the region.
The new mapping sets CFG/IO/MEM spaces to align with kernel like below
ATU region 0 for MEM access
ATU region 1 for CFG0 or CFG1 access by bus id
ATU region 2 for IO access
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
eb0959cbf2118342a544440f124e0c81eeba70e3)
(cherry picked from commit
bec6f34702a66905f86c5e1b58872200b315ba92)
Sherry Sun [Wed, 31 Jul 2019 19:31:46 +0000 (15:31 -0400)]
MLK-22357-4 imx8: Enable usb2 configs on imx8 platform
Enable the configs of usb2 so that both usb2 and usb3 gadget
drivers are now supported on imx8 plaform. And add
CONFIG_USB_PORT_AUTO to support usb port autodetect function
for SDP/fastboot.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit
1aa6e3f84c65e99de1219aa5d58d454cef1129f9)
(cherry picked from commit
89f1ba4b13df16ddd9760a0c8c44171a9bf917d7)
Sherry Sun [Wed, 31 Jul 2019 21:07:04 +0000 (17:07 -0400)]
MLK-22357-3 usb: Clear the value of bEndpointAddress before refill it
For one usb controller driver, the transport endpoint address won't
change after the driver initialize. So the value of bEndpointAddress
have no need to be cleared.
But when more than one usb controller drivers are used at the same time,
different endpoints address is used by different controller driver
usually, it will cause confusion of endpoint address. So the value of
bEndpointAddress had better been cleared everytime before we refill
endpoint address to it.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit
9f9102968a777cfdcf0609a5435b35406f57124c)
(cherry picked from commit
16de9e791a045ca2cb2fe375be1d6561068e7a91)
Sherry Sun [Fri, 2 Aug 2019 17:58:03 +0000 (13:58 -0400)]
MLK-22357-2 sdp/fastboot: Add board_usb_gadget_port_auto() to autodetect the connected usb port
On imx8 platform, the usb2 and usb3 ports are both supported. Which
means we can use usb2(ci_udc_otg) and usb3(cdns3_generic_peripheral)
gadget driver to run sdp/fastboot/ums at the same time.
For sdp and the fastboot that runs automatically when uboot starts,
board_usb_gadget_port_auto() is added to autodetect usb port, this
means that we don't have to specify which USB port should be used to
download in code, now we can just connect either usb port then it
will download automatically.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit
2b6fd3da6fffae0732e8e91ef5c1f870ea393ca9)
(cherry picked from commit
7c8e0606ea4aaeceae1f1d1e17db1503ac9f841e)
Sherry Sun [Wed, 31 Jul 2019 00:42:02 +0000 (20:42 -0400)]
MLK-22357-1 usb: Add handle_interrupts function pointer for UCLASS_USB_GADGET_GENERIC
Since the orginal way to call interrupts handle function of DM usb
gadget driver is through dm_usb_gadget_handle_interrupts(), when we want
to use two or more different gadget drivers at the same time, it will
cause error of duplicate names.
So here add a handle_interrupts function pointer instead of driectly
call dm_usb_gadget_handle_interrupts(), then the error can be avoided.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
(cherry picked from commit
2458ddd952a6a2d2304dfe7ea34e4192cd1d5ed4)
(cherry picked from commit
c9fc90db5b31a0f111f85b749a55b417b1341af3)
Ye Li [Wed, 12 Jun 2019 03:27:12 +0000 (20:27 -0700)]
MLK-22351 iMX8DXL: Add iMX8DXL phantom chip MEK board
The iMX8DXL phantom chip is 15x15 iMX8QXP, so we will use 8QXP as SOC,
add configs and codes for the new board.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
791b6ff76a96f17c1222dd39c09937e2ffc5c00e)
(cherry picked from commit
638ab8a02891f6617b3e2db7616f79abcd11a209)
Ye Li [Sun, 19 Apr 2020 09:25:48 +0000 (02:25 -0700)]
MLK-23574-36 DTS: imx8mm/8mn: Update USB assigned clocks
Update OTG1 and OTG2 assigned clocks for USB core ref clock.
Remove the deleting of OTG assigned clocks since we have support
them in clk drivers
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c72056ec1af074f9a2b39a22cba3489870e72991)
Sherry Sun [Sat, 27 Jul 2019 01:22:54 +0000 (21:22 -0400)]
MLK-22336-4 imx8mm: configs: Move CONFIG_CI_UDC
For imx8mm, the CONFIG_CI_UDC is defined in
include/configs/imx8mm_evk.h, which leads to CONFIG_CI_UDC can not been
enabled in Kconfig, and CONFIG_DM_USB_GADGET which we need selected by
CONFIG_CI_UDC in Kconfig also can not work. So move CONFIG_CI_UDC to
defconfig files.
The CONFIG_USB_GADGET_DUALSPEED is selected by CONFIG_CI_UDC in Kconfig
files too, so we don't need it to be defined in include/configs/imx8mm_evk.h
files.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
cb33ca7a2a5052bdb7b479ae2af5169360625962)
(cherry picked from commit
1f4da952f962a03a9a7b274704924f7f04f71bae)
Sherry Sun [Sat, 27 Jul 2019 01:12:21 +0000 (21:12 -0400)]
MLK-22336-3 usb: Kconfig: imply DM_USB_GADGET
Since the ci_udc driver has been converted to DM driver, the
CONFIG_DM_USB_GADGET should also be selected when CONFIG_CI_UDC
is enabled, then we can use DM ci_udc driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
d456376b59459403c4570d66297cc34f7264bd6d)
(cherry picked from commit
64b058c4ece0d4faef9a375bf4b75af16e3815d2)
Sherry Sun [Thu, 25 Jul 2019 21:20:26 +0000 (17:20 -0400)]
MLK-22336-2 dts: Add a new usb gadget node on imx6/7/7ulp/8/8mm
Since one dts node can only bind to one DM driver in uboot, for usbotg
node, we can not use it for both DM usb host driver and DM usb gadget
driver. So a new usb gadget node is added to each usbotg node, the
original usbotg node is bind to usb host driver as default, and the
new usb gadget node is bind to usb gadet driver as default.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
342adc8948def972dbd08b71009584745f7826f0)
(cherry picked from commit
6716cd87079cae70a5c521f83be292628403b9ab)
Sherry Sun [Tue, 23 Jul 2019 19:21:57 +0000 (15:21 -0400)]
MLK-22336-1 usb: ci_udc: Convert driver to DM_USB_GADGET
Convert the ci_udc driver to driver model by using the uclass
UCLASS_USB_GADGET_GENERIC. The clk and power of USB controller and USB
PHY both are initialized by parsing the device tree nodes.
If CONFIG_DM_USB_GADGET is defined, we use the ci_udc driver in DM way,
if it does not defined, we can use ci_udc driver in its original Non-DM
way.
Move some USB PHY register definitions from ehci-mx6.c to
asm/mach-imx/regs-usbphy.h in order to share with DM usb gadget driver.
Signed-off-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
5c50d6bd6fda34827a27387e42c9a803da40b1e5)
Ye Li [Tue, 23 Jul 2019 03:53:31 +0000 (20:53 -0700)]
MLK-22293-12 mx6q/qp: Update SATA codes and configs for sabre boards
Enable the SCSI and imx AHCI driver in imx6q/qp sabreauto and sabresd
SATA configs. Removed unused codes for old SATA driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
ee39101f3a5cc62bfdc08332ac3f945abdb19c0c)
(cherry picked from commit
ec1460d8be4594f5785309ec529a45671202276d)
Ye Li [Tue, 23 Jul 2019 03:52:12 +0000 (20:52 -0700)]
MLK-22293-11 DTS: imx6q/qp: Add gpr property to sata node
Because u-boot does not support syscon_regmap_lookup_by_compatible,
we have to add a gpr phandle property to point to iomuxc gpr node.
and uses syscon_regmap_lookup_by_phandle to get gpr node in driver.
This is common implementation in other nodes and better than
by_compatible interface.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
06f38476808e87ca258511567cf0cf4c9b973519)
(cherry picked from commit
6f9df1c36a5e38d3a9abb064cf4ecdb83c25a93e)
Ye Li [Tue, 23 Jul 2019 03:50:41 +0000 (20:50 -0700)]
MLK-22293-9 imx6: clock: Enable sata clock for imx AHCI
We reuse current sata clock interface in imx AHCI for imx6q/qp. So
enable them when the config is set
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
112ee99236f6d7d97f94ccf1d065ec577a118f80)
(cherry picked from commit
37573e731bd6c43b39cba82e552e2e63d49dcc75)
Ye Li [Thu, 18 Jul 2019 03:12:47 +0000 (20:12 -0700)]
MLK-22293-8 iMX8QM: enable AHCI on MEK
Enable the iMX AHCI driver and relevat codes on iMX8QM MEK board.
User can access the SATA disk via SCSI commands.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
11bb14b2281a7012e3efcad438ac211efac2077f)
(cherry picked from commit
598aeada1265c0ea33e0fdeb953129e60149316c)
Ye Li [Thu, 18 Jul 2019 03:16:24 +0000 (20:16 -0700)]
MLK-22293-7 DTS: Update iMX8QM MEK dts to enable SATA
Enable the SATA node in iMX8QM MEK DTS file for iMX AHCI driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
fa27e716f13a3803ef0296eed992b37fc5e8090c)
(cherry picked from commit
41aab145f6cfc302320c1f9e26fd29ccf5dd1846)
Ye Li [Fri, 19 Jul 2019 03:41:46 +0000 (20:41 -0700)]
MLK-22293-6 clk-imx8: Add SATA relevant clock for iMX8QM
Add the SATA clocks to clk-imx8, so we can use clk uclass interfaces
to access the clocks in AHCI driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
87adf3f28ffc639240561d90c1d3c51ec29aae80)
(cherry picked from commit
9a35db582d333ac8c30927e49670d22b76c26a2b)
Ye Li [Tue, 23 Jul 2019 01:23:05 +0000 (18:23 -0700)]
MLK-22293-5 env: Update SATA env location driver to use SCSI
When DM SCSI is enabled with AHCI, use SCSI device to replace SATA
device to access the peripheral.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
097bf5dcf79a3fc461c3e27102113cac7372afcf)
(cherry picked from commit
4ceb4355c2e5ad7e361497f7ec56cb478a9ef636)
Ye Li [Fri, 19 Jul 2019 03:42:17 +0000 (20:42 -0700)]
MLK-22293-4 fastboot: Change to use SCSI interface for sata device
After enabling AHCI driver and DM SCSI, we need to access SCSI device
for SATA
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
764cc673d345abf775ed9d05737a3dd856b5dfde)
(cherry picked from commit
92e4cc082eef6b59fb3f723b3362d17a06b3389a)
Ye Li [Fri, 19 Jul 2019 03:40:23 +0000 (20:40 -0700)]
MLK-22293-3 ata: ahci: Fix nport index issue
Ahci driver set max ports to 2, but the codes has comparing issue if we
only has one port. Also suppress the print of invalid port.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
2eb4513e30ca986ccd89d98dac9a947bea32ff1f)
(cherry picked from commit
3c4508427dd440895ff3c4e27a5cf2604a7eb35f)
Ye Li [Thu, 18 Jul 2019 02:54:55 +0000 (19:54 -0700)]
MLK-22293-2 ata: Add iMX AHCI driver
Add new iMX AHCI driver which is ported from kernel and support
imx6q/qp/imx8qm.
The new driver adapt to SCSI through common AHCI interfaces in ahci.c
So after enabling it, we will use SCSI commands to access the SATA
disk device.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c206ca62ec4e3a04af24c668d2394b81142b6ec4)
(cherry picked from commit
1a74c7e21455e20fa06e8ba15a78342a567cc1ec)
Ye Li [Tue, 7 May 2019 07:06:17 +0000 (00:06 -0700)]
MLK-21485 imx8qm/qxp: Extend image size for bootaux M4
iMX8 has consective address for TCML and TCMU, so the M4 image size
could exceed the TCML boundary and put its data section in TCMU.
So change the size limitation in bootaux to 256KB to include TCMU.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
cdc80200841055b949677ae8633c6d64fe0d0985)
(cherry picked from commit
086aa956a8e2a98aeb601eba337d02e7ad5076dc)
(cherry picked from commit
f45a01724e1aba84d812f9f0339e80efb53757c2)
Ye Li [Fri, 24 May 2019 06:07:18 +0000 (23:07 -0700)]
MA-14501[Android] Set BOOTAUX_RESERVED_MEM macro to iMX8 defconfig
As the M4 use different DDR memory size in normal android/car2 and car
image, use different defconfig for car2 to decrease DDR memory
reservation. So memory reserved for each M4 core is 8MB in car2 and
normal android image. it's 32MB for car image.
Change-Id: Idf608f539cd614a154c78e3a1af28eff1da5c1f2
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
565f2204e7925d3bd25623ff1104a54ee0f8a601)
(cherry picked from commit
fdb033f37174713728132fd8e933225019c3aec5)
Peng Fan [Mon, 25 Feb 2019 09:59:17 +0000 (17:59 +0800)]
MLK-20976-1 imx8qm: mek: remove partition creation for domu
Partition creation will be done in xen, remove it from uboot.
And add domu-android-auto property
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit
23f7a037d14d05c2eea5622bd8ffda2f23d04372)
(cherry picked from commit
9646e5b095f4c79114eaa7d60bfa03504c7da172)
(cherry picked from commit
d4d53611c19b67d217bc9194e269e2dcefd0e72f)
Peng Fan [Wed, 12 Dec 2018 06:28:56 +0000 (14:28 +0800)]
MLK-20542 imx8qm: xen: mek: add magic number
Write magic number in board early init, and clear magic when booting
Linux.
This is to let XEN know the current EL1 code is U-Boot or Linux
when reset/reboot. This is just a workaround because CM41 could not
communicate with XEN now, even XEN knows that EL1 is reseting/rebooting.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Flynn xu <flynn.xu@nxp.com>
(cherry picked from commit
8132f6b5848d45cab795bb472d6484130985415d)
(cherry picked from commit
c9dc0848f0ccf01f3a7c048d1a309ab99c46bd48)
(cherry picked from commit
ace8af3d53a8e3ebb06a72099a2ebe274703d057)
Peng Fan [Thu, 11 Oct 2018 09:13:25 +0000 (17:13 +0800)]
MLK-19890 configs: imx8qm_mek: create partition before loading hdmi firmware
After loading hdmi firmware, create partition, HDMI power domain will be
off, this will cause HDMI firmware being lost.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
0681ed943c1a00012a8f15e104048f48f2e1fcbe)
(cherry picked from commit
e2922f4f0e6c659bb444d87ca4a2d103110c2f85)
(cherry picked from commit
267ed0a245b26a8da0872dbcb7f51efcd777b418)
Ye Li [Tue, 21 May 2019 06:28:10 +0000 (23:28 -0700)]
MLK-21854-5 imx8qxp_mek: Update MEK board defconfig to support UUU
Enable the SPL SDP driver and FASTBOOT driver in iMX8QXP MEK board
defconfigs to support running UUU
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
c0e91ab4f97448a1e529a07513079f859e57df5e)
(cherry picked from commit
8a6bd34baab527d1ff494b752053329b7fb1ec3b)
Ye Li [Tue, 21 May 2019 03:23:00 +0000 (20:23 -0700)]
MLK-21854-3 imx8qm_mek: Update MEK board defconfig to support UUU
Enable the SPL SDP driver and FASTBOOT driver in MEK board defconfigs
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
29b514bd91919cbfbe638f1474d370c2aae42896)
(cherry picked from commit
5998b101eca0d67abe2fe71b1f176b5a241cd973)
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)
(cherry picked from commit
ccf43cde94db0f7427cb164bc96bb2e5bdf00fbe)
Ye Li [Sun, 28 Apr 2019 08:21:44 +0000 (01:21 -0700)]
MLK-20945-7 imx8qm/qxp: Add MEK FSPI configurations
Add MEK FSPI configs to enable SPL SPI and NOR support for flexspi booting
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit
f303f969ebb0f525c413c47519725275d00025a1)
(cherry picked from commit
b6c7ad55b757be56d454f0d64667c7547e3690dc)
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)
(cherry picked from commit
fac77d3a0013fa79b5df04cd58144d96d780d613)
(cherry picked from commit
93ab77f592ea771e3ec2801a6603116b7796bc02)
Ye Li [Tue, 19 Feb 2019 07:51:46 +0000 (23:51 -0800)]
MLK-20945-3 imx_virt_i2c: Add DM_FLAG_DEFAULT_PD_CTRL_OFF 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)
(cherry picked from commit
6ac1ee462c7000e7017c55f76550551a6267dc58)
(cherry picked from commit
08e051be36043273c4d5fc496e657aaeab5b16e7)
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)
(cherry picked from commit
b165fa3ee0ebabf77d4f68ee61d98a3cc5adbba5)
(cherry picked from commit
73ddd75acbae95fa7a91d3bcb46bfacc6cc94f2c)
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>
(cherry picked from commit
76e89f4a9a2ed1331572f60b30854463afdfed50)
(cherry picked from commit
1c27ca131181dffd9549c8d659cbb18d89acec10)
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>
(cherry picked from commit
5dd4ff270dc387111f5feb85e4020adf2d60a32f)
(cherry picked from commit
7b5950ea2999d3c4e28ab62b5ba363037ae649c3)
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)
(cherry picked from commit
c79189e57ebd693bf50b92e32d2dcc01b463cfd3)
(cherry picked from commit
d8f85a4a1fa6af1e442dd5346c5f21b6c6b43418)
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)
(cherry picked from commit
b4125878ee4f57bbddff12921a0e71da4fa578bb)
(cherry picked from commit
a9dc7ee1ac4e97533c2fe82014eac7f353b8d315)
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)
(cherry picked from commit
8393fe1e2ad6025f686956a447a6acee3250a2b4)
(cherry picked from commit
e207f7a941b86ab38691a295ef9ed17e0bb8f035)
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)
(cherry picked from commit
8c407ea63ad7c7cf59eb6d8b96766cd163026d82)
(cherry picked from commit
10decd628e25e4ac07651b35f7e11b2efc331edd)
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)
(cherry picked from commit
3624faca59ed1dda7cd5f9c688598ea4941cac61)
(cherry picked from commit
7cdd8d0ff362c26fd1c5b7682a6b69393ccda59c)
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)
(cherry picked from commit
c19550012c6143be0100a49485bf8452a90e9379)
(cherry picked from commit
a3169c233a58186e84f5538edc5be0cf0db6c2ca)
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>
(cherry picked from commit
7537b3c0fbe4e2c355bc4ff20613958bdd178bcd)
(cherry picked from commit
3caa81795c16a7644f60ed3b9c77030446b49484)
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)
(cherry picked from commit
57c95d6476052a052f026f8e4d7c98bd05792a1f)
(cherry picked from commit
7cf313495381878b46173bb567ebf5814d403d58)
Ye Li [Thu, 24 Jan 2019 07:42:57 +0000 (23:42 -0800)]
MLK-20794-1 imx8: Add legacy 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)
(cherry picked from commit
8b83db421811d9d761c004d000eb0259902ad150)
(cherry picked from commit
0819497d68537c20d1d8d05e0e6e5a49710b4c35)
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)
(cherry picked from commit
ec6a694c1430f023401286862902bd14ca9acf87)
(cherry picked from commit
1aa411d4a3f401ab85b62eadc7c426a797d59b74)
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>
(cherry picked from commit
b4ebefe7b0d6252f1c210d7f5f84b3c63d383530)
(cherry picked from commit
8f82f30e93bc8876d62af7a0f4d677a88d1b4cc8)
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>
(cherry picked from commit
736ea652c6dbc7bb9f52bceff35a5f4bb98ca4dc)
(cherry picked from commit
724a10ad40720fd13bdd3c43cfc7f9e317aeb0a5)
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)
(cherry picked from commit
9e0ec51fc5a95cb197c9579414343ab3e1d0419a)
(cherry picked from commit
7435792b692f56009eb55d794e5056e917963af2)
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.
Apply the same power off interface to SPL as well.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
3ab7cc26500eb78407bc6454a48f4d5f0ebf4f60)
(cherry picked from commit
f6c3e3191de31f0249a89a24a477d82feecb526f)
(cherry picked from commit
1105214ef0023bf3df1e0b8071a795d42013a35e)
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)
(cherry picked from commit
f21fc30aa7b723db68c2d62afc6be0edb9de0ed2)
(cherry picked from commit
a607d579064989e9ad285e9115ebe5cac3e69d09)
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)
(cherry picked from commit
e3ba5c0719e4b6b7867451b815f11a3683dd393d)
(cherry picked from commit
931d1bd7a4fd6675d0f0b891afc6203bdfd185f6)
Ye Li [Tue, 15 May 2018 09:03:19 +0000 (02:03 -0700)]
MLK-18316 imx8: Fix USBOTG disconnect when XRDC blocking is enabled
We clean USBOTG register USBCMD if it is used in serial download mode.
When XRDC blocking is enabled, we can't write this register directly,
must enable the OTG power, otherwise the kernel will get SError
exception in mfgtool.
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit
cf2143dc97b2a8f21b828c7386c59ee965d981f2)
(cherry picked from commit
55dd2c8e17eca27b3d393be9fd84a153ce7bf37b)
(cherry picked from commit
4cadac201b480ac28dcbb27903489a98c0303a3d)
(cherry picked from commit
60d41ce815e5bd63952794d2868ee7dd3be54157)
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)
(cherry picked from commit
dfb3c57f9313ed0bee355dd7217135d05c824be6)
(cherry picked from commit
e5f701e32d3f516f15c0c7c53a85d94381838a17)
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)
(cherry picked from commit
02e8bbe4e659a7ffb360c392ea79ce073b90f276)
(cherry picked from commit
a12d5e0559843c6870aa0fb2091ebe9f23bdbc56)
Ye Li [Wed, 25 Apr 2018 09:45:32 +0000 (02:45 -0700)]
MLK-18129-2 imx8qm/qxp: Add secure boot environment
Add the secure boot relevant environment variables to 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)
(cherry picked from commit
07b9850354b27dafa4cc774c59770931af2ac898)
(cherry picked from commit
149006de99c9c214232d30cc2e9795401766fe4b)