u-boot.git
7 years agoMA-10028 [Android]delete gpt in cmdline
zhang sanshan [Tue, 8 Aug 2017 04:46:32 +0000 (12:46 +0800)]
MA-10028 [Android]delete gpt in cmdline

The gpt table in imx8 is not overlay with uboot.
we do not use the last GPT table on imx8 platform.

Change-Id: I2c766a8de83e84135aa53811817b8d74f2f2f6e0
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-10022 [Android] uboot: add driver model in android on imx8mq board
zhang sanshan [Mon, 7 Aug 2017 04:42:21 +0000 (12:42 +0800)]
MA-10022 [Android] uboot: add driver model in android on imx8mq board

uboot have build fail on android branch.

BSP enable driver model in v2017 on evk-8mq board.
This patch align BSP configure.

Change-Id: I1e3a495cb38fd548b33d59eef053b2efaabbce7b
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-16132-10 makefile: fix typo
Peng Fan [Fri, 4 Aug 2017 06:29:21 +0000 (14:29 +0800)]
MLK-16132-10 makefile: fix typo

Fix typo CONIFG->CONFIG, if not, spl will include i2c uclass code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-9: imx8mq: evk: enable CMD_PMIC
Peng Fan [Fri, 4 Aug 2017 03:23:43 +0000 (11:23 +0800)]
MLK-16132-9: imx8mq: evk: enable CMD_PMIC

Enable CMD_PMIC

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-8: imx8mq: evk: enable DM_ETH
Peng Fan [Thu, 3 Aug 2017 07:18:09 +0000 (15:18 +0800)]
MLK-16132-8: imx8mq: evk: enable DM_ETH

Enable DM_ETH for i.mx8mq evk board.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-7: net: fec_get_miibus: use ulong for base_addr
Peng Fan [Thu, 3 Aug 2017 07:15:36 +0000 (15:15 +0800)]
MLK-16132-7: net: fec_get_miibus: use ulong for base_addr

Use ulong for base_addr to avoid
" warning: cast from pointer to integer of different size".

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-6 imx8mq: evk enable driver model
Peng Fan [Fri, 4 Aug 2017 03:06:08 +0000 (11:06 +0800)]
MLK-16132-6 imx8mq: evk enable driver model

Enable pinctrl/dm mmc/dm i2c/dm regulator and pmic.
Since we do not enable DM for SPL, so move non dm
code to spl file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-5: board: freescale: common: allow dm be omited by SPL
Peng Fan [Fri, 4 Aug 2017 03:05:05 +0000 (11:05 +0800)]
MLK-16132-5: board: freescale: common: allow dm be omited by SPL

Allow be omited by DM

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-4: power: pmic/regulator allow dm be omited by SPL
Peng Fan [Fri, 4 Aug 2017 03:04:23 +0000 (11:04 +0800)]
MLK-16132-4: power: pmic/regulator allow dm be omited by SPL

Allow the dm driver be omited by SPL.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-3 i2c: Kconfig: add dependency for SYS_I2C_MXC
Peng Fan [Thu, 3 Aug 2017 06:12:58 +0000 (14:12 +0800)]
MLK-16132-3 i2c: Kconfig: add dependency for SYS_I2C_MXC

add dependency for CONFIG_SYS_I2C_MXC

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-2: pinctrl: add imx8m support
Peng Fan [Thu, 3 Aug 2017 06:39:42 +0000 (14:39 +0800)]
MLK-16132-2: pinctrl: add imx8m support

Add i.mx8m pinctrl driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16132-1: imx8mq: evk: enable dts
Peng Fan [Fri, 4 Aug 2017 05:40:34 +0000 (13:40 +0800)]
MLK-16132-1: imx8mq: evk: enable dts

Add dts for i.mx8mq evk board.
dts kernel commit f66fac9f84.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoFix get partition error in fastboot
ji.luo [Wed, 2 Aug 2017 12:19:05 +0000 (20:19 +0800)]
Fix get partition error in fastboot

Signed-off-by: ji.luo <ji.luo@nxp.com>
7 years agoMA-10009 [fastboot] Get has-slot status from gpt
ji.luo [Wed, 2 Aug 2017 08:32:17 +0000 (16:32 +0800)]
MA-10009 [fastboot] Get has-slot status from gpt

Change-Id: I6a187dfa40b3d7a1dcc92c0d774956ac30679225
Signed-off-by: ji.luo <ji.luo@nxp.com>
7 years agoMA-9999 [iot] Fix getvar all/$wrong_variable in fastboot
ji.luo [Tue, 1 Aug 2017 01:42:42 +0000 (09:42 +0800)]
MA-9999 [iot] Fix getvar all/$wrong_variable in fastboot

Fix "fastboot getvar all/$wrong_variable" command in fastboot according to
"Android Boot/Bootloader Requirements, V2.84 - 01/27/17".

Change-Id: I08a3a04d450f2ffd2d0f465a32b52a57e45034a2
Signed-off-by: ji.luo <ji.luo@nxp.com>
7 years agoMLK-16118-8 imx8qm/qxp: Enable the power domain driver and update relevant codes
Ye Li [Tue, 1 Aug 2017 10:25:19 +0000 (05:25 -0500)]
MLK-16118-8 imx8qm/qxp: Enable the power domain driver and update relevant codes

This patch enables the power domain driver for i.MX8QM and QXP boards in defconfig files.
The devices with using DM driver will be powered on automatically by DM framework. So
we remove the power relevant codes for them.
For devices with non-DM drivers, we updates the board/SoC codes to use power domain driver API.
So that we can use power domain driver to manage them.

The only exceptions are:
1. UART0 at board_early_f, this is very early stage, that power domain is not ready.
2. Power up secondary cores and M4 cores. These resources are not peripherals and
   are not in power domain tree.

Additional, 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.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-7 spi: flexspi: Add init_clk_fspi function to setup clock
Ye Li [Tue, 1 Aug 2017 10:08:18 +0000 (05:08 -0500)]
MLK-16118-7 spi: flexspi: Add init_clk_fspi function to setup clock

When the power domain driver is enabled, we need to enable clocks after power
domain on. The clock settings in board level codes must be removed, needs to
set them when the device is probed. Add this weak function in flexspi driver,
that SoC codes can implement the clock settings.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-6 net: fec_mxc: Add the init_clk_fec function
Ye Li [Tue, 1 Aug 2017 10:06:25 +0000 (05:06 -0500)]
MLK-16118-6 net: fec_mxc: Add the init_clk_fec function

When the power domain driver is enabled, we need to enable clocks after power
domain on. So the clock settings can't set in board_init, needs to set them
when the device is probed. Add this weak function in driver, that SoC codes
can implement the clock settings.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-5 DTS: imx8qxp: Update iMX8QXP DTS and binding files
Ye Li [Tue, 1 Aug 2017 09:37:39 +0000 (04:37 -0500)]
MLK-16118-5 DTS: imx8qxp: Update iMX8QXP DTS and binding files

Sync the DTSi files and binding files with latest kernel commit:
"commit 2ce220ede08c0802a12459877ae134812ddda20b"

Some extra modifications:
1. Add "power-domains" property to all GPIO nodes and flexspi node, since
   they miss to add it.
2. Add "simple-bus" compatible strings to imx8qm-pm node.
3. Rename nodes "i2c0_mipi_lvds0" and "i2c0_mipi_lvds1"

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-4 DTS: imx8qm: Update iMX8QM DTS and binding files
Ye Li [Wed, 2 Aug 2017 03:02:07 +0000 (22:02 -0500)]
MLK-16118-4 DTS: imx8qm: Update iMX8QM DTS and binding files

Sync the DTSi files and binding files with latest kernel commit:
"commit 2ce220ede08c0802a12459877ae134812ddda20b"

Some extra modifications:
1. Add "power-domains" property to all GPIO nodes and flexspi node, since
they miss to add it.
2. Fix the wrong SATA PD name, should be "PD_HSIO_SATA_0".
3. Add "simple-bus" compatible strings to imx8qm-pm node.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-3 core: Add power domain operation to device probe
Ye Li [Wed, 2 Aug 2017 02:57:33 +0000 (21:57 -0500)]
MLK-16118-3 core: Add power domain operation to device probe

When power domain driver is enabled, power on the power domain
for the device be probed.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-2 power: Add PD device lookup interface to power domain uclass
Ye Li [Wed, 2 Aug 2017 02:47:53 +0000 (21:47 -0500)]
MLK-16118-2 power: Add PD device lookup interface to power domain uclass

Add power_domain_lookup_name interface to power domain uclass to find
a power domain device by its DTB node name, not using its associated
client device.

Through this interface, we can operate the power domain devices directly.
This is needed for non-DM drivers.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16118-1 power: Add power domain driver for i.MX8QM/QXP
Ye Li [Wed, 2 Aug 2017 01:55:03 +0000 (20:55 -0500)]
MLK-16118-1 power: Add power domain driver for i.MX8QM/QXP

Add the power domain DM driver for i.MX8, that it depends on the DTB
power domain trees to generate the power domain provider devices. Users
needs add power domain trees with property "compatible = "nxp,imx8-pd";"

- When power on one PD device, the driver will power on its ancestor PD devices
in power domain tree.

- When power off on PD device, the driver will check its child PD devices first,
only all child PD devices are off, then power off the current PD device. Then the
driver checks sibling PD devices. If sibling PD devices are off, then it will power
off parent PD device.

- There is no counter maintained in this driver, but a state to hold current on/off
state. So the request and free functions are empty.

- The power domain implemetation in i.MX8 DTB set the "#power-domain-cells" to 0, so
there is no ID binding with each PD device. We don't use "id" variable in
struct power_domain. At same time, we have to set of_xlate to empty to bypass standard
of_xlate in uclass driver.

Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16107 imx8mq: support mfg
Peng Fan [Tue, 1 Aug 2017 01:28:06 +0000 (09:28 +0800)]
MLK-16107 imx8mq: support mfg

Support MFG.
1. When ROM jumps to SPL, SPL saves ROM context. After SPL successfully
   initialize DRAM, SPL will restore ROM and context and back to ROM.
   During this flow, SPL does not do any USB configuration to avoid
   breaking the connect between ROM and Host PC, because we rely on
   ROM to continue serial download with Host.
2. Add MFG env to support kernel boot correctly.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16094-3 imx8qxp_arm2/mek: Update codes to use pinctrl driver
Ye Li [Fri, 28 Jul 2017 01:53:06 +0000 (20:53 -0500)]
MLK-16094-3 imx8qxp_arm2/mek: Update codes to use pinctrl driver

This patch enables the pinctrl driver for i.MX8QXP ARM2 and MEK boards.
For DM enabled driver, the iomux pins can be set by pinctrl driver. So
the board codes don't need to set iomux explicitly for these DM enabled modules.

Also update the DTS file for i2c pins settings.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16094-2 imx8qm_arm2: Update board codes to use pinctrl driver
Ye Li [Thu, 27 Jul 2017 05:46:30 +0000 (00:46 -0500)]
MLK-16094-2 imx8qm_arm2: Update board codes to use pinctrl driver

This patch enables the pinctrl driver for i.MX8QM ARM2 board.
For DM enabled driver, the iomux pins can be set by pinctrl driver. So
the board codes don't need to set iomux explicitly for these DM enabled
modules.

Also update the DTS file for some module's pins settings.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16094-1 pinctrl: Add pinctrl driver for i.MX8 platform
Ye Li [Wed, 26 Jul 2017 13:01:30 +0000 (08:01 -0500)]
MLK-16094-1 pinctrl: Add pinctrl driver for i.MX8 platform

Add pinctrl driver for i.MX8 platform (QM/QXP). The driver can
parse the iomuxc settings from DTB and set them through IPC to SCU.

Enable CONFIG_PINCTRL_IMX8 to use this pinctrl driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16092 Revert "MLK-16088 which is not correct"
Peng Fan [Fri, 28 Jul 2017 02:19:12 +0000 (10:19 +0800)]
MLK-16092 Revert "MLK-16088 which is not correct"

This reverts commit 671482a96196abacf8de446fb634b3c32e7027c2.
This is not correct and breaks ums.

7 years agoMLK-16087 imx8qm/qxp: Disable kernel FDT nodes for the resources are not owned
Ye Li [Wed, 26 Jul 2017 07:12:50 +0000 (02:12 -0500)]
MLK-16087 imx8qm/qxp: Disable kernel FDT nodes for the resources are not owned

Before starting the kernel, need to check if the enabled nodes (resources) in FDT
are owned by current partition.  If it is not owned, need to disable it because A core
can't access it.
We use the node's power-domain property to get the PD node which has the SCFW resource
id in its reg property. Then we can check it with SCFW.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16083 imx8qm/qxp: Setup MMU pagetables dynamically with owned memory regions
Ye Li [Wed, 26 Jul 2017 01:41:13 +0000 (20:41 -0500)]
MLK-16083 imx8qm/qxp: Setup MMU pagetables dynamically with owned memory regions

Since the memory regions assigned to u-boot partition is dynamically set by
ATF and SCD. We have to setup MMU pagetables according to the owned memory
regions, not set it for unassigned memory.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16088 usb: gadget: ci_udc: waiting finish when submit one request
Peng Fan [Wed, 26 Jul 2017 07:34:09 +0000 (15:34 +0800)]
MLK-16088 usb: gadget: ci_udc: waiting finish when submit one request

After submit a request and hardware starting transfer, wait
the transfer complete. Also set req_primed with value false.

Then we could do multile fastboot_tx_write_str in fastboot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16076 imx8m: discard the atf memory region from mmu table
Peng Fan [Tue, 25 Jul 2017 06:26:10 +0000 (14:26 +0800)]
MLK-16076 imx8m: discard the atf memory region from mmu table

Discard the ATF memory region from MMU table. ATF region is
protected by TZASC, however U-Boot runs in non-secure EL2,
we should not map the ATF region in U-Boot.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16069 imx6slevk: Workaround to limit the u-boot in low 512MB memory
Ye Li [Mon, 24 Jul 2017 06:12:33 +0000 (01:12 -0500)]
MLK-16069 imx6slevk: Workaround to limit the u-boot in low 512MB memory

On i.MX6SLEVK board, the LPDDR2 chip(CS1) is not reset before accessing.
And due to MMDC limitation, the script we get from IC team is only doing
CS0 reset but skipping CS1 reset, the reason is that doing CS1 reset might
cause CS0 can NOT be accessed any longer.

Because of this HW issue, we found the high 512MB memory needs more time to
be stable. Since the u-boot relocates itself to highest address after booting,
so this will cause issue.
To work around it, we just limit the u-boot running at low 512MB memory.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16066-2 imx8mq_evk: enable USB3 host function
Li Jun [Mon, 24 Jul 2017 16:08:22 +0000 (00:08 +0800)]
MLK-16066-2 imx8mq_evk: enable USB3 host function

Enable imx8mq USB xhci host for type-A port.

Reviewed-by : Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMLK-16066-1 usb: host: add imx8m xhci host driver
Li Jun [Mon, 24 Jul 2017 16:05:20 +0000 (00:05 +0800)]
MLK-16066-1 usb: host: add imx8m xhci host driver

imx8mq usb xhci is a dwc3 based controller, its synopsys PHY
can be controlled by usbmix glue layer. imx8mq has 2 USB3 instance,
this patch only enables USB2(2nd instance).

Reviewed-by : Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
7 years agoMA-9955 Enable imx8qxp mek board for android
guoyin.chen [Thu, 20 Jul 2017 08:09:50 +0000 (16:09 +0800)]
MA-9955 Enable imx8qxp mek board for android

Add imx8qxp mek android config
Below config is commented out due to USB not ready for this board
CONFIG_CMD_USB=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="FSL"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_CMD_FASTBOOT

Change-Id: I024156d445ed880ddd7a8dc15d94c81bb0a71b5e
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
7 years agoMLK-16058: arm: dts: imx6q arm2 enable sd3 vcc
Adrian Alonso [Fri, 21 Jul 2017 16:40:07 +0000 (11:40 -0500)]
MLK-16058: arm: dts: imx6q arm2 enable sd3 vcc

Fix SD3_VCC power rail enablement on DM MMC build
Add in pin control hog group MX6QDL_PAD_GPIO_18__SD3_VSELECT
pad for early power on of SD3_VCC power rail.
Add cd-gpio property.

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
7 years agoMLK-16049 imx8qm/qxp: Add support for reserving DDR memory for M4
Ye Li [Thu, 20 Jul 2017 01:26:57 +0000 (20:26 -0500)]
MLK-16049 imx8qm/qxp: Add support for reserving DDR memory for M4

We assign the DDR memory from 0x88000000 to 0x8FFFFFFF to M4 on QM and QXP.
The M4 can allocate this memory by two ways, in SCD or u-boot.

There are 3 things needed to change in u-boot:
1. Move the u-boot INIT SP address to first 128M memory to avoid conflict with M4 memory.

2. The memory regions may be allocated in SCD or ATF. So we can't staticly set the memory
   bank information in u-boot, need to get it from owned memory regions.

3. u-boot addes the memory reserve node to DTB to pass the info to kernel, no matter
   the M4 memory is reserved in SCD or u-boot. So kernel won't access M4 reserved memory.

The codes for M4 resources and memory regions allocated by u-boot will be added
later when they are finalized.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16048 imx8mq_evk: Eliminate the SPL panic when mfg boot
Ye Li [Fri, 21 Jul 2017 04:12:36 +0000 (23:12 -0500)]
MLK-16048 imx8mq_evk: Eliminate the SPL panic when mfg boot

By using mfg boot, SPL will give panic dump because it jump to RAW image
when boot device is wrong. Enable CONFIG_SPL_ABORT_ON_RAW_IMAGE to eliminate
the dump but give a error.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16047 imx8mq_evk: Enable eMMC boot support
Ye Li [Fri, 21 Jul 2017 03:58:29 +0000 (22:58 -0500)]
MLK-16047 imx8mq_evk: Enable eMMC boot support

Enable the CONFIG_SUPPORT_EMMC_BOOT, so that for eMMC boot SPL can switch
to boot partition for u-boot.img loading.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMA-9387 [Android] fastboot: fastboot gpt.img for sd card in android
zhang sanshan [Thu, 13 Jul 2017 12:07:58 +0000 (20:07 +0800)]
MA-9387 [Android] fastboot: fastboot gpt.img for sd card in android

we set gpt image in the last lba for sd boot.
complete the gpt header, gpt entry and protective MBR according
the last lba gpt rule.

Change-Id: Icc356a66f82ad359c0243245ab9fdfaea3bccd4f
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-16021 imx8qxp_arm2: Enable base board 1.8v power
Ye Li [Tue, 18 Jul 2017 09:16:27 +0000 (04:16 -0500)]
MLK-16021 imx8qxp_arm2: Enable base board 1.8v power

Setup the BB_PWR_EN GPIO to high to enable the 1.8v power on base board.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16018 imx8qxp_mek: Add i.mx8qxp MEK board support
Ye Li [Mon, 10 Jul 2017 08:40:00 +0000 (03:40 -0500)]
MLK-16018 imx8qxp_mek: Add i.mx8qxp MEK board support

Add the board file, head file, build config and DTS for i.MX8QXP MEK.
Enabled SD/eMMC, FlexSPI, UART, LPI2C, I2C MUX, IO EXP and Ethernet.

DTS is based on kernel patch (commit 86203e3c136836d6b01d5e00ac52c561014f1cab),
and add support for i2c mux, ioexp, second ethernet on base board and flexspi.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-16014 imx8m: evk: fix bss area
Peng Fan [Tue, 18 Jul 2017 06:57:44 +0000 (14:57 +0800)]
MLK-16014 imx8m: evk: fix bss area

The current BSS area conflict with area that used by ROM,
move the bss start to 0x912000 and decrease the size, because
8KB is enough now.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-16002 iMX8QM/QXP: Modify coding style for android tool chain
Ye Li [Mon, 17 Jul 2017 07:11:22 +0000 (02:11 -0500)]
MLK-16002 iMX8QM/QXP: Modify coding style for android tool chain

The android tool chain forces to use C89 standard, and give a build
warning:

board/freescale/imx8qxp_arm2/imx8qxp_arm2.c:635:2: error: 'for' loop
initial declarations are only allowed in C99 or C11 mode
  for (int i = 0; i < 8; i++)
  ^

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK15948 imx8qm/imx8qxp - Power down devices enabled by uboot before
Ranjani Vaidyanathan [Thu, 13 Jul 2017 14:46:09 +0000 (09:46 -0500)]
MLK15948 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.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
7 years agoMLK-15957 imx8m: evk: default enable tzc380
Peng Fan [Thu, 13 Jul 2017 09:21:03 +0000 (17:21 +0800)]
MLK-15957 imx8m: evk: default enable tzc380

Default enable TZC380.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMA-9909-2 [iot] uboot run into no-secure mode by default
Chen Guoyin [Thu, 13 Jul 2017 07:47:22 +0000 (15:47 +0800)]
MA-9909-2 [iot] uboot run into no-secure mode by default

Add log to indicate whether the board is in secure mode

Change-Id: I67544498c7ee7b591ce1f6cac899cee9e5867e3e
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
7 years agoMA-9909-1 [iot] uboot run into no-secure mode by default
Chen Guoyin [Thu, 13 Jul 2017 07:47:00 +0000 (15:47 +0800)]
MA-9909-1 [iot] uboot run into no-secure mode by default

Config pico 7d uboot run into secure mode by default

Change-Id: I7a25df8516900819acfe03372308baa718a76154
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
7 years agoMLK-15958-3 iMX8QM/QXP ARM2: Enable the SPI flash 4bytes address mode
Ye Li [Wed, 12 Jul 2017 09:36:47 +0000 (04:36 -0500)]
MLK-15958-3 iMX8QM/QXP ARM2: Enable the SPI flash 4bytes address mode

Disable the CONFIG_SPI_FLASH_BAR which uses the bank register, enable
the 4bytes address mode config CONFIG_SPI_FLASH_4BYTES_ADDR. So that
the whole 64MB SPI flash memory are ok to access.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15958-2 spi: fsl_fspi: Add support for 4bytes address mode
Ye Li [Wed, 12 Jul 2017 09:33:27 +0000 (04:33 -0500)]
MLK-15958-2 spi: fsl_fspi: Add support for 4bytes address mode

Update the LUT settings, spi_xfer to use the 4bytes address read/write/erase
commands.
Also add a function to enter the 4bytes mode for flash device.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15958-1 mtd: spi: Add 4bytes extend address support
Ye Li [Wed, 12 Jul 2017 09:26:08 +0000 (04:26 -0500)]
MLK-15958-1 mtd: spi: Add 4bytes extend address support

Current SPI flash framework only supports to set bank register
(CONFIG_SPI_FLASH_BAR) for flash with size > 16MiB. But some new flash device
(for example, mt35xu512aba) does not support this way, it only supports
4bytes extend address.

To access the whole memory size for such flash device, we add the support
for this 4bytes extend address mode to SPI flash framework.
The configuration CONFIG_SPI_FLASH_4BYTES_ADDR is used to enable the feature.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15341 mx6qpsabresd: add PHY AR8031 hw reset
Fugang Duan [Tue, 11 Jul 2017 03:21:32 +0000 (11:21 +0800)]
MLK-15341 mx6qpsabresd: add PHY AR8031 hw reset

Currently mx6qpsabresd board file only add PHY AR8031 gpio reset
in non-DM driver, then net DM driver PHY cannot work after stress
reboot test. So also add gpio reset for DM driver.

RGMII and PHY work at VDDIO 1.8V has better timing and to align
the IO voltage with kernel, also set the IO voltage to 1.8V.

Since i.MX6QP tx_clk can loop from SOC internal, no need to set
PHY output 125Mhz clock that can save power.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15930-2 imx8m: refine mmu table
Peng Fan [Mon, 10 Jul 2017 06:03:49 +0000 (14:03 +0800)]
MLK-15930-2 imx8m: refine mmu table

Refine mmu table. Map TCML/TCMU as non-cachable.
Remove the map of CAAM secure ram and OCRAM_S.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMLK-15930-1 armv8: mmu: fix page table mapping
Peng Fan [Mon, 10 Jul 2017 07:58:22 +0000 (15:58 +0800)]
MLK-15930-1 armv8: mmu: fix page table mapping

To page mapping the lowest 2 bits needs to be 0x3.
If not fix this, the final lowest 3 bits for page mapping is 0x1
which is marked as reserved.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
7 years agoMA-9822 Device has to be booted manually to recovery mode to apply the OTA update...
zhang sanshan [Mon, 10 Jul 2017 09:30:02 +0000 (17:30 +0800)]
MA-9822 Device has to be booted manually to recovery mode to apply the OTA update when booting from NAND

uboot can't get the correct misc info.

nand_info[0] is the info of mtd in v2016 or more older version.
nand_info[0] hold the pointer of mtd info in v2017.

Change-Id: I6b336efeafeed1e0f4e3224f738e72b83f1e09df
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-15325-2 imx8m: Remove ARM trusted firmware bl31 image
Ye Li [Fri, 7 Jul 2017 02:26:39 +0000 (21:26 -0500)]
MLK-15325-2 imx8m: Remove ARM trusted firmware bl31 image

Have changed to use imx-mkimage to package images, move the ARM trusted
firmware bl31 image out of u-boot to imx-mkimage.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-15325-1 imx8m: Remove DDR PHY Firmware images
Ye Li [Thu, 6 Jul 2017 05:54:55 +0000 (00:54 -0500)]
MLK-15325-1 imx8m: Remove DDR PHY Firmware images

We start to use imx-mkimage to package images, so move the DDR
PHY firmware images out of u-boot to imx-mkimage.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMA-9857 [Android] uboot change CONFIG_NAND_BOOT
zhang sanshan [Thu, 6 Jul 2017 10:49:37 +0000 (18:49 +0800)]
MA-9857 [Android] uboot change CONFIG_NAND_BOOT

NAND macro has been changed to CONFIG_NAND_BOOT in uboot2017.

Change-Id: I61dd03c0eed8a65100212607447a41bde431cc04
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9788 [fastboot]some commands not support
zhang sanshan [Thu, 6 Jul 2017 05:10:53 +0000 (13:10 +0800)]
MA-9788 [fastboot]some commands not support

support below commands:
fastboot getvar has-slot:oem gapps vbmeta.

Change-Id: I2b7ed6efa4675cf5cfa64e5982cb3987bee6f28a
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9789 [fastboot]System doesn't enter fastboot mode automatically while there is...
zhang sanshan [Wed, 5 Jul 2017 10:43:03 +0000 (18:43 +0800)]
MA-9789 [fastboot]System doesn't enter fastboot mode automatically while there is no valid gpt partition

add command "fastboot 0"

Change-Id: Ibad6dcab5213d815ac968034aeef5ff5a0be3b1b
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-15345 pcie: return enodev when pll is not locked
Richard Zhu [Wed, 5 Jul 2017 09:45:11 +0000 (17:45 +0800)]
MLK-15345 pcie: return enodev when pll is not locked

return -ENODEV if the pll is not locked, otherwise
system would be hang

Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
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>