u-boot.git
7 years agoMLK-15344 imx8m: Update bl31
Peng Fan [Wed, 5 Jul 2017 10:03:53 +0000 (18:03 +0800)]
MLK-15344 imx8m: Update bl31

Update bl31 with commit 37ee5643e to include tzasc and wdog support.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK15320 imx8qm/imx8qx: Update to SCFW API based on commit:
Ranjani Vaidyanathan [Fri, 30 Jun 2017 20:27:05 +0000 (15:27 -0500)]
MLK15320 imx8qm/imx8qx: Update to SCFW API based on commit:
    "
    commit a645f3c4c529e1f8cc5a624a047a3af56cfd39e1
    Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
    Date:   Thu Jun 29 15:21:53 2017 -0500

        Turn off all HDMI-TX clocks by default. This is required for setting
        the rate of the DIG PLL.
        Add code to enable/disable the correct clocks before SECO accesses the HD

Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
    "
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
7 years agoMA-9828 [uboot] 6ul_Aquila: can't boot up with 2017.03 uboot
zhang sanshan [Wed, 5 Jul 2017 07:02:33 +0000 (15:02 +0800)]
MA-9828 [uboot] 6ul_Aquila: can't boot up with 2017.03 uboot

6ul_aquila will hang at somewhere when boot up.

the prevision of voltage configuration change from 1mV precision
to 0.1mV prevision that cause the conversion are wrong.

Change-Id: I1cdebb2a013e7adce5cd56844102acd4e30977ad
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-15327 imx8mq_evk: Enable CACHE commands
Ye Li [Tue, 4 Jul 2017 10:01:56 +0000 (05:01 -0500)]
MLK-15327 imx8mq_evk: Enable CACHE commands

Enable the icache and dcache commands, so that user can operate caches.
We have set the TCML/U to cachable, so need to flush dcache after copying
image to TCM before kick M4 running.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMA-9825 [Android] uboot: fix the compile issue
zhang sanshan [Tue, 4 Jul 2017 10:44:38 +0000 (18:44 +0800)]
MA-9825 [Android] uboot: fix the compile issue

correct CONFIG_DEFAULT_DEVICE_TREE.

Change-Id: Ie1b3e298152f50d071b500e907d175d7a65c7c66
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-15324-4 imx8qm/qxp: Enable DPUv1 driver and splash screen
Ye Li [Mon, 3 Jul 2017 09:11:31 +0000 (04:11 -0500)]
MLK-15324-4 imx8qm/qxp: Enable DPUv1 driver and splash screen

Add IT6263 LVDS to HDMI card panel parameters to ARM2 boards. And enable
the DPUv1 driver and relevant settings for splash screen.

At default we set the environment variable "panel=NULL" to disable
the display output since it needs display adapter card to plug into the
board. Change the "panel=it6263" to enable it.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15324-3 imx8: Add LVDS and DC setup common functions
Ye Li [Mon, 3 Jul 2017 08:58:22 +0000 (03:58 -0500)]
MLK-15324-3 imx8: Add LVDS and DC setup common functions

Add common functions for LVDS/DC setup, video framebuffer init/disable,
LVDS to HDMI card settings, etc. Refactor it from video_imxdpuv1.c.
1. Add power, clocks, PLL relevant setup for LVDS and DC.
2. Configure the LVDS and its PHY settings for the display format and pixel link.
3. Setup the LVDS to HDMI card.
4. Implement the video_hw_init by calling DC driver API to output data to
   specified display panel.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15324-2 video: imxdpuv1: Add DPU driver for i.MX8
Ye Li [Mon, 3 Jul 2017 08:54:49 +0000 (03:54 -0500)]
MLK-15324-2 video: imxdpuv1: Add DPU driver for i.MX8

Adding new IMXDPUV1 (aka Seeris, Iris-lite) display control driver.

Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15324-1 video: cfb_console: Fix 64 bits support problem
Ye Li [Mon, 29 Aug 2016 05:51:01 +0000 (13:51 +0800)]
MLK-15324-1 video: cfb_console: Fix 64 bits support problem

There are some integer to pointer convert. To support 64 bits system,
change the unsigned int to unsigned long.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15329 imx8mq: evk: revert the wrong ddr script change
Peng Fan [Tue, 4 Jul 2017 05:04:44 +0000 (13:04 +0800)]
MLK-15329 imx8mq: evk: revert the wrong ddr script change

Revert the wrong ddr script change that introduced by
"commit f051779"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15323-4: imx8m: evk: invoke board_late_mmc_env_init
Peng Fan [Mon, 3 Jul 2017 09:19:33 +0000 (17:19 +0800)]
MLK-15323-4: imx8m: evk: invoke board_late_mmc_env_init

Invoke board_late_mmc_init to support dynamically changing mmcroot.
Add board_mmc_get_env_dev to read/save env into correct mmc/sd device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15323-4: imx8m: evk: invoke board_late_mmc_env_init
Peng Fan [Mon, 3 Jul 2017 07:41:17 +0000 (15:41 +0800)]
MLK-15323-4: imx8m: evk: invoke board_late_mmc_env_init

Invoke board_late_mmc_init to support dynamically changing mmcroot.
Add board_mmc_get_env_dev to read/save env into correct mmc/sd device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15323-3 imx8m: implement mmc_get_env_dev
Peng Fan [Mon, 3 Jul 2017 07:40:28 +0000 (15:40 +0800)]
MLK-15323-3 imx8m: implement mmc_get_env_dev

Implement mmc_get_env_dev

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15323-2 imx8m: support more boot device
Peng Fan [Mon, 3 Jul 2017 06:44:18 +0000 (14:44 +0800)]
MLK-15323-2 imx8m: support more boot device

Support more boot device.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15323-1 imx8m: get boot device from rom sw info
Peng Fan [Mon, 3 Jul 2017 05:59:48 +0000 (13:59 +0800)]
MLK-15323-1 imx8m: get boot device from rom sw info

ROM will update ROM_SW_INFO according to boot media, so U-Boot could
reuse that info.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15290 imx8mq: evk: add wdog reset support
Peng Fan [Thu, 29 Jun 2017 03:16:41 +0000 (11:16 +0800)]
MLK-15290 imx8mq: evk: add wdog reset support

Power down wdog counter to avoid reset after 16 seconds.
Add set_wdog_set to configure wcr to use WDOG_B reset.
Configure iomux to output WDOG_B to reset system.
Build watchdog driver for imx8mq.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15294 arm: enforce no-pic for SPL and normal U-Boot
Peng Fan [Fri, 30 Jun 2017 02:17:55 +0000 (10:17 +0800)]
MLK-15294 arm: enforce no-pic for SPL and normal U-Boot

Enforce no-pic for SPL and normal U-Boot. If not, there
will be .got and .got.plt sections for dynamic link.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMA-9795-1[Android] imx8mq-evk: bring up android in u-boot v2017
Zhang Bo [Thu, 29 Jun 2017 08:41:44 +0000 (16:41 +0800)]
MA-9795-1[Android] imx8mq-evk: bring up android in u-boot v2017

Add get_boot_device and get_board_serial in soc.c.
Add is_recovery_key_pressing function definition
Use CONFIG_USB_GADGET and CONFIG_FSL_FASTBOOT to separate the usb related code
in the f_fastboot.c.The CONFIG_USB_FUNCTION_FASTBOOT should be defined So the
boota can work normally.

Change-Id: I6c0d3851ba28b147d0da310485a06f102de5a813
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
7 years agoMA-9795[Android] imx8mq-evk: bring up android in u-boot v2017
Zhang Bo [Thu, 29 Jun 2017 08:38:45 +0000 (16:38 +0800)]
MA-9795[Android] imx8mq-evk: bring up android in u-boot v2017

add configs for imx8mq-evk board.

Change-Id: I9686bc8700fa6ad1355892176ebcf45d758331ea
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
7 years agoMLK-15303: imx8m: fix out of tree build
Peng Fan [Thu, 29 Jun 2017 06:14:39 +0000 (14:14 +0800)]
MLK-15303: imx8m: fix out of tree build

Fix out of tree build.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15301 imx8/imx8m: Change kernel loading address to avoid overlap
Ye Li [Thu, 29 Jun 2017 02:15:44 +0000 (21:15 -0500)]
MLK-15301 imx8/imx8m: Change kernel loading address to avoid overlap

Currently, the space between kernel loading address and u-boot start address
is less than 512KB, smaller than u-boot size.  This is ok for normal booting,
because u-boot will relocate itself to higher memory address before loading the
kernel. But for mfgtool which pre-loads kernel and u-boot into memory, this causes overlap.

So need change the kernel loading address. Add 2MB offset to it. Because ARM64 kernel
has such requirement:
"arm64 requires the kernel image to placed TEXT_OFFSET bytes beyond a 2 MB aligned base“

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by : Peng Fan <peng.fan@nxp.com>

7 years agoMLK-15298 imx8mq: reuse imx-common code to add reset cause
Peng Fan [Wed, 28 Jun 2017 13:15:55 +0000 (21:15 +0800)]
MLK-15298 imx8mq: reuse imx-common code to add reset cause

Reuse imx-common code for cpuinfo.
Add a dummy crm_regs.h file, becasue imx-common code includes it.
Add src register map for i.MX8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMA-9717 [iot] Add board support for imx6dl pico pi
fang hui [Mon, 12 Jun 2017 05:21:54 +0000 (13:21 +0800)]
MA-9717 [iot] Add board support for imx6dl pico pi

Add board support for imx6dl pico pi

Change-Id: I2003b1713122580c514a98759587023fef5deb3a
Signed-off-by: fang hui <hui.fang@nxp.com>
7 years agoMLK-15297 imx8mq_evk: Change to not static link the DDR PHY FW
Ye Li [Wed, 28 Jun 2017 07:26:41 +0000 (02:26 -0500)]
MLK-15297 imx8mq_evk: Change to not static link the DDR PHY FW

To avoid violating GPL license, we can't static link the DDR PHY FW into
uboot binary, so change to attach the FW images with u-boot binary.

Remove the codes and link scripts for static linking the FW in sections.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15291 imx8mq: evk: Add LPDDR4 performance register settings
Peng Fan [Tue, 27 Jun 2017 06:50:11 +0000 (14:50 +0800)]
MLK-15291 imx8mq: evk: Add LPDDR4 performance register settings

Add LPDDR4 performance register settings

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Jian Li <jian.li@nxp.com>
7 years agoMLK-15292 imx8m: Update the bl31 image for i.mx8mq
Bai Ping [Tue, 27 Jun 2017 07:46:26 +0000 (15:46 +0800)]
MLK-15292 imx8m: Update the bl31 image for i.mx8mq

Update the bl31 ATF image for i.MX8MQ.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
7 years agoMA-9409-3 Add base board support for android and android things.
zhang sanshan [Mon, 22 May 2017 07:17:44 +0000 (15:17 +0800)]
MA-9409-3 Add base board support for android and android things.

* add board support for android and android things.
  mx6ul_nxpu_iopb, pico-6ul, pico-imx7d, aquila-6ul
  reorganize the Kconfig, and fix the redefine issue.
* add android configure into configure-while
* add a common file mx_android_common.h
  it will be included by android and android things.
  defconfig only include ANDROID_THINGS_SUPPORT or ANDROID_SUPPORT
* move partition_table_valid into f_fastboot.c.
  it's a common code.
* add invalidate_dcache_range in fixed order.
  It will have salt invalid issue if we do not add it in order
* add display for pico-7d.

Change-Id: I6f8a4876c2f8bbd098034d1e3f53033109300bca
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9409-2 fix some issue for android and android things
zhang sanshan [Mon, 22 May 2017 06:08:14 +0000 (14:08 +0800)]
MA-9409-2 fix some issue for android and android things

* Add CONFIG_SYSTEM_RAMDISK_SUPPORT to support system's ramdisk
* Normal boot: cmdline to bypass ramdisk in boot.img,
  but use Recovery boot: Use the ramdisk in boot.img
* commandline is larger than 512, system can't bootup sometime for commandline issue.
* support fastboot getvar.
* Support "fastboot erase" command for emmc device.
  TODO: uboot community have api to operate flash, we can unify this part
* support "fastboot flash" even on damaged gpt

Change-Id: I080c25d6569d6cab56ff025601cd3b8df21cf3dd

7 years agoMA-9409-1 enable avb on android things.
zhang sanshan [Mon, 15 May 2017 02:45:07 +0000 (10:45 +0800)]
MA-9409-1 enable avb on android things.

Fix issue for API changed from v2017.
porting below patch from v2016.
commit 44834fd12f60a090e3d10ab6f84a75460894d49d

Change-Id: Ifaf0b86dd29648f9150646f00f54502676df9013
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9786[Android] change bootdelay time to zero to optimize boot time
Zhang Bo [Mon, 26 Jun 2017 10:40:24 +0000 (18:40 +0800)]
MA-9786[Android] change bootdelay time to zero to optimize boot time

Change the CONFIG_BOOTDELAY macro to 0 in defconfig to autoboot without delay.

Change-Id: Ie4f49325b0bac73eed6aafe59bf6a5ec584a4d43
Signed-off-by: Zhang Bo <bo.zhang@nxp.com>
7 years agoMLK-15289 imx8m: Change USDHC1/2 clocks to 200Mhz
Ye Li [Tue, 27 Jun 2017 03:10:46 +0000 (22:10 -0500)]
MLK-15289 imx8m: Change USDHC1/2 clocks to 200Mhz

The USDHC uses default clock root OSC 25Mhz, this causes SD/eMMC reading
very slowly.
This patch changes the USDHC IP/BUS clock to 200Mhz.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15288-2 imx8m: Fix build warning in clock
Ye Li [Tue, 27 Jun 2017 02:29:48 +0000 (21:29 -0500)]
MLK-15288-2 imx8m: Fix build warning in clock

Fix the build warning below:

arch/arm/cpu/armv8/imx8m/clock.c: In function ‘decode_frac_pll’:
arch/arm/cpu/armv8/imx8m/clock.c:37:36: warning: variable ‘pll_newdiv’
set but not used [-Wunused-but-set-variable]
 u32 divr_val, divq_val, divf_val, pll_newdiv, divff, divfi;

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15288-1 fsl_usdhc: Fix typo error for i.MX8M
Ye Li [Tue, 27 Jun 2017 02:28:08 +0000 (21:28 -0500)]
MLK-15288-1 fsl_usdhc: Fix typo error for i.MX8M

Got the build warning below due to the typo error. Fix it.

drivers/mmc/fsl_esdhc.c: In function ‘check_and_invalidate_dcache_range’:
drivers/mmc/fsl_esdhc.c:355:10: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
 start = (unsigned)data->dest;

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15286 arm: arm64: only use general regs
Peng Fan [Mon, 26 Jun 2017 12:18:10 +0000 (20:18 +0800)]
MLK-15286 arm: arm64: only use general regs

When compiling with android toolchain, there is an instruction
"str     q0, [x8],#16", but x8 is not 16bytes aligned,
this instruction will trigger sync abort.

So, following Linux kernel, only use general regs for arm64.
If not, compiler may use simd registers Q[x]. We need to avoid
using simd registers in U-Boot, because load/store Q[x] has
restriction that 128bits aligned when str/ldr.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-15 imx8m: add EVK board support
Peng Fan [Mon, 26 Jun 2017 06:15:51 +0000 (14:15 +0800)]
MLK-15142-15 imx8m: add EVK board support

Add i.MX8M EVK board support.
The drivers are not switched to use driver model now.
SPL is used to initialize DDR Controller and DDR PHY, then
load u-boot.img from SD to DRAM.
ATF and PHY FW bin are included.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-14 net: fec: do not access reserved register for i.MX8M
Peng Fan [Fri, 23 Jun 2017 08:07:46 +0000 (16:07 +0800)]
MLK-15142-14 net: fec: do not access reserved register for i.MX8M

The MIB RAM and FIFO receive start register does not exist on
i.MX8M. Accessing these register will cause system hang.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-15142-13 imx8m: add ddr memory map
Peng Fan [Fri, 23 Jun 2017 07:58:46 +0000 (15:58 +0800)]
MLK-15142-13 imx8m: add ddr memory map

Add ddr register memory map

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-12 gpio: mxc: add i.MX8M support
Peng Fan [Fri, 23 Jun 2017 07:55:00 +0000 (15:55 +0800)]
MLK-15142-12 gpio: mxc: add i.MX8M support

Add i.MX8M GPIO support.
There are 4 GPIO banks on i.MX8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-11 imx8m: add ddr phy fw section
Peng Fan [Fri, 23 Jun 2017 07:49:27 +0000 (15:49 +0800)]
MLK-15142-11 imx8m: add ddr phy fw section

Add ddr phy fw section in SPL link file.
Also when objcopy, do not ignore the firmware section.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-10 Makefile: bind ATF for i.MX8M
Peng Fan [Mon, 26 Jun 2017 05:48:25 +0000 (13:48 +0800)]
MLK-15142-10 Makefile: bind ATF for i.MX8M

Bind ATF with u-boot-nodtb.bin together.
Since now ATF's entry is 0x40001000, so when
generating u-boot.img, we use 0x40001000
as the load and entry address.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-9 imx-common: lcdif: include i.MX8M
Peng Fan [Fri, 23 Jun 2017 02:53:04 +0000 (10:53 +0800)]
MLK-15142-9 imx-common: lcdif: include i.MX8M

Include i.MX8M in lcdif register layout map.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-8 mmc: fsl_esdhc: support i.MX8M
Peng Fan [Fri, 23 Jun 2017 02:49:49 +0000 (10:49 +0800)]
MLK-15142-8 mmc: fsl_esdhc: support i.MX8M

support i.MX8M in fsl esdhc driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-7 misc: ocotp add i.MX8M support
Peng Fan [Fri, 23 Jun 2017 02:43:58 +0000 (10:43 +0800)]
MLK-15142-7 misc: ocotp add i.MX8M support

i.MX8M OCOTP follow same flow as i.MX6Q, but it has 64 banks
and each bank 4 words.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-6: imx-common: include imx8m support
Peng Fan [Fri, 23 Jun 2017 02:37:46 +0000 (10:37 +0800)]
MLK-15142-6: imx-common: include imx8m support

Build iomux/i2c/bootaux for i.MX8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-5: imx: imx8m: add soc initialization code
Peng Fan [Mon, 26 Jun 2017 06:08:53 +0000 (14:08 +0800)]
MLK-15142-5: imx: imx8m: add soc initialization code

Add soc level initialization code.
Add arch_cpu_init.
Add M4 boot.
Add timer_init.
Add cpuinfo
Add dummy SoC ID.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15142-4 imx: imx8m: add clock driver
Peng Fan [Mon, 26 Jun 2017 07:44:27 +0000 (15:44 +0800)]
MLK-15142-4 imx: imx8m: add clock driver

Add clock driver to support i.MX8M.
There are two kind PLLs, FRAC PLL and SSCG PLL.
ROM code already configured SYS PLL1/PLL2, so we
just enabled all the output here.
The clock root is similar to i.MX7D, so have similar
code structure as i.MX7D. The clock_slice is mainly for
setting clock root.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
7 years agoMLK-15142-3 imx: imx8m: add pin header file
Peng Fan [Mon, 26 Jun 2017 05:47:22 +0000 (13:47 +0800)]
MLK-15142-3 imx: imx8m: add pin header file

Add pin header file for i.MX8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15142-2 imx: imx8m: add register definition header file
Peng Fan [Mon, 26 Jun 2017 06:07:42 +0000 (14:07 +0800)]
MLK-15142-2 imx: imx8m: add register definition header file

Add register definition header file for i.MX8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15142-1 armv8: add i.MX8M into Kconfig
Peng Fan [Mon, 26 Jun 2017 02:45:06 +0000 (10:45 +0800)]
MLK-15142-1 armv8: add i.MX8M into Kconfig

Add i.MX8M into Kconfig.

The architecture of i.MX8M is different to i.MX8QM/QXP, so
add a new folder for i.MX8M.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15127 mx7dsdb: fix epdc en gpio usage
Peng Fan [Wed, 21 Jun 2017 02:47:16 +0000 (10:47 +0800)]
MLK-15127 mx7dsdb: fix epdc en gpio usage

Request gpio before use it, otherwise it will fail to
drive the gpio when gpio_direction_output.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 31da76c496511b3d640ac1008b630b3ec939e168)

7 years agoMLK-15108 mx7d_12x12_lpddr3_arm2: Fix PMIC setting issue
Ye Li [Tue, 20 Jun 2017 11:30:18 +0000 (06:30 -0500)]
MLK-15108 mx7d_12x12_lpddr3_arm2: Fix PMIC setting issue

Fix the SW2MODE setting problem in power_init_board, which causes issue when wakeup source
is set in kernel for LPSR.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Bai Ping <ping.bai@nxp.com>
7 years agoMLK-13723 imx7d: restore epdc QoS setting after exit the lpsr mode
Robby Cai [Wed, 30 Nov 2016 14:05:03 +0000 (22:05 +0800)]
MLK-13723 imx7d: restore epdc QoS setting after exit the lpsr mode

without this patch, the QoS setting will be lost after exit LPSR mode.
The patch moves the QoS setting into DDR setting group (in plugin mode), thus
when exit LPSR mode, QoS setting will be restored as well as DDR setting.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit 0b217456375bace3fbe9a72c7e92a46dc1907277)

7 years agoMLK-15087 mx7ulp_evk: Add m4 boot defconfig
Ye Li [Wed, 14 Jun 2017 13:19:06 +0000 (08:19 -0500)]
MLK-15087 mx7ulp_evk: Add m4 boot defconfig

Add back the defconfig to boot M4 in single mode, because some customers
are using the defconfig during development.

Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15086 arm: Add firmware_image section to objcopy flags
Ye Li [Wed, 14 Jun 2017 13:15:47 +0000 (08:15 -0500)]
MLK-15086 arm: Add firmware_image section to objcopy flags

The u-boot limits the needed sections in .bin by set -j parameter
in objcopy. Need to add the firmware_image section for M4 image.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-14994 mx7ulp: Update M4 image header version check
Ye Li [Wed, 14 Jun 2017 12:54:20 +0000 (07:54 -0500)]
MLK-14994 mx7ulp: Update M4 image header version check

The latest M4 image uses the version 0x41 not 0x40, have to update
it when checking M4 image. Otherwise M4 image won't be loaded.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMA-9763 Include init.${ro.hardware}.${ro.boot.soc_type}.rc based uboot's soc_type
guoyin.chen [Mon, 19 Jun 2017 09:59:42 +0000 (17:59 +0800)]
MA-9763 Include init.${ro.hardware}.${ro.boot.soc_type}.rc based uboot's soc_type

Append androidboot.soc_type based on the imx soc type

Change-Id: I3ae18bff42b434eb77728a7db70dd3baf6d7e0a6
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
7 years agoMA-9721-2 [Android]arm2-8qxp: bring up arm2 imx8qxp for android
sanshan zhang [Tue, 13 Jun 2017 04:47:28 +0000 (12:47 +0800)]
MA-9721-2 [Android]arm2-8qxp: bring up arm2 imx8qxp for android

add configure for arm2 imx8qxp.

Change-Id: Ie123e9c342f920db4428d06a8ee580314edc70b8
Signed-off-by: sanshan zhang <sanshan.zhang@nxp.com>
7 years agoMA-9721-1 [Android]arm2-8qxp: bring up arm2 imx8qxp for android
sanshan zhang [Tue, 13 Jun 2017 04:46:01 +0000 (12:46 +0800)]
MA-9721-1 [Android]arm2-8qxp: bring up arm2 imx8qxp for android

add is_recovery_key_pressing for imx8qxp.

Change-Id: I660c09e026250d9815ac4db38f17c674d49320ce
Signed-off-by: sanshan zhang <sanshan.zhang@nxp.com>
7 years agoMLK-14533 mx7ulp_evk: Change APLL and its PFD0 frequencies
Ye Li [Tue, 28 Mar 2017 08:52:12 +0000 (16:52 +0800)]
MLK-14533 mx7ulp_evk: Change APLL and its PFD0 frequencies

To support HDMI display on EVK board, the LCDIF pix clock must be 25.2Mhz. Since
the its PCC divider range is from 1-8, the max rate of LCDIF PCC source clock is
201.6Mhz. This limits the source clock must from NIC1 bus clock or NIC1 clock, other sources
from APLL PFDs are higher than this max rate.

The NIC1 bus clock and NIC1 clock are from DDRCLK whose parent source is APLL PFD0, so we must
change the APLL PFD0 and have impact to DDRCLK, NIC1 and NIC1 bus.

Eventually, this requests to set the APLL PFD0 frequency to 302.4Mhz (25.2 * 12),
with settings:

PFD0 FRAC:  32
APLL MULT:  22
APLL NUM:   2
APLL DENOM: 5

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Fancy Fang <chen.fang@nxp.com>
(cherry picked from commit 91be2789a93288cc087cd9e8db522c8308ef007c)

7 years agoMLK-15044 DTS: mx6ul/ullevk: Add OTG ID pin mux
Ye Li [Fri, 9 Jun 2017 07:36:03 +0000 (02:36 -0500)]
MLK-15044 DTS: mx6ul/ullevk: Add OTG ID pin mux

The OTG ID pin mux setting is missed in DTS, so the OTG can't work
as host mode.

Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15026-4 usb: host: xhci-imx8: add imx8 USB3 driver
Peter Chen [Wed, 7 Jun 2017 09:20:06 +0000 (17:20 +0800)]
MLK-15026-4 usb: host: xhci-imx8: add imx8 USB3 driver

It is for imx8qm and imx8qxp, and the cadence IP is in it.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-15026-3 configs: imx8qm_arm2: enable USB3
Peter Chen [Wed, 7 Jun 2017 06:21:02 +0000 (14:21 +0800)]
MLK-15026-3 configs: imx8qm_arm2: enable USB3

Enable USB3 configuration, only host mode is supported now.
And disable EHCI support at imx8qm_lpddr4_arm2_defconfig.
Currently, the EHCI and xHCI can't be enabled at the same time
due to below redefinition symbols:

drivers/usb/host/xhci.o: In function `submit_control_msg':
/home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1032: multiple definition of `submit_control_msg'
drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1517: first defined here
drivers/usb/host/xhci.o: In function `submit_bulk_msg':
/home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1045: multiple definition of `submit_bulk_msg'
drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1141: first defined here
drivers/usb/host/xhci.o: In function `submit_int_msg':
/home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1053: multiple definition of `submit_int_msg'
drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1523: first defined here
drivers/usb/host/xhci.o: In function `usb_lowlevel_init':
/home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1063: multiple definition of `usb_lowlevel_init'
drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1097: first defined here
drivers/usb/host/xhci.o: In function `usb_lowlevel_stop':
/home/b29397/work/projects/uboot-imx/drivers/usb/host/xhci.c:1102: multiple definition of `usb_lowlevel_stop'
drivers/usb/host/ehci-hcd.o:/home/b29397/work/projects/uboot-imx/drivers/usb/host/ehci-hcd.c:1092: first defined here
scripts/Makefile.build:359: recipe for target 'drivers/usb/host/built-in.o' failed
make[1]: *** [drivers/usb/host/built-in.o] Error 1

If the user wants to use EHCI for chipidea IP at imx8qm, please comment out
CONFIG_USB_XHCI_HCD
CONFIG_USB_XHCI_IMX
And define
CONFIG_USB_EHCI_HCD
CONFIG_DM_USB
at imx8qm_lpddr4_arm2_defconfig

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-15026-2 board: imx8qm_arm2: add USB3 support
Peter Chen [Wed, 7 Jun 2017 06:19:46 +0000 (14:19 +0800)]
MLK-15026-2 board: imx8qm_arm2: add USB3 support

It only supports USB3 power up sequence now.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years agoMLK-15026-1 usb: host: xhci-mem: add scratch buffer support
Peter Chen [Mon, 27 Feb 2017 01:13:45 +0000 (09:13 +0800)]
MLK-15026-1 usb: host: xhci-mem: add scratch buffer support

Add scratch buffer support which is missing at u-boot.
No sure if all USB3 IP is needed, but it should have
no affect for adding it.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
7 years ago MA-9702-3 [Android] arm2-8qm: bring up android in v2017.
sanshan zhang [Thu, 8 Jun 2017 02:43:42 +0000 (10:43 +0800)]
 MA-9702-3 [Android] arm2-8qm: bring up android in v2017.

add configs for arm2-8qm.

Change-Id: Ief47e1587f6dbc4f16b243c29fa9bc9c8c80c044
Signed-off-by: sanshan zhang <sanshan.zhang@nxp.com>
7 years agoMA-9702-2 [Android] arm2-8qm: bring up android in v2017.
sanshan zhang [Thu, 8 Jun 2017 02:41:38 +0000 (10:41 +0800)]
MA-9702-2 [Android] arm2-8qm: bring up android in v2017.

enable booti for imx8.
boot_addr_start for booti should be the addr of Image rather than
boot.img, so need read Image into hdr->kernel_addr.
change the offset for bootloader.
booti do not call android_image_get_kernel to init android env.
booti can't load boot.img, so it can't init android env.
init android env through android_image_get_kernel.

Change-Id: Ifb990ee9c5710ce7bd5fa9a0d4221dcb0e52d341
Signed-off-by: sanshan zhang <sanshan.zhang@nxp.com>
7 years agoMA-9702-1 [Android] arm2-8qm: bring up android in v2017.
sanshan zhang [Thu, 8 Jun 2017 02:11:09 +0000 (10:11 +0800)]
MA-9702-1 [Android] arm2-8qm: bring up android in v2017.

add api get_board_serial and is_recovery_key_pressing for android.
1. read unique num from fuse through api sc_misc_otp_fuse_read exported
   by sc firmware.
2. many register have not added in reg.h
   set is_recovery_key_pressing into TODO list.

Change-Id: I2175e3a379d979ed473a4494695483dbf579bb2d
Signed-off-by: sanshan zhang <sanshan.zhang@nxp.com>
7 years agoMLK-15013-6 imx8qm_arm2: Enable USB DM driver for USBOH controller
Ye Li [Tue, 6 Jun 2017 08:14:41 +0000 (03:14 -0500)]
MLK-15013-6 imx8qm_arm2: Enable USB DM driver for USBOH controller

Add board codes and configurations to enable USB DM driver (host and gadget)
for the USBOH(OTG) controller on i.MX8QM ARM2 board.

For device mode, the UMS (USB mass storage) is enabled at default.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15013-5 DTS: imx8qm_arm2: update USBOH nodes
Ye Li [Tue, 6 Jun 2017 08:12:32 +0000 (03:12 -0500)]
MLK-15013-5 DTS: imx8qm_arm2: update USBOH nodes

Add the usb alias for OTG1 in QM dtsi.
Add OTG1 power control and its GPIO regulator node.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15013-4 imx8qxp_arm2: Enable USB DM driver for USBOH controller
Ye Li [Tue, 6 Jun 2017 04:09:40 +0000 (23:09 -0500)]
MLK-15013-4 imx8qxp_arm2: Enable USB DM driver for USBOH controller

Add board codes and configurations to enable USB DM driver (host and gadget)
for the USBOH(OTG) controller on i.MX8QXP ARM2 board.

For device mode, the UMS (USB mass storage) is enabled at default.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15013-3 DTS: imx8qxp_arm2: Add USBOH nodes
Ye Li [Tue, 6 Jun 2017 04:07:43 +0000 (23:07 -0500)]
MLK-15013-3 DTS: imx8qxp_arm2: Add USBOH nodes

Add USB OTG, PHY relevant nodes and properties. Add its power control pin
to GPIO regulator.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15013-2 imx8: Add SoC level support for USBOH controller
Ye Li [Tue, 6 Jun 2017 04:05:28 +0000 (23:05 -0500)]
MLK-15013-2 imx8: Add SoC level support for USBOH controller

Add the otg power and clock settings functions. The USBOH clocks are
from Connectivity subsystem's internal bus clocks, which are enabled
at default, so no operation needed to enable them.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15013-1 ehci-mx6: Add i.MX8 OTG controller support
Ye Li [Tue, 6 Jun 2017 04:03:24 +0000 (23:03 -0500)]
MLK-15013-1 ehci-mx6: Add i.MX8 OTG controller support

The i.MX8 has two USB controllers: USBOH and USB3. The USBOH reuses
previous i.MX6/7. It has same PHY IP as i.MX7ULP but NC registers
are same as i.MX7D. So add its support in ehci-mx6 driver.

Also the driver is updated to remove build warning for 64 bits CPU.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15016 mfgtool fixed typo fdtaddr of environment
Frank Li [Tue, 6 Jun 2017 16:50:27 +0000 (11:50 -0500)]
MLK-15016 mfgtool fixed typo fdtaddr of environment

replace fdt_addr with fdtaddr

Signed-off-by: Frank Li <Frank.Li@nxp.com>
7 years agoMLK-14998 i.MX8: Update to the latest SCFW API
Ranjani Vaidyanathan [Fri, 26 May 2017 22:33:53 +0000 (17:33 -0500)]
MLK-14998 i.MX8: Update to the latest SCFW API

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
7 years agoMLK-14996-2 imx8qm/qxp: add boot from usb support
Peng Fan [Thu, 1 Jun 2017 07:05:46 +0000 (15:05 +0800)]
MLK-14996-2 imx8qm/qxp: add boot from usb support

Add boot from usb support.
Follow same flow as i.mx6 chips.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-14996-1 configs: qm/qxp_arm2: add mfg env settings
Peng Fan [Thu, 1 Jun 2017 03:11:00 +0000 (11:11 +0800)]
MLK-14996-1 configs: qm/qxp_arm2: add mfg env settings

Add MFG ENV settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-14992 imx8qm_arm2/imx8qxp_arm2: Add dynamic SD/MMC env settings
Ye Li [Wed, 31 May 2017 09:25:15 +0000 (04:25 -0500)]
MLK-14992 imx8qm_arm2/imx8qxp_arm2: Add dynamic SD/MMC env settings

Implement functions used for dynamically setting environment of SD/MMC device
for bootargs and saveenv. And enable the board_late_init as a default
selection for i.MX8QM/QXP ARM2.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14991-2 imx8qm_arm2/imx8qxp_arm2: Add print for boot device
Ye Li [Wed, 31 May 2017 08:25:30 +0000 (03:25 -0500)]
MLK-14991-2 imx8qm_arm2/imx8qxp_arm2: Add print for boot device

Add a print for current boot device to u-boot console.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14991-1 imx8: Add support to get boot device
Ye Li [Wed, 31 May 2017 08:23:38 +0000 (03:23 -0500)]
MLK-14991-1 imx8: Add support to get boot device

For i.MX8QM and QXP, ROM provides rom info structure for passing boot device and
other boot information. Use it to implement the common function get_boot_device.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14930-2 dwc_ahsata: Fix memory issue in reset_sata
Ye Li [Wed, 24 May 2017 07:13:00 +0000 (02:13 -0500)]
MLK-14930-2 dwc_ahsata: Fix memory issue in reset_sata

The reset_sata should reset the sata device info and free the probe_ent
memory. Otherwise, it will cause memory leak if we init the sata again.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14930-1 cmd: sata: Fix sata init and stop issue
Ye Li [Wed, 24 May 2017 07:12:04 +0000 (02:12 -0500)]
MLK-14930-1 cmd: sata: Fix sata init and stop issue

When sata stop is executed, the sata_curr_device is not reset to -1, so
any following sata commands will not initialize the sata again and cause
problem.

Additional, in sata init implementation, the sata_curr_device should be updated,
otherwise sata will be initialized again when doing other sata commands like
read/write/info/part/device.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14970-4 imx8qxp_arm2: Add i.MX8QXP ARM2 board support
Ye Li [Wed, 24 May 2017 01:51:23 +0000 (20:51 -0500)]
MLK-14970-4 imx8qxp_arm2: Add i.MX8QXP ARM2 board support

Add board level codes and DTS for i.MX8QXP LPDDR4 ARM2 board.

Copy the DTS from imx_4.9.y kernel on commit:
"4590bca4a6bc6ae8625c37bb027697a17d1b925f"
With modifications to support FlexSPI flash, PCA953x and MIPI I2C.

- Enabled DM driver:
  FEC, LPUART, LPI2C, GPIO, SD/MMC, FSPI, PCA953X

- Enabled Non-DM driver:
  PCIE, iomux, fuse

- Disabled driver:
  mailbox, pinctrl (will try to use later)

- Board defconfigs:
  imx8qxp_lpddr4_arm2_defconfig

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Prabhu Sundararaj <prabhu.sundararaj@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14970-3 imx8qxp: Add DTS and binding header files
Ye Li [Tue, 23 May 2017 10:32:33 +0000 (05:32 -0500)]
MLK-14970-3 imx8qxp: Add DTS and binding header files

Copy the imx8qm DTS files and its binding header files from imx_4.9.y kernel
on commit:
"
 commit 4590bca4a6bc6ae8625c37bb027697a17d1b925f
 Author: Anson Huang <Anson.Huang@nxp.com>
 Date:   Tue May 23 20:06:40 2017 +0800

    MLK-14967-2 ARM64: dts: freescale: imx8qxp: add M4 dtb

    Add M4 dtb for i.MX8QXP LPDDR4 ARM2 board.

    Reserve first 4M memory for below usage:

    0x80000000 - 0x800fffff: ARM Trusted Firmware;
    0x80100000 - 0x803fffff: M4/RPMSG;

Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
"

Add extra support used in u-boot:
1. Add alias for FSPI nodes
2. Add GPIO alias which is used as seq number in u-boot DM GPIO driver.
3. Ajust GPIO nodes ahead of i2c nodes. The PCA9557 is a i2c device, if we
   arrange the i2c nodes ahead of GPIO nodes, the GPIO seq number for PCA9557
   will overlay with GPIO nodes. This will cause issue to use GPIO in u-boot.
4. Add i2c alias for i2c0 to i2c3.
5. Add mipi0/mipi1 i2c0 controllers' nodes.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14970-2 imx8: Update lpi2c power domains for i.MX8QXP
Ye Li [Tue, 23 May 2017 15:23:31 +0000 (10:23 -0500)]
MLK-14970-2 imx8: Update lpi2c power domains for i.MX8QXP

There two MIPI/LVDS combo modules on i.MX8QXP DC0, different as i.MX8QM.
Update the power domains for the MIPI DSI I2C controllers.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14970-1 imx8: Update get cpu clock rate function for i.MX8QXP
Ye Li [Tue, 23 May 2017 10:34:53 +0000 (05:34 -0500)]
MLK-14970-1 imx8: Update get cpu clock rate function for i.MX8QXP

Need to get A35 for cpu clock rate on i.MX8QXP.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-26 imx8qm_arm2: Add i.MX8QM ARM2 board support
Ye Li [Thu, 18 May 2017 12:51:34 +0000 (07:51 -0500)]
MLK-14938-26 imx8qm_arm2: Add i.MX8QM ARM2 board support

Add board level codes and DTS for i.MX8QM LPDDR4 ARM2 board.

Copy the DTS from imx_4.9.y kernel on commit:
"f4b0affd5477301f732efc8ee21185b11495cfcf"
With modifications to support FlexSPI flash and PCA953x

- Enabled DM driver:
  FEC, LPUART, LPI2C, GPIO, SD/MMC, FSPI, PCA953X

- Enabled Non-DM driver:
  SATA, PCIE, iomux, fuse

- Disabled driver:
  mailbox, pinctrl (will try to use later)

- Board defconfigs:
  imx8qm_lpddr4_arm2_defconfig

Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Peter Chen <peter.chen@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-25 imx8qm: Add DTS and binding header files
Ye Li [Thu, 18 May 2017 08:07:18 +0000 (03:07 -0500)]
MLK-14938-25 imx8qm: Add DTS and binding header files

Copy the imx8qm DTS files and its binding header files from imx_4.9.y kernel
on commit:
"
 commit f4b0affd5477301f732efc8ee21185b11495cfcf
 Author: Fugang Duan <fugang.duan@nxp.com>
 Date:   Fri May 19 18:12:23 2017 +0800

    MLK-14952 arm64: dts: imx8qm/qxp: add enet support

    Add enet support for i.MX8QM and i.MX8QXP lpddr4 arm2 board.
"

Add extra support used in u-boot:
1. Add mbox-cells used for mailbox
2. Add alias for FSPI nodes
3. Add GPIO alias which is used as seq number in u-boot DM GPIO driver.
4. Ajust GPIO nodes ahead of i2c nodes. The PCA9557 is a i2c device, if we
   arrange the i2c nodes ahead of GPIO nodes, the GPIO seq number for PCA9557
   will overlay with GPIO nodes. This will cause issue to use GPIO in u-boot.
5. Add i2c alias for i2c0 to i2c4, i2c6 and i2c8.
6. Modify ethernet alias index start from 0

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-24 mailbox: add imx mu DM mailbox driver
Teo Hall [Mon, 12 Sep 2016 19:15:44 +0000 (14:15 -0500)]
MLK-14938-24 mailbox: add imx mu DM mailbox driver

implement i.MX Messaging Unit driver within the DM Mailbox uclass

Signed-off-by: Teo Hall <teo.hall@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-23 mailbox: enable mbox_send non-blocking use
Teo Hall [Mon, 12 Sep 2016 19:12:25 +0000 (14:12 -0500)]
MLK-14938-23 mailbox: enable mbox_send non-blocking use

Add a timeout to allow non-blocking use in the
same way as mbox_recv

Signed-off-by: Teo Hall <teo.hall@nxp.com>
7 years agoMLK-14938-22 mxc_gpio: Change to get value from DR register
Ye Li [Fri, 28 Apr 2017 14:36:57 +0000 (09:36 -0500)]
MLK-14938-22 mxc_gpio: Change to get value from DR register

Currently the driver gets value from PSR register, but this register
is only for input mode. For output mode, it always return 0 not the
value we set for output.

This patch changes to use DR register, which returns the DR value for
output mode, and PSR value for input mode.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-21 mxc_gpio: add support for i.MX8
Adrian Alonso [Tue, 8 Mar 2016 20:53:31 +0000 (14:53 -0600)]
MLK-14938-21 mxc_gpio: add support for i.MX8

Add support for iMX8 SoC platforms, and extend to support LSIO GPIO0..GPIO7 ports.
Since the i.MX8 GPIO banks are indexed from 0 not 1 on other i.MX platforms,
so we have to adjust the index accordingly.

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-20 spi_flash: Remove SECT_4K flag for mt35xu512aba
Ye Li [Wed, 26 Apr 2017 21:10:54 +0000 (16:10 -0500)]
MLK-14938-20 spi_flash: Remove SECT_4K flag for mt35xu512aba

Found the 4K subsector erase can't work on this mt35xu512aba flash.
Remove this flag to use 128K sector erase.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-19 spi: Add FlexSPI Driver for i.MX8QM
Ye Li [Tue, 28 Mar 2017 02:14:10 +0000 (10:14 +0800)]
MLK-14938-19 spi: Add FlexSPI Driver for i.MX8QM

Add fsl_fspi driver for flexspi controller. This driver supports:
1. DDR Quad output
2. Prefetch function for improve read performance.
3. Fast read and Quad read for one line read mode.
4. Read flash FSR register.
5. DM.

Signed-off-by: Han Xu <han.xu@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-18 sata: Add i.MX8 SATA support
Ye Li [Mon, 27 Mar 2017 09:35:42 +0000 (17:35 +0800)]
MLK-14938-18 sata: Add i.MX8 SATA support

- some delay is required between SATA_CTRL0 RST SET and CLR.
  Otherwise, sata phy link would be down.
- specific the ahci modification by imx8qm platform.

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-17 pcie: Add support for i.MX8QM/QXP PCIe
Ye Li [Mon, 27 Mar 2017 07:46:55 +0000 (15:46 +0800)]
MLK-14938-17 pcie: Add support for i.MX8QM/QXP PCIe

- one lane pcie gen2 link is okay, the cfg space
  of the rc/ep can be accessed.
  rc cfg base 0x5f00_0000. ep cfg base 0x6000_0000
- limit to gen2 speed
- mask the wait of eq3 finish, because it is used
  for gen3.
- use pcie_ctrla_init_rc() to do the initialization
  of the pciea controller
- setup the common pcie codes in pcie_imx8x.c, separate
  the different soc speicifed initialization codes into
  their own pcie/board codes, move the macro definitions
  into the new header file imx8_hsio.h.
- i.MX8QXP only have PCIe Control B. Enable PORT B at default.
  i.MX8QM needs to set CONFIG_IMX_PCIEB to enable PORT B.

Signed-off-by: Frank Li <Frank.Li@nxp.com>
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Signed-off-by: Shenwei Wang <shenwei.wang@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-16 net: fec: do not access reserved register for i.MX8
Ye Li [Thu, 27 Apr 2017 18:51:45 +0000 (13:51 -0500)]
MLK-14938-16 net: fec: do not access reserved register for i.MX8

The MIB RAM and FIFO receive start register does not exist on
i.MX8. Accessing these register will cause SERROR in kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-15 net: fec: Remove build warnings for 64bits support
Ye Li [Mon, 27 Mar 2017 02:58:46 +0000 (10:58 +0800)]
MLK-14938-15 net: fec: Remove build warnings for 64bits support

When building for 64bits system, we get some warnings about type
cast between pointer and integer. This patch eliminates the warnings
by using ulong/long type which is 32bits on 32bits system or 64bits on
64bits system.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-14 imx_lpi2c: Fix bus stop timeout issue
Ye Li [Thu, 18 May 2017 12:47:14 +0000 (07:47 -0500)]
MLK-14938-14 imx_lpi2c: Fix bus stop timeout issue

When checking the timeout for NACK, the start time should be got at
stop command send out, not before controller's TX ready.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-13 imx_lpi2c: Update lpi2c driver to support imx8
Ye Li [Mon, 27 Mar 2017 02:16:59 +0000 (10:16 +0800)]
MLK-14938-13 imx_lpi2c: Update lpi2c driver to support imx8

Add compatible string for i.MX8 and move imx_lpi2c.h from mx7ulp directory
to u-boot include directory as a common header file.

Signed-off-by: Ye Li <ye.li@nxp.com>