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

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

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

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

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

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

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

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

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

It only supports USB3 power up sequence now.

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

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

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

add configs for arm2-8qm.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

replace fdt_addr with fdtaddr

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

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

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

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

Add MFG ENV settings.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

- Board defconfigs:
  imx8qxp_lpddr4_arm2_defconfig

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

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

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

    Add M4 dtb for i.MX8QXP LPDDR4 ARM2 board.

    Reserve first 4M memory for below usage:

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

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

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

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

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

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

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

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

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

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

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

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

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

- Board defconfigs:
  imx8qm_lpddr4_arm2_defconfig

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Ye Li <ye.li@nxp.com>
7 years agoMLK-14938-12 serial_lpuart: Update lpuart driver to support i.MX8
Ye Li [Fri, 24 Mar 2017 08:12:14 +0000 (16:12 +0800)]
MLK-14938-12 serial_lpuart: Update lpuart driver to support i.MX8

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fix compile error for api change.

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Fix coverity:392391 392382 392385 Unsigned compared against 0

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

Add return value check

Coverity 392391

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

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

Coverity: 392384 resource leak

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

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

Signed-off-by: Ye Li <ye.li@nxp.com>
7 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>
7 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>
7 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>
7 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>