u-boot.git
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>
7 years agoMLK-14938-12 serial_lpuart: Update lpuart driver to support i.MX8
Ye Li [Fri, 24 Mar 2017 08:12:14 +0000 (16:12 +0800)]
MLK-14938-12 serial_lpuart: Update lpuart driver to support i.MX8

Add i.MX8 compatible string and cpu type support to lpuart driver,
to use little endian 32 bits configurations.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-11 fsl_esdhc: Fix build warning when DM regulator is not enabled
Ye Li [Fri, 19 May 2017 03:02:07 +0000 (22:02 -0500)]
MLK-14938-11 fsl_esdhc: Fix build warning when DM regulator is not enabled

If DM regulator driver is not enabled, we will get build warning for used variable:

drivers/mmc/fsl_esdhc.c: In function 'fsl_esdhc_probe':
drivers/mmc/fsl_esdhc.c:987:18: warning: unused variable 'vqmmc_dev' [-Wunused-variable]
  struct udevice *vqmmc_dev;
                  ^

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-10 fsl_esdhc: Update usdhc driver to support i.MX8
Ye Li [Fri, 24 Mar 2017 07:13:09 +0000 (15:13 +0800)]
MLK-14938-10 fsl_esdhc: Update usdhc driver to support i.MX8

Add CONFIG_MX8 to use the 64bits support in usdhc driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-9 imx8: bootaux: Add i.MX8 M4 boot support
Ye Li [Mon, 22 Aug 2016 02:44:58 +0000 (10:44 +0800)]
MLK-14938-9 imx8: bootaux: Add i.MX8 M4 boot support

1. Adjust bootaux interface to adapt 64bits address and add core id.
2. Implement bootaux for the M4 boot on i.MX8QM and QXP. Users need to download
   M4 image to any DDR address first. Then use the
   "bootaux <M4 download DDR address> [M4 core id]" to boot CM4_0
   or CM4_1, the default core id is 0 for CM4_0.

   Since current M4 only supports running in TCM. The bootaux will copy
   the M4 image from DDR to its TCML.

3. Implment bootaux for HIFI on QXP
   command: bootaux 0x81000000 1

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-8 imx8: Add SMMU setup to Soc codes
Ye Li [Wed, 17 May 2017 07:19:25 +0000 (02:19 -0500)]
MLK-14938-8 imx8: Add SMMU setup to Soc codes

We setup SMMU in arch_preboot_os to avoid breaking u-boot driver.
Add a kconfig entry CONFIG_IMX_SMMU to enable it.
So far, the USDHC0-USDHC1 and FEC0-FEC1 are added into sid.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-7 imx8: Add iomux driver
Ye Li [Wed, 17 May 2017 07:08:19 +0000 (02:08 -0500)]
MLK-14938-7 imx8: Add iomux driver

Wrap the iomux settings through SCU APIs. Provide interfaces to follow
other i.MX platforms.

Users need to define the iomux_cfg_t which combines of three parts:
<PAD id> | <MUX ALT> | <PAD & MUX CONFIG>

<PAD id>   can directly use the values in imx8qm_pins.h
<MUX ALT>  is optional if the select to use default mux. Otherwise using
           MUX_MODE_ALT(x) to set it.
<PAD & MUX CONFIG> is the value for CONFIG, LP_CONFIG, PULL control, Drive Strength in
           Padring control register.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-6 imx8: Add fuse driver to wrap SCFW API
Ye Li [Wed, 17 May 2017 07:06:15 +0000 (02:06 -0500)]
MLK-14938-6 imx8: Add fuse driver to wrap SCFW API

Implement a fuse driver to wrap the SCFW OCOTP API and provide interfaces
to u-boot fuse command. So that we can use "fuse read" or "fuse sense" command.

Since there is no concept of fuse bank on i.MX8. Need set "bank" parameter to 0
when using the fuse command.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-5 imx8: Add SoC level support
Ye Li [Wed, 17 May 2017 07:00:43 +0000 (02:00 -0500)]
MLK-14938-5 imx8: Add SoC level support

Add cpu, power, and clocks functions for support i.MX8QM and i.MX8QXP SoCs.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Nitin Garg <nitin.garg@nxp.com>
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-4 mx8: Add pinmux header file
Ye Li [Wed, 17 May 2017 06:44:22 +0000 (01:44 -0500)]
MLK-14938-4 mx8: Add pinmux header file

Add the i.MX8QM and i.MX8QXP header files used for pad configurations.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-3 mx8: Add support for SCFW IPC
Ye Li [Wed, 17 May 2017 06:36:05 +0000 (01:36 -0500)]
MLK-14938-3 mx8: Add support for SCFW IPC

Add the MU (message unit) driver for IPC with SCFW.
Add CONFIG_HAVE_SC_FIRMWARE for enabling the IPC feature and holding the
IP channel in global data.

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-2 imx8: Add Kconfig entries for i.MX8
Ye Li [Wed, 17 May 2017 06:20:45 +0000 (01:20 -0500)]
MLK-14938-2 imx8: Add Kconfig entries for i.MX8

Add Kconfig entries for i.MX8 new architecture and QM/QXP SoCs.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-1 imx: Add SCFW-API and IPC functions
Ye Li [Wed, 17 May 2017 05:23:06 +0000 (00:23 -0500)]
MLK-14938-1 imx: Add SCFW-API and IPC functions

Using the latest SCFW-API based on commit from SCFW master branch:
"commit 0d7528ab8d243d8de60ac33a473a4988c3135b28
 Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
 Date:   Wed May 10 13:13:12 2017 -0500

 Add support to change the parent of clock slices in a SS.
"

Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14958 mx6slevk: Move setup_spi to board_init
Ye Li [Mon, 22 May 2017 08:39:48 +0000 (03:39 -0500)]
MLK-14958 mx6slevk: Move setup_spi to board_init

Current setup_spi is in board_early_init_f which is too early, so gpio_request
can't reserve the gpio successfully. Move it to board_init.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMA-9382 [Android] uboot: enable BCB&BOOTCTR&LOCK_UNLOCK
zhang sanshan [Thu, 18 May 2017 13:43:46 +0000 (21:43 +0800)]
MA-9382 [Android] uboot: enable BCB&BOOTCTR&LOCK_UNLOCK

Add configure for bcb & bootctr & lock_unlock for android.
change CONFIG_SYS_BOOT_NAND to CONFIG_NAND_BOOT
correct macro ANDROID_FASTBOOT_NAND_PARTS.

Change-Id: Iec2190ee940260d770de904889d8d352572a80b5
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9382 [Android]uboot: fix compiler issue and command line issue.
zhang sanshan [Thu, 18 May 2017 13:43:19 +0000 (21:43 +0800)]
MA-9382 [Android]uboot: fix compiler issue and command line issue.

Fix compile error when enable CONFIG_NAND_BOOT.
Fix data abort issue in uboot.

Change-Id: If41a7fafa40a2c851882c723a201ac5cdf31284f
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9376 [Android IMX] uboot: enable lock&unlock
zhang sanshan [Wed, 10 May 2017 03:00:09 +0000 (11:00 +0800)]
MA-9376 [Android IMX] uboot: enable lock&unlock

Fix compile error for api change.

Porting below patches from v2015.o4:
    MA-7875 Enable CAAM for i.MX6
    MA-7875-1 Support fastboot lock&unlock in u-boot
    MA-7875-2 Support fastboot lock/unlock in i.MX6 platform
    MA-7875-3 Support fastboot lock/unlock in i.MX6UL
    MA-8425 fastboot: return OKAY in fastboot erase
    MA-8418 fix return value check for get_device_and_partition
    MA-8622 - [brillo] fix uboot compile warnings and code style warnings

Change-Id: I2370c3e5851cc1f92aaa93c200e6c079f7929af2
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMA-9375 [Android IMX] uboot: enable BCB and bootctrl
zhang sanshan [Wed, 10 May 2017 02:14:27 +0000 (10:14 +0800)]
MA-9375 [Android IMX] uboot: enable BCB and bootctrl

* Add API to read\write MISC partition.
* get the boot mode from BCB command when boot up.
* get the boot up tactics from bootctrl.

Change-Id: Icbba6340e10983dddc1b04804ecc012a3a3c57d0
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
7 years agoMLK-14915 mx6ul_arm2/mx6ull_arm2: Fix ENET PHY reset issue
Ye Li [Tue, 16 May 2017 04:47:49 +0000 (23:47 -0500)]
MLK-14915 mx6ul_arm2/mx6ull_arm2: Fix ENET PHY reset issue

There are two pins used for ENET PHY reset, need to assert them before init the PHY.
Current DM driver does not have such operation, need board level codes to handle.
This patch moves the PHY reset operation into setup_fec, which is common for DM driver
and non-DM driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14890 i2c: Enable I2C force idle bus
Ye Li [Mon, 15 May 2017 09:04:07 +0000 (04:04 -0500)]
MLK-14890 i2c: Enable I2C force idle bus

This patch enables the I2C force idle bus for all i.MX6 and i.MX7 boards to avoid
i2c bus problem during reboot. To use it, we must add some i2c properties in DTB file
and the GPIO pinctrl for i2c.

For mx6qsabreauto, mx6slevk, mx6sxsabresd and mx6sxscm, these boards call the
setup_i2c. To remove conflict, change to use "setup_i2c" only for non-DM i2c driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14891 mx6slevk/mx6sll_arm2: Fix SPINOR CS GPIO using
Ye Li [Mon, 15 May 2017 02:15:56 +0000 (21:15 -0500)]
MLK-14891 mx6slevk/mx6sll_arm2: Fix SPINOR CS GPIO using

Needs to request the GPIO pin before assigning to GPIO to SPI driver
which will directly setting it to output without request it.

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14772 net: fec: set the device->seq id to priv->dev_id
Fugang Duan [Fri, 12 May 2017 07:58:56 +0000 (15:58 +0800)]
MLK-14772 net: fec: set the device->seq id to priv->dev_id

i.MX6UL/ULL evk board net get the wrong MAC address from fuse, exp,
eth1 get MAC0 address, eth0 get MAC1 address from fuse. Set the
priv->dev_id to device->seq as the real net interface alias id then
.fec_get_hwaddr() read the related MAC address from fuse.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
7 years agoMLK-14877 DTB: mx6sllevk: Fix usdhc2 property issue
Ye Li [Thu, 11 May 2017 16:39:46 +0000 (11:39 -0500)]
MLK-14877 DTB: mx6sllevk: Fix usdhc2 property issue

For eMMC, should using "non-removable" property, not "no-removable",
this cause USDHC driver has problem in get_cd, then switching to eMMC will
always show no card present.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoARM: fixed relocation using proper alignment
Manfred Schlaegl [Wed, 10 May 2017 13:41:32 +0000 (15:41 +0200)]
ARM: fixed relocation using proper alignment

Using u-boot-2017.05 on i.MX6UL we ran into following problem:
Initially U-Boot could be started normally.
If we added one random command in configuration, the newly generated
image hung at startup (last output was DRAM:  256 MiB).

We tracked this down to a data abort within relocation (relocated_code).

relocated_code in arch/arm/lib/relocate.S copies 8 bytes per loop
iteration until the source pointer is equal to __image_copy_end.
In a good case __image_copy_end was aligned to 8 bytes, so the loop
stopped as suggested, but in an errornous case __image_copy_end was
not aligned to 8 bytes, so the loop ran out of bounds and caused a
data abort exception.

This patches solves the issue by aligning __image_copy_end to 8 byte
using the linker script related to arm.

From Community: http://patchwork.ozlabs.org/patch/760592/

Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 years agoMLK-14864: regulator: pfuze100: unsigned compared against 0
Peng Fan [Thu, 11 May 2017 02:20:56 +0000 (10:20 +0800)]
MLK-14864: regulator: pfuze100: unsigned compared against 0

Fix coverity:392391 392382 392385 Unsigned compared against 0

Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 years agoMLK-14862 net: eth-uclass: add return value check
Peng Fan [Thu, 11 May 2017 02:21:48 +0000 (10:21 +0800)]
MLK-14862 net: eth-uclass: add return value check

Add return value check

Coverity 392391

Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 years agoMLK-14840: pinctrl: imx: fix resource leak
Peng Fan [Wed, 10 May 2017 00:44:04 +0000 (08:44 +0800)]
MLK-14840: pinctrl: imx: fix resource leak

The device managed API actually not free the memory, so need
to use devm_kfree to free the memory to avoid leakage.

Coverity: 392384 resource leak

Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 years agoMLK-14878 qspi: Fix issue when enabling DDR mode
Ye Li [Wed, 10 May 2017 14:52:42 +0000 (09:52 -0500)]
MLK-14878 qspi: Fix issue when enabling DDR mode

There are two problems in enabling DDR mode in this new driver:
1. The TDH bits in FLSHCR register should be set to 1. Otherwise, the TX DDR delay logic
   won't be enabled. Since u-boot driver does not have DDR commands in LUT. So this won't
   cause explicit problem.
2. When doing read/write/readid/erase operations, the MCR register is overwritten, the bits
   like DDR_EN are cleared during these operations.  When we using DDR mode QSPI boot, the TDH bit
   is set to 1 by ROM. if the DDR_EN is cleared, there is no clk2x output for TX data shift.
   So these operations will fail.
   The explicit problem is users may get "SF: unrecognized JEDEC id bytes: ff, ff, ff" error
   after using DDR mode QSPI boot on 6UL/ULL EVK boards.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14808 mx6sxsabresd: Fix wrong configuration name for QSPI boot
Ye Li [Wed, 10 May 2017 07:43:31 +0000 (02:43 -0500)]
MLK-14808 mx6sxsabresd: Fix wrong configuration name for QSPI boot

A wrong config name is used for QSPI boot, it causes IVT offset wrong.
Fix the typo issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14792 mx6ull: Disable WDOG3 after init
Ye Li [Wed, 10 May 2017 05:24:36 +0000 (00:24 -0500)]
MLK-14792 mx6ull: Disable WDOG3 after init

Need to power down WDOG3 for mx6ull, otherwise the kernel will reboot once the
iomux for WDOG_ANY pin is configured. This is missed in community u-boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14839-2 imx: clean up print info for thermal and reset cause
Ye Li [Tue, 9 May 2017 09:34:37 +0000 (04:34 -0500)]
MLK-14839-2 imx: clean up print info for thermal and reset cause

Clean up the print info, so that the reset cause print can display in
a new line.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14839-1 mx6: Fix wrong CPU frequency
Ye Li [Tue, 9 May 2017 09:27:48 +0000 (04:27 -0500)]
MLK-14839-1 mx6: Fix wrong CPU frequency

Fix incorrect value for 696MHz CPU frequency on i.MX6UL.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14845 mx6/mx7: Not call usb setup functions used by non-DM driver
Ye Li [Tue, 9 May 2017 05:43:05 +0000 (00:43 -0500)]
MLK-14845 mx6/mx7: Not call usb setup functions used by non-DM driver

Use CONFIG_DM_USB to comment out USB setup functions used by non-DM driver. So
they won't be executed when using DM driver.

These USB setup functions may setup power control pins to USB_PWR function not GPIO,
which is different as the GPIO function used by USB vbus-supply. And cause the power control
not work.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14775 mx7dsabresd: Disable USDHC2 in device tree
Ye Li [Tue, 9 May 2017 01:53:07 +0000 (20:53 -0500)]
MLK-14775 mx7dsabresd: Disable USDHC2 in device tree

The USDHC2 is connecting to BT/WIFI chip on SDB board, this controller is enabled
in device tree as SDIO, but USDHC driver in u-boot will use it as SDHC. So totally
3 USDHC devices will be created, and cause run time MMC environments go wrong because
it only supports USDHC1 and USDHC3.

So disable the unused USDHC2 controller in u-boot device tree.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14828 env_sata: Fix SATA saveenv issue
Ye Li [Mon, 8 May 2017 09:32:02 +0000 (04:32 -0500)]
MLK-14828 env_sata: Fix SATA saveenv issue

Wrong env buffer was passed into sata write function, so the saveenv can't work.
Fix this issue.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14768 fec: Change CONFIG_ETHPRIME name to align with DM ETH
Ye Li [Mon, 8 May 2017 08:05:09 +0000 (03:05 -0500)]
MLK-14768 fec: Change CONFIG_ETHPRIME name to align with DM ETH

The DM Ethernet driver requests the "ethprime" to align with DTB name
or start with "eth" with seq number as index.

So previous name "FEC" can't work as prime. Must change it to the "eth0" for
first ethernet device, or "eth1" for second one.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14831 mx6: Fix wrong bmode value used for usb boot
Ye Li [Mon, 8 May 2017 06:25:19 +0000 (01:25 -0500)]
MLK-14831 mx6: Fix wrong bmode value used for usb boot

Wrong bmode value is used in community u-boot for usb reboot. And cause
it failed. Fix this by using a reserved bootcfg value.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14779 mx6qdlsabreauto: Fix usb detect issue
Ye Li [Mon, 8 May 2017 06:09:40 +0000 (01:09 -0500)]
MLK-14779 mx6qdlsabreauto: Fix usb detect issue

The recent ehci-mx6 driver can support vbus-supply property, no need
to request io expander pins in usb setup. If did this, the regulator
for vbus-supply will fail to get due to the pin is occupied.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14777 imx: mx6ul/mx6ull/mx7d: correct the usage of the macro PFUZE3000_SW1AB_SETP()
Fugang Duan [Thu, 4 May 2017 08:36:13 +0000 (16:36 +0800)]
MLK-14777 imx: mx6ul/mx6ull/mx7d: correct the usage of the macro PFUZE3000_SW1AB_SETP()

Commit:894a4b4da7e2 add the voltage configuration macro that base on
the 0.1mV precision, and i.MX6UL/i.MX6ULL/i.MX7D use the macro as 1mV
prevision that cause the conversion are wrong, then some boards cannot
boot up in ldo bypass mode.

The patch just correct the usage of PFUZE3000_SW1AB_SETP().

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
8 years agoMLK-14776 imx6sl: add enet phy reset to i.MX6SL EVK board
Fugang Duan [Wed, 3 May 2017 06:53:07 +0000 (14:53 +0800)]
MLK-14776 imx6sl: add enet phy reset to i.MX6SL EVK board

For some i.MX6SL evk board, enet phy need reset.
Add phy reset before phy clock enable and init the
pinctrl earlier.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
8 years agoMXSCM-292-3 mx6sxscm: add dts files for EVB board
Juan Gutierrez [Fri, 21 Apr 2017 00:01:14 +0000 (19:01 -0500)]
MXSCM-292-3 mx6sxscm: add dts files for EVB board

Copy the dts files from kernel for MX6SXSCM EVB board for
preparing enabling the OF_CONTROL.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMXSCM-292-2 mx6sxscm: convert to enable OF_CONTROL and DM drivers
Juan Gutierrez [Thu, 20 Apr 2017 23:58:36 +0000 (18:58 -0500)]
MXSCM-292-2 mx6sxscm: convert to enable OF_CONTROL and DM drivers

Update mx6sxscm boards code and build configurations to enable
OF_CONTROL and DM drivers.

1. Update GPIO codes for adding gpio request
2. Update PMIC and LDO by-pass codes for DM PMIC
3. Add lpddr2 512MB size and eMMC options tolocal Kconfig
4. Update license with NXP 2017
5. Add defconfigs for EVB boards

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMXSCM-292-1 mx6sxscm: add mx6sxscm boards code
Juan Gutierrez [Thu, 20 Apr 2017 22:26:49 +0000 (17:26 -0500)]
MXSCM-292-1 mx6sxscm: add mx6sxscm boards code

Move the scm mx6sxscm board generic support code from v2016.03
as the base for converting to use DTB OF_CONTROL

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMXSCM-291 mx6dqscm: set runtime fdt_file and other fixes
Juan Gutierrez [Wed, 19 Apr 2017 15:51:02 +0000 (10:51 -0500)]
MXSCM-291 mx6dqscm: set runtime fdt_file and other fixes

1. set fdt_file according to board_rev which is set at runtime
2. Add macros for proper delimitation for different board builds
3. Fix and add proper iomux configuration

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMXSCM-290-3 mx6dqscm: add dts files for qwks boards
Juan Gutierrez [Wed, 19 Apr 2017 16:03:46 +0000 (11:03 -0500)]
MXSCM-290-3 mx6dqscm: add dts files for qwks boards

Copy the dts files from kernel for qwks boards for preparing
enabling the OF_CONTROL.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMXSCM-290-2 mx6dqscm: convert to enable OF_CONTROL and DM drivers
Juan Gutierrez [Wed, 19 Apr 2017 15:38:05 +0000 (10:38 -0500)]
MXSCM-290-2 mx6dqscm: convert to enable OF_CONTROL and DM drivers

Update mx6dqscm boards code and build configurations to enable
OF_CONTROL and DM drivers.

1. Update GPIO codes for adding gpio request
2. Enable USB DM driver
3. Update PMIC and LDO by-pass codes for DM PMIC
4. Add spinor boot support
5. Add lpddr2 modes, sizes and boards on local Kconfig
6. Update license with NXP 2017
7. Add defconfigs for qwks boards

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMXSCM-290-1 mx6dqscm: add mx6dqscm boards code
Juan Gutierrez [Mon, 10 Apr 2017 20:44:19 +0000 (15:44 -0500)]
MXSCM-290-1 mx6dqscm: add mx6dqscm boards code

Move the scm mx6dqscm board generic support code from v2016.03
as the base for converting to use DTB OF_CONTROL.

Signed-off-by: Juan Gutierrez <juan.gutierrez@nxp.com>
8 years agoMLK-14752 common/console.c: remove CONFIG_IS_ENABLED()
Fugang Duan [Wed, 26 Apr 2017 09:06:05 +0000 (17:06 +0800)]
MLK-14752 common/console.c: remove CONFIG_IS_ENABLED()

Remove CONFIG_IS_ENABLED() macro in the driver, it seems the macro don't work
in the config build for mx6sxsabreauto_config platform.

And CONFIG_IS_ENABLED(FOO) evaluates to
 *  1 if CONFIG_SPL_BUILD is undefined and CONFIG_FOO is set to 'y' or 'm',
 *  1 if CONFIG_SPL_BUILD is defined and CONFIG_SPL_FOO is set to 'y' or 'm'

If enable CONFIG_SPL_BUILD, then CONFIG_FOO doesn't work.

Now remove the CONFIG_IS_ENABLED() in the driver.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
8 years agoMLK-14750 mxc_fec: Add compatible string for i.mx6sl
Ye Li [Tue, 25 Apr 2017 14:53:44 +0000 (22:53 +0800)]
MLK-14750 mxc_fec: Add compatible string for i.mx6sl

The compatible string "fsl,imx6sl-fec" is missed for i.mx6sl in
u-boot FEC driver, so that FEC can't be recognized.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-13141 mx6qpsabresd: Do not touch VGEN3 and VGEN5
Robin Gong [Tue, 30 Aug 2016 09:03:36 +0000 (17:03 +0800)]
MLK-13141 mx6qpsabresd: Do not touch VGEN3 and VGEN5

VGEN3 and VGEN5 have been fused the right value in PF0100 on i.mx6qp board,
so software didn't need to change their voltage output anymore. Otherwise,
VGEN3 will be wrongly updated from 1.8v to 2.8v.

Signed-off-by: Robin Gong <yibin.gong@nxp.com>
(cherry picked from commit 6f7f185664a401f03f6ce6c81b996c1f27fdbe73)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14698 imx: lpi2c: fix clock issue when NACK detected
Gao Pan [Fri, 14 Apr 2017 07:51:44 +0000 (15:51 +0800)]
MLK-14698 imx: lpi2c: fix clock issue when NACK detected

For LPI2C IP, NACK is detected by the rising edge of the ninth clock.
In current uboot driver, once NACK is detected, it will reset and then
disable LPI2C master. As a result, we can never see the falling edge
of the ninth clock.

Signed-off-by: Gao Pan <pandy.gao@nxp.com>
(cherry picked from commit dd139ee52b709c95af3e0c968bcbc3cf42cca408)

8 years agoMLK-14707 fsl_esdhc: Fix eMMC 1.8v setting issue
Ye Li [Thu, 20 Apr 2017 02:16:24 +0000 (10:16 +0800)]
MLK-14707 fsl_esdhc: Fix eMMC 1.8v setting issue

Current USDHC driver will reset VSELECT to 0 (3.3v) during mmc init,
then set to 1 for 1.8v eMMC I/O. When booting from eMMC, since ROM has
already set VSELECT to 1.8v before running the u-boot. This reset in
USDHC driver causes a short 2.2v pulse on CMD pin.

Fix this issue by not reset VSELECT to 0 when 1.8v flag is set.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f01ebfdaa57b4c74ede32a6a40cf9cf9184ce049)

8 years agoMLK-14708 mmc: fsl_esdhc: fix wrong usage device_get_supply_regulator
Peng Fan [Thu, 20 Apr 2017 02:34:26 +0000 (10:34 +0800)]
MLK-14708 mmc: fsl_esdhc: fix wrong usage device_get_supply_regulator

Fix wrong usage of device_get_supply_regulator.
device_get_supply_regulator returns 0 on success.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
8 years agoMLK-14693 mx7ulp: Change PLL rate calculation to avoid div 0
Ye Li [Fri, 14 Apr 2017 05:44:48 +0000 (13:44 +0800)]
MLK-14693 mx7ulp: Change PLL rate calculation to avoid div 0

The new ROM patch will set DENOM and NUM of APLL and SPLL to 0 to
workaround PLL issue.
When DENOM is 0, the PLL rate calculation will divide 0 and raise a signal.

raise: Signal # 8 caught

To avoid such problem, we change our calculation.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit f28cf489e1b3864bac6bae4944d8a73bab30ec32)

8 years agoMLK-14689 mx7ulp: Workaround APLL PFD2 to 345.6Mhz
Ye Li [Thu, 13 Apr 2017 03:40:46 +0000 (11:40 +0800)]
MLK-14689 mx7ulp: Workaround APLL PFD2 to 345.6Mhz

The GPU uses APLL PFD2 as its clock parent (483.84Mhz) with divider set to 1.
This frequecy is out of ULP A0 spec. The MAX rate for GPU is 350Mhz.
So we simply configure the APLL PFD2 to 345.6Mhz (FRAC=28) to workaround the problem.
The correct fix should let GPU handle the clock rate in kernel.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit e931d534fd68e0e639082766de17a20e705fd908)

8 years agoMLK-14636 Tools: Add python lib dependency check for libfdt
Ye Li [Thu, 6 Apr 2017 09:42:34 +0000 (17:42 +0800)]
MLK-14636 Tools: Add python lib dependency check for libfdt

The tools/makefile will build a libfdt Python module if swig is available.
But actually it not only need swig but also need python libary. We will get
build break below when python is not installed. It is better to add more
check for python lib.

Because applications may install some python libs, but not the full libpython-dev,
then the Python.h is missed. We check Python.h to instead checking libs.

tools/libfdt_wrap.c:147:21: fatal error: Python.h: No such file or directory

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14365 nand: replace the CONFIG_SYS_USE_NAND
Ye Li [Thu, 6 Apr 2017 09:12:59 +0000 (17:12 +0800)]
MLK-14365 nand: replace the CONFIG_SYS_USE_NAND

The CONFIG_SYS_USE_NAND is not used in v2017.03. We have to replace it
by other NAND configurations, like CONFIG_CMD_NAND or CONFIG_NAND_MXS.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12527-6 mx6slevkandroid: Add keyboard configurations to whilelist
Ye Li [Thu, 6 Apr 2017 09:08:58 +0000 (17:08 +0800)]
MLK-12527-6 mx6slevkandroid: Add keyboard configurations to whilelist

To use keyboard on mx6slevk, some configurations are added in android header files.
Need adding them to config_whilelist.txt

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12527-5 android: Miss pad setting for button
Ye Li [Thu, 6 Apr 2017 08:59:24 +0000 (16:59 +0800)]
MLK-12527-5 android: Miss pad setting for button

The button pad setting is missed during cherry-pick.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12527-4 android: Fix duplicated configuration
Ye Li [Thu, 6 Apr 2017 08:57:21 +0000 (16:57 +0800)]
MLK-12527-4 android: Fix duplicated configuration

The CONFIG_USB_GADGET is duplicated set in defconfig and android header file.
Remove it from defconfig

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-12 mx7ulp_evk: Fix dts building for eMMC
Ye Li [Thu, 6 Apr 2017 08:33:47 +0000 (16:33 +0800)]
MLK-14445-12 mx7ulp_evk: Fix dts building for eMMC

Missed to add eMMC dts file to Makefile

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14628 epdc: Fix configs issue
Ye Li [Thu, 6 Apr 2017 02:30:54 +0000 (10:30 +0800)]
MLK-14628 epdc: Fix configs issue

In Kconfig, the CONFIG_MXC_EPDC depends on CONFIG_LCD.
We can't only set the CONFIG_MXC_EPDC in defconfig and set CONFIG_LCD in header file.
This will cause the both two configs are not selected. So in fact the epdc codes
are not compiled.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-13499 imx6sll: add epdc splash screen support
Robby Cai [Fri, 18 Nov 2016 09:10:11 +0000 (17:10 +0800)]
MLK-13499 imx6sll: add epdc splash screen support

add splash screen feature for epdc.
it's tested on imx6sll arm2 board and evk board.

Signed-off-by: Robby Cai <robby.cai@nxp.com>
(cherry picked from commit c85c6f2a0f08dfc6c2859fe969b2021ab32b9370)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14627 android: Fix cache unaligned warning
Ye Li [Wed, 5 Apr 2017 16:54:58 +0000 (00:54 +0800)]
MLK-14627 android: Fix cache unaligned warning

The sparse image writing and boot image reading may have cache unaligned problem.
The u-boot v2017 will print warning at runtime. This patch fixes the
unaligned problem.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14622 mx6sx: update defconfig to enable setexpr command
Ye Li [Wed, 5 Apr 2017 09:11:27 +0000 (17:11 +0800)]
MLK-14622 mx6sx: update defconfig to enable setexpr command

Since we need the setexpr command for m4 image loading, so enable
the CONFIG_CMD_SETEXPR for i.MX6SX defconfigs with m4 boot enabled.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14621 fsl_qspi: Set endianness for i.MX platforms
Ye Li [Wed, 5 Apr 2017 09:09:39 +0000 (17:09 +0800)]
MLK-14621 fsl_qspi: Set endianness for i.MX platforms

The endianness is not set at qspi driver initialization. So if we don't
boot from QSPI, we will get wrong endianness when accessing from AHB address
directly.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14620 env_sata: Fix build warning
Ye Li [Wed, 5 Apr 2017 06:20:13 +0000 (14:20 +0800)]
MLK-14620 env_sata: Fix build warning

Fix below build warning by declaring sata_get_dev the in the part.h

common/env_sata.c: In function 'saveenv':
common/env_sata.c:70:9: warning: implicit declaration of function 'sata_get_dev' [-Wimplicit-function-declaration]
  sata = sata_get_dev(env_sata);
         ^
common/env_sata.c:70:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  sata = sata_get_dev(env_sata);
       ^
common/env_sata.c: In function 'env_relocate_spec':
common/env_sata.c:116:7: warning: assignment makes pointer from integer without a cast [-Wint-conversion]
  sata = sata_get_dev(env_sata);

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14608 fsl_esdhc: Fix wp_enable issue
Ye Li [Tue, 4 Apr 2017 16:24:46 +0000 (00:24 +0800)]
MLK-14608 fsl_esdhc: Fix wp_enable issue

The wp-gpios property is used for gpio, if this is set, the WP pin is muxed
to gpio function, can't be used as internal WP checking.

This patch changes to examine the "fsl,wp-controller" for using internal WP checking. And
wp-gpios for using gpio pin.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14607 mx7d: Enable the CONFIG_CMD_BOOTD for auto boot
Ye Li [Tue, 4 Apr 2017 15:32:32 +0000 (23:32 +0800)]
MLK-14607 mx7d: Enable the CONFIG_CMD_BOOTD for auto boot

The CONFIG_CMD_BOOTD is commented in the defconfig files, then the default boot
can't work. We need to uncomment it for auto boot.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14606 mx6/7: Modify ENV offset to 896K
Ye Li [Wed, 5 Apr 2017 02:17:47 +0000 (10:17 +0800)]
MLK-14606 mx6/7: Modify ENV offset to 896K

Since the u-boot size increases after using OF_CONTROL to including DTB,
we have to adjust ENV_OFFSET to 896K for SD/eMMC/FLASH/SATA.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14605 mx7ulp: Modify the lpi2c seq number
Ye Li [Fri, 24 Mar 2017 08:52:26 +0000 (16:52 +0800)]
MLK-14605 mx7ulp: Modify the lpi2c seq number

Change the i2c alias seq number to align with device index. So in lpi2c
driver we don't need to add 4 to get the device index. This codes may not
valid on other platforms.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14506-2 HAB: Disable CAAM driver for SoC using DCP
Ye Li [Tue, 4 Apr 2017 08:31:01 +0000 (16:31 +0800)]
MLK-14506-2 HAB: Disable CAAM driver for SoC using DCP

The MX6SL, SLL and ULL have DCP to replace CAAM in SoC. We have to
disable the CAAM driver for them.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14506-1 HAB: Change CSF size to 0x4000
Ye Li [Wed, 22 Mar 2017 10:20:44 +0000 (18:20 +0800)]
MLK-14506-1 HAB: Change CSF size to 0x4000

Modify the CONFIG_CSF_SIZE to 0x4000 to align with v2016.03. Also remove
the duplicated setting for CSF size.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14483 mx7ulp: Fix SPLL/APLL clock rate calculation issue
Ye Li [Fri, 17 Mar 2017 07:38:43 +0000 (15:38 +0800)]
MLK-14483 mx7ulp: Fix SPLL/APLL clock rate calculation issue

The num/denom is a float value, but in the calculation it is convert
to integer 0, and cause the result wrong.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 4a8f51499ca098637e9ee2036066374d34458865)

8 years agoMLK-14417 imx: Enable ACTLR.SMP bit for all i.MX cortex-a7 platforms
Ye Li [Mon, 13 Mar 2017 06:03:53 +0000 (14:03 +0800)]
MLK-14417 imx: Enable ACTLR.SMP bit for all i.MX cortex-a7 platforms

According to the Cortex-A7 TRM, for ACTLR.SMP bit "You must ensure this bit
is set to 1 before the caches and MMU are enabled, or any cache and TLB
maintenance operations are performed".
ROM sets this bit in normal boot flow, but when in serial download mode, it is not set.
Here we add it in u-boot as a common flow for all i.MX cortex-a7 platforms,
including mx7d, mx6ul/ull and mx7ulp.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 14990af03450f3e1898135c86fd8b93328007617)

8 years agoMLK-13586-2 mx7d_arm2/sabresd: Update ddr3 script to V2.0 for Bank interleave
Ye Li [Wed, 7 Dec 2016 03:37:05 +0000 (11:37 +0800)]
MLK-13586-2 mx7d_arm2/sabresd: Update ddr3 script to V2.0 for Bank interleave

To improve the performance, enable the bank interleave for DDR3. Update
the DDR3 settings to new script IMX7D_DDR3_533MHz_1GB_32bit_V2.0.ds

Changes:
    1. Enable bank interleave
    2. Improve the drive strength for non-TO1.1 chips.
    3. Updates ZQ_CON0 settings.
    4. For 19x19 DDR3 ARM2 and 12x12 DDR3 ARM2, they are using old version scripts which
       were not upgrade with SABRESD script. According to DDR owner suggestion, to use same version
       script for all of them.

File:
    http://compass.freescale.net/livelink/livelink?func=ll&objid=233861153&objAction=browse&sort=name&viewType=1

Test:
    Passed stress test on one TO1.2 SABRESD, one TO1.1 SABRESD and one TO1.0 SABRESD.
    Passed stress test on one 12x12 ddr3 ARM2.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 62e73b45c53e3302d869c373da72699199b90648)

8 years agoMLK-13586-1 mx7d_arm2: Update lpddr3 script to V2.0 for Bank interleave
Ye Li [Thu, 1 Dec 2016 05:39:41 +0000 (13:39 +0800)]
MLK-13586-1 mx7d_arm2: Update lpddr3 script to V2.0 for Bank interleave

To improve the performance, enable the bank interleave for LPDDR3. Update
the LPDDR3 settings to new script IMX7D_LPDDR3_533MHz_2GB_32bit_V2.0.ds5.

Changes:
   1. Enable bank interleave
   2. Improve the drive strength for non-TO1.1 chips.
   3. Updates ZQ_CON0 settings.
   4. Change to 0 for reserved bits.

File:
   http://compass.freescale.net/livelink/livelink?func=ll&objid=233861153&objAction=browse&sort=name&viewType=1

Test:
    Passed stress test on one 19x19 lpddr3 arm2 and one 12x12 lpddr3 arm2.
    Passed LPSR test on one 12x12 lpddr3 arm2.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 9a4fa3f8d2762791a76fd90e83feec8c8c9235b0)

8 years agoMLK-14248-3: mx6ul: update lpddr2 script to latest version
Adrian Alonso [Wed, 22 Feb 2017 17:14:39 +0000 (11:14 -0600)]
MLK-14248-3: mx6ul: update lpddr2 script to latest version

Update lpddr2 settings to latest version
IMX6UL_LPDDR2_400MHz_16bit_V1.1.inc

Use pre-charge command 0x1 per DDR register programming aid

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
(cherry picked from commit e7aa25c2c7313b00475e3e0ce394a2fbaa569fbd)

8 years agoMLK-14248-1: mx6sl: update lpddr2 script to latest version
Adrian Alonso [Wed, 22 Feb 2017 16:50:45 +0000 (10:50 -0600)]
MLK-14248-1: mx6sl: update lpddr2 script to latest version

Update lpddr2 settings to latest version
MX6SL_MMDC_LPDDR2_register_programming_aid_v0.9.inc

Use pre-charge command 0x1 per DDR register programming aid

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
(cherry picked from commit 7c15f3afbd2cfa97b14a0013ef959e9e73fd2f1e)

8 years agoMLK-13539: mx6sl: evk: lpddr2: add pre charge command all
Adrian Alonso [Tue, 29 Nov 2016 17:32:25 +0000 (11:32 -0600)]
MLK-13539: mx6sl: evk: lpddr2: add pre charge command all

LPDDR2 script MX6SL_MMDC_LPDDR2_register_programming_aid_v0.9.inc

Updated to add Precharge all command per JEDEC
The memory controller may optionally issue a precharge-all command
prior to the MRW reset command
This is strongly recommended to ensure robust DRAM initialization

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 498f4a791593069220213c6d777527f4d899fb8a)

8 years agoMLK-13407: mx6qarm2: mt128x64mx3 2: add init pre charge all command
Adrian Alonso [Mon, 31 Oct 2016 18:57:54 +0000 (13:57 -0500)]
MLK-13407: mx6qarm2: mt128x64mx3 2: add init pre charge all command

- Adjust ZQ delay for MMDC clock frequency at 400MHz
- Precharge all commands per JEDEC
  The memory controller may optionally issue a Precharge-All command
  prior to the MRW Reset command, this is strongly recommended to ensure
  a robust DRAM initialization

DDR Calibration script:
http://sw-stash.freescale.net/projects/IMX/repos/ddr-scripts-rel/commits/a72e010a1fd8c7fe0fda7bdc4d058c478e94c3da

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
(cherry picked from commit 03cc626df73d6c2bb36daf280b1cd43170c298a0)

8 years agoMLK-13131: mx6qarm2: add fastboot and recovery support
Adrian Alonso [Wed, 7 Sep 2016 23:03:46 +0000 (18:03 -0500)]
MLK-13131: mx6qarm2: add fastboot and recovery support

Add fastboot and recovery mode support for mx6qarm

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
(cherry picked from commit 505e899ce582118da28ca1f4487ce7f179225bd7)

8 years agoMLK-13130: configs: mx6qarm2: android lpddr2 pop support
Adrian Alonso [Wed, 7 Sep 2016 23:00:54 +0000 (18:00 -0500)]
MLK-13130: configs: mx6qarm2: android lpddr2 pop support

Add Android support for mx6qarm2 lpddr2 pop target

Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
(cherry picked from commit 6356f2b420f3571493755f6b3a307a66a539b60c)

8 years agoMA-9263-3 [Android] Partition: enable GPT partition on imx devices
Sanshan Zhang [Wed, 1 Mar 2017 09:00:10 +0000 (17:00 +0800)]
MA-9263-3 [Android] Partition: enable GPT partition on imx devices

1. pass androidboot.storage_type to android, 'init' use it to parse
different init.freescale.storage.rc.
2. store new ptable with gpt partition.
3. we use the last LBA as backup gpt table, there is many warning log
when boot, change print to debug

Change-Id: I84070735e9d4c2741b0e240bc1c61b357dabc5b8
Signed-off-by: Sanshan Zhang <sanshan.zhang@nxp.com>
(cherry picked from commit da0ce2787256a323371641b0764266d386d767a5)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMA-9213 imx: mx7ulp-evk: Add android support
Sanshan Zhang [Wed, 25 Jan 2017 01:13:35 +0000 (09:13 +0800)]
MA-9213 imx: mx7ulp-evk: Add android support

Add android features on i.MX7ULP EVK board.
Implement the code to get boot device and the serial number on mx7ulp.
TODO: will add the code which check misc partition after porting BCB.

Change-Id: I9d06fecba303fa4dfdcaf73da1b6246444697bba
Signed-off-by: Sanshan Zhang <sanshan.zhang@nxp.com>
(cherry picked from commit 4c60cba3a017b921aebb84dd1268c898e549c99a)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12527-3 android: Add board support to enable android fastboot
Ye Li [Thu, 10 Mar 2016 02:49:49 +0000 (10:49 +0800)]
MLK-12527-3 android: Add board support to enable android fastboot

Add board level support for android fastboot feature. Each board has
a android specified header file for defining android related configuraitons.
And add build targets for their android uboot images building.

For mx6qsabreauto, mx6sabresd and mx7dsabresd, we enable the android
fastboot exclusive with DFU.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 43fe988af28c5e51fb23aa846e04bc9698256926)

8 years agoMLK-12527-2 android: Add FSL android fastboot support
Ye Li [Thu, 10 Mar 2016 02:48:24 +0000 (10:48 +0800)]
MLK-12527-2 android: Add FSL android fastboot support

Integrate the FSL android fastboot features into community's fastboot.

1. Use USB gadget g_dnl driver
2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and
   EFI partitions are not support by i.MX.
3. Add FDT support to community's android image.
4. Add a new boot command "boota" for android image boot. The boota
   implements to load ramdisk and fdt to their loading addresses
   specified in boot.img header, while bootm won't do it for android image.
5. Support the authentication of boot.img at the "load_addr" for
   both SD and NAND.
6. We use new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot
   with relevant header file "fsl_fastboot.h". While disabling the
   configuration, the community fastboot is used.
7. Overwrite the cmdline in boot.img by using bootargs saved in local environment.
8. Add recovery and reboot-bootloader support.

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 23d63ff185929fff5e392efc853d69b606ba081a)

8 years agoMLK-12527-1 mxc_keyb: Add MXC keyboard driver
Ye Li [Wed, 9 Mar 2016 12:59:43 +0000 (20:59 +0800)]
MLK-12527-1 mxc_keyb: Add MXC keyboard driver

The i.MX6SL EVK needs this driver in android fastboot support. Add
this driver to u-boot.

To use the driver, user must define:

CONFIG_MXC_KPD          Enable the driver
CONFIG_MXC_KEYMAPPING   Key mapping matrix
CONFIG_MXC_KPD_COLMAX   The column size of key mapping matrix
CONFIG_MXC_KPD_ROWMAX   The row size of the key mapping matrix

Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5096e572667ff41217deb4ba9b1bd15e93fa6b59)

8 years agoMLK-14497 mx6/mx7: DTS: Update dtsi file to add usb alias
Ye Li [Tue, 21 Mar 2017 03:50:17 +0000 (11:50 +0800)]
MLK-14497 mx6/mx7: DTS: Update dtsi file to add usb alias

After changed to USB DM driver, the framework uses the seq to find usb
device when registering a gadget driver. We have to add usb0 alias in
all i.MX6 and i.MX7 dtsi, otherwise the gadget driver register will fail.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14484-3 mx7ulp_arm2: Convert to use OF_CONTROL
Ye Li [Fri, 17 Mar 2017 13:30:56 +0000 (21:30 +0800)]
MLK-14484-3 mx7ulp_arm2: Convert to use OF_CONTROL

Add the 10x10 ARM2 and 14x14 ARM2 DTS files. Also convert the board
codes to use OF_CONTROL and DM drivers.

Since the DTS files only have UART and SD1 supported. So we only enable
the DM for these two modules. QSPI and USB are still kept in non-DM fashion.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14484-2 mx7ulp_arm2: Add 10x10 and 14x14 ARM2 codes
Ye Li [Fri, 17 Mar 2017 08:45:28 +0000 (16:45 +0800)]
MLK-14484-2 mx7ulp_arm2: Add 10x10 and 14x14 ARM2 codes

Copy the mx7ulp ARM2 codes from v2016.03 as the base for using
OF_CONTROL and DM drivers.

The 14x14 ARM2 LPDDR3 script is v1.5:
- IMX7ULP1_LPDDR3_320MHz_512MB_32bit_V1.5.inc

The 10x10 ARM2 LPDDR2 script is v1.1:
- IMX7ULP1_LPDDR2_320MHz_1GB_32bit_V1.1.inc

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14484-1 mtd/spi: Add MT35XU512ABA NOR flash support
Ye Li [Fri, 17 Mar 2017 09:37:41 +0000 (17:37 +0800)]
MLK-14484-1 mtd/spi: Add MT35XU512ABA NOR flash support

Add MT35XU512ABA parameters to NOR flash parameters array. Since the
manufactory ID is changed to 0x2C, add it for micron and using it for
relevant settings.

The MT35XU512ABA only supports 1 bit mode and 8 bits. It can't support
dual and quad. Because the 8 bits is not support by u-boot framework and
driver. We only use 1 bit mode for this flash.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-11 mx7ulp_evk: Add mfgtool environment
Ye Li [Fri, 17 Mar 2017 09:54:28 +0000 (17:54 +0800)]
MLK-14445-11 mx7ulp_evk: Add mfgtool environment

Add environment variables for mfgtool.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-10 mx7ulp_evk: Enable OCOTP fuse
Ye Li [Fri, 17 Mar 2017 09:52:42 +0000 (17:52 +0800)]
MLK-14445-10 mx7ulp_evk: Enable OCOTP fuse

Add the OCOTP driver and fuse command configurations.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-9 mx7ulp_evk: Add eMMC reworked board support
Ye Li [Fri, 17 Mar 2017 09:17:59 +0000 (17:17 +0800)]
MLK-14445-9 mx7ulp_evk: Add eMMC reworked board support

Add build configuration and DTS file to enable eMMC for eMMC reworked
EVK board.
Because the eMMC DTS file has QSPI node disabled, so we change to use
non-DM QSPI driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-8 mx7ulp_evk: Add dynamical MMC device detection
Ye Li [Fri, 17 Mar 2017 08:23:46 +0000 (16:23 +0800)]
MLK-14445-8 mx7ulp_evk: Add dynamical MMC device detection

Add board_late_mmc_env_init to support MMC device detection for environment
variables.

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