aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2019-07-15mmc: Parse no-1-8-v DT propertyPeng Fan
Parse no-1-8-v DT Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
2019-07-15mmc: Parse HS400 Enhanced strobe DT propertiesPeng Fan
Add HS400 Enhanced strobe properties parsing support to mmc_of_parse(). Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Jean-Jacques Hiblot <jjhiblot@ti.com> Cc: Marek Vasut <marek.vasut+renesas@gmail.com>
2019-07-15mmc: support hs400 enhanced strobe modePeng Fan
eMMC 5.1+ supports HS400 Enhances Strobe mode without the need for tuning procedure. The flow is as following: - set HS_TIMIMG (Highspeed) - Host change freq to <= 52Mhz - set the bus width to Enhanced strobe and DDR8Bit(CMD6), EXT_CSD[183] = 0x86 instead of 0x80 - set HS_TIMING to 0x3 (HS400) - Host change freq to <= 200Mhz - Host select HS400 enhanced strobe complete Signed-off-by: Peng Fan <peng.fan@nxp.com>
2019-07-15mmc: fsl_esdhc_imx: fix config check issue when building in SPLYe Li
Should use CONFIG_IS_ENABLED not IS_ENABLED for clock and regulator drivers, CONFIG_IS_ENABLED will check the CONFIG_SPL_CLK and CONFIG_SPL_DM_REGULATOR when building SPL. Signed-off-by: Ye Li <ye.li@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-15cmd: Remove mmc_spi commandAnup Patel
The mmc_spi command was added to manually setup MMC over SPI bus using command. This was required by the legacy non-DM MMC_SPI driver. With DM based MMC_SPI driver in-place, we can now use all general storge commands and mmc command for MMC over SPI bus hence we remove the mmc_spi command all it's references. Suggested-by: Bin Meng <bmeng.cn@gmail.com> Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-15mmc: mmc_spi: Re-write driver using DM frameworkBhargav Shah
This patch rewrites MMC SPI driver using U-Boot DM framework and get it's working on SiFive Unleashed board. Signed-off-by: Bhargav Shah <bhargavshah1988@gmail.com> Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-15mmc: skip select_mode_and_width for MMC SPI hostAnup Patel
The MMC mode and width are fixed for MMC SPI host hence we skip sd_select_mode_and_width() and mmc_select_mode_and_width() for MMC SPI host. Signed-off-by: Anup Patel <anup.patel@wdc.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Tested-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-15mmc: retry a few times if a partition switch failedJean-Jacques Hiblot
This operation may fail. Retry it a few times before giving up and report a failure. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: do not change mode when accessing a boot partitionJean-Jacques Hiblot
Accessing the boot partition had been error prone with HS200 and HS400 and was disabled. The driver first switched to a lesser mode and then switched the partition access. It was mostly due to a bad handling of the switch and has been fixed, so let's remove this 'feature' Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: During a switch, poll on dat0 if available and check the final statusJean-Jacques Hiblot
The switch operation can sometimes make the bus unreliable, in that case the send_status parameter should be false to indicate not to poll using CMD13. If polling on dat0 is possible, we should use it to detect the end of the operation. At the end of the operation it is safe to use CMD13 to get the status of the card. It is important to do so because the operation may have failed. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: When switching partition, use the timeout specified in the ext_csdJean-Jacques Hiblot
The e-MMC spec allows the e-MMC to specify a timeout for the partition switch command. It can take up to 2550 ms. There is no lower limit to this value in the spec, but do as the the linux driver does and force it to be at least 300ms. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: use the generic timeout for cmd6 (SWITCH) provided in the ext_csdJean-Jacques Hiblot
Starting with rev 4.5, the eMMC can define a generic timeout for the SWITCH command. Following Linux Kernel code, the timeout also changed from 1000 -> 500 Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: if possible, poll the busy state using DAT0Jean-Jacques Hiblot
Using the DAT0 line as a rdy/busy line is an alternative to reading the status register of the card. It especially useful in situation where the bus is not in a good shape, like when modes are switched. This is also how the linux driver behaves. Note of warning: As per the specification, while polling on DAT0 the CLK must not turned off: "[...] Without a clock edge the Device (unless previously disconnected by a deselect command (CMD7)) will force the DAT0 line down, forever. [...]" Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: add mmc_poll_for_busy() and change the purpose of mmc_send_status()Jean-Jacques Hiblot
mmc_send_status() is currently used to poll the card until it is ready, not actually returning the status of the card. Make it return the status and add another function to poll the card. Also remove the 'extern' declaration in the mmc-private.h header to comply with the coding standard. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: omap_hsmmc: provide wait_dat0 even if UHS modes are not supportedJean-Jacques Hiblot
This function can also be used for eMMC devices. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15Revert "mmc: Add a new callback function to perform the 74 clocks cycle ↵Jean-Jacques Hiblot
sequence" This reverts commit 318a7a576bc49aa8b4207e694d3fbd48c663d6ac. The last and only user of this callback had been the omap_hsmmc driver. It is not used anymore. Removing the callback. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: omap_hsmmc: don't fill the send_init_stream callbackJean-Jacques Hiblot
This is not required. The MMC core sends CMD0 right after the initialization and it serves the same purpose. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: omap_hsmmc: reset FSM for DAT and CMD lines if needed before a new commandJean-Jacques Hiblot
It sometimes happen that the PSTATE register does not indicate that the bus is ready when it really is. This usually happens after a mode switch. In that case it makes sense to reset the FSM handling the CMD and DATA Also reset the FSMs if the STATE register cannot be cleared. This also sometimes happens after a mode switch. Signed-off-by: Jean-Jacques Hiblot <jjhiblot@ti.com>
2019-07-15mmc: rpmb: fix response type of CMD25Akio Hirayama
The response type of CMD25 is R1 instead of R1b. Signed-off-by: Akio Hirayama <hirayama.akio@socionext.com> [masahiro: add log ] Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2019-07-15mmc: sdhci: Implement SDHCI card detectT Karthik Reddy
Card detect function implemented for SDHCI framework. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-15mmc: sdhci: Read cd-gpio from devicetreeT Karthik Reddy
This patch reads cd-gpio property from devicetree Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-15mmc: Read sd card detect properties from DTT Karthik Reddy
This patch reads card detect properties from device tree & added mmc capability macros in mmc.h. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-15mmc: mvebu: Remove unused MMC_CAP.. macrosT Karthik Reddy
Removed MMC_CAP_NONREMOVABLE, MMC_CAP_NEEDS_POLL macros from mvebu_mmc.h to avoid redefining of these macros when compiled with mvebu based configs. Signed-off-by: T Karthik Reddy <t.karthik.reddy@xilinx.com> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
2019-07-14Merge tag 'u-boot-stm32-20190712' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-stm - syscon: add support for power off - stm32mp1: add op-tee config - stm32mp1: add specific commands: stboard and stm32key - add stm32 mailbox driver - solve many stm32 warnings when building with W=1 - update stm32 gpio driver
2019-07-14Merge branch '2019-07-12-master-imports'Tom Rini
- First round of TI Davinci updates - Some OMAP3 DM updates - Other misc updates
2019-07-13test: Disable pci_ep test for nowTom Rini
This test is currently broken so disable it for now. Cc: Ramon Fried <ramon.fried@gmail.com> Cc: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-13ARM: dts: logicpd som-lvs and torpedos: Shrink SPL DTBAdam Ford
Since we have limited resources in SPL, it is the best interest to keep the SPL as small as possible and that includes the DTB. There are a few items in the device tree that can be removed, because these boards don't use them. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-07-13regulator: Allow autosetting fixed regulatorsSven Schwermer
Fixed regulators don't have a set_value method. Therefore, trying to set their value will always return -ENOSYS. Signed-off-by: Sven Schwermer <sven@svenschwermer.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-13gpio: add gpio-hog supportHeiko Schocher
add gpio-hog support. GPIO hogging is a mechanism providing automatic GPIO request and configuration as part of the gpio-controller's driver probe function. for more infos see: doc/device-tree-bindings/gpio/gpio.txt Signed-off-by: Heiko Schocher <hs@denx.de> Tested-by: Michal Simek <michal.simek@xilinx.com> (zcu102) Tested-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-13ARM: dts: logicpd-som-lv: Resync with Kernel 5.1.9Adam Ford
The MMC card-detect pin was incorrectly defined which was fixed. This patch resync's the dts and removes the u-boot specific fix. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-07-13ARM: dts: da850: Resync with Linux 5.1.9Adam Ford
The da850.dtsi file had some changes. This patch pulls in the changes from Kernel 5.1.9 Signed-off-by: Adam Ford <aford173@gmail.com>
2019-07-13ARM: davinci: da850: Manual pinmux only when PINCTRL not availableAdam Ford
With a recent update to the pinctrl-single driver and the fact that the da850evm has both DM and OF_CONTROL working in both SPL and U-Boot, some of the manual pinmuxing can be setup to only be activated when either the driver doesn't have DM for it, or when CONFIG_PINMUX isn't available (only during SPL). If the code ever shrinks enough to support PINCTRL in SPL, a lot of this can go away. This also remove some manual pinmuxing not needed by SPL to give SPL a little more breathing room. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-07-13pinctrl: pinctrl-single: Add 'pinctrl-single, bits' supportAdam Ford
The TI Davinci (da850/l138/am1808) use pinctrl-single,bits for pinmuxing peripherals. This patch allosw the pinctrl-single driver to parse the pinctrl-single,bits options and correctly setup devices. Signed-off-by: Adam Ford <aford173@gmail.com>
2019-07-13configs: Make USE_TINY_PRINTF depend on SPL||TPL and be defaultTom Rini
The USE_TINY_PRINTF symbol only changes things within SPL and TPL builds, so make it depend on that support. Next, make it default as within these cases we should rarely have need of more advanced print formats outside of the debug context. To do this, in a few cases we need to correct our Kconfig dependencies as we had cases of non-SPL targets select'ing this symbol. Finally, in the case of a few boards we really do need the full printf functionality. Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-13power: regulator: Kconfig: Add SPL_DM_REGULATOR configs for ↵Keerthy
palmas/lp873x/lp87565 Add SPL_DM_REGULATOR configs for palmas/lp873x/lp87565. These were missing and the Makefile already assumes them to be defined. Add the corresponding SPL config options. This enables the regulator support in SPL. Signed-off-by: Keerthy <j-keerthy@ti.com>
2019-07-13power: pmic: Kconfig: Add SPL_PMIC configs for palmas/lp873x/lp87565Keerthy
Add SPL_PMIC configs for palmas/lp873x/lp87565. These were missing and the Makefile already assumes them to be defined. Add the corresponding SPL config options. This enables the pmics in SPL. Signed-off-by: Keerthy <j-keerthy@ti.com>
2019-07-13ARM: am335x: Add phyCORE AM335x R2 supportNiel Fourie
Support for Phytech phyCORE AM335x R2 SOM (PCL060) on the Phytec phyBOARD-Wega AM335x. CPU : AM335X-GP rev 2.1 Model: Phytec AM335x phyBOARD-WEGA DRAM: 256 MiB NAND: 256 MiB MMC: OMAP SD/MMC: 0 eth0: ethernet@4a100000 Working: - Eth0 - i2C - MMC/SD - NAND - UART - USB (host) Device trees were taken from Linux mainline: commit 37624b58542f ("Linux 5.1-rc7") Signed-off-by: Niel Fourie <lusus@denx.de> Signed-off-by: Parthiban Nallathambi <pn@denx.de> Reviewed-by: Heiko Schocher <hs@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Tested-by: Marek Vasut <marex@denx.de>
2019-07-13ARM: legoev3: convert to driver modelDavid Lechner
This converts LEGO MINDSTORMS EV3 to the driver model. MMC, SERIAL, SPI and SPI_FLASH are converted. The device tree contains only the minimal nodes required by U-Boot since the size of U-Boot is limited to 256K on this device. Signed-off-by: David Lechner <david@lechnology.com>
2019-07-13rtc: add Microcrystal RV-8803 driverMichael Walle
Signed-off-by: Michael Walle <michael@walle.cc>
2019-07-13usb: musb-new: omap2430: Fix compilation warning with USB_MUSB_GADGETDerald D. Woods
This commit addresses the following warning, when _NOT_ USB_MUSB_HOST: [...] CC drivers/usb/gadget/f_mass_storage.o CC drivers/usb/musb-new/omap2430.o CC drivers/usb/gadget/f_fastboot.o CC env/common.o CC env/env.o /src/etinker/software/u-boot-master/drivers/usb/musb-new/omap2430.c: In function ‘omap2430_musb_probe’: /src/etinker/software/u-boot-master/drivers/usb/musb-new/omap2430.c:239:6: warning: assignment to ‘int’ from ‘struct musb *’ makes integer from pointer without a cast [-Wint-conversion] ret = musb_register(&platdata->plat, ^ LD drivers/usb/host/built-in.o CC drivers/usb/gadget/f_sdp.o CC fs/ext4/ext4fs.o [...] Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2019-07-13ARM: omap3: evm: Enable DM_USB in defconfigDerald D. Woods
This addresses the following warning message: ===================== WARNING ====================== This board does not use CONFIG_DM_USB. Please update the board to use CONFIG_DM_USB before the v2019.07 release. Failure to update by the deadline may result in board removal. See doc/driver-model/MIGRATION.txt for more info. ==================================================== As USB support for older OMAP3 SoC's improves, OMAP3 EVM can be readily adapted. There is some additional 'gpio-hog' support needed to fully setup USB in a similar manner to Linux. Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2019-07-13ARM: dts: omap3-evm: Sync dts(i) files from Linux 5.1.5Derald D. Woods
Signed-off-by: Derald D. Woods <woods.technical@gmail.com>
2019-07-13rtc: ds1307: add support for m41t11Heiko Schocher
add m41t11 support in ds1307 driver. changes: - add compatible string for m41t11 - check if RTC clock is running, if not enable the clock Signed-off-by: Heiko Schocher <hs@denx.de>
2019-07-13mmc: Register only the first MMC device on MMC_TINYEzequiel Garcia
When MMC_TINY is enabled, support for only one MMC device is provided. Boards that register more than one device, will just write over mmc_static keeping only the last one registered. This commit prevents this, keeping only the first MMC device created. A debug warning message is added, if nothing else, as a hint/documentation for developers. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
2019-07-13spl: Move SPL_MMC_TINY option to appear under SPL menuEzequiel Garcia
The SPL_MMC_TINY implements feature-reduced MMC support on SPL, and as such, it's more consistent and convenient to find it as part of the SPL configuration. Signed-off-by: Ezequiel Garcia <ezequiel@collabora.com>
2019-07-13cmd: nvedit: Add sub-command 'env info'Leo Ruan
Add sub-command 'env info' to display environment information: - env_valid : is environment valid - env_ready : is environment imported into hash table - env_use_default : is default environment using This command can be optionally used for evaluation in scripts: [-d] : evaluate whether default environment is used [-p] : evaluate whether environment can be persisted The result of multiple evaluations will be combined with AND. Signed-off-by: Leo Ruan <tingquan.ruan@cn.bosch.com> Signed-off-by: Mark Jonas <mark.jonas@de.bosch.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: Do not enable by default] Signed-off-by: Tom Rini <trini@konsulko.com>
2019-07-12drivers: core: use strcmp when find device by namePeng Fan
`if (!strncmp(dev->name, name, strlen(name)))` might find out the wrong device, it might find out `dram_pll_ref_sel`, when name is `dram_pll`. So use strcmp to avoid such issue. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-12test: dm: usb: use the real device namePeng Fan
"keyb" is not the real device name, "keyb@3" is. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-12test: dm: adc: use the real device namePeng Fan
"adc" is not the real device name, "adc@0" is. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
2019-07-12pci: ensure enumeration of all devices in pci_initMarek Behún
Use the uclass_first_device_check and uclass_next_device_check functions instead of uclass_first_device and uclass_next_device in pci_init. This ensures that all PCI devices are tried to be probed. Currently if a device fails to probe, the enumeration stops and the devices which come after the failed device are not probed. Signed-off-by: Marek Behún <marek.behun@nic.cz> Cc: Stefan Roese <sr@denx.de> Cc: Anton Schubert <anton.schubert@gmx.de> Cc: Dirk Eibach <dirk.eibach@gdsys.cc> Cc: Mario Six <mario.six@gdsys.cc> Cc: Chris Packham <chris.packham@alliedtelesis.co.nz> Cc: Phil Sutter <phil@nwl.cc> Cc: VlaoMao <vlaomao@gmail.com> Cc: Tom Rini <trini@konsulko.com> Reviewed-by: Stefan Roese <sr@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>