Commit Graph

49483 Commits

Author SHA1 Message Date
Ye Li 2bc872282b MLK-19218 imx8qm/qxp: spl: Fix build break in SPL build
Get such build error below due to the changes in tcpc.h
(MLK-19181-2: i.MX850: SPL enable usb support).
Fix the issue by removing unused tcpc and usb header files from spl.c

spl/board/freescale/imx8qxp_mek/spl.o: In function `tcpc_setup_ufp_mode':
spl.c:(.text.tcpc_setup_ufp_mode+0x0): multiple definition of `tcpc_setup_ufp_mode'
spl/board/freescale/imx8qxp_mek/imx8qxp_mek.o:imx8qxp_mek.c:(.text.tcpc_setup_ufp_mode+0x0): first defined here
spl/board/freescale/imx8qxp_mek/spl.o: In function `tcpc_setup_dfp_mode':
spl.c:(.text.tcpc_setup_dfp_mode+0x0): multiple definition of `tcpc_setup_dfp_mode'
spl/board/freescale/imx8qxp_mek/imx8qxp_mek.o:/home/leyoen/Workspace/u-boot-upgrading/u-boot/board/freescale/imx8qxp_mek/imx8qxp_mek.c:547: first defined here
scripts/Makefile.build:359: recipe for target 'spl/board/freescale/imx8qxp_mek/built-in.o' failed

Signed-off-by: Ye Li <ye.li@nxp.com>
2018-08-14 03:34:22 -07:00
Han Xu 4752217d6a MLK-19212: set the fastboot_bytes env
set the fastboot_bytes env for uuu download

Signed-off-by: Han Xu <han.xu@nxp.com>
2018-08-13 10:24:45 -05:00
Ye Li 7e07aa674b MLK-19157 imx8mm_evk: Disable dsi panel before booting kernel
Pull down the DSI_EN gpio to disable mipi dsi panel before booting kernel.
This avoids display full yellow screen before kernel mipi driver probes
the device.

For MIPI2HDMI card, this DSI_EN gpio is not used. So nothing impact to it.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e73adc9a139f2e8bb92bda1631fa2f2391a8a5e3)
2018-08-13 03:33:52 -07:00
Ye Li 6069aa09d9 MLK-19133 pinctrl: Fix select input issue in pinctrl driver
The pinctrl supports to set any bit in input register on iMX6 if
the MSB of input value is 0xff. But the driver uses signed int for
input value, so when executing the codes below, it won't meet.
Because this is arithmetic right shift.

    if (input_val >> 24 == 0xff)

Fix the issue by changing the input_val, config_val and mux_mode to u32.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit e464bbcd13d472ddf2df5b62b0002a127147e17b)
2018-08-13 00:51:40 -07:00
Ji Luo 983b708fb5 MA-12371 Sync evk_imx8mq config file to fix build errors
Move some configs from imx8mq_evk_android.h to imx8mq_evk_android_defconfig
to sync with BSP team.

Test: build and boot ok on evk_imx8mq.

Change-Id: I954f2c284b368ca26c6fb44a6db6a200cb1e6da7
Signed-off-by: Ji Luo <ji.luo@nxp.com>
2018-08-13 10:28:23 +08:00
Ye Li e5de85ba36 MLK-19200-2 Revert "Add iMX8DX DDR3 arm2 board support"
This is debug patch, pushed by mistake. Since we already support
DDR3 ARM2 in previous commit, must revert it.

This reverts commit d0602d2ee6.

Signed-off-by: Ye Li <ye.li@nxp.com>
2018-08-12 19:21:32 -07:00
Ye Li 831f7b34e9 MLK-19200-1 Revert "disable mmc trace"
This is debug patch for DX DDR3 ARM2 support, which is pushed by mistake.

This reverts commit 3514c8a2a6.

Signed-off-by: Ye Li <ye.li@nxp.com>
2018-08-12 19:21:21 -07:00
Li Jun 3a1e7c188d MLK-19181-6 arm: imx8m: Fix compile warning
In file included from arch/arm/mach-imx/imx8m/soc.c:11:0:
arch/arm/mach-imx/imx8m/soc.c: In function ‘imx_gpc_set_m_core_pgc’:
./arch/arm/include/asm/io.h:44:28: warning: cast to pointer from integer of differen                                                                                                                                                         t size [-Wint-to-pointer-cast]
 #define __arch_getl(a)   (*(volatile unsigned int *)(a))
                            ^
./arch/arm/include/asm/io.h:122:31: note: in expansion of macro ‘__arch_getl’
 #define readl(c) ({ u32 __v = __arch_getl(c); __iormb(); __v; })
                               ^~~~~~~~~~~
arch/arm/mach-imx/imx8m/soc.c:427:8: note: in expansion of macro ‘readl’
  val = readl(GPC_BASE_ADDR + offset);
        ^~~~~
./arch/arm/include/asm/io.h:49:29: warning: cast to pointer from integer of differen                                                                                                                                                         t size [-Wint-to-pointer-cast]
 #define __arch_putl(v,a)  (*(volatile unsigned int *)(a) = (v))
                             ^
./arch/arm/include/asm/io.h:117:48: note: in expansion of macro ‘__arch_putl’
 #define writel(v,c) ({ u32 __v = v; __iowmb(); __arch_putl(__v,c); __v; })
                                                ^~~~~~~~~~~
arch/arm/mach-imx/imx8m/soc.c:432:2: note: in expansion of macro ‘writel’
  writel(val, GPC_BASE_ADDR + offset);
  ^~~~~~
arch/arm/mach-imx/imx8m/soc.c: In function ‘imx8m_usb_power’:
arch/arm/mach-imx/imx8m/soc.c:453:16: warning: unused variable ‘ret’ [-Wunused-varia                                                                                                                                                         ble]
  unsigned long ret;
                ^~~

Signed-off-by: Li Jun <jun.li@nxp.com>
2018-08-11 13:16:18 +08:00
Han Xu e7cbfb4f2d MLK-19197: qxp: configs: enable fastboot for i.MX8QX MEK FlexSPI u-boot
enable fastboot for i.MX8QX MEK FlexSPI u-boot

Signed-off-by: Han Xu <han.xu@nxp.com>
2018-08-10 15:47:39 -05:00
Ye Li 3514c8a2a6 disable mmc trace
Signed-off-by: Ye Li <ye.li@nxp.com>
2018-08-10 15:25:40 -05:00
Ye Li d0602d2ee6 Add iMX8DX DDR3 arm2 board support
When rewoked eMMC to MMC socket, change MMC driver can recognize the card
Enable the fastboot to test usb gadget

Signed-off-by: Ye Li <ye.li@nxp.com>
2018-08-10 15:25:40 -05:00
Li Jun eeb6a8d545 MLK-19181-5 imx8mq_evk: Force USB to be high speed for uuu
As there is problem with super speed with SDP, we force the dwc3
usb speed to be high speed.

Signed-off-by: Li Jun <jun.li@nxp.com>
2018-08-10 12:10:31 -05:00
Li Jun bc76fe6dad MLK-19181-4 usb: gadget: don't change ep name for dwc3 while ep autoconfig
As the SDP protocol use the predefined ep num for communication, we can't
change its name hence reset its ep num while do ep autoconfig, this is
only apply for SPL.

Signed-off-by: Li Jun <jun.li@nxp.com>
2018-08-10 12:10:31 -05:00
Frank Li 21ce8ab67d MLK-19181-3: defconfig: iMX850D enable USB SDP
uuu can download whole uboot and run it
fastboot also enabled.

malloc start at 0x182000, size is 0x6000 (24K)
So BSS and malloc use all OCRAM_S

stack move to endof OCRAM 0x91FFF0.
ATF start at 91000

AFT about 48K, 0x91000  - 0x91D000,

Stack size is about 16K.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
2018-08-10 12:10:31 -05:00
Frank Li 7c3d2a17bf MLK-19181-2: i.MX850: SPL enable usb support
Enable DWC3 USB support at i.MX850D platform

Signed-off-by: Frank Li <Frank.Li@nxp.com>
2018-08-10 12:10:31 -05:00
Frank Li ab6696c4f7 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>
2018-08-10 12:10:31 -05:00
Ye Li 8efc764dff MLK-19177 imx8dx: Add iMX8DX DDR3 ARM2 board support
Add new dts, config and defconfig file for DX DDR3 ARM2 board. Since
it does not have USB3.0 and SD, disable them in DTS and header file. Also move
gpio expander to i2c1 according with its schematic.

In defconfig, fastboot is default enabled due to we need uuu to program
eMMC.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e5b822615a5aa2fadb481002c286f35d996999f8)
2018-08-10 03:11:00 -07:00
Richard Zhu cdedbb42e0 MLK-19194 PCI: imx: disable the ltssm when link is down in uboot
Disable the LTSSM when link is down in uboot.
Otherwise, the pcie ep/rc validation system in kernel
would be impacted by the enabled ltssm stat in the uboot.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
2018-08-10 17:14:01 +08:00
Andy Duan bbfd694dc0 MLK-19189 arm64: dts: imx8qm/qxp: set enet IO voltage to 1.8v
By default, imx8qm/qxp b0 silicon set the IO voltage to 2.5v, but mek/arm2
boards are designed as 1.8v voltage for enet IO, so force the IO voltage
to 1.8 by setting COMP_CTL_GPIO_1V8_3V3 pins like:
The pin setting:
    1.8V/3.3V : bit4=0,  bit[30]=1, bit[2:0]=000
    2.5V      : bit4=1,  bit[30]=1, bit[2:0]=010

Reviewed-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
2018-08-10 15:12:08 +08:00
Teo Hall dddd60f948 MLK-19182-4 iMX8QM SPL: imx8qm_arm2: add iMX8QM SPL defconfigs
Add a defconfigs for SPL build for iMX8QM DDR4 ARM2 board and
for the iMX8QM LPDDR4 ARM2 board

Signed-off-by: Teo Hall <teo.hall@nxp.com>
2018-08-09 15:20:09 -05:00
Teo Hall b252e02911 MLK-19182-3 iMX8QM SPL: arm: mach-imx: Add SPL support for iMX8QM
Enable SPL support for iMX8QM ARM2 boards

Signed-off-by: Teo Hall <teo.hall@nxp.com>
2018-08-09 15:20:01 -05:00
Teo Hall 91bf1f0771 MLK-19182-2 iMX8QM SPL: include/configs: imx8qm_arm2: Add SPL build config
Add all necessary configs when building for SPL based on
CONFIG_SPL_BUILD set.

Signed-off-by: Teo Hall <teo.hall@nxp.com>
2018-08-09 15:19:53 -05:00
Teo Hall a3a943c1b9 MLK-19182-1 iMX8QM SPL: board: imx8qm_arm2: Add spl implementation
Add spl implementation for LPDDR4 and DDR4 iMX8QM boards.

Signed-off-by: Teo Hall <teo.hall@nxp.com>
2018-08-09 15:19:43 -05:00
Abel Vesa 06a5803c2a MLK-19183-10 iMX8QXP SPL: imx8qxp_mek: Add i.MX8QXP SPL defconfig
Add a separate defconfig which builds SPL along with u-boot proper.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:30 -05:00
Abel Vesa 2355481419 MLK-19183-9 iMX8QXP SPL: drivers: pca953x_gpio: Do not build it in SPL
The pca953x_gpio is not SPL non-DM ready, so make it build only in uboot proper

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:21 -05:00
Abel Vesa e6aa0a71dd MLK-19183-8 iMX8QXP SPL: common: spl: Hack for allowing raw ATF image booting
Since the default way to boot ATF from SPL is by using a FIT blob, this hack
allows us to boot raw ATF image, without checking anything in the header of the
image since is non-existent.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:18 -05:00
Abel Vesa a5a87b6424 MLK-19183-7 iMX8QXP SPL: arm: mach-imx: Do not build partition in case of SPL build
There is not needed for this in SPL.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:18 -05:00
Abel Vesa 0e917f760a MLK-19183-6 iMX8QXP SPL: arm: mach-imx: Do not build imx_bootaux in SPL for imx8
Do not build the imx_bootaux if the build is SPL when building for imx8.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:18 -05:00
Abel Vesa 562fe0c869 MLK-19183-5 iMX8QXP SPL: arm: mach-imx: Add SPL support to iMX8
This will allow iMX8QX to have SPL support and later on the iMX8QM too.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:18 -05:00
Abel Vesa 136a66a731 MLK-19183-4 iMX8QXP SPL: arch/arm: Add imx8 to the list of socs for SPL builds
Now that iMX8QX and iMXQM will have SPL support, the socs list that support it
has to be updated. Instead of building 8m only build for all imx8.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:12 -05:00
Abel Vesa b829de8c29 MLK-19183-3 iMX8QXP SPL: include/configs: imx8qxp_mek: Add SPL build configs
This adds all the configs necessary for when CONFIG_SPL_BUILD is set.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:18:01 -05:00
Abel Vesa 30ac9734f6 MLK-19183-2 iMX8QXP SPL: board: imx8qxp_mek: Add spl specific implementation
This adds the spl specific code for imx8qxp.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:17:53 -05:00
Abel Vesa 7586aa50fd MLK-19183-1 iMX8QXP SPL: serial_lpuart: Add non DM serial device
In case CONFIG_DM is not enabled, the driver needs to be initialized through
serial_initfunc. All the ops are implemented again this time using the
lpuart_serial_data.

Signed-off-by: Abel Vesa <abel.vesa@nxp.com>
2018-08-09 15:14:28 -05:00
Joakim Zhang facc02d13a MLK-19150 fastboot: enable fastboot in mx7dsabre
Modify mx7dsabresd.h file and defconfig file to enable fastboot in
mx7dsabre board

Signed-off-by: Joakim Zhang <qiangqing.zhang@nxp.com>
2018-08-08 09:44:56 +08:00
Ye Li 0203415434 MLK-19138 fsl_caam: move the g_jrdata global variable to data section
The imx_sec_init is called at board_f phase, this phase forbids to
write any global variable in BSS section, because the BSS section is
overlay with u-boot dynamic relocation entries (or DTB) which are used during
u-boot relocation after board_f phase.

Now the g_jrdata is in BSS section and it is initialized during imx_sec_init.
Therefore, it destroys the relocation entries (or DTB) and causes various u-boot
issues.

Fix the problem by assiging default value to g_jrdata.status, so g_jrdata is
moved to data section.

Signed-off-by: Ye Li <ye.li@nxp.com>
2018-08-07 05:38:31 -07:00
Luo Ji 9337077a29 MA-12219 [Android] Fix build errors for imx8mm
Android build use different tool chain(gcc 4.9) with yocto(gcc 6.2),
'for' loop initial declarations are not supported in C90, define the
variable first before use it.

Test: build pass for imx8mm_evk.

Change-Id: Idf9a9f21626a02e2e679d2e74410378cd143c3f1
Signed-off-by: Luo Ji <ji.luo@nxp.com>
2018-08-07 11:50:46 +08:00
Peng Fan 718b0792df 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)
2018-08-07 10:54:51 +08:00
Bai Ping 44d97952c6 MLK-19045 imx8mm_evk: enable the dispmix & mipi phy power domain
dispmix & mipi phy power domain must be enabled before doing any
config for lcfif and dsi.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 240475ecb29aff22fb362ea39f3bf8e7045281db)
2018-08-05 22:44:51 -07:00
Bai Ping 76babfc2d9 MLK-18431-03 imx8mm_evk: use the more generic dram init flow on imx8mm evk
Refact the lpddr4 init flow on i.MX8MM EVK board. board level only need
to provide the necessary dram init related parameter.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 72a06ef47c7c93de49730261adb8f251612d1883)
2018-08-05 22:44:27 -07:00
Bai Ping fea0b43ca7 MLK-18431-02: add a more generic dram init flow for imx8m
the dram init is board related. But there is still some common
part can be reused on different board. The basic flow is common
for all the board. only the DDRC and DDR PHY config register setting
is different on different board. So extract the LPDDR4 init common
flow to make it more generic. baord level only need to provide
the DDRC and PHY config register parameter to the common code to finish
the dram init.

the same method can be use for DDR4. will be added later.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 220d0cc79a3f340e0da664242bb19ccda7a071d1)
2018-08-05 22:36:07 -07:00
Bai Ping 8bc766feba MLK-18431-01 imx8mm: move the spl bss base to ocram 0x910000
Move the SPL bss and malloc base to OCRAM 0x910000.
OCRAM_S will be reserved for dram low power purpose.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 2b2cd1adc23525d2fb79dc281cd2a741ebe13f90)
2018-08-05 20:37:44 -07:00
Ye Li 41b5bf2279 MLK-19127 mx6sxsabresd: Change prime ethernet port to eth0
All previous u-boot versions use eth0 as the prime ethernet port on iMX6SX
SDB board. But this default configuration is modified to eth1 when upgrading
to v2017.03. Change it back to align previous setting.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 1f128fdba8399878243444e71646f941a6ca9649)
2018-08-05 20:12:07 -07:00
Ye Li e8bc2dd022 MLK-19086 imx8qxp: Change USDHC root clock to AVPLL for B0
Still meet DPLL unstable issue on iMX8QXP B0 when doing various stress tests.
So switch back to use AVPLL for usdhc on B0

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 099ddce37cf3100d0aeb0964db7b24e5a59ee1d0)
2018-08-05 19:29:52 -07:00
Ye Li e469bf980d 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)
2018-08-05 19:29:05 -07:00
Ye Li 776cd6799e MLK-19023-2 imx: epdc: Eliminate unaligned cache flush
Meet such warning during boot with EPDC splash screen enabled, because the
flushed waveform buffer size is not aligned to cacheline size
   CACHE: Misaligned operation at range [ff027d00, ff270d99]

Since we have enough 4MB buffer allocated, round up the flushed size to
eliminate the warning.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 211af0d11f4472d7575b54ad5d14e79f77e71b6a)
2018-08-05 18:47:22 -07:00
Ye Li cab63772fc MLK-19023-1 imx6: Increase the EPDC waveform buffer size
Since the epdc_flash.bin size has increased over 2MB, the orignal buffer size
can't fit it and will cause overwrite to other useful data in heap. Thus,
increase the EPDC waveform buffer size to 4MB to align imx7d and imx6ul
platforms.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 6aaca204c1ccdb967065ebb03cf39ecd8f4d6766)
2018-08-05 18:47:08 -07:00
Ye Li e9c1c97f64 MLK-18939 mx7ulp_evk: Fix mtest end address issue
When TEE is enabled, the high 32MB memory is reserved to TEE. So the
mtest end address 0x9e000000 will overlay with u-boot runtime text and data.

Fix the issue by changing the mtest end to half of DDR size.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9b56f22639703bd70bfdd1de0cbdcef2b80f0bff)
2018-08-05 18:46:00 -07:00
Jun Li 8481dd21de MLK-19101 usb: gadget: update os_desc_config when add config
Always use the new added config for os_desc_config to fix cdev->
os_desc_config may miss set in case we restart usb gadget driver.

Signed-off-by: Li Jun <jun.li@nxp.com>
(cherry picked from commit e8efb32e9b7a4fe45c7f21e86052c7f5bcdb6695)
2018-08-03 09:52:11 -05:00
Peng Fan 56ea0d9280 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)
2018-08-03 17:18:41 +08:00
Peng Fan 5fc3409941 MLK-19105 imx: mx6: bee: fix build error
CONFIG_STACKSIZE is removed, so when enable CONFIG_CMD_BEE
there will be build failure.

The previous CONFIG_STACKSIZE value is 128KB, so replace
CONFIG_STACKSIZE with SZ_128KB in bee.c to avoid build error.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
2018-08-03 17:08:04 +08:00