Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:33 +0000 (20:16 +0200)]
mmc: add a new mmc parameter to disable mmc clock
mmc clock has to be disabled in certain cases like during
the voltage switch sequence. Modify mmc_set_clock function
to take disable as an argument that signifies if the
clock has to be enabled or disabled.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:32 +0000 (20:16 +0200)]
mmc: add power cyle support in mmc core
mmc/sd specification requires vdd to be disabled for 1 ms
and then enabled again during power cycle. Add a
function in mmc core to perform power cycle and set
the io signal to it's initial state.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Kishon Vijay Abraham I [Fri, 12 May 2017 18:16:31 +0000 (20:16 +0200)]
mmc: Add a new callback function to enable/disable vdd
Add a new callback function *set_vdd* which can be used
by the platform mmc driver to enable or disable vdd.
The mmc core can use *mmc_set_vdd* in order to invoke
the callback function. This will be used during power cycle
where the specification requires vdd to be disabled for
1ms and enabled again.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Kishon Vijay Abraham I [Fri, 12 May 2017 18:16:30 +0000 (20:16 +0200)]
mmc: Enable signal voltage to be selected from mmc core
Add a new function *mmc_set_signal_voltage* in mmc core
which can be used during mmc initialization to select the
signal voltage. Platform driver should use the set_ios
callback function to select the signal voltage.
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:29 +0000 (20:16 +0200)]
mmc: make mmc_set_ios() return status
set_ios callback has a return value of 'int' but the mmc_set_ios()
function ignore this. Modify mmc_set_ios() and the callers of mmc_set_ios() to
to return the error status.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:28 +0000 (20:16 +0200)]
mmc: refactor MMC startup to make it easier to support new modes
The MMC startup process currently handles 4 modes. To make it easier to
add support for more modes, let's make the process more generic and use a
list of the modes to try.
The major functional change is that when a mode fails we try the next one.
Not all modes are tried, only those supported by the card and the host.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:27 +0000 (20:16 +0200)]
mmc: refactor SD startup to make it easier to support new modes
The SDcard startup process currently handles only 2 modes. To make it
easier to add support for more modes, let's make the process more generic
and use a list of the modes to try.
The major functional change is that when a mode fails we try the next one.
Not all modes are tried, only those supported by the card and the host.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:26 +0000 (20:16 +0200)]
cmd: mmc: display the mode name and current bus speed in the mmc info
Display the mode name when the user execute 'mmc info'. Also instead of
displaying tran_speed, display the actual bus speed.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:25 +0000 (20:16 +0200)]
mmc: use mmc modes to select the correct bus speed
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:24 +0000 (20:16 +0200)]
mmc: Add a fonction to dump the mmc capabilities
This adds a simple helper function to display information (bus width and
mode) based on a capability mask. Useful for debug.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:23 +0000 (20:16 +0200)]
mmc: introduces mmc modes.
no functionnal changes.
In order to add the support for the high speed SD and MMC modes, it is
useful to track this information.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:22 +0000 (20:16 +0200)]
mmc: add a function to read and test the ext csd (mmc >= 4)
This will be reused later in the selection of high speed and ddr modes.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:21 +0000 (20:16 +0200)]
mmc: make ext_csd part of struct mmc
The ext csd is used for comparison many times. Keep a reference content
of the ext csd in the struct mmc to avoid reading multiple times
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:20 +0000 (20:16 +0200)]
mmc: move the MMC startup for version above v4.0 in a separate function
no functionnal change. This is only to further reduce the size o
mmc_startup().
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Jean-Jacques Hiblot [Fri, 12 May 2017 18:16:19 +0000 (20:16 +0200)]
mmc: split mmc_startup()
No functionnal change here. The function is really big and can be split.
The part related to bus configuration are put in 2 separate functions: one
for MMC and one for SD.
Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
Reviewed-by: Simon Glass <sjg@chromium.org>
Xu Ziyuan [Sun, 12 Mar 2017 06:19:04 +0000 (14:19 +0800)]
mmc: drop unnecessary send_status request
It's redundant to send cmd13 after cmd9 whose response is not R1b. The
card devices will not be busy w/ cmd9.
Signed-off-by: Ziyuan Xu <xzy.xu@rock-chips.com>
(cherry picked from commit
166c2b8fd91f9aa9e51505083d03784135609bf3)
Oliver Brown [Wed, 16 Aug 2017 03:09:17 +0000 (22:09 -0500)]
MLK-16195: Add support for Mini SAS display boards
Added GPIOs to enable the Mini SAS display boards at startup.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Ye Li [Mon, 14 Aug 2017 07:22:15 +0000 (02:22 -0500)]
MLK-16192 lpi2c: Fix bus stop problem in xfer
In xfer function, both bus_i2c_read and bus_i2c_write will
send a STOP command. This causes a problem when reading register
data from i2c device.
Generally two operations comprise the register data reading:
1. Write the register address to i2c device.
START | chip_addr | W | ACK | register_addr | ACK |
2. Read the Data from i2c device.
START | chip_addr | R | ACK | DATA | NACK | STOP
The STOP command should happen at the end of the transfer, otherwise
we will always get data from register address 0
Signed-off-by: Ye Li <ye.li@nxp.com>
Acked-by: Peng Fan <peng.fan@nxp.com>
Han Xu [Fri, 11 Aug 2017 19:52:16 +0000 (14:52 -0500)]
MLK-16187: i.mx8qm/qxp: add flexspi configurations for QM/QXP
Add two new configurations for flexspi on i.MX8QM and QXP. The boot
image size becomes larger so move the env offset to 1MB.
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Fri, 11 Aug 2017 19:48:25 +0000 (14:48 -0500)]
MLK-16186: spi: flexspi: reset the flexspi DLL register to default value
i.MX8QM ROM didn't calculate the DLL correctly in some cases, to avoid
the wrong DLL setting impact the following functions, reset them to the
default value when probe.
Signed-off-by: Han Xu <han.xu@nxp.com>
Ye Li [Mon, 14 Aug 2017 02:32:24 +0000 (21:32 -0500)]
MLK-16190 DTS: imx8qxp_mek: Fix ioexp and i2c mux issue
Both two ioexp devices locate on i2cexp2_i2c1 bus (i2c@3).
Also for each i2c channel in i2c mux, need add a alias node for it,
so the i2c bus can have correct bus seq id.
Signed-off-by: Ye Li <ye.li@nxp.com>
Tested-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Thu, 10 Aug 2017 03:26:19 +0000 (22:26 -0500)]
MLK-16181 imx8qm/qxp: Add dcache flush to M4 boot commands
For booting M4 running in DDR, we use fatload to load the image to DDR first.
The fatload will do a copy for block size unaligned data in the tail. Since the DDR
area is cachable, so this cause a memory coherence issue. Need to use dcache flush
command before booting the M4 core.
This patch enables the CONFIG_CMD_CACHE and add the dcache flush to M4 boot commands
no matter the M4 runs in DDR or TCM.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 9 Aug 2017 10:05:02 +0000 (05:05 -0500)]
MLK-16175-2 imx8qm/qxp: Remove USB OTG power domain on function
Since the DM framework and ehci-mx6 driver will enable the power domains
for USB controller and PHY via power domain driver. No need to call
the power on function in board level.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Wed, 9 Aug 2017 09:54:53 +0000 (04:54 -0500)]
MLK-16175-1 usb: ehci-mx6: Turn on the power domain of USB PHY
Since there is no uclass for USB PHY. The device won't be setup for the USB PHY
node in DTB. And its associated power domain device won't be turned on neither
by DM framework.
This patch modifies the ehci-mx6 driver to enable the power domain device before
access the USB PHY. This is only for DM driver. For non-DM part, users still
need to power on the USB PHY in boards/SoC codes.
Signed-off-by: Ye Li <ye.li@nxp.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Han Xu [Wed, 19 Jul 2017 16:45:30 +0000 (11:45 -0500)]
MLK-16034-03: support NAND on i.MX8QXP ARM2 board
NAND module is pin conflict with SD/eMMC on i.MX8QXP ARM2 board,
add new config to disable SD/eMMC when booting from NAND.
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Wed, 19 Jul 2017 16:43:08 +0000 (11:43 -0500)]
MLK-16034-02: enable GPMI NAND driver for i.MX8
enable the GPMI NAND driver for i.MX8, the major changes
- register defination for i.mx8
- Makefile change for misc.c
- DMA structure must be 32bit address
Signed-off-by: Han Xu <han.xu@nxp.com>
Han Xu [Wed, 19 Jul 2017 16:40:59 +0000 (11:40 -0500)]
MLK-16034-01: change the maximum oob size
change the maximum oob size to 1872 for the MT29F128G08CBCCB raw NAND
chip on i.MX8QXP
Signed-off-by: Han Xu <han.xu@nxp.com>
zhang sanshan [Tue, 8 Aug 2017 08:41:17 +0000 (16:41 +0800)]
MA-10031 [Android]fix compile warning for android
There are some warning on 64-bit platform,like:
drivers/usb/gadget/bcb.c:151:29: warning: cast from pointer to integer
of different size [-Wpointer-to-int-cast]
sprintf(addr_str, "0x%x", (unsigned int)p_block);
fix through cast point to uintptr_t firstly.
declare in header to fix below warning:
drivers/usb/gadget/f_fastboot.c:971:5: warning: implicit declaration of
function 'fastboot_tx_write_str' [-Wimplicit-function-declaration]
fastboot_tx_write_str("FAILinvalid mmc device");
Change-Id: Ifc9a2adbea4fe4a510fd06030396181b2513fbbe
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
zhang sanshan [Tue, 8 Aug 2017 04:46:32 +0000 (12:46 +0800)]
MA-10028 [Android]delete gpt in cmdline
The gpt table in imx8 is not overlay with uboot.
we do not use the last GPT table on imx8 platform.
Change-Id: I2c766a8de83e84135aa53811817b8d74f2f2f6e0
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
zhang sanshan [Mon, 7 Aug 2017 04:42:21 +0000 (12:42 +0800)]
MA-10022 [Android] uboot: add driver model in android on imx8mq board
uboot have build fail on android branch.
BSP enable driver model in v2017 on evk-8mq board.
This patch align BSP configure.
Change-Id: I1e3a495cb38fd548b33d59eef053b2efaabbce7b
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Peng Fan [Fri, 4 Aug 2017 06:29:21 +0000 (14:29 +0800)]
MLK-16132-10 makefile: fix typo
Fix typo CONIFG->CONFIG, if not, spl will include i2c uclass code.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 4 Aug 2017 03:23:43 +0000 (11:23 +0800)]
MLK-16132-9: imx8mq: evk: enable CMD_PMIC
Enable CMD_PMIC
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 3 Aug 2017 07:18:09 +0000 (15:18 +0800)]
MLK-16132-8: imx8mq: evk: enable DM_ETH
Enable DM_ETH for i.mx8mq evk board.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 3 Aug 2017 07:15:36 +0000 (15:15 +0800)]
MLK-16132-7: net: fec_get_miibus: use ulong for base_addr
Use ulong for base_addr to avoid
" warning: cast from pointer to integer of different size".
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 4 Aug 2017 03:06:08 +0000 (11:06 +0800)]
MLK-16132-6 imx8mq: evk enable driver model
Enable pinctrl/dm mmc/dm i2c/dm regulator and pmic.
Since we do not enable DM for SPL, so move non dm
code to spl file.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 4 Aug 2017 03:05:05 +0000 (11:05 +0800)]
MLK-16132-5: board: freescale: common: allow dm be omited by SPL
Allow be omited by DM
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 4 Aug 2017 03:04:23 +0000 (11:04 +0800)]
MLK-16132-4: power: pmic/regulator allow dm be omited by SPL
Allow the dm driver be omited by SPL.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 3 Aug 2017 06:12:58 +0000 (14:12 +0800)]
MLK-16132-3 i2c: Kconfig: add dependency for SYS_I2C_MXC
add dependency for CONFIG_SYS_I2C_MXC
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Thu, 3 Aug 2017 06:39:42 +0000 (14:39 +0800)]
MLK-16132-2: pinctrl: add imx8m support
Add i.mx8m pinctrl driver.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Fri, 4 Aug 2017 05:40:34 +0000 (13:40 +0800)]
MLK-16132-1: imx8mq: evk: enable dts
Add dts for i.mx8mq evk board.
dts kernel commit
f66fac9f84.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
ji.luo [Wed, 2 Aug 2017 12:19:05 +0000 (20:19 +0800)]
Fix get partition error in fastboot
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Wed, 2 Aug 2017 08:32:17 +0000 (16:32 +0800)]
MA-10009 [fastboot] Get has-slot status from gpt
Change-Id: I6a187dfa40b3d7a1dcc92c0d774956ac30679225
Signed-off-by: ji.luo <ji.luo@nxp.com>
ji.luo [Tue, 1 Aug 2017 01:42:42 +0000 (09:42 +0800)]
MA-9999 [iot] Fix getvar all/$wrong_variable in fastboot
Fix "fastboot getvar all/$wrong_variable" command in fastboot according to
"Android Boot/Bootloader Requirements, V2.84 - 01/27/17".
Change-Id: I08a3a04d450f2ffd2d0f465a32b52a57e45034a2
Signed-off-by: ji.luo <ji.luo@nxp.com>
Ye Li [Tue, 1 Aug 2017 10:25:19 +0000 (05:25 -0500)]
MLK-16118-8 imx8qm/qxp: Enable the power domain driver and update relevant codes
This patch enables the power domain driver for i.MX8QM and QXP boards in defconfig files.
The devices with using DM driver will be powered on automatically by DM framework. So
we remove the power relevant codes for them.
For devices with non-DM drivers, we updates the board/SoC codes to use power domain driver API.
So that we can use power domain driver to manage them.
The only exceptions are:
1. UART0 at board_early_f, this is very early stage, that power domain is not ready.
2. Power up secondary cores and M4 cores. These resources are not peripherals and
are not in power domain tree.
Additional, benefiting from power domain driver, We have implemented the function "power_off_pd_devices"
to power off all active devices. No need to explicitly power off them in board_quiesce_devices.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 1 Aug 2017 10:08:18 +0000 (05:08 -0500)]
MLK-16118-7 spi: flexspi: Add init_clk_fspi function to setup clock
When the power domain driver is enabled, we need to enable clocks after power
domain on. The clock settings in board level codes must be removed, needs to
set them when the device is probed. Add this weak function in flexspi driver,
that SoC codes can implement the clock settings.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 1 Aug 2017 10:06:25 +0000 (05:06 -0500)]
MLK-16118-6 net: fec_mxc: Add the init_clk_fec function
When the power domain driver is enabled, we need to enable clocks after power
domain on. So the clock settings can't set in board_init, needs to set them
when the device is probed. Add this weak function in driver, that SoC codes
can implement the clock settings.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Tue, 1 Aug 2017 09:37:39 +0000 (04:37 -0500)]
MLK-16118-5 DTS: imx8qxp: Update iMX8QXP DTS and binding files
Sync the DTSi files and binding files with latest kernel commit:
"commit
2ce220ede08c0802a12459877ae134812ddda20b"
Some extra modifications:
1. Add "power-domains" property to all GPIO nodes and flexspi node, since
they miss to add it.
2. Add "simple-bus" compatible strings to imx8qm-pm node.
3. Rename nodes "i2c0_mipi_lvds0" and "i2c0_mipi_lvds1"
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 2 Aug 2017 03:02:07 +0000 (22:02 -0500)]
MLK-16118-4 DTS: imx8qm: Update iMX8QM DTS and binding files
Sync the DTSi files and binding files with latest kernel commit:
"commit
2ce220ede08c0802a12459877ae134812ddda20b"
Some extra modifications:
1. Add "power-domains" property to all GPIO nodes and flexspi node, since
they miss to add it.
2. Fix the wrong SATA PD name, should be "PD_HSIO_SATA_0".
3. Add "simple-bus" compatible strings to imx8qm-pm node.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 2 Aug 2017 02:57:33 +0000 (21:57 -0500)]
MLK-16118-3 core: Add power domain operation to device probe
When power domain driver is enabled, power on the power domain
for the device be probed.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 2 Aug 2017 02:47:53 +0000 (21:47 -0500)]
MLK-16118-2 power: Add PD device lookup interface to power domain uclass
Add power_domain_lookup_name interface to power domain uclass to find
a power domain device by its DTB node name, not using its associated
client device.
Through this interface, we can operate the power domain devices directly.
This is needed for non-DM drivers.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 2 Aug 2017 01:55:03 +0000 (20:55 -0500)]
MLK-16118-1 power: Add power domain driver for i.MX8QM/QXP
Add the power domain DM driver for i.MX8, that it depends on the DTB
power domain trees to generate the power domain provider devices. Users
needs add power domain trees with property "compatible = "nxp,imx8-pd";"
- When power on one PD device, the driver will power on its ancestor PD devices
in power domain tree.
- When power off on PD device, the driver will check its child PD devices first,
only all child PD devices are off, then power off the current PD device. Then the
driver checks sibling PD devices. If sibling PD devices are off, then it will power
off parent PD device.
- There is no counter maintained in this driver, but a state to hold current on/off
state. So the request and free functions are empty.
- The power domain implemetation in i.MX8 DTB set the "#power-domain-cells" to 0, so
there is no ID binding with each PD device. We don't use "id" variable in
struct power_domain. At same time, we have to set of_xlate to empty to bypass standard
of_xlate in uclass driver.
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Tue, 1 Aug 2017 01:28:06 +0000 (09:28 +0800)]
MLK-16107 imx8mq: support mfg
Support MFG.
1. When ROM jumps to SPL, SPL saves ROM context. After SPL successfully
initialize DRAM, SPL will restore ROM and context and back to ROM.
During this flow, SPL does not do any USB configuration to avoid
breaking the connect between ROM and Host PC, because we rely on
ROM to continue serial download with Host.
2. Add MFG env to support kernel boot correctly.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Fri, 28 Jul 2017 01:53:06 +0000 (20:53 -0500)]
MLK-16094-3 imx8qxp_arm2/mek: Update codes to use pinctrl driver
This patch enables the pinctrl driver for i.MX8QXP ARM2 and MEK boards.
For DM enabled driver, the iomux pins can be set by pinctrl driver. So
the board codes don't need to set iomux explicitly for these DM enabled modules.
Also update the DTS file for i2c pins settings.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 27 Jul 2017 05:46:30 +0000 (00:46 -0500)]
MLK-16094-2 imx8qm_arm2: Update board codes to use pinctrl driver
This patch enables the pinctrl driver for i.MX8QM ARM2 board.
For DM enabled driver, the iomux pins can be set by pinctrl driver. So
the board codes don't need to set iomux explicitly for these DM enabled
modules.
Also update the DTS file for some module's pins settings.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 26 Jul 2017 13:01:30 +0000 (08:01 -0500)]
MLK-16094-1 pinctrl: Add pinctrl driver for i.MX8 platform
Add pinctrl driver for i.MX8 platform (QM/QXP). The driver can
parse the iomuxc settings from DTB and set them through IPC to SCU.
Enable CONFIG_PINCTRL_IMX8 to use this pinctrl driver.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Fri, 28 Jul 2017 02:19:12 +0000 (10:19 +0800)]
MLK-16092 Revert "MLK-16088 which is not correct"
This reverts commit
671482a96196abacf8de446fb634b3c32e7027c2.
This is not correct and breaks ums.
Ye Li [Wed, 26 Jul 2017 07:12:50 +0000 (02:12 -0500)]
MLK-16087 imx8qm/qxp: Disable kernel FDT nodes for the resources are not owned
Before starting the kernel, need to check if the enabled nodes (resources) in FDT
are owned by current partition. If it is not owned, need to disable it because A core
can't access it.
We use the node's power-domain property to get the PD node which has the SCFW resource
id in its reg property. Then we can check it with SCFW.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 26 Jul 2017 01:41:13 +0000 (20:41 -0500)]
MLK-16083 imx8qm/qxp: Setup MMU pagetables dynamically with owned memory regions
Since the memory regions assigned to u-boot partition is dynamically set by
ATF and SCD. We have to setup MMU pagetables according to the owned memory
regions, not set it for unassigned memory.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Wed, 26 Jul 2017 07:34:09 +0000 (15:34 +0800)]
MLK-16088 usb: gadget: ci_udc: waiting finish when submit one request
After submit a request and hardware starting transfer, wait
the transfer complete. Also set req_primed with value false.
Then we could do multile fastboot_tx_write_str in fastboot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Tue, 25 Jul 2017 06:26:10 +0000 (14:26 +0800)]
MLK-16076 imx8m: discard the atf memory region from mmu table
Discard the ATF memory region from MMU table. ATF region is
protected by TZASC, however U-Boot runs in non-secure EL2,
we should not map the ATF region in U-Boot.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 24 Jul 2017 06:12:33 +0000 (01:12 -0500)]
MLK-16069 imx6slevk: Workaround to limit the u-boot in low 512MB memory
On i.MX6SLEVK board, the LPDDR2 chip(CS1) is not reset before accessing.
And due to MMDC limitation, the script we get from IC team is only doing
CS0 reset but skipping CS1 reset, the reason is that doing CS1 reset might
cause CS0 can NOT be accessed any longer.
Because of this HW issue, we found the high 512MB memory needs more time to
be stable. Since the u-boot relocates itself to highest address after booting,
so this will cause issue.
To work around it, we just limit the u-boot running at low 512MB memory.
Signed-off-by: Ye Li <ye.li@nxp.com>
Li Jun [Mon, 24 Jul 2017 16:08:22 +0000 (00:08 +0800)]
MLK-16066-2 imx8mq_evk: enable USB3 host function
Enable imx8mq USB xhci host for type-A port.
Reviewed-by : Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
Li Jun [Mon, 24 Jul 2017 16:05:20 +0000 (00:05 +0800)]
MLK-16066-1 usb: host: add imx8m xhci host driver
imx8mq usb xhci is a dwc3 based controller, its synopsys PHY
can be controlled by usbmix glue layer. imx8mq has 2 USB3 instance,
this patch only enables USB2(2nd instance).
Reviewed-by : Peng Fan <peng.fan@nxp.com>
Signed-off-by: Li Jun <jun.li@nxp.com>
guoyin.chen [Thu, 20 Jul 2017 08:09:50 +0000 (16:09 +0800)]
MA-9955 Enable imx8qxp mek board for android
Add imx8qxp mek android config
Below config is commented out due to USB not ready for this board
CONFIG_CMD_USB=y
CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_EHCI_HCD=y
CONFIG_USB_STORAGE=y
CONFIG_CMD_USB_MASS_STORAGE=y
CONFIG_USB_GADGET=y
CONFIG_CI_UDC=y
CONFIG_USB_GADGET_DOWNLOAD=y
CONFIG_G_DNL_MANUFACTURER="FSL"
CONFIG_G_DNL_VENDOR_NUM=0x0525
CONFIG_G_DNL_PRODUCT_NUM=0xa4a5
CONFIG_CMD_FASTBOOT
Change-Id: I024156d445ed880ddd7a8dc15d94c81bb0a71b5e
Signed-off-by: guoyin.chen <guoyin.chen@nxp.com>
Adrian Alonso [Fri, 21 Jul 2017 16:40:07 +0000 (11:40 -0500)]
MLK-16058: arm: dts: imx6q arm2 enable sd3 vcc
Fix SD3_VCC power rail enablement on DM MMC build
Add in pin control hog group MX6QDL_PAD_GPIO_18__SD3_VSELECT
pad for early power on of SD3_VCC power rail.
Add cd-gpio property.
Signed-off-by: Adrian Alonso <adrian.alonso@nxp.com>
Ye Li [Thu, 20 Jul 2017 01:26:57 +0000 (20:26 -0500)]
MLK-16049 imx8qm/qxp: Add support for reserving DDR memory for M4
We assign the DDR memory from 0x88000000 to 0x8FFFFFFF to M4 on QM and QXP.
The M4 can allocate this memory by two ways, in SCD or u-boot.
There are 3 things needed to change in u-boot:
1. Move the u-boot INIT SP address to first 128M memory to avoid conflict with M4 memory.
2. The memory regions may be allocated in SCD or ATF. So we can't staticly set the memory
bank information in u-boot, need to get it from owned memory regions.
3. u-boot addes the memory reserve node to DTB to pass the info to kernel, no matter
the M4 memory is reserved in SCD or u-boot. So kernel won't access M4 reserved memory.
The codes for M4 resources and memory regions allocated by u-boot will be added
later when they are finalized.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 21 Jul 2017 04:12:36 +0000 (23:12 -0500)]
MLK-16048 imx8mq_evk: Eliminate the SPL panic when mfg boot
By using mfg boot, SPL will give panic dump because it jump to RAW image
when boot device is wrong. Enable CONFIG_SPL_ABORT_ON_RAW_IMAGE to eliminate
the dump but give a error.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Fri, 21 Jul 2017 03:58:29 +0000 (22:58 -0500)]
MLK-16047 imx8mq_evk: Enable eMMC boot support
Enable the CONFIG_SUPPORT_EMMC_BOOT, so that for eMMC boot SPL can switch
to boot partition for u-boot.img loading.
Signed-off-by: Ye Li <ye.li@nxp.com>
zhang sanshan [Thu, 13 Jul 2017 12:07:58 +0000 (20:07 +0800)]
MA-9387 [Android] fastboot: fastboot gpt.img for sd card in android
we set gpt image in the last lba for sd boot.
complete the gpt header, gpt entry and protective MBR according
the last lba gpt rule.
Change-Id: Icc356a66f82ad359c0243245ab9fdfaea3bccd4f
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Ye Li [Tue, 18 Jul 2017 09:16:27 +0000 (04:16 -0500)]
MLK-16021 imx8qxp_arm2: Enable base board 1.8v power
Setup the BB_PWR_EN GPIO to high to enable the 1.8v power on base board.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 10 Jul 2017 08:40:00 +0000 (03:40 -0500)]
MLK-16018 imx8qxp_mek: Add i.mx8qxp MEK board support
Add the board file, head file, build config and DTS for i.MX8QXP MEK.
Enabled SD/eMMC, FlexSPI, UART, LPI2C, I2C MUX, IO EXP and Ethernet.
DTS is based on kernel patch (commit
86203e3c136836d6b01d5e00ac52c561014f1cab),
and add support for i2c mux, ioexp, second ethernet on base board and flexspi.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Tue, 18 Jul 2017 06:57:44 +0000 (14:57 +0800)]
MLK-16014 imx8m: evk: fix bss area
The current BSS area conflict with area that used by ROM,
move the bss start to 0x912000 and decrease the size, because
8KB is enough now.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ye Li [Mon, 17 Jul 2017 07:11:22 +0000 (02:11 -0500)]
MLK-16002 iMX8QM/QXP: Modify coding style for android tool chain
The android tool chain forces to use C89 standard, and give a build
warning:
board/freescale/imx8qxp_arm2/imx8qxp_arm2.c:635:2: error: 'for' loop
initial declarations are only allowed in C99 or C11 mode
for (int i = 0; i < 8; i++)
^
Signed-off-by: Ye Li <ye.li@nxp.com>
Ranjani Vaidyanathan [Thu, 13 Jul 2017 14:46:09 +0000 (09:46 -0500)]
MLK15948 imx8qm/imx8qxp - Power down devices enabled by uboot before
launching the kernel
Make sure that all devices that are powered up by uboot
are powered down before bringing up kernel.
Else the subsystem/device will never be powered down by SCFW even though
from the kernel's point of view it should be powered down.
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
Peng Fan [Thu, 13 Jul 2017 09:21:03 +0000 (17:21 +0800)]
MLK-15957 imx8m: evk: default enable tzc380
Default enable TZC380.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Chen Guoyin [Thu, 13 Jul 2017 07:47:22 +0000 (15:47 +0800)]
MA-9909-2 [iot] uboot run into no-secure mode by default
Add log to indicate whether the board is in secure mode
Change-Id: I67544498c7ee7b591ce1f6cac899cee9e5867e3e
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
Chen Guoyin [Thu, 13 Jul 2017 07:47:00 +0000 (15:47 +0800)]
MA-9909-1 [iot] uboot run into no-secure mode by default
Config pico 7d uboot run into secure mode by default
Change-Id: I7a25df8516900819acfe03372308baa718a76154
Signed-off-by: Chen Guoyin <guoyin.chen@nxp.com>
Ye Li [Wed, 12 Jul 2017 09:36:47 +0000 (04:36 -0500)]
MLK-15958-3 iMX8QM/QXP ARM2: Enable the SPI flash 4bytes address mode
Disable the CONFIG_SPI_FLASH_BAR which uses the bank register, enable
the 4bytes address mode config CONFIG_SPI_FLASH_4BYTES_ADDR. So that
the whole 64MB SPI flash memory are ok to access.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 12 Jul 2017 09:33:27 +0000 (04:33 -0500)]
MLK-15958-2 spi: fsl_fspi: Add support for 4bytes address mode
Update the LUT settings, spi_xfer to use the 4bytes address read/write/erase
commands.
Also add a function to enter the 4bytes mode for flash device.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Wed, 12 Jul 2017 09:26:08 +0000 (04:26 -0500)]
MLK-15958-1 mtd: spi: Add 4bytes extend address support
Current SPI flash framework only supports to set bank register
(CONFIG_SPI_FLASH_BAR) for flash with size > 16MiB. But some new flash device
(for example, mt35xu512aba) does not support this way, it only supports
4bytes extend address.
To access the whole memory size for such flash device, we add the support
for this 4bytes extend address mode to SPI flash framework.
The configuration CONFIG_SPI_FLASH_4BYTES_ADDR is used to enable the feature.
Signed-off-by: Ye Li <ye.li@nxp.com>
Fugang Duan [Tue, 11 Jul 2017 03:21:32 +0000 (11:21 +0800)]
MLK-15341 mx6qpsabresd: add PHY AR8031 hw reset
Currently mx6qpsabresd board file only add PHY AR8031 gpio reset
in non-DM driver, then net DM driver PHY cannot work after stress
reboot test. So also add gpio reset for DM driver.
RGMII and PHY work at VDDIO 1.8V has better timing and to align
the IO voltage with kernel, also set the IO voltage to 1.8V.
Since i.MX6QP tx_clk can loop from SOC internal, no need to set
PHY output 125Mhz clock that can save power.
Signed-off-by: Fugang Duan <fugang.duan@nxp.com>
Reviewed-by: Ye Li <ye.li@nxp.com>
Peng Fan [Mon, 10 Jul 2017 06:03:49 +0000 (14:03 +0800)]
MLK-15930-2 imx8m: refine mmu table
Refine mmu table. Map TCML/TCMU as non-cachable.
Remove the map of CAAM secure ram and OCRAM_S.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Peng Fan [Mon, 10 Jul 2017 07:58:22 +0000 (15:58 +0800)]
MLK-15930-1 armv8: mmu: fix page table mapping
To page mapping the lowest 2 bits needs to be 0x3.
If not fix this, the final lowest 3 bits for page mapping is 0x1
which is marked as reserved.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
zhang sanshan [Mon, 10 Jul 2017 09:30:02 +0000 (17:30 +0800)]
MA-9822 Device has to be booted manually to recovery mode to apply the OTA update when booting from NAND
uboot can't get the correct misc info.
nand_info[0] is the info of mtd in v2016 or more older version.
nand_info[0] hold the pointer of mtd info in v2017.
Change-Id: I6b336efeafeed1e0f4e3224f738e72b83f1e09df
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Ye Li [Fri, 7 Jul 2017 02:26:39 +0000 (21:26 -0500)]
MLK-15325-2 imx8m: Remove ARM trusted firmware bl31 image
Have changed to use imx-mkimage to package images, move the ARM trusted
firmware bl31 image out of u-boot to imx-mkimage.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Thu, 6 Jul 2017 05:54:55 +0000 (00:54 -0500)]
MLK-15325-1 imx8m: Remove DDR PHY Firmware images
We start to use imx-mkimage to package images, so move the DDR
PHY firmware images out of u-boot to imx-mkimage.
Signed-off-by: Ye Li <ye.li@nxp.com>
zhang sanshan [Thu, 6 Jul 2017 10:49:37 +0000 (18:49 +0800)]
MA-9857 [Android] uboot change CONFIG_NAND_BOOT
NAND macro has been changed to CONFIG_NAND_BOOT in uboot2017.
Change-Id: I61dd03c0eed8a65100212607447a41bde431cc04
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
zhang sanshan [Thu, 6 Jul 2017 05:10:53 +0000 (13:10 +0800)]
MA-9788 [fastboot]some commands not support
support below commands:
fastboot getvar has-slot:oem gapps vbmeta.
Change-Id: I2b7ed6efa4675cf5cfa64e5982cb3987bee6f28a
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
zhang sanshan [Wed, 5 Jul 2017 10:43:03 +0000 (18:43 +0800)]
MA-9789 [fastboot]System doesn't enter fastboot mode automatically while there is no valid gpt partition
add command "fastboot 0"
Change-Id: Ibad6dcab5213d815ac968034aeef5ff5a0be3b1b
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Richard Zhu [Wed, 5 Jul 2017 09:45:11 +0000 (17:45 +0800)]
MLK-15345 pcie: return enodev when pll is not locked
return -ENODEV if the pll is not locked, otherwise
system would be hang
Signed-off-by: Richard Zhu <hongxing.zhu@nxp.com>
Peng Fan [Wed, 5 Jul 2017 10:03:53 +0000 (18:03 +0800)]
MLK-15344 imx8m: Update bl31
Update bl31 with commit
37ee5643e to include tzasc and wdog support.
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Ranjani Vaidyanathan [Fri, 30 Jun 2017 20:27:05 +0000 (15:27 -0500)]
MLK15320 imx8qm/imx8qx: Update to SCFW API based on commit:
"
commit
a645f3c4c529e1f8cc5a624a047a3af56cfd39e1
Author: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
Date: Thu Jun 29 15:21:53 2017 -0500
Turn off all HDMI-TX clocks by default. This is required for setting
the rate of the DIG PLL.
Add code to enable/disable the correct clocks before SECO accesses the HD
Signed-off-by: Ranjani Vaidyanathan <ranjani.vaidyanathan@nxp.com>
"
Signed-off-by: Ranjani Vaidyanathan <Ranjani.Vaidyanathan@nxp.com>
zhang sanshan [Wed, 5 Jul 2017 07:02:33 +0000 (15:02 +0800)]
MA-9828 [uboot] 6ul_Aquila: can't boot up with 2017.03 uboot
6ul_aquila will hang at somewhere when boot up.
the prevision of voltage configuration change from 1mV precision
to 0.1mV prevision that cause the conversion are wrong.
Change-Id: I1cdebb2a013e7adce5cd56844102acd4e30977ad
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Ye Li [Tue, 4 Jul 2017 10:01:56 +0000 (05:01 -0500)]
MLK-15327 imx8mq_evk: Enable CACHE commands
Enable the icache and dcache commands, so that user can operate caches.
We have set the TCML/U to cachable, so need to flush dcache after copying
image to TCM before kick M4 running.
Signed-off-by: Ye Li <ye.li@nxp.com>
zhang sanshan [Tue, 4 Jul 2017 10:44:38 +0000 (18:44 +0800)]
MA-9825 [Android] uboot: fix the compile issue
correct CONFIG_DEFAULT_DEVICE_TREE.
Change-Id: Ie1b3e298152f50d071b500e907d175d7a65c7c66
Signed-off-by: zhang sanshan <sanshan.zhang@nxp.com>
Ye Li [Mon, 3 Jul 2017 09:11:31 +0000 (04:11 -0500)]
MLK-15324-4 imx8qm/qxp: Enable DPUv1 driver and splash screen
Add IT6263 LVDS to HDMI card panel parameters to ARM2 boards. And enable
the DPUv1 driver and relevant settings for splash screen.
At default we set the environment variable "panel=NULL" to disable
the display output since it needs display adapter card to plug into the
board. Change the "panel=it6263" to enable it.
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 3 Jul 2017 08:58:22 +0000 (03:58 -0500)]
MLK-15324-3 imx8: Add LVDS and DC setup common functions
Add common functions for LVDS/DC setup, video framebuffer init/disable,
LVDS to HDMI card settings, etc. Refactor it from video_imxdpuv1.c.
1. Add power, clocks, PLL relevant setup for LVDS and DC.
2. Configure the LVDS and its PHY settings for the display format and pixel link.
3. Setup the LVDS to HDMI card.
4. Implement the video_hw_init by calling DC driver API to output data to
specified display panel.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 3 Jul 2017 08:54:49 +0000 (03:54 -0500)]
MLK-15324-2 video: imxdpuv1: Add DPU driver for i.MX8
Adding new IMXDPUV1 (aka Seeris, Iris-lite) display control driver.
Signed-off-by: Oliver Brown <oliver.brown@nxp.com>
Signed-off-by: Ye Li <ye.li@nxp.com>
Ye Li [Mon, 29 Aug 2016 05:51:01 +0000 (13:51 +0800)]
MLK-15324-1 video: cfb_console: Fix 64 bits support problem
There are some integer to pointer convert. To support 64 bits system,
change the unsigned int to unsigned long.
Signed-off-by: Ye Li <ye.li@nxp.com>
Peng Fan [Tue, 4 Jul 2017 05:04:44 +0000 (13:04 +0800)]
MLK-15329 imx8mq: evk: revert the wrong ddr script change
Revert the wrong ddr script change that introduced by
"commit
f051779"
Signed-off-by: Peng Fan <peng.fan@nxp.com>