u-boot.git
8 years agoMLK-14250-4 mx6dq/dl/dqp: Add plugin boot support for sabre boards
Ye Li [Fri, 24 Feb 2017 07:24:20 +0000 (15:24 +0800)]
MLK-14250-4 mx6dq/dl/dqp: Add plugin boot support for sabre boards

Add plugin.S for plugin boot initialization on mx6dq/dl/dqp sabresd and sabreauto
boards. Need to set "CONFIG_USE_IMXIMG_PLUGIN" for this feature.
Add the configurations for the plugin enabled buiding.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14250-3 mx6sxsabreauto: Add plugin boot support
Ye Li [Fri, 24 Feb 2017 06:58:34 +0000 (14:58 +0800)]
MLK-14250-3 mx6sxsabreauto: Add plugin boot support

Add plugin.S for plugin boot initialization. Need to set "CONFIG_USE_IMXIMG_PLUGIN"
for this feature.
Add the build configuration "mx6sxsabreauto_plugin_defconfig" to use the plugin.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14250-2 mx6sxsabresd: Add plugin boot support
Ye Li [Fri, 24 Feb 2017 06:52:23 +0000 (14:52 +0800)]
MLK-14250-2 mx6sxsabresd: Add plugin boot support

Add plugin.S for plugin boot initialization. Need to set "CONFIG_USE_IMXIMG_PLUGIN"
for this feature.
Add the build configuration "mx6sxsabresd_plugin_defconfig" to use the plugin.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14250-1 mx6slevk: Add plugin boot support
Ye Li [Thu, 23 Feb 2017 06:47:57 +0000 (14:47 +0800)]
MLK-14250-1 mx6slevk: Add plugin boot support

Add plugin.S for plugin boot initialization. Need to set "CONFIG_USE_IMXIMG_PLUGIN"
for this feature.
Add the build configuration "mx6slevk_plugin_defconfig" to use the plugin.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-10647 armv7: Fix Dcache disable issue on i.MX7
Ye.Li [Mon, 13 Apr 2015 09:18:14 +0000 (17:18 +0800)]
MLK-10647 armv7: Fix Dcache disable issue on i.MX7

The issue on the i.MX7D is that, there is one cache-able memory access
between the L1 and L2 cache flush by calling the flush_dache_all->
v7_maint_dcache_all() [Flush L1 and L2 cache) which written in the C code.

L1-cache-flush            -> This will flush L1 cache to L2 cache in the end.
Cache-able memory access  -> This will have the chance cause the L1 line-fill
                             with dirty data from L2 cache(L1 cache-line dirty,
                             L2 clean)
L2-cache-flush            -> This will only flush L2 cache to L3, but still
                             some dirty data on the L1 cacheline.

After C & M bit clean,    -> The dirty data on the L1 cache line lost, which will
                             cause memory coherent issue if that dirty cache line
                             has some useful data

The only problem here is: there is one cache-cable memory access between L1 and L2 cache flush.

This patch should works fine on the i.MX6 and i.MX7.

The second cache flush have zero impact on the i.MX6, but this is really need for
the i.MX7D platform due to the L1 line-fill during the first dcache_flush.

And the second flush will not bring in the L1 dirty cache line due to the C bit is
clear now, which means the dcache is disabled.

Acked-by: Jason Liu<r64343@freescale.com>
Reviewed-by: Jason Liu<r64343@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit f5d5f07fba936c4bb05c887de9d72fb75b3dc0f2)
(cherry picked from commit 86c784cf4c4b633d37a76de7d47155c08f75dc82)
(cherry picked from commit d85cd484e6825631aa1ab572e5e0539f2191d795)
(cherry picked from commit 2b29c1873c2293abe1c4b361392521223b9c9ecf)

8 years agoMLK-13782 net: fec_mxc: specify the registered eth index by dev_id
Andy Duan [Thu, 19 Jan 2017 06:22:29 +0000 (14:22 +0800)]
MLK-13782 net: fec_mxc: specify the registered eth index by dev_id

Specify the registered eth index by dev_id.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit df42b7b0c5e6847f32419075eb25f274ed039d6f)

8 years agoMLK-13777 net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse
Andy Duan [Wed, 18 Jan 2017 08:04:10 +0000 (16:04 +0800)]
MLK-13777 net: fec_mxc: avoid transfer dev_id -1 to get mac address from fuse

Avoid transfer parameter dev_id value with "-1" to .fec_get_hwaddr(),
it should transfer fec->dev_id to get mac address from fuse.

Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
(cherry picked from commit 7e4a55b068311d46d16e86e697d36f34a59bf47a)

8 years agoMLK-13486: imx: logos: use NXP logo
Peng Fan [Tue, 22 Nov 2016 02:57:13 +0000 (10:57 +0800)]
MLK-13486: imx: logos: use NXP logo

Use NXP logo.
The vendor and board dir not changed, only replace the contents
of freescale.bmp.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 0b381fdf1a45cb06a057724e708ce0bbeee67f4d)

8 years agoMLK-13410 Android: Change to set mfgtool only for none android u-boot
Ye Li [Mon, 31 Oct 2016 02:10:17 +0000 (10:10 +0800)]
MLK-13410 Android: Change to set mfgtool only for none android u-boot

The mfgtool environments only can set in BSP u-boot image, not for android
u-boot. Since android u-boot may go into fastboot in board_r phase which is
earlier than mfgtool environment check. The USB status from android fastboot
will cause u-boot to configure mfgtool environment.

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

8 years agoMLK-13307-12 imx: mx6: update ccm macro settings for i.MX6SLL
Peng Fan [Mon, 10 Oct 2016 03:14:26 +0000 (11:14 +0800)]
MLK-13307-12 imx: mx6: update ccm macro settings for i.MX6SLL

Update CCM macros for i.MX6SLL.

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

8 years agoMLK-13307-7 imx: mx6sll: update soc settings
Peng Fan [Mon, 10 Oct 2016 02:00:45 +0000 (10:00 +0800)]
MLK-13307-7 imx: mx6sll: update soc settings

Update soc settings for i.MX6SLL.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit afa2d78f2b799337eae3dc67c0ed702d5520eee6)

8 years agoMLK-12883 usb: limit USB_MAX_XFER_BLK to 256
Peng Fan [Mon, 6 Jun 2016 05:53:43 +0000 (13:53 +0800)]
MLK-12883 usb: limit USB_MAX_XFER_BLK to 256

For Some USB mass storage devices, such as:
"
 - Kingston DataTraveler 2.0 001D7D06CF09B04199C7B3EA
 - Class: (from Interface) Mass Storage
 - PacketSize: 64  Configurations: 1
 - Vendor: 0x0930  Product 0x6545 Version 1.16
"
When `usb read 0x80000000 0 0x2000`, we met
"EHCI timed out on TD - token=0x80008d80".

The devices does not support scsi VPD page, we are not able
to get the maximum transfer length for READ(10)/WRITE(10).

So we limit this to 256 blocks as READ(6).

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit df0052575b2bc9d66ae73584768e1a457ed5d914)

8 years agoMLK-12444-2 mx6: Modify kernel and fdt load address to align with mfgtool
Ye Li [Wed, 24 Feb 2016 14:01:07 +0000 (22:01 +0800)]
MLK-12444-2 mx6: Modify kernel and fdt load address to align with mfgtool

Change the CONFIG_LOADADDR to 0x80800000 and environment variable "fdt_addr"
to 0x83000000 for i.MX6SX, i.MX6SL and i.MX6UL to align the address
used in mfgtool.

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

8 years agoMLK-12444-1 mfgtool: Add mfgtool support
Ye Li [Wed, 24 Feb 2016 09:38:54 +0000 (17:38 +0800)]
MLK-12444-1 mfgtool: Add mfgtool support

If boot from usb, reset environment to default value.
Auto apply mfgtools setting and boot mfgtools kernel.
Porting this from fsl uboot to uboot 2016.

The 7dsabresd has already added the environment and usb boot
related functions. No need to add them more. Only need to add
NAND parts environment for mfgtools.

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

8 years agoMLK-14259-3 mx6ulevk: Add support for NAND
Ye Li [Fri, 24 Feb 2017 06:23:12 +0000 (14:23 +0800)]
MLK-14259-3 mx6ulevk: Add support for NAND

Add NAND pinmux settings, clock setting and related configurations.
Default not enabled, need hardware rework.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14259-2 mx6ulevk: Add PHYS_SDRAM_SIZE and CMA macro
Ye Li [Fri, 24 Feb 2017 06:17:18 +0000 (14:17 +0800)]
MLK-14259-2 mx6ulevk: Add PHYS_SDRAM_SIZE and CMA macro

Define PHYS_SDRAM_SIZE future usage.
Define CMA for kernel usage, default is 320MB, but we do not
have enough memory on 9x9 evk lpddr2 board, so swith to 96MB.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14259-1 mx6ulevk: Change i.MX6UL EVK to non-SPL at default
Ye Li [Fri, 24 Feb 2017 06:03:53 +0000 (14:03 +0800)]
MLK-14259-1 mx6ulevk: Change i.MX6UL EVK to non-SPL at default

Current i.MX6UL EVK boards enable the SPL u-boot. Change it to non-SPL
for default configurations. Add two other build configurations for SPL.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12767 imx6ull: fix runtime checking for i.MX6ULL
Peng Fan [Mon, 9 May 2016 09:31:34 +0000 (17:31 +0800)]
MLK-12767 imx6ull: fix runtime checking for i.MX6ULL

Fix runtime checking for i.MX6ULL. Add is_cpu_type(MXC_CPU_MX6ULL)
to avoid using wrong code path.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 05922b0abf848949df778c19312cb1cf7fdfbe6a)

8 years agoMLK-12766 net: fec: do not access reserved register for i.MX6ULL
Peng Fan [Mon, 9 May 2016 08:53:32 +0000 (16:53 +0800)]
MLK-12766 net: fec: do not access reserved register for i.MX6ULL

The MIB RAM and FIFO receive start register does not exist on
i.MX6ULL. Accessing these register will cause enet not work well or
cause system report fault.

Reported-by: Bai Ping <ping.bai@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 5fb09cab9bb3cc4cef02239299d02cec666396ab)

8 years agoMLK-12565 mx7: rdc: Change IS_ENABLED to remove build warning
Ye Li [Wed, 16 Mar 2016 08:27:56 +0000 (16:27 +0800)]
MLK-12565 mx7: rdc: Change IS_ENABLED to remove build warning

Change to use #ifdef not the IS_ENABLED, because we will get build warning
when the CONFIG_IMX_RDC is not set.

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

8 years agoMLK-10708 imx:mx6qp Update Saturation THR for PREx
Peng Fan [Tue, 21 Apr 2015 03:38:09 +0000 (11:38 +0800)]
MLK-10708 imx:mx6qp Update Saturation THR for PREx

Update settings for PRE. Value for Saturation THR of PREx,
changed from 0x20 to 0x10 to make system more stable.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 02e7090604e55d9690532294b02b499609d46e63)
(cherry picked from commit f7c5cf580fcc2c8ab95a8d835f5874d26216910f)
(cherry picked from commit 1a90b60731cd60feba1ef7a11ede2613283bb4a8)

8 years agoMLK-12483-5 mx6ul: Enable module fuse check EVK board
Ye Li [Tue, 15 Mar 2016 14:16:54 +0000 (22:16 +0800)]
MLK-12483-5 mx6ul: Enable module fuse check EVK board

Enable the configurations CONFIG_MODULE_FUSE and CONFIG_OF_SYSTEM_SETUP for
module fuse check. And modify board level codes for SD, FEC and EIM.

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

8 years agoMLK-12483-4 mx6: Modify drivers to disable fused modules
Ye Li [Wed, 16 Mar 2016 05:50:54 +0000 (13:50 +0800)]
MLK-12483-4 mx6: Modify drivers to disable fused modules

Add the fuse checking in drivers, when the module is disabled in fuse,
the driver will not work.

Changed drivers: BEE, GPMI, APBH-DMA, ESDHC, FEC, QSPI, ECSPI, I2C,
USB-EHCI, GIS, LCDIF.

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

8 years agoMLK-12483-3 mx6: Add a module fuse checking
Ye Li [Tue, 15 Mar 2016 14:12:46 +0000 (22:12 +0800)]
MLK-12483-3 mx6: Add a module fuse checking

Implement a functionality to read the soc fuses and check if any module
is fused. For fused module, we have to disable it in u-boot dynamically,
and change the its node in FDT to "disabled" status before starting the kernel.

In this patch, we implement the ft_system_setup for FDT fixup. This function will
be called during boot process or by "fdt systemsetup" command.

To enable the module fuse checking, two configurations must be defined:
CONFIG_MODULE_FUSE
CONFIG_OF_SYSTEM_SETUP

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

8 years agoENGR00315894-55 iMX6SX: add debug monitor support
Ye.Li [Wed, 11 Jun 2014 07:34:49 +0000 (15:34 +0800)]
ENGR00315894-55 iMX6SX: add debug monitor support

Debug monitor will print out last failed AXI access info when
system reboot is caused by AXI access failure, only works when
debug monitor is enabled.

Enable this module on i.MX6SX.

Signed-off-by: Anson Huang <b20788@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit df6ac8531d498021ed379c74fc1847bd2cec7179)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 4f4ecdbf6fe2673b8ad117df1a4974bdb7e6aa4a)

8 years agoMLK-10674-2 imx: mx6qp settings for PRE
Peng Fan [Fri, 17 Apr 2015 10:28:29 +0000 (18:28 +0800)]
MLK-10674-2 imx: mx6qp settings for PRE

Since the following piece settings can not be in DCD table, we
add them in enable_ipu_clock.
"
setmem /32 0x00bb048c = 0x00000002      ## Bypass IPU1 QoS generator
setmem /32 0x00bb050c = 0x00000002      ## Bypass IPU2 QoS generator
setmem /32 0x00bb0690 = 0x00000200      ## Bandwidth THR for of PRE0
setmem /32 0x00bb0710 = 0x00000200      ## Bandwidth THR for of PRE1
setmem /32 0x00bb0790 = 0x00000200      ## Bandwidth THR for of PRE2
setmem /32 0x00bb0810 = 0x00000200      ## Bandwidth THR for of PRE3
setmem /32 0x00bb0694 = 0x00000020      ## Saturation THR for of PRE0
setmem /32 0x00bb0714 = 0x00000020      ## Saturation THR for of PRE1
setmem /32 0x00bb0794 = 0x00000020      ## Saturation THR for of PRE2
setmem /32 0x00bb0814 = 0x00000020      ## Saturation THR for of PRE
"
CONFIG_VIDEO_IPUV3 is always defined in mx6sabre_common.h,
the settings sure will effect.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 61cec88a59ebf450dd1352d81e03b5aa842e1d71)
(cherry picked from commit 3d25e2acd48f605678a98cf594a715809dea8286)

8 years agoMLK-10496: Check the PL310 version for applying errata
Nitin Garg [Fri, 27 Mar 2015 19:45:43 +0000 (14:45 -0500)]
MLK-10496: Check the PL310 version for applying errata

Apply errata based on PL310 version instead of compile
time. Also set Prefetch offset to 15, since it improves
memcpy performance by 35%. Don't enable Incr double
Linefill enable since it adversely affects memcpy
performance by about 32MB/s and reads by 90MB/s. Tested
with 4K to 16MB sized src and dst aligned buffer.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
(cherry picked from commit 31751fa9cf29ef4056f49fe06a54700a89c9bdc5)

8 years agoMLK-10176-6 imx: mx7: Modify GPT timer driver for mx7
Peng Fan [Mon, 9 Mar 2015 02:22:41 +0000 (10:22 +0800)]
MLK-10176-6 imx: mx7: Modify GPT timer driver for mx7

Modify the GPT common platform driver for mx7 which only use 24Mhz
OSC as clock source.

Note: at default, the mx7d will use system counter as timer. The GPT
is disabled.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 6e250796d6a07d84093eeae96e5a6e4c593cdb0b)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 708898fe547bd3d56f0abf7e40f1af91cf4271cf)

8 years agoENGR00328312 i2c: imx: Optimize the i2c device recovery solution
Fugang Duan [Mon, 11 Aug 2014 07:14:50 +0000 (15:14 +0800)]
ENGR00328312 i2c: imx: Optimize the i2c device recovery solution

From i2c spec, if device pull down the SDA line that causes
i2c bus dead, host can send out 9 clock to let device release
SDA.

But for some special device like pfuze100, it pull down SDA line
and the solution cannot take effort.

The patch just add NACK and STOP signal after 8 dummy clock, and pmic
can release SDA line after the recovery. Test case catch 375 times of
i2c hang, and all are recovered.

Signed-off-by: Fugang Duan <B38611@freescale.com>
(cherry picked from commit 53118db42d201d36ca9067b4bb0e2702399e100b)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit b8dcb812401026cb2189b24a4f6058830151c85a)
(cherry picked from commit c5a44a2a0b2218221cb12645b10f0b34ecc6f79b)

8 years agoMLK-10576 ARM: i.MX6: exclude the ARM errata from i.MX6 UP system
Nitin Garg [Fri, 3 Apr 2015 14:59:45 +0000 (09:59 -0500)]
MLK-10576 ARM: i.MX6: exclude the ARM errata from i.MX6 UP system

The ARM errata 751472, 794072, 761320, 845369 only applied
to the following configuration:

This erratum affects configurations with either:
- One processor if the ACP is present
- Two or more processors

i.MX6 family does not have the ACP and thus only the MPCore system
will be impacted, which are the i.MX6DQ, i.MX6DL, and i.MX6QP.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Jason Liu <r64343@freescale.com>
(cherry picked from commit 0db960784ba4f631ee5c0321b5d25f3b1ac55640)
(cherry picked from commit 850f27d137a083a141c99fe9828d596807937d38)

8 years agoMLK-10524: iMX6x: Implement workaround for Cortex-A9 errata 845369
Nitin Garg [Wed, 1 Apr 2015 01:37:36 +0000 (20:37 -0500)]
MLK-10524: iMX6x: Implement workaround for Cortex-A9 errata 845369

Under very rare timing circumstances, transitioning into streaming
mode might create a data corruption. Present on Two or more processors
or 1 core with ACP, all revisions. This erratum can be worked round
by setting bit[22] of the undocumented Diagnostic Control Register to 1.

Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
(cherry picked from commit 70ad44e523680de67dd8b7a7505d7f27799980ee)
(cherry picked from commit f20a65847577ff40dc7e3739a0bb69926885c734)

8 years agoMLK-12557 mx6ul: Enable syscounter as default timer
Ye Li [Mon, 14 Mar 2016 09:52:12 +0000 (17:52 +0800)]
MLK-12557 mx6ul: Enable syscounter as default timer

Use syscounter for i.MX6UL platform as default timer, not use GPT.
Add a CONFIG_GPT_TIMER for selecting GPT. Using CONFIG_SYSCOUNTER_TIMER
for selecting system counter.

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

8 years agoENGR00325255 pcie:enable pcie support on imx6sx sd
Ye Li [Fri, 11 Mar 2016 09:28:00 +0000 (17:28 +0800)]
ENGR00325255 pcie:enable pcie support on imx6sx sd

Enable pcie support in uboot on imx6sx sd boards
- enable_pcie_clock should be call before ssp_en is set,
  since that ssp_en control the phy_ref clk gate, turn on
  it after the source of the pcie clks are stable.
- add debug info
- add rx_eq of gpr12 on imx6sx
- there are random link down issue on imx6sx. It's
  pcie ep reset issue.
  solution:reset ep, then retry link can fix it.

(cherry picked from commit ec78595a24b5ff1020baa97b6d6e79a3a3326307)
Signed-off-by: Richard Zhu <r65037@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 81fd30250110d72992758f08b66c07306126892b)

8 years agoENGR00319965 pcie: mask the imx6sl out
Richard Zhu [Wed, 25 Jun 2014 06:20:16 +0000 (14:20 +0800)]
ENGR00319965 pcie: mask the imx6sl out

imx6sl doesn't have the pcie module, mask the pcie
related codes from imx6sl.

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit acaff11da33f8f0cb1521d3c48e64e7ed9a87bec)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 48a4606ef575c72e16e31c167dce042fcb66191c)

8 years agoENGR00319415 pcie: random link down issue after warm-rst
Richard Zhu [Tue, 24 Jun 2014 01:59:47 +0000 (09:59 +0800)]
ENGR00319415 pcie: random link down issue after warm-rst

There are about 0.02% percentage on some imx6q/dl/solo
hw boards, random pcie link down when warm-reset is used.
Make sure to clear the ref_ssp_en bit16 of gpr1 before
warm-rst, and set ref_ssp_en after the pcie clks are
stable to workaround it.

rootcause:
* gpr regisers wouldn't be reset by warm-rst, while the
ref_ssp_en is required to be reset by pcie.
(work-around in u-boot)
* ref_ssp_en should be set after pcie clks are stable.
(work-around in kernel)

Signed-off-by: Richard Zhu <r65037@freescale.com>
(cherry picked from commit 5cc825b12c6b86a22f1a6a0535b52cf3ee142e77)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 6193cf4e3384a59e29546d13a67657f7faeafc9e)
(cherry picked from commit 7b4aabeddffabca46d7d6e7ef2611de468a6b4f7)

8 years agoMLK-11064 imx: mx6qp: Adjust AQos settings for peripherals
Ye.Li [Fri, 5 Jun 2015 14:11:41 +0000 (22:11 +0800)]
MLK-11064 imx: mx6qp: Adjust AQos settings for peripherals

To resolve USB camera bandwidth issue, the patch sets recommended AQoS
setting from IC team value for peripheral and only on imx6qp.

The address is: 0xbb0608, the value is: 0x80000201

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 11906c712a52e7a20caf71d7c5da4e951a59db29)
(cherry picked from commit 5dcf073b8f2479a2adbb8d9fb03d9c9c70664e32)

8 years agoMLK-12534 mx6: shutdown vddpu and PCIE phy to save power
Ye Li [Fri, 11 Mar 2016 07:44:01 +0000 (15:44 +0800)]
MLK-12534 mx6: shutdown vddpu and PCIE phy to save power

Shutdown VDDPU and PCIE phy to save power.

For PCIE, the i.MX6SL and i.MX6UL does not have this module,
so don't need it.

For VDDPU, the i.MX6UL does not have GPU, does not need it. And on
i.MX6QP there is narrow window that PRE driver is ready but GPU driver probe later,
and the later GPU driver turn on PU may cause 'PRE hang' issue. To simplify
thing, do not turn off PU in u-boot.

Reference:
commit: 6b0787b726e2ff32210d742d93ecd3f4bb2ae402
commit: 4bd0032c0eba50fa0caf43f50f735a3cfbe36a8d

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

8 years agoMLK-12533 mx6sx: select OSC as uart's clk parent
Ye Li [Fri, 11 Mar 2016 06:20:23 +0000 (14:20 +0800)]
MLK-12533 mx6sx: select OSC as uart's clk parent

As M4 is sourcing UART clk from OSC, to make UART work
when M4 is enabled, need to select OSC as clk parent,
24M OSC is enough for debug UART in uboot.

Signed-off-by: Ye Li <ye.li@nxp.com>
Signed-off-by: Anson Huang <b20788@freescale.com>
(cherry picked from commit b5e1b393192099e91c5cb75b69291c87eacb9f60)
(cherry picked from commit 416dea861c2dd5a197bf2354069bba8415a20b12)

8 years agoMLK-12452-4 mx6sxsabreauto: Add secondary enet support
Ye Li [Fri, 4 Mar 2016 08:45:17 +0000 (16:45 +0800)]
MLK-12452-4 mx6sxsabreauto: Add secondary enet support

Add configurations and board codes for second enet.

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

8 years agoMLK-12452-3 mx6sxsabresd: Add secondary enet support
Ye Li [Fri, 4 Mar 2016 08:43:35 +0000 (16:43 +0800)]
MLK-12452-3 mx6sxsabresd: Add secondary enet support

Add configurations and board codes for second enet.

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

8 years agoMLK-12452-1 FEC: Update fec driver to support two MDIO
Ye Li [Thu, 25 Feb 2016 05:34:11 +0000 (13:34 +0800)]
MLK-12452-1 FEC: Update fec driver to support two MDIO

On i.MX6SX, 6UL and 7D, there are two enet controllers each has a
MDIO port. Some boards share the MDIO port for the two enets. So
introduce a configuration CONFIG_FEC_MXC_MDIO_BASE to indicate
the MDIO port for sharing.
In Kconfig, user needs enable CONFIG_FEC_MXC_SHARE_MDIO first to enter
the CONFIG_FEC_MXC_MDIO_BASE.

Without defining this configuration, the enet will uses own MDIO port.
Also add this configurationfor FEC DM driver, since the ENET PHY currently
does not support FDT.

Modify the dev_id for DM driver, the first fec will set dev_id with 0, while
second fec sets the dev_id with 1. So the MII bus name won't be duplicated.
Then we can add two FEC devices from DTB.

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

8 years agoMLK-12439 mx6sxsabreauto: Enable GIS for the AI board
Ye Li [Tue, 23 Feb 2016 09:58:09 +0000 (17:58 +0800)]
MLK-12439 mx6sxsabreauto: Enable GIS for the AI board

Enable the GIS feature for i.MX6SX sabreauto board. Need to define
the "gis=vadc" environment variable for the gis input. At default
this variable is not set.

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

8 years agoENGR00315894-81 gis: Add gis module
Ye.Li [Thu, 12 Jun 2014 11:47:27 +0000 (19:47 +0800)]
ENGR00315894-81 gis: Add gis module

Add gis module, current gis is support vadc input.
Add power down function to lcdif driver.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a007b00dd8ef9f773dfdebef0b1deb0990281793)
(cherry picked from commit a31dcdafb0963381e7213c59f79a340ef27ec2e2)
(cherry picked from commit 02dfe2e4af5f51d39a51542fb0e81f93faf505bc)

8 years agoENGR00315894-80 pxp: Add pxp module
Ye.Li [Thu, 12 Jun 2014 11:40:53 +0000 (19:40 +0800)]
ENGR00315894-80 pxp: Add pxp module

Add pxp module.
Support csc between YUV444 and RGB888 and scaling.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 4c6e1f9ed1b2f5c98a34502b44b6414593fdd290)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 92295fafcdbaa3a3fe0a63ede15f896dfc9ce0b0)
(cherry picked from commit 096a63e81a8c78b3f8bbc65a9d418aa032d62231)

8 years agoENGR00315894-79 csi: Add csi module
Ye.Li [Thu, 12 Jun 2014 11:39:16 +0000 (19:39 +0800)]
ENGR00315894-79 csi: Add csi module

Add csi module.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 854ae26758ec8132ef749b98645dd2f43b84e5e2)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 5f133bd9420109951fd03bd5168801327e929c3b)
(cherry picked from commit 16960e59fa3334162d2e2212ee4bc1e7f0c420a3)

8 years agoENGR00315894-78 vadc: Add vadc module
Ye.Li [Thu, 12 Jun 2014 11:37:19 +0000 (19:37 +0800)]
ENGR00315894-78 vadc: Add vadc module

Add vadc module.
Both PAL and NTSC mode can work.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 03c31ae30c1e81c99f6824221e4801433445e04a)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit b5d776ffc1519c16091736445b3217ffb7fcd7db)
(cherry picked from commit 2377eb9fd299b76888f11faf76383b68e77bcc8a)

8 years agoENGR00321299 gis: clean csi0 input mux set bit in GPR
Sandor Yu [Fri, 4 Jul 2014 09:13:58 +0000 (17:13 +0800)]
ENGR00321299 gis: clean csi0 input mux set bit in GPR

When gis enable in uboot, the CSI0 input mux select setting
to vadc module, clean the bit when gis disabled.

Signed-off-by: Sandor Yu <R01008@freescale.com>
(cherry picked from commit ae66b17b7da3be50dc81ca636b67e8e879f52e26)
(cherry picked from commit c83fd326e810c2fff44b8b02e78406d5d04c977c)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit d6e803ed5f51d31ebe7e9d178aa11f16401b7fc8)
(cherry picked from commit 2065b417ae93436736e49ca66b66aa0791d003fe)

8 years agoENGR00315894-77 mx6 soc: Add vadc power up/down function
Ye.Li [Thu, 12 Jun 2014 11:34:18 +0000 (19:34 +0800)]
ENGR00315894-77 mx6 soc: Add vadc power up/down function

Add vadc power up/down function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 96d990ef754a879f6ca9da4adf6e0be3d21cdc51)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 01b88201aa86bef26a4254ac43aff90e99fd2c06)
(cherry picked from commit d50b53f138dd3b4c463c80ac8e14f41ac0fdd415)

8 years agoENGR00315894-76 mx6 clock: Add vadc clock enable function
Ye.Li [Thu, 12 Jun 2014 11:33:05 +0000 (19:33 +0800)]
ENGR00315894-76 mx6 clock: Add vadc clock enable function

Add vadc clock enable function.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 721c7a1448c5b7265b597b83d18f8338a27ea213)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 903a59ef941f39b6d7f693dd7c60528e166de079)
(cherry picked from commit dc767fb7d5c155f2a6ef01c4dee808b9c1944fc2)

8 years agoMLK-10655 Video: Fix second line string display issue
Ye.Li [Tue, 14 Apr 2015 09:27:14 +0000 (17:27 +0800)]
MLK-10655 Video: Fix second line string display issue

The string display on second line repeats the last word of
first line and does not show full.
This is the bug introduced by the fixing to MLK-10542.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ac430cee8c42f0acad9e126631d772b99f1166ea)
(cherry picked from commit ff62c5b275a9b5e47d570d3eb10622799bf12070)
(cherry picked from commit bd265a064c8f797e542955352d170e7f20f7b0d1)
(cherry picked from commit aaa55881de3e9aa8232c819a2c8a3abb285b682f)

8 years agoMLK-10542 video: Support multiple lines version string display
Ye.Li [Fri, 10 Apr 2015 04:10:34 +0000 (12:10 +0800)]
MLK-10542 video: Support multiple lines version string display

The caculation of left space for version string is not correct, should
use VIDEO_COLS not VIDEO_LINE_LEN / 2, otherwise we will get larger space
than actual have and cause string to overlay logo picture.

Also current version string display only supports two lines words at max.
This also causes overlay when the LCD pixel colume size is not enough.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ed53487d36a886fb4557088804a4b5232b168889)
(cherry picked from commit 253936bb920c5bb8e7d26e0425d155fb2576ab77)
(cherry picked from commit a12ec4c29b4cbdf03ae68a5ecb739253f79b59fc)

8 years agoMLK-11211 lcd: fix build warning
Peng Fan [Wed, 1 Jul 2015 04:51:41 +0000 (12:51 +0800)]
MLK-11211 lcd: fix build warning

Fix build warning:
common/lcd.c: In function 'lcd_clear':
common/lcd.c:166:6: warning: variable 'bg_color' set but not used [-Wunused-but-set-variable]
int bg_color;
      ^
common/lcd.c: In function 'lcd_setmem':
common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 2 has type 'u_long' [-Wformat=]
debug("LCD panel info: %d x %d, %d bit/pix\n", panel_info.vl_col,
  ^
common/lcd.c:296:2: warning: format '%d' expects argument of type 'int', but argument 3 has type 'u_long' [-Wformat=]

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit acfeb43685efb04423ce064c67228d15fa6d3da5)

8 years agoMLK-14365-2 mx6ullevk: Add LCD splash screen support
Ye Li [Tue, 7 Mar 2017 03:29:11 +0000 (11:29 +0800)]
MLK-14365-2 mx6ullevk: Add LCD splash screen support

Add LCD configurations and TFT43AB display settings for mx6sllevk.
Enable the CONFIG_VIDEO for this feature.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14365-1 mx6sllevk: Add LCD splash screen support
Ye Li [Tue, 7 Mar 2017 03:14:42 +0000 (11:14 +0800)]
MLK-14365-1 mx6sllevk: Add LCD splash screen support

Add LCD configurations and MCIMX28LCD display settings for mx6sllevk.
Enable the CONFIG_VIDEO for this feature.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12437-5 mx6ulevk: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:29:29 +0000 (15:29 +0800)]
MLK-12437-5 mx6ulevk: Update display to support panel selection

Change to panel environment for display at default. Align this feature to
v2015.04 uboot.

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

8 years agoMLK-12437-4 mx6sxsabreauto: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:28:11 +0000 (15:28 +0800)]
MLK-12437-4 mx6sxsabreauto: Update display to support panel selection

Support two display panels, one for LVDS, another for parallel LCD. Align
the feature to v2015.04 uboot.

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

8 years agoMLK-12437-3 mx6sxsabresd: Update display to support panel selection
Ye Li [Tue, 23 Feb 2016 07:25:12 +0000 (15:25 +0800)]
MLK-12437-3 mx6sxsabresd: Update display to support panel selection

Support two display panels, one for LVDS, another for parallel LCD. Align the
feature to the v2015.04 uboot.

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

8 years agoMLK-12437-2 Video: Update the common board_video_skip to support MXS LCD
Ye Li [Tue, 23 Feb 2016 07:19:39 +0000 (15:19 +0800)]
MLK-12437-2 Video: Update the common board_video_skip to support MXS LCD

Update the board_video_skip to use CONFIG_VIDEO_MXS for LCD display support.

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

8 years agoMLK-12437-1 mx6sx: Add support for LVDS display
Ye Li [Tue, 23 Feb 2016 07:12:17 +0000 (15:12 +0800)]
MLK-12437-1 mx6sx: Add support for LVDS display

The i.MX6SX uses a LVDS bridge to mux to the LCDIF interface. Implmement a
function for this muxing. So that on 6SX we can use a LVDS display.

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

8 years agoENGR00315894-70 iMX6SX:Video Update MXS LCDIF driver
Ye.Li [Thu, 12 Jun 2014 09:10:32 +0000 (17:10 +0800)]
ENGR00315894-70 iMX6SX:Video Update MXS LCDIF driver

Add a new interface "mxs_lcd_panel_setup" to setup fb parameters and
specifies the LCDIF controller for multiple controllers of iMX6SX.
Pass fb parameters via "videomode" env remains work if the new interface
is not called before video initialization.

Modify LCDIF clock interface "mxs_set_lcdclk" to support multiple
LCDIF controllers on iMX6SX.

Signed-off-by: Ye.Li <B37916@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit d7f49b9378547c3a57b96bcdb907fc44616beb3d)
(cherry picked from commit e1343191b9de227c582847e7eeb5ce9238be0754)

8 years agoMLK-12434-9: mx6: define CONFIG_BOARD_LATE_INIT
Peng Fan [Tue, 23 Feb 2016 06:22:05 +0000 (14:22 +0800)]
MLK-12434-9: mx6: define CONFIG_BOARD_LATE_INIT

Define CONFIG_BOARD_LATE_INIT for mx6qarm2/mx6slevk/mx6sxsabresd
to let mmcdev/mmcroot work as expected.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 86135fb7e55c3046ead899b83f58dd6048eda9e8)

8 years agoMLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:52:27 +0000 (12:52 +0800)]
MLK-12434-8: mx7dsabresd: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx7dsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 2fc0e6ccc90989375ac6355d4f33fd4ffaca9b3a)

8 years agoMLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:51:50 +0000 (12:51 +0800)]
MLK-12434-7: mx6ulevk: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6ul evk board.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 95cf514bb3c17014622bca26cbcbfda31cec861a)

8 years agoMLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:50:49 +0000 (12:50 +0800)]
MLK-12434-6: mx6slevk: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6slevk.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 3308f3c48c644938c415ead23ed9acedc2fd7981)

8 years agoMLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:49:37 +0000 (12:49 +0800)]
MLK-12434-5: mx6sxsabreauto: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sxsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ebb43ae292d43817202b71b25368516887f4686b)

8 years agoMLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:48:23 +0000 (12:48 +0800)]
MLK-12434-4: mx6sxsabresd: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sxsabresd.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit fb53c90269ead4f72028fd9bcc764e4924921a30)

8 years agoMLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:46:21 +0000 (12:46 +0800)]
MLK-12434-3: mx6sabre: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6sabresd and mx6qsabreauto.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 14040e07549a394500c11e815f31299e4fb0ac50)

8 years agoMLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:45:20 +0000 (12:45 +0800)]
MLK-12434-2: mx6qarm2: dynamic setting mmcdev and mmcroot

Dynamic setting mmcdev and mmcroot for mx6qarm2.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 54ea563dbe1804e426afbbf0710ffa815551d92b)

8 years agoMLK-12434-1: imx: dynamic setting mmcdev and mmcroot
Peng Fan [Tue, 23 Feb 2016 04:43:10 +0000 (12:43 +0800)]
MLK-12434-1: imx: dynamic setting mmcdev and mmcroot

Align to imx_v2015.04, dynamic setting mmcdev and mmcroot.
Then when boot linux, we can have correct "root=/dev/mmcblk[x]p2"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit b46b99a901eb194e81fc4836ee2259ad8857f4d3)

8 years agoMLK-12425-4: mx6dlsabresd: support epdc
Peng Fan [Mon, 22 Feb 2016 07:53:59 +0000 (15:53 +0800)]
MLK-12425-4: mx6dlsabresd: support epdc

Support epdc for mx6dlsabresd board.
Introduce a new configuration file mx6dlsabresd_epdc_defconfig.
Add related settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 467974ffda4b874e16f0c84974c3d65d85f84f6a)

8 years agoMLK-12425-3: mx6slevk: support epdc
Peng Fan [Mon, 22 Feb 2016 07:37:03 +0000 (15:37 +0800)]
MLK-12425-3: mx6slevk: support epdc

Support epdc for mx6slevk board.
Introduce a new configuration file mx6slevk_epdc_defconfig.
Add related settings.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 8e4304c2ab95928fb6fbb24ba83115cf1cd1e6d2)

8 years agoMLK-12425-2: video: epdc: introduce epdc support
Peng Fan [Tue, 23 Feb 2016 02:14:34 +0000 (10:14 +0800)]
MLK-12425-2: video: epdc: introduce epdc support

Support EPDC.
E-Ink feature is supported by i.MX6DL/SL and i.MX7D.
For now this driver only supports i.MX6DL/SL, because the
i.MX7D EPDC driver needs pxp support which is not included
in U-Boot.

Support user defined logo file, if there is no logo file, it will
draw a black border around a white screen.

If need to enable EPDC, a waveform file is required to let all
work.

Since we need LCD_MONOCHROME mode for EPDC, we introduce LCD_MONOCHROME
support.

Please refer to Linux Reference Manual for how to flash WAVEFORM file.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Robby Cai <R63905@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit a7244f279cc3c3994bcd103f5e9a183b1075ae71)

8 years agoMLK-12425-1: mx6sl/ul: introudce more pinmux macros
Peng Fan [Mon, 22 Feb 2016 04:44:24 +0000 (12:44 +0800)]
MLK-12425-1: mx6sl/ul: introudce more pinmux macros

Introuduce more pinmux macros definitions.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 06893558f2cc042b683247989be5127a8027ebf2)

8 years agoMLK-11304 MX6 SabreSD: Disable HDMI detect
Peng Fan [Fri, 31 Jul 2015 05:19:24 +0000 (13:19 +0800)]
MLK-11304 MX6 SabreSD: Disable HDMI detect

As the HDMI splash screen feature is not well supported,
we should not set it to be the default display. In case,
users leave the 'panel' uboot environment variable empty
and connect the board with a HDMI monitor, the HDMI detect
funtion will work and enable the HDMI splash screen. So,
this patch disables HDMI detect function so that users
may only explicitly set the 'panel' variable to be 'HDMI'
to use HDMI splash screen.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit d482c54a9fbf458fdb2270cf990d8ec727823bb1)
(cherry picked from commit b484d36882c8db9ddb8262001cfef187a28051b2)

8 years agoMLK-11952 Video: IPU: Fix dereferencing NULL pointer problem
Ye.Li [Fri, 4 Dec 2015 07:17:07 +0000 (15:17 +0800)]
MLK-11952 Video: IPU: Fix dereferencing NULL pointer problem

By Coverity check,  the clk_set_rate function dereferences the clk pointer
without checking whether it is NULL. This may cause problem when clk is NULL.
Fix the problem by adding NULL check.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit ded2f2958d568411274eeecd265fcc1181638335)
(cherry picked from commit b58ac1502391d87470918ff8d172b2b8dc1e7a68)

8 years agoMLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessary
Liu Ying [Mon, 27 Apr 2015 10:07:47 +0000 (18:07 +0800)]
MLK-10747-2 video: ipu: Enable/disable LDB_DI clock when necessary

This patch adds enable/disable hooks support for ldb_di[0/1] clocks
and enables/disables them when necessary.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 615d4c51679a6c2ee0ed4c5e3922eec76646eef1)
(cherry picked from commit 152192507c3bbaba093783d7da32b88327705c63)

8 years agoMLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53
Liu Ying [Tue, 28 Apr 2015 06:20:44 +0000 (14:20 +0800)]
MLK-10747-1 video: ipu: Build ldb_di clock relevant code only for MX6 and MX53

The LDB is found in MX6 variants and MX53, so this patch makes the ldb_di clock
relevant code be built only for them.

Signed-off-by: Liu Ying <Ying.Liu@freescale.com>
(cherry picked from commit 3e40c7466ae7d1d6ca74011bfe69ae059d412a3b)
(cherry picked from commit 0c47d4138fd2fe8aa864160e23428b2ef95f16ae)

8 years agoMLK-10774-2 HDMI: splash screen function enhancement
Peng Fan [Thu, 19 Mar 2015 02:10:07 +0000 (10:10 +0800)]
MLK-10774-2 HDMI: splash screen function enhancement

-Change HDMI video mode to VGA.
-Add pixel clock fraction part setting in IPU driver,
 fix video mode timing issue.
-Add overflow state clear workaround,
 fix kernel hang in HDMI driver issue.
-Correct IPU clock to 264MHz.

Signed-off-by: Sandor Yu <R01008@freescale.com>
Signed-off-by: Nitin Garg <nitin.garg@freescale.com>
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
(cherry picked from commit 5028519b434d5dfbe53c48ac4b115ff8b69bbac7)
(cherry picked from commit 8dcbd43b971616fb67dc3b2af32e2d33f68ed0ce)

8 years agoMLK-12865 Nand: Fix BCH debug1 register access issue
Ye Li [Tue, 31 May 2016 08:32:00 +0000 (16:32 +0800)]
MLK-12865 Nand: Fix BCH debug1 register access issue

Should have "&" to access the register address, otherwise uboot will hang.

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

8 years agoMLK-12693-2 nand: mxs: correct bitflip for erased NAND page
Peng Fan [Sat, 7 May 2016 08:58:24 +0000 (16:58 +0800)]
MLK-12693-2 nand: mxs: correct bitflip for erased NAND page

This patch is a porting of
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=e4dacc44d22e9474ec456cb330df525cd805ea38
"
i.MX6QP and i.MX7D BCH module integrated a new feature to detect the
bitflip number for erased NAND page. So for these two platform, set the
erase threshold to gf/2 and if bitflip detected, GPMI driver will
correct the data to all 0xFF.

Also updated the imx6qp dts file to ditinguish the GPMI module for i.MX6Q
with the one for i.MX6QP.
"

In this patch, i.MX6UL is added and threshold changed to use ecc_strength.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 489929be0221bb7d4c46bb5bc6083650b78f73e0)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error
Peng Fan [Fri, 6 May 2016 04:13:38 +0000 (12:13 +0800)]
MLK-12693-1 nand: mxs: fix the bitflips for erased page when uncorrectable error

This patch is porting from linux:
http://git.freescale.com/git/cgit.cgi/imx/linux-2.6-imx.git/commit/?h=imx_4.1.15_1.0.0_ga&id=3d42fcece496224fde59f9343763fb2dfc5b0768

"
We may meet the bitflips in reading an erased page(contains all 0xFF),
this may causes the UBIFS corrupt, please see the log from Elie:

-----------------------------------------------------------------
[    3.831323] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.845026] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.858710] UBI warning: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read only 16384 bytes, retry
[    3.872408] UBI error: ubi_io_read: error -74 (ECC error) while reading 16384 bytes from PEB 443:245760, read 16384 bytes
...
[    4.011529] UBIFS error (pid 36): ubifs_recover_leb: corrupt empty space LEB 27:237568, corruption starts at 9815
[    4.021897] UBIFS error (pid 36): ubifs_scanned_corruption: corruption at LEB 27:247383
[    4.030000] UBIFS error (pid 36): ubifs_scanned_corruption: first 6569 bytes from LEB 27:247383
-----------------------------------------------------------------

This patch does a check for the uncorrectable failure in the following steps:

   [0] set the threshold.
       The threshold is set based on the truth:
       "A single 0 bit will lead to gf_len(13 or 14) bits 0 after the BCH
        do the ECC."

        For the sake of safe, we will set the threshold with half the gf_len, and
        do not make it bigger the ECC strength.

   [1] count the bitflips of the current ECC chunk, assume it is N.

   [2] if the (N <= threshold) is true, we continue to read out the page with
       ECC disabled. and we count the bitflips again, assume it is N2.
       (We read out the whole page, not just a chunk, this makes the check
        more strictly, and make the code more simple.)

   [3] if the (N2 <= threshold) is true again, we can regard this is a erased
       page. This is because a real erased page is full of 0xFF(maybe also has
       several bitflips), while a page contains the 0xFF data will definitely
       has many bitflips in the ECC parity areas.

   [4] if the [3] fails, we can regard this is a page filled with the '0xFF'
       data.
"

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit ceb324a2914487aa517a6c70a06a20b5e3438fda)

8 years agoMLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot
Han Xu [Mon, 28 Mar 2016 16:26:51 +0000 (11:26 -0500)]
MLK-12603: mtd: gpmi: may use legacy bch geometry in u-boot

provide one config "CONFIG_NAND_MXS_BCH_LEGACY_GEO" to keep using legacy
bch geometry.

NOTICE: the feature must be enabled/disabled in both u-boot and kernel.

Signed-off-by: Han Xu <han.xu@nxp.com>
(cherry picked from commit 0abc9c182c24f88522bd74fa1b53cd2fa3477184)
(cherry picked from commit 772af34b1216acc8e6a1a3faf43fef7c90b26a2f)
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-12214 NAND:apbh_dma: Fix logically dead code issue
Ye.Li [Wed, 13 Jan 2016 02:06:59 +0000 (10:06 +0800)]
MLK-12214 NAND:apbh_dma: Fix logically dead code issue

The list_first_entry always assumes the list is not empty, it won't return NULL pointer when
the list is empty. So the "if (pdesc == NULL)" becomes a dead code. Fix the issue by calling
the list_empty before the list_first_entry.

(Coverity CID 29934)

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

8 years agoMLK-11718-2: mtd: nand: change the BCH layout setting for large oob NAND
Han Xu [Fri, 9 Oct 2015 18:29:41 +0000 (13:29 -0500)]
MLK-11718-2: mtd: nand: change the BCH layout setting for large oob NAND

The cod change updated the NAND driver BCH ECC layout algorithm to
support large oob size NAND chips(oob > 1024 bytes).

Current implementation requires each chunk size larger than oob size so
the bad block marker (BBM) can be guaranteed located in data chunk. The
ECC layout always using the unbalanced layout(Ecc for both meta and
Data0 chunk), but for the NAND chips with oob larger than 1k, the driver
cannot support because BCH doesn’t support GF 15 for 2K chunk.

The change keeps the data chunk no larger than 1k and adjust the ECC
strength or ECC layout to locate the BBM in data chunk. General idea for
large oob NAND chips is

1.Try all ECC strength from the minimum value required by NAND spec to
the maximum one that works, any ECC makes the BBM locate in data chunk
can be chosen.

2.If none of them works, using separate ECC for meta, which will add one
extra ecc with the same ECC strength as other data chunks. This extra
ECC can guarantee BBM located in data chunk, of course, we need to check
if oob can afford it.

Signed-off-by: Han Xu <b45815@freescale.com>
(cherry picked from commit 78f620a6d6ab44bd34e42f00abe4673db099ca73)

8 years agoENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores
Ye.Li [Wed, 11 Jun 2014 08:21:29 +0000 (16:21 +0800)]
ENGR00315894-60 GPIO: Modify driver mxc_gpio to support RDC Semaphores

For GPIO group which shared by multiple masters, it may set in RDC
to shared and semaphore required. Before access the GPIO register,
the GPIO driver must get the RDC semaphore, and release the semaphore
after the GPIO register access.

When CONFIG_MXC_RDC is set, the features related to RDC semaphores
is enabled in mxc_gpio driver.

Signed-off-by: Ye.Li <B37916@freescale.com>
(cherry picked from commit 84d63e2e2ce12f714e88baad8b2325684614a7c1)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
Conflicts:
drivers/gpio/mxc_gpio.c

(cherry picked from commit c9943b9c8a78bb2c9886bfe582e82978387d8dee)
Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit faf94726cac8316c4342e19936f1e03ef283ace3)
(cherry picked from commit 6c0474fe0e4fc543c62b22c05c2702a881f56418)

8 years agoMLK-12416-10: mx6ul: Add comments for BEE
Peng Fan [Wed, 16 Mar 2016 06:08:07 +0000 (14:08 +0800)]
MLK-12416-10: mx6ul: Add comments for BEE

Add comments for enabling BEE.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit e5cc58b71e28b2bb3c66fbe8af373cff31eb3017)

8 years agoMLK-11528 imx: mx6ul check fuse before init bee
Peng Fan [Thu, 10 Sep 2015 06:40:01 +0000 (14:40 +0800)]
MLK-11528 imx: mx6ul check fuse before init bee

Need to check fuse bit 25 of bank 0 word 4 before initialize bee.
The bit: 0 means bee enabled, 1 means bee disabled.
If disabled, continuing initialize bee will cause system hang, so
need to check this bit before initialize bee.

Add macro to enable BEE in header file, default disabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit ef4cb7c53418e4e1dd7cfcb7c6974cfea77ef3c0)

8 years agoMLK-10958 imx: mx6ul support Bus Encryption Engine
Peng Fan [Mon, 25 May 2015 08:31:05 +0000 (16:31 +0800)]
MLK-10958 imx: mx6ul support Bus Encryption Engine

This patch is to support Bus Encryption Engine(BEE) for i.MX 6UL.
Supported feature:
1. SNVS key and soft key
2. CTR and ECB mode
3. Specify address region to bee.

Two commands are included:
bee init [key] [mode] [start] [end] - BEE block initial
    "Example: bee init 1 1 0x80000000 0x80010000\n"
bee test [region]
    "Example: bee test 1\n"

Mapping:
[0x10000000 - (0x10000000 + size - 1)] : [start - (start + size - 1)]
[0x30000000 - (0x30000000 + IRAM_SIZE - 1)] : [IRAM_BASE_ADDR -
(IRAM_BASE_ADDR + IRAM_SIZE - 1)]

Whatever start is, start - (start + size -1) will be fixed mapping to
0x10000000 - (0x10000000 + size - 1)

Since default AES region's protected size is SZ_512M, so
on mx6ul evk board, you can not simply run 'bee init', it will
overlap with uboot execution environment, you can use
'bee init 0 0 0x80000000 0x81000000'.

If want to use bee, Need to define CONFIG_CMD_BEE in board configuration
header file, since CONFIG_CMD_BEE default is not enabled.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 29b9bdbbdac9678dba9b7bc2d3662598e9c548a5)
(cherry picked from commit 6d45292ff7e7020a48842f033f8a337daabe4476)

8 years agoMLK-13335 mx6sl: Fix build break for all i.MX6SL boards
Ye Li [Thu, 13 Oct 2016 05:14:56 +0000 (13:14 +0800)]
MLK-13335 mx6sl: Fix build break for all i.MX6SL boards

Since the UART1 register base name is changed from UART1_IPS_BASE_ADDR
to UART1_BASE to align with other i.MX6 chips. Should update the board
configuration header file with the new name.

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

8 years agoMLK-12416-4: imx: mx6: update imx-regs.h
Peng Fan [Fri, 19 Feb 2016 07:18:06 +0000 (15:18 +0800)]
MLK-12416-4: imx: mx6: update imx-regs.h

Update imx-regs.h to align with 2016.03

Signed-off-by: Peng Fan <peng.fan@nxp.com>
(cherry picked from commit 9bbd54e44ae1f0868d3f0dd34975e76606b0a5e8)

8 years agoMLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT
Ye Li [Tue, 8 Nov 2016 06:21:41 +0000 (14:21 +0800)]
MLK-13440-5 fsl_usdhc: Remove the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT

Since we have added the "vs18_enable" parameter for fixed 1.8v I/O, remove
the CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT. This configuration can only work
with one MMC device. If more devices are supported, this will set 1.8v to
all controllers, so will cause problem to 3.3v devices.

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

8 years agoMLK-13440-4 warp: Replace CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT by using vs18_enable...
Ye Li [Tue, 8 Nov 2016 06:17:22 +0000 (14:17 +0800)]
MLK-13440-4 warp: Replace CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT by using vs18_enable parameter

Change to use the new way to set the vs18_enable field to 1 for fixed 1.8v I/O eMMC.
Don't use CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT any longer.

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

8 years agoMLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/O
Ye Li [Tue, 8 Nov 2016 02:32:58 +0000 (10:32 +0800)]
MLK-13440-1: fsl_usdhc: Add configuration parameter for using fixed 1.8V I/O

When using eMMC with 1.8V I/O, we have to set the VSELECT bit at this USDHC controller
setup and init. The CONFIG_SYS_FSL_ESDHC_FORCE_VSELECT has problem that it will
apply to all USDHC controllers and it only set the 1.8V at init phase. So if user does not
select to the eMMC device, the voltage on the I/O pins are not correct.

This patch adds a parameter "vs18_enable" in fsl_esdhc_cfg structure and priv data, so each controller
can have different settings. The default value is 0 for 3.3V, which is compatible with current
codes. When setting this value to 1, at USDHC setup and init phase the driver will set the
VSELECT bit.

For DM driver, the vqmmc-supply property will be searched for current usdhc node. If the vqmmc-supply is
set to 1800000 uV, the vs18_enable in priv data will be set to 1.

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

8 years agoMLK-14423-2 gpio: 74x164: make oe-pins optional
Peng Fan [Mon, 6 Feb 2017 08:20:53 +0000 (16:20 +0800)]
MLK-14423-2 gpio: 74x164: make oe-pins optional

Make oe-pins optional because some boards have fixed it to enable.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14423-1 spi: kconfig: add soft spi Kconfig entry
Peng Fan [Mon, 6 Feb 2017 08:08:47 +0000 (16:08 +0800)]
MLK-14423-1 spi: kconfig: add soft spi Kconfig entry

Add the Kconfig entry for SOFT_SPI which uses gpio to simulate the
SPI signals. We use it for accessing 74x164 on some i.MX boards.

Signed-off-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal
Ye Li [Tue, 7 Feb 2017 14:48:01 +0000 (22:48 +0800)]
MLK-14422 imx7d: wdog: Overwrite the reset_cpu to turn off internal reset signal

Set wdog WCR register SRS bit to turn off internal reset signal WDOG_RESET_B_DEB
for mx7d. So that the warm reset is disabled.
The WDA is cleared to output WDOG_B immediately to reset the board.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-11035 imx: mx6 update thermal slope factors
Peng Fan [Thu, 21 May 2015 01:09:58 +0000 (09:09 +0800)]
MLK-11035 imx: mx6 update thermal slope factors

From temp sensor guys:
"
I confirmed the math with him(had do the accuracy study) today.
The new, final equation is:

Tmeas = (Nmeas - n1) / slope + t1 + offset

n1= fused room count
t1= 25
offset=3.580661
slope= 0.4148468 – 0.0015423*n1
"

87723f903454aaf17336e0fe9098ea7911c19f3c update the thermal with not
accurate slope parameters. This patch fix it.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 0d4904f5929cecd66f0b60cf8ebdcb0e6a2f733e)

8 years agoMLK-10827 imx: mx6 update thermal driver according new equation
Peng Fan [Wed, 6 May 2015 06:39:46 +0000 (14:39 +0800)]
MLK-10827 imx: mx6 update thermal driver according new equation

From IC guys:
"
After a thorough accuracy study of the Temp sense circuit,
we found that with our current equation, an average part can
read 7 degrees lower than a known forced temperature.
We also found out that the standard variance was around 2C;
which is the tightest distribution that we could create.
We need to change the temp sense equation to center the average
part around the target temperature.

Old Equation:
Temp = Troom,cal – slope*(Count measured – Count room fuse)
Where
Troom,cal = 25C  and
Slope = 0.4297157 – (0.0015974 * Count room fuse)

New Equation:
Temp = Troom,cal – slope*(Count measured – Count room fuse) +offset
Where
Troom,cal = 25C  and
Slope = 0.4445388 – (0.0016549 * Count room fuse)
Offset = 3.580661
"

According the new equation, update the thermal driver.
c1 and c2 changed to u64 type and update comments.

Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
(cherry picked from commit 87723f903454aaf17336e0fe9098ea7911c19f3c)
(cherry picked from commit 3392203fc3ae2f0701461143094cfbb112f7bc04)

8 years agoMLK-14420-3 mx6qsabresd: Update mx6qsabresd to enable OF_CONTROL and DM drivers
Ye Li [Tue, 7 Feb 2017 13:33:57 +0000 (21:33 +0800)]
MLK-14420-3 mx6qsabresd: Update mx6qsabresd to enable OF_CONTROL and DM drivers

Modify and remove configurations conflicts with DM drivers from head file.
Enable DM drivers and OF_CONTROL in defconfig.
Also update the GPIO usage to call gpio_request before any gpio using, and
update power_init_board since the PMIC APIs are changed in Pfuze DM driver.

Signed-off-by: Ye Li <ye.li@nxp.com>
8 years agoMLK-14420-2 DTS: add DTS file for imx6q sabresd board
Ye Li [Tue, 7 Feb 2017 13:18:19 +0000 (21:18 +0800)]
MLK-14420-2 DTS: add DTS file for imx6q sabresd board

Copy the dts and dtsi files from kernel to support imx6q sabresd board.

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