u-boot.git
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>
8 years agoMLK-14445-7 DTS: mx7ulp: Add PTA and PTB two GPIO banks
Ye Li [Fri, 17 Mar 2017 08:14:46 +0000 (16:14 +0800)]
MLK-14445-7 DTS: mx7ulp: Add PTA and PTB two GPIO banks

PTA and PTB banks are at M4 domain, but some boards like ARM2 use
them for controlling A7 domain modules. So we may need to support
them in GPIO driver.

In the imx_rgpio2p driver, the non-DM driver supports full 6 GPIO
banks, with PTA from index 0. But the DM driver which uses DTB only
have 4 GPIO banks, with PTC from index 0.

This will cause problem when using GPIO. So this patch add PTA and PTB
banks to DTB, and reorder the sequence for gpio with PTA from index 0.
So the non-DM driver and DM driver are aligned.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14312 mx7ulp: Fix incorrect DTB modification after using USB
Ye Li [Thu, 2 Mar 2017 03:35:49 +0000 (11:35 +0800)]
MLK-14312 mx7ulp: Fix incorrect DTB modification after using USB

u-boot has feature that when booting for mfgtool, the u-boot will modify the DTB
to disable SD 1.8v switch. But the judgement for mfgtool boot has a problem, it
only checks whether the USB PHY power status is enabled. When a USB device
(for example a USB ethernet) is used in u-boot, the power status is also enabled.
So the u-boot incorrectly disable the SD 1.8v switch.

The patch changes the get_boot_device to use the boot SW info provided by ROM. Only if
it is a USB boot, we will start the DTB modification for SD.

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

8 years agoMLK-13547 configs: mx7ulp_evk: enable ethernet boot support
Peter Chen [Wed, 16 Nov 2016 06:07:53 +0000 (14:07 +0800)]
MLK-13547 configs: mx7ulp_evk: enable ethernet boot support

Since we can use USB ethernet instead of local ethernet, add ethernet support
for it. To use USB ethernet function at u-boot, just plug in Micro-AB cable
at USBOTG1 port with USB2Ethernet adapter connected.

Signed-off-by: Peter Chen <peter.chen@nxp.com>
(cherry picked from commit 60ffddf87cf6b8502c5d5fc6540364adfd66ebb3)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-13929-6 mx7ulp_evk: Enable the MIPI DSI splashscreen
Ye Li [Wed, 15 Feb 2017 09:45:17 +0000 (17:45 +0800)]
MLK-13929-6 mx7ulp_evk: Enable the MIPI DSI splashscreen

Enable and setup board level codes for MIPI DSI splashscreen on EVK board.
User needs set env variable"panel=HX8363_WVGA" for displaying.

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

8 years agoMLK-13929-5 mx7ulp: Update clock and SoC functions for video
Ye Li [Wed, 15 Feb 2017 09:38:55 +0000 (17:38 +0800)]
MLK-13929-5 mx7ulp: Update clock and SoC functions for video

Add the clocks functions for enabling LCDIF and DSI clocks.
Also add the arch_preboot_os to disable the video before enter into
the kernel.

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

8 years agoMLK-13929-4 mx7ulp: Update registers and memory map for DSI and LCDIF
Ye Li [Wed, 15 Feb 2017 09:34:10 +0000 (17:34 +0800)]
MLK-13929-4 mx7ulp: Update registers and memory map for DSI and LCDIF

Update the registers base address and LCDIF registers structure for
mx7ulp.

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

8 years agoMLK-13929-3 video: Update LCDIF driver to support MIPI-DSI
Ye Li [Wed, 15 Feb 2017 09:27:31 +0000 (17:27 +0800)]
MLK-13929-3 video: Update LCDIF driver to support MIPI-DSI

The LCDIF provides video source for MIPI DSI host at DPI-2 interface.
When the LCDIF Framebuffer driver is enabled, it uses the panel
parameters setup by environments to create a panel device and register
it to DSI host driver and then enable the DSI host.

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

8 years agoMLK-13929-2 video: Add mipi panel driver for hx8363
Ye Li [Wed, 15 Feb 2017 09:04:08 +0000 (17:04 +0800)]
MLK-13929-2 video: Add mipi panel driver for hx8363

Add the mipi dsi panel driver for device HX8363 from kernel. The panel
driver needs work with mipi_dsi_northwest driver.

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

8 years agoMLK-13929-1 video: Add MIPI DSI host controller driver for i.MX7ULP
Ye Li [Wed, 15 Feb 2017 08:34:50 +0000 (16:34 +0800)]
MLK-13929-1 video: Add MIPI DSI host controller driver for i.MX7ULP

Add the host driver base from kernel for MIPI DSI controller on i.MX7ULP.
The controller provides a DPI-2 interface for LCDIF video stream, and a APB interface
for packet transmission.

The driver provides APIs to register a MIPI panel device and its driver. The panel
driver can use the write packet function provided by the host driver to send control
packets to panel device via APB interface.

MIPI DSI has its PHY and dedicated PLL. The driver will setup them when enabling the DSI
host.

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

8 years agoMLK-14445-6 mx7ulp_evk: Add USB OTG0 support
Ye Li [Thu, 16 Mar 2017 09:02:56 +0000 (17:02 +0800)]
MLK-14445-6 mx7ulp_evk: Add USB OTG0 support

Porting codes to support USB OTG0 on the EVK board. Convert
to use DM USB driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-5 ehci-mx6: Add OTG ID detecting by GPIO
Ye Li [Thu, 16 Mar 2017 09:00:59 +0000 (17:00 +0800)]
MLK-14445-5 ehci-mx6: Add OTG ID detecting by GPIO

The i.MX7ulp EVK board uses GPIO to detect ID for USB OTG0,
but when using DM USB driver, it is hard coded to use OTG ID pin.
Add a board override function that when extcon property is provided,
the function can check the GPIO to get ID.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-4 mx7ulp: Fix wrong i2c configuration name
Ye Li [Thu, 16 Mar 2017 07:59:26 +0000 (15:59 +0800)]
MLK-14445-4 mx7ulp: Fix wrong i2c configuration name

Wrong I2c driver configuration name is used in codes, so I2c driver is
not built. Correct it.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-3 mx7ulp_evk: Enable wdog driver for reset cpu
Ye Li [Thu, 16 Mar 2017 05:40:01 +0000 (13:40 +0800)]
MLK-14445-3 mx7ulp_evk: Enable wdog driver for reset cpu

Enable the CONFIG_ULP_WATCHDOG in defconfig, so that reset command
can work.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-2 mx7ulp_evk: Add QSPI flash support
Ye Li [Thu, 16 Mar 2017 03:25:35 +0000 (11:25 +0800)]
MLK-14445-2 mx7ulp_evk: Add QSPI flash support

Porting the QSPI flash board support from v2016.03, and convert to use
DM QSPI driver.
Since we need to support QSPI at default in u-boot, change the default
DTS file to qspi enabled DTS.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14445-1 mx7ulp: Add CONFIG_MX7ULP to kconfig
Ye Li [Thu, 16 Mar 2017 05:31:38 +0000 (13:31 +0800)]
MLK-14445-1 mx7ulp: Add CONFIG_MX7ULP to kconfig

Since many drivers need this CONFIG_MX7ULP to distiguish the settings
for i.MX7ULP only. Add this entry to cpu's kconfig.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14474-2 pinctrl: imx7ulp: Add new info instance for iomuxc1
Ye Li [Thu, 16 Mar 2017 03:35:50 +0000 (11:35 +0800)]
MLK-14474-2 pinctrl: imx7ulp: Add new info instance for iomuxc1

In mx7ulp pinctrl driver, we should create two info instances for
iomuxc0 and iomuxc1 respective, otherwise they will share the same
info instance, and cause problem in get base address... etc.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14474-1 pinctrl-imx: Fix wrong mask when SHARE_MUX_CONF_REG is set
Ye Li [Thu, 16 Mar 2017 03:28:54 +0000 (11:28 +0800)]
MLK-14474-1 pinctrl-imx: Fix wrong mask when SHARE_MUX_CONF_REG is set

when using SHARE_MUX_CONF_REG, wrong mask is used for writing config value.
which causes mux value is cleared.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-13925-1 mx7ulp_evk: Update LPDDR3 script to V1.4
Ye Li [Tue, 14 Feb 2017 05:39:10 +0000 (13:39 +0800)]
MLK-13925-1 mx7ulp_evk: Update LPDDR3 script to V1.4

Update LPDDR3 script from v1.2 to v1.4 EVK_IMX7ULP1_LPDDR3_320MHz_1GB_32bit_V1.4.inc
with the changes below:

  Version 1.3
    -Update the precharge command to CMD=01 at the DDR initialization phase
  Version 1.4
    -remove unimplemented registers
     Write data bit delay --refer to the DDR_TRIM bits in IOMUXC1_DDR_SW_PAD_CTL_PAD_DDRn

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

Test:
  One EVK board passes overnight stress test.

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

8 years agoMLK-13924 mx7ulp: Fix APLL num and denom setting issue
Ye Li [Tue, 14 Feb 2017 03:39:12 +0000 (11:39 +0800)]
MLK-13924 mx7ulp: Fix APLL num and denom setting issue

For the current APLL setting, as we want the APLL PFD0 to meet DDR clock 320Mhz requirement.
We set MULT to 20, NUM to 4 and DENOM to 2, to get final 22 multiplier. But according to the RM,
the NUM should always be less than the DENOM. So our setting violates the rule.

Actually the ROM has already set the MULT to 22 and leave NUM/DENOM in default value. The calculated APLL PFD0 clock
is 318.9888Mhz, which also meet the DDR requirement.
To fix the issue, we remove the PLL settings in DCD to use default value from ROM, and only set the PFD0 FRAC.

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

8 years agoMLK-13923 mx7ulp: Fix PCC register bits mask and offset issue
Ye Li [Tue, 14 Feb 2017 02:30:18 +0000 (10:30 +0800)]
MLK-13923 mx7ulp: Fix PCC register bits mask and offset issue

The offset for FRAC and the mask for PCD are not correct. If we set FRAC, we
can't get the right frequency. Fix them to correct value.

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

8 years agoMLK-13899 ARM: mx7ulp: Correct the clock index on imx7ulp
Bai Ping [Thu, 9 Feb 2017 05:50:32 +0000 (13:50 +0800)]
MLK-13899 ARM: mx7ulp: Correct the clock index on imx7ulp

On i.MX7ULP, value zero is reserved in SCG1 RCCR register,
so the val should be decreased by 1 to get the correct clock
source index.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 7c9a3573ec0191f1e0bea12956346a5eab2db43a)

8 years agoMLK-13761 board: imx7ulp: Fix system reset after a7 rtc alarm expired.
Bai Ping [Thu, 19 Jan 2017 10:27:34 +0000 (18:27 +0800)]
MLK-13761 board: imx7ulp: Fix system reset after a7 rtc alarm expired.

The board will reboot if A7 core enter mem mode by rtc, then M4 core
enter VLLS mode after the RTC alarm expired. Enable the dumb PMIC mode
to fix this issue.

Signed-off-by: Bai Ping <ping.bai@nxp.com>
(cherry picked from commit 5aa5974f487e0b4c2e963a86203161c5f05e2fdf)

8 years agoMLK-13776 ocotp: Add fuse word checking before programming it on i.MX7ULP
Ye Li [Wed, 18 Jan 2017 07:19:55 +0000 (15:19 +0800)]
MLK-13776 ocotp: Add fuse word checking before programming it on i.MX7ULP

On i.MX7ULP, the fuse words (except bank 0 and 1) only supports to write once,
because they use ECC mode. Multiple writes may damage the ECC value and cause a
wrong fuse value decoded when reading.
This patch adds a checking before the fuse word programming, only can write
when the word value is 0.

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

8 years agoMLK-13645 mx7ulp: Modify FDT file to disable SD3.0 for mfgtool
Ye Li [Fri, 23 Dec 2016 04:01:06 +0000 (12:01 +0800)]
MLK-13645 mx7ulp: Modify FDT file to disable SD3.0 for mfgtool

Since the SD3.0 kernel driver needs M4 image support, this causes problem to mfgtool.
To decouple the relationship, we modify the FDT file in u-boot to disable
SD3.0 when booting for mfgtool. So the kernel won't depend on M4 image.

Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 1826d6e4dc732521190c742f812193be95eea211)

8 years agoMLK-13525-1 mx7ulp: Add common plugin codes for mx7ulp
Ye Li [Fri, 25 Nov 2016 06:00:55 +0000 (14:00 +0800)]
MLK-13525-1 mx7ulp: Add common plugin codes for mx7ulp

Add common plugin codes to call ROM's hwcnfg_setup and generate IVT2
header.

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

8 years agoMLK-13450-17 sf: Add Macronix MX25R6435F SPI NOR flash to flash parameters array
Ye Li [Wed, 15 Mar 2017 09:00:58 +0000 (17:00 +0800)]
MLK-13450-17 sf: Add Macronix MX25R6435F SPI NOR flash to flash parameters array

On mx7ulp EVK board, we use MX25R6435F NOR flash, add its parameters
and IDs to flash parameter array. Otherwise, the flash probe will fails.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-13450-16 fsl_qspi: Update changes for mx7ulp
Ye Li [Wed, 15 Mar 2017 08:53:31 +0000 (16:53 +0800)]
MLK-13450-16 fsl_qspi: Update changes for mx7ulp

The mx7ulp has small TX/RX FIFO (64Bytes) and AHB buffer size (128Bytes)
than other i.MX. Change some parameters for it.

Also found when the DDR_EN bit is set, sometime the page programming will fail
during large data programming. The 64 bytes data is not programmed into flash.
But when DDR_EN is clear, there is no such issue. Suspect this is a IC issue.
We have disable the DDR_EN for mx7ulp.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-13450-15 ehci-mx6: Add powerup_fixup implementation
Ye Li [Thu, 17 Nov 2016 08:54:56 +0000 (16:54 +0800)]
MLK-13450-15 ehci-mx6: Add powerup_fixup implementation

When doing port reset, the PR bit of PORTSC1 will be automatically
cleared by our IP, but standard EHCI needs explicit clear by software. The
EHCI-HCD driver follow the EHCI specification, so after 50ms wait, it
clear the PR bit by writting to the PORTSC1 register with value loaded before
setting PR.

This sequence is ok for our IP when the delay time is exact. But when the timer
is slower, some bits like PE, PSPD have been set by controller automatically
after the PR is automatically cleared. So the writing to the PORTSC1 will overwrite
these bits set by controller. And eventually the driver gets wrong status.

We implement the powerup_fixup operation which delays 50ms and will check
the PR until it is cleared by controller. And will update the reg value which is written
to PORTSC register by EHCI-HCD driver. This is much safer than depending on the delay
time to be accurate and aligining with controller's behaiver.

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

8 years agoMLK-13450-14 ehci-mx6: Update EHCI driver to support OTG0 on i.MX7ULP
Ye Li [Thu, 17 Nov 2016 08:39:03 +0000 (16:39 +0800)]
MLK-13450-14 ehci-mx6: Update EHCI driver to support OTG0 on i.MX7ULP

The ULP has two USB controllers. These two controllers have similar NC
registers layout as i.MX7D. But OTG0 uses UTMI PHY simliar as i.MX6, not
the integrated PHY on i.MX7D. The OTG1 needs off-chip HSIC PHY or ULPI PHY
to work.

This patch only supports OTG0 with UTMI PHY.

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

8 years agoMLK-13450-7 mx7ulp: Add M4 core boot support when using single boot mode
Ye Li [Mon, 14 Nov 2016 09:58:04 +0000 (17:58 +0800)]
MLK-13450-7 mx7ulp: Add M4 core boot support when using single boot mode

The single boot mode in MX7ULP will only boot up A7, the M4 is running in ROM
by checking entry from SIM0 GP register.

In this patch, We bind M4 image with u-boot.bin by allocating a section for m4 image.
So the whole image (included M4 image) will be loaded by A7 ROM into DDR. Then
when u-boot is up, it will try to load M4 image into TCML and boot it there.

Since M4 image will not be relocated in u-boot codes, we must load it during
board_f. Current implementation put it in arch_cpu_init to get M4 booted
as quick as possible.

We requires the M4 image with IVT head and padding embedded, not a RAW binary. The
image should be same as what is used for M4 QSPI boot in dual boot mode.

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

8 years agoimx: mx7ulp_evk: enable mmc/regulator support
Peng Fan [Wed, 22 Feb 2017 08:21:57 +0000 (16:21 +0800)]
imx: mx7ulp_evk: enable mmc/regulator support

Enable MMC support.
The fsl sdhc driver needs regulator to enable power, so enable
regulator support.

And bootcmd and more env.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agoimx: imx7ulp: add EVK board support
Peng Fan [Wed, 22 Feb 2017 08:21:56 +0000 (16:21 +0800)]
imx: imx7ulp: add EVK board support

Add EVK board support.
Add the evk dts file.

LOG:
U-Boot 2017.03-rc2-00038-gab86c1d (Feb 22 2017 - 15:59:58 +0800)

CPU:   Freescale i.MX7ULP rev1.0 at 500 MHz
Reset cause: POR
Boot mode: Dual boot
Model: NXP i.MX7ULP EVK
DRAM:  1 GiB
MMC:   FSL_SDHC: 0
In:    serial@402D0000
Out:   serial@402D0000
Err:   serial@402D0000
Net:   Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot:  0

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agommc: fsl_esdhc: support i.MX7ULP
Peng Fan [Wed, 22 Feb 2017 08:21:55 +0000 (16:21 +0800)]
mmc: fsl_esdhc: support i.MX7ULP

Add compatible property for i.MX7ULP.
Add a weak init_usdhc_clk function, i.MX7ULP use this to init the clock.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>

8 years agoarm: dts: add i.MX7ULP dtsi file
Peng Fan [Wed, 22 Feb 2017 08:21:54 +0000 (16:21 +0800)]
arm: dts: add i.MX7ULP dtsi file

Add i.MX7ULP dtsi file.
Add clock and pinfun header files.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
8 years agomx7ulp: Add HAB boot support
Peng Fan [Wed, 22 Feb 2017 08:21:53 +0000 (16:21 +0800)]
mx7ulp: Add HAB boot support

Add CAAM clock functions, SEC_CONFIG[1] fuse checking, and default CSF
size for HAB support boot on mx7ulp.

Users need to uncomment the CONFIG_SECURE_BOOT in mx7ulp_evk.h to build
secure uboot.

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

8 years agoserial: lpuart: add i.MX7ULP support
Peng Fan [Wed, 22 Feb 2017 08:21:52 +0000 (16:21 +0800)]
serial: lpuart: add i.MX7ULP support

Add i.MX7ULP support.
The buadrate calculation on i.MX7ULP is different,so add a new setbrg
function for i.MX7ULP.
Add a enum lpuart_devtype for runtime check for different platforms.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Shaohui Xie <Shaohui.Xie@nxp.com>
Cc: Alison Wang <b18965@freescale.com>
8 years agoserial: lpuart: restructure lpuart driver
Peng Fan [Wed, 22 Feb 2017 08:21:51 +0000 (16:21 +0800)]
serial: lpuart: restructure lpuart driver

Drop CONFIG_LPUART_32B_REG.
Move the register structure to a common file include/fsl_lpuart.h
Define lpuart_serial_platdata structure which includes the reg base and flags.
For 32Bit register access, use lpuart_read32/lpuart_write32 which handles
big/little endian.
For 8Bit register access, still use the orignal code.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by : Stefano Babic <sbabic@denx.de>
Cc: Bhuvanchandra DV <bhuvanchandra.dv@toradex.com>
Cc: York Sun <york.sun@nxp.com>
Cc: Shaohui Xie <Shaohui.Xie@nxp.com>
Cc: Alison Wang <b18965@freescale.com>
8 years agoi2c: lpi2c: add lpi2c driver for i.MX7ULP
Peng Fan [Fri, 24 Feb 2017 01:54:18 +0000 (09:54 +0800)]
i2c: lpi2c: add lpi2c driver for i.MX7ULP

Add lpi2c driver for i.MX7ULP.
Need to enable the two options to use this driver:
CONFIG_DM_I2C=y
CONFIG_SYS_I2C_IMX_LPI2C=y

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Heiko Schocher <hs@denx.de>
Cc: Stefano Babic <sbabic@denx.de>
8 years agopinctrl: Add i.MX7ULP pinctrl driver
Peng Fan [Wed, 22 Feb 2017 08:21:49 +0000 (16:21 +0800)]
pinctrl: Add i.MX7ULP pinctrl driver

Add i.MX7ULP pinctrl driver.
Select CONFIG_PINCTRL_IMX7ULP to use this driver.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Reviewed-by : Stefano Babic <sbabic@denx.de>

8 years agowdog: Add the watchdog driver for MX7ULP.
Ye Li [Wed, 22 Feb 2017 08:21:48 +0000 (16:21 +0800)]
wdog: Add the watchdog driver for MX7ULP.

This driver implements the HW WATCHDOG functions. Which needs
to set CONFIG_HW_WATCHDOG to use them. This is disabled by default for
mx7ulp.

Use watchdog for reset cpu. Implement this in the driver.
Need to define CONFIG_ULP_WATCHDOG to build it.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Cc: Stefano Babic <sbabic@denx.de>