summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
...
* | Merge git://git.denx.de/u-boot-imxTom Rini2018-01-153-2/+48
|\ \
| * | drivers: pci: imx: fix enumeration logic errorKoen Vandeputte2018-01-121-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | By default, the subordinate is set equally to the secondary bus (1) when the RC boots, and does not alter afterwards. This means that theoretically, the highest bus reachable downstream is bus 1. Force the PCIe RC subordinate to 0xff, otherwise no downstream devices will be detected behind bus 1 if the booting OS does not allow enumerating a higher busnr than the subordinate value of the primary bus. Signed-off-by: Koen Vandeputte <koen.vandeputte@ncentric.com>
| * | spi: fsl_qspi: support i.MX6UL/6ULLL/7DPeng Fan2018-01-121-2/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The QSPI module on i.MX7D is modified from i.MX6SX. The module used on i.MX6UL/6ULL is reused from i.MX7D. They share same tx buffer size. The endianness is not set at qspi driver initialization. So if we don't boot from QSPI, we will get wrong endianness when accessing from AHB address directly. Add the compatible entry for 6ul/7d. Signed-off-by: Peng Fan <peng.fan@nxp.com>
| * | pci: imx: request gpio before usePeng Fan2018-01-121-0/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | Before use GPIO, we need to request gpio first. Free gpio after use. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Fabio Estevam <fabio.estevam@nxp.com> Reviewed-by: Stefano Babic <ssbabic@denx.de>
| * | misc: mxc_ocotp: check fuse word before programming on i.MX7ULPPeng Fan2018-01-121-0/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On i.MX7ULP, the fuse words (except bank 0 and 1) only supports to write once, because they use ECC mode. Multiple writes may damage the ECC value and cause a wrong fuse value decoded when reading. This patch adds a checking before the fuse word programming, only can write when the word value is 0. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* | | db410c: replace reset driver with psciJorge Ramirez-Ortiz2018-01-152-42/+0
| | | | | | | | | | | | | | | | | | this should be the norm for armv8 platforms. Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
* | | db820c: enable pmic gpios for pm8994Jorge Ramirez-Ortiz2018-01-151-2/+5
| | | | | | | | | | | | Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
* | | dm: core: parse chosen nodeRob Clark2018-01-151-0/+11
| | | | | | | | | | | | | | | | | | | | | This is the node that would contain, for example, the framebuffer setup by an earlier stage. Signed-off-by: Rob Clark <robdclark@gmail.com>
* | | spmi: msm: display the PMIC Arb version (debug)Jorge Ramirez-Ortiz2018-01-151-0/+12
| |/ |/| | | | | Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org>
* | Merge git://git.denx.de/u-boot-mmcTom Rini2018-01-1413-446/+1486
|\ \ | |/ |/|
| * mmc: fsl_esdhc: Fix eMMC 1.8v setting issuePeng Fan2018-01-131-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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> Signed-off-by: Peng Fan <peng.fan@nxp.com>
| * power: Rearrange code to guard power command with CONFIG_SPL_BUILD guardTom Rini2018-01-131-32/+29
| | | | | | | | | | | | | | | | | | In order to discard this code when unused in SPL we need to guard the command with a check for CONFIG_SPL_BUILD and we rearrange the code slightly to make this cleaner. Cc: Jaehoon Chung <jh80.chung@samsung.com> Signed-off-by: Tom Rini <trini@konsulko.com>
| * mmc: remove hc_wp_grp_size from struct mmc if not neededJean-Jacques Hiblot2018-01-121-0/+2
| | | | | | | | | | | | | | hc_wp_grp_size is needed only if hardware partitionning is used. On ARM removing it saves about 30 bytes of code space. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: don't read the size of eMMC enhanced user data area in SPLJean-Jacques Hiblot2018-01-121-0/+2
| | | | | | | | | | | | | | This information is only used by the "mmc info" command. On ARM removing this information from SPL saves about 140 of code space. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: compile out erase and write mmc commands if write operations are not ↵Jean-Jacques Hiblot2018-01-121-2/+14
| | | | | | | | | | | | | | | | | | | | enabled Also remove erase_grp_size and write_bl_len from struct mmc as they are not used anymore. On ARM, removing them saves about 100 bytes of code space in SPL. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: read ssr only if MMC write support is enabledJean-Jacques Hiblot2018-01-121-11/+14
| | | | | | | | | | | | | | The content of ssr is useful only for erase operations. on ARM, removing sd_read_ssr() saves around 300 bytes. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: add a Kconfig option to enable the support for MMC write operationsJean-Jacques Hiblot2018-01-124-6/+11
| | | | | | | | | | | | | | | | This allows using CONFIG_IS_ENABLED(MMC_WRITE) to compile out code needed only if write support is required. The option is added for u-boot and for SPL Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: reworked version lookup in mmc_startup_v4Jean-Jacques Hiblot2018-01-121-25/+17
| | | | | | | | | | | | Using a table versus a switch() structure saves a bit of space Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: compile out more code if support for UHS and HS200 is not enabledJean-Jacques Hiblot2018-01-121-1/+11
| | | | | | | | Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: atmel: when sending a data command, use the provided block sizeJean-Jacques Hiblot2018-01-121-22/+20
| | | | | | | | | | | | | | | | struct mmc_data contains the block size to use for the data transfer. Use this information instead of using the default value or the block length information stored in struct mmc. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * dm: mmc: sandbox: Update SD card emulationJean-Jacques Hiblot2018-01-121-1/+4
| | | | | | | | | | | | | | | | | | | | | | The SDcard initialization procedure does a few more things than it did earlier: * switch the bus width even for 1-bit bus width * check that speed has been properly set (in resp[4] of SD_CMD_SWITCH_FUNC) Update the SD simulator to handle those requests gracefully. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Jaehoon Chung <jh80.chung@samsung.com>
| * mmc: make optional the support for eMMC hardware partitioningJean-Jacques Hiblot2018-01-122-0/+9
| | | | | | | | | | | | | | Not all boards have an eMMC and not all users have a need for this. Allow to compile it out. By default it is still included. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: make UHS and HS200 optionalJean-Jacques Hiblot2018-01-123-1/+112
| | | | | | | | | | | | | | | | | | Supporting USH and HS200 increases the code size as it brings in IO voltage control, tuning and fatter data structures. Use Kconfig configuration to select which of those features should be built in. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: convert most of printf() to pr_err() and pr_warn()Jean-Jacques Hiblot2018-01-122-29/+22
| | | | | | | | | | | | | | This allows to compile out the log message by tweaking the LOGLEVEL. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * mmc: don't use malloc_cache_aligned()Jean-Jacques Hiblot2018-01-121-9/+17
| | | | | | | | | | | | | | | | | | | | Not using this function reduces the size of the binary. It's replaces by a standard malloc() and the alignment requirement is handled by an intermediate buffer on the stack. Also make sure that the allocated buffer is freed in case of error. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: fix for old MMCs (below version 4)Jean-Jacques Hiblot2018-01-121-0/+3
| | | | | | | | | | | | | | The ext_csd is allocated only for MMC above version 4. The compare will crash or fail for older MMCs. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: all hosts support 1-bit bus width and legacy timingsJean-Jacques Hiblot2018-01-121-5/+10
| | | | | | | | | | | | | | | | Make sure that those basic capabilities are advertised by the host. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: Fixed a problem with old sd or mmc that do not support High speedJean-Jacques Hiblot2018-01-121-2/+2
| | | | | | | | | | | | | | | | | | As the legacy modes were not added to the list of supported modes, old cards that do not support other modes could not be used. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: mmc: update mmc_of_parse()Jean-Jacques Hiblot2018-01-121-16/+20
| | | | | | | | | | | | | | | | * convert to livetree API * don't fail because of an invalid bus-width, instead default to 1-bit. * recognize 1.2v DDR and 1.2v HS200 flags Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: dump card and host capabilities if debug is enabledJean-Jacques Hiblot2018-01-121-0/+9
| | | | | | | | | | | | | | | | | | This is a useful information while debugging the initialization process or performance issues. Also dump this information with the other mmc info if the verbose option is selected Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: meson_gx_mmc: fix the complie errorJaehoon Chung2018-01-121-1/+1
| | | | | | | | | | | | | | mmc_set_clock() is changed. This patch is for fixing complie error. Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
| * dm: mmc: Add a library function to parse generic dt bindingKishon Vijay Abraham I2018-01-121-0/+46
| | | | | | | | | | | | | | | | | | | | | | Add a new function to parse host controller dt node and set mmc_config. This function can be used by mmc controller drivers to set the generic mmc_config. This function can be extended to set other UHS mode caps once UHS mode support is added. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: add a library function to send tuning commandJean-Jacques Hiblot2018-01-121-0/+68
| | | | | | | | | | | | | | | | | | | | | | | | | | | | HS200/SDR104 requires tuning command to be sent to the card. Add a simple function to send tuning command and to read and compare the received data with the tuning block pattern. This function can be used by platform driver to perform DLL tuning. This patch is similar to commit 996903de92f0 ("mmc: core: add core-level function for sending tuning commands") added in linux kernel. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: use the right voltage level for MMC DDR and HS200 modesJean-Jacques Hiblot2018-01-121-1/+67
| | | | | | | | | | | | | | | | HS200 only supports 1.2v and 1.8v signal voltages. DDR52 supports 3.3v/1.8v or 1.2v signal voltages. Select the lowest voltage available when using those modes. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: Retry some MMC cmds on failureKishon Vijay Abraham I2018-01-122-2/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With certain SD cards like Kingston 8GB/16GB UHS card, it is seen that MMC_CMD_ALL_SEND_CID cmd fails on first attempt, but succeeds subsequently. Therefore, retry MMC_CMD_ALL_SEND_CID cmd a few time as done in Linux kernel. Similarly, it is seen that MMC_CMD_SET_BLOCKLEN may fail on first attempt, therefore retry this cmd a few times as done in kernel. To make it clear that those are optionnal workarounds, a new Kconfig option 'MMC_QUIRKS' is added (enabled by default). Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: Change mode when switching to a boot partitionJean-Jacques Hiblot2018-01-121-17/+49
| | | | | | | | | | | | | | | | | | | | Boot partitions do not support HS200. Changing to a lower performance mode is required to access them. mmc_select_mode_and_width() and sd_select_mode_and_width() are modified to make it easier to call them outside of the initialization context. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: disable UHS modes if Vcc cannot be switched on and offJean-Jacques Hiblot2018-01-121-3/+16
| | | | | | | | | | | | | | | | If a power cycle cannot be done on Vcc, it is safer not to try the UHS modes because we wouldn't be able to recover from an error occurring during the UHS initialization. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: Add support for UHS modesJean-Jacques Hiblot2018-01-122-8/+182
| | | | | | | | | | | | | | | | | | | | | | | | | | Add UHS modes to the list of supported modes, get the UHS capabilites of the SDcard and implement the procedure to switch the voltage (UHS modes use 1v8 IO lines) During the voltage switch procedure, DAT0 is used by the card to signal when it's ready. The optional card_busy() callback can be used to get this information from the host driver. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: add HS200 support in MMC coreKishon Vijay Abraham I2018-01-121-2/+20
| | | | | | | | | | | | | | | | | | Add HS200 to the list of supported modes and introduce tuning in the MMC startup process. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: Add a execute_tuning() callback to the mmc operations.Kishon Vijay Abraham I2018-01-122-0/+19
| | | | | | | | | | | | | | | | Tuning is a mandatory step in the initialization of SDR104 and HS200 modes. This callback execute the tuning process. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: disable the mmc clock during power offKishon Vijay Abraham I2018-01-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | There is no point in having the mmc clock enabled during power off. Disable the mmc clock. This is similar to how it's programmed in Linux Kernel. Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: add a new mmc parameter to disable mmc clockKishon Vijay Abraham I2018-01-122-6/+7
| | | | | | | | | | | | | | | | | | | | 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>
| * mmc: add power cyle support in mmc coreKishon Vijay Abraham I2018-01-121-17/+71
| | | | | | | | | | | | | | | | | | | | 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>
| * mmc: Add a new callback function to perform the 74 clocks cycle sequenceJean-Jacques Hiblot2018-01-122-0/+19
| | | | | | | | | | | | | | | | | | | | Add a new callback function *send_init_stream* which start a sequence of at least 74 clock cycles. The mmc core uses *mmc_send_init_stream* in order to invoke the callback function. This will be used during power cycle where the specification requires such a sequence after power up. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
| * mmc: Enable signal voltage to be selected from mmc coreKishon Vijay Abraham I2018-01-121-0/+16
| | | | | | | | | | | | | | | | | | | | 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>
| * mmc: make mmc_set_ios() return statusKishon Vijay Abraham I2018-01-121-6/+10
| | | | | | | | | | | | | | | | | | | | 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: Kishon Vijay Abraham I <kishon@ti.com> Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: refactor MMC startup to make it easier to support new modesJean-Jacques Hiblot2018-01-121-94/+147
| | | | | | | | | | | | | | | | | | | | | | 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>
| * mmc: refactor SD startup to make it easier to support new modesJean-Jacques Hiblot2018-01-121-54/+129
| | | | | | | | | | | | | | | | | | | | | | 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>
| * mmc: use mmc modes to select the correct bus speedJean-Jacques Hiblot2018-01-121-11/+28
| | | | | | | | | | Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * mmc: Add a function to dump the mmc capabilitiesJean-Jacques Hiblot2018-01-121-0/+24
| | | | | | | | | | | | | | 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>