summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
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-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-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-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-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-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-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-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-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>
2019-07-12gpio: stm32: Remove .ofmatch callbackPatrice Chotard
As compatible string "st,stm32-gpio" is no more used, .ofmatch callback becomes useless, remove it. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12pinctrl: stm32: update .bind callbackPatrice Chotard
Update .bind callback in order to bind all pinctrl subnodes with "gpio-controller" property to gpio_stm32 driver. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12gpio: stm32: Rename stm32f7_gpio to stm32_gpioPatrice Chotard
As this driver is used on stm32f4/f7/h7 and stm32mp1 SoCs, rename it with a more generic name. Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Reviewed-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12spi: stm32: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/spi/stm32_spi.c: In function 'stm32_spi_write_txfifo': drivers/spi/stm32_spi.c:116:20: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (priv->tx_len >= sizeof(u32) && ^~ drivers/spi/stm32_spi.c:122:27: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] } else if (priv->tx_len >= sizeof(u16) && ^~ drivers/spi/stm32_spi.c: In function 'stm32_spi_read_rxfifo': drivers/spi/stm32_spi.c:150:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (priv->rx_len >= sizeof(u32) || (sr & SPI_SR_RXWNE))) { ^~ drivers/spi/stm32_spi.c:156:21: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (priv->rx_len >= sizeof(u16) || ^~ drivers/core/simple-bus.c:15:12: warning: no previous prototype for 'simple_bus_translate' [-Wmissing-prototypes] fdt_addr_t simple_bus_translate(struct udevice *dev, fdt_addr_t addr) ^~~~~~~~~~~~~~~~~~~~ drivers/spi/stm32_spi.c: In function 'stm32_spi_set_speed': drivers/spi/stm32_spi.c:335:10: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] div > STM32_MBR_DIV_MAX) ^ drivers/spi/stm32_spi.c:344:19: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if ((mbrdiv - 1) < 0) ^ drivers/spi/stm32_spi.c: In function 'stm32_spi_probe': drivers/spi/stm32_spi.c:531:16: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(priv->cs_gpios); i++) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12spi: stm32_qspi: avoid warnings when building with W=1 optionPatrick Delaunay
This patch solves warnings detected by setting W=1 when building. Warnings type detected: - [-Wtype-limits] - [-Wsign-compare] Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12mtd: rawnand: stm32_fmc2: avoid warnings when building with W=1 optionPatrick Delaunay
This patch solves warnings detected by setting W=1 when building. Warnings type detected: - [-Wsign-compare] - [-Wtype-limits] Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12power: stpmic1: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: warning: this statement may fall through [-Wimplicit-fallthrough=] Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12pinctrl: pinctrl_stm32: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (*idx < 0) ^ drivers/pinctrl/pinctrl_stm32.c: At top level: warning: no previous prototype for 'stm32_pinctrl_probe' [-Wmissing-prototypes] int stm32_pinctrl_probe(struct udevice *dev) ^~~~~~~~~~~~~~~~~~~ Signed-off-by: Patrice CHOTARD <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12ram: stm32mp1_ram: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_clk_enable': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (idx = 0; idx < ARRAY_SIZE(clkname); idx++) { ^ drivers/ram/stm32mp1/stm32mp1_ram.c: In function 'stm32mp1_ddr_setup': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (idx = 0; idx < ARRAY_SIZE(param); idx++) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12misc: stm32_fuse: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: warning: no previous prototype for 'fuse_read' [-Wmissing-prototypes] int fuse_read(u32 bank, u32 word, u32 *val) ^~~~~~~~~ CC cmd/sf.o warning: no previous prototype for 'fuse_prog' [-Wmissing-prototypes] int fuse_prog(u32 bank, u32 word, u32 val) ^~~~~~~~~ warning: no previous prototype for 'fuse_sense' [-Wmissing-prototypes] int fuse_sense(u32 bank, u32 word, u32 *val) ^~~~~~~~~~ warning: no previous prototype for 'fuse_override' [-Wmissing-prototypes] int fuse_override(u32 bank, u32 word, u32 val) ^~~~~~~~~~~~~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12power: regulator: stm32: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/power/regulator/stm32-vrefbuf.c: In function 'stm32_vrefbuf_set_value': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (uV == stm32_vrefbuf_voltages[i]) { ^~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12clk: clk_stm32mp1: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/clk/clk_stm32mp1.c: In function 'stm32mp1_clk_get_parent': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(stm32mp1_clks); i++) ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12i2c: stm32f7_i2c: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_compute_solutions': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (scldel < scldel_min) ^ warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (((sdadel >= sdadel_min) && ^~ warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (sdadel <= sdadel_max)) && ^~ drivers/i2c/stm32f7_i2c.c: In function 'stm32_i2c_choose_solution': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (clk_error < clk_error_prev) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12gpio: stm32_gpio: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/gpio/stm32_gpio.c: In function 'stm32_offset_to_index': : comparison between signed and unsigned integer expressions [-Wsign-compare] if (idx == offset) ^~ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12adc: stm32: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/adc/stm32-adc-core.c: In function 'stm32h7_adc_clk_sel': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) { ^ warning: comparison between signed and unsigned integer expressions [-Wsign-compare] for (i = 0; i < ARRAY_SIZE(stm32h7_adc_ckmodes_spec); i++) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
2019-07-12adc: stm32-adc: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/adc/stm32-adc.c: In function 'stm32_adc_chan_of_init': warning: comparison between signed and unsigned integer expressions [-Wsign-compare] if (num_channels > adc->cfg->max_channels) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Acked-by: Fabrice Gasnier <fabrice.gasnier@st.com>
2019-07-12mmc: stm32_sdmmc2: avoid warnings when building with W=1 optionPatrick Delaunay
This patch solves warnings detected by setting W=1 when building. Warnings type detected: - [-Wmissing-prototypes] - [-Wimplicit-fallthrough=] Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12serial: stm32: Fix warnings when compiling with W=1Patrick Delaunay
This patch solves the following warnings: drivers/serial/serial_stm32.c: In function 'stm32_serial_probe': warning: comparison of unsigned expression < 0 is always false [-Wtype-limits] if (plat->clock_rate < 0) { ^ Signed-off-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12pmic: stpmic1: add support for SYSRESET_POWER_OFFPatrick Delaunay
Adds support for SYSRESET_POWER_OFF = PMIC power off used by command power off and introduced by commit 751fed426f87 ("sysreset: Add a way to find the last reset"). The driver use SYSRESET_POWER for the PMIC-level power cycle, with restart. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12stm32mp1: syscon: remove stgenPatrick Delaunay
Reduce difference with kernel Linux device tree. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12sysreset: syscon: add support for power offPatrick Delaunay
The new type sysreset 'POWER_OFF', introduced by commit 751fed426f87 ("sysreset: Add a way to find the last reset") is only supported for "syscon-poweroff" compatible. For details see Linux binding: ./Documentation/devicetree/bindings/power/reset/syscon-poweroff.txt This patch removes the support of POWER_OFF for "syscon-reboot" and keeps only the COLD reset (for command reset support) and it introduces the compatible "syscon-poweroff" for the POWER_OFF case. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2019-07-12mailbox: introduce stm32-ipcc driverFabien Dessenne
On STM32 family, the IPCC peripheral allows the communication between 2 processors offering doorbells mechanism. Signed-off-by: Fabien Dessenne <fabien.dessenne@st.com> Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Reviewed-by: Patrice Chotard <patrice.chotard@st.com>
2019-07-11Merge tag 'dm-pull-9jul19-take2' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-dm - Sandbox improvements including .dts refactor - Minor tracing and PCI improvements - Various other minor fixes - Conversion of patman, dtoc and binman to support Python 3
2019-07-11Merge https://gitlab.denx.de/u-boot/custodians/u-boot-marvellTom Rini
- SPL SATA enhancements to allow booting from RAW SATA device needed for Clearfog (Baruch) - Enable SATA booting on Clearfog (Baruch) - Misc changes to Turris Omnia (Marek) - Enable CMD_BOOTZ and increase SYS_BOOTM_LEN on crs305-1g-4s (Luka) - Enable FIT support for db-xc3-24g4xg (Chris) - Enable DM_SPI on Keymile Kirkwood board with necessary changes for this (Pascal) - Set 38x and 39x AVS on lower frequency (Baruch)
2019-07-11Merge tag 'uniphier-v2019.10' of ↵Tom Rini
https://gitlab.denx.de/u-boot/custodians/u-boot-uniphier UniPhier SoC updates for v2019.10 - import DT updates from Linux - add UniPhier SPI controller driver - make U-Boot image for 64bit SoCs position independent - tidy up various init code for next generation SoCs - misc cleanups
2019-07-11gpio: pca953x: Add TI TCA9539 compatible stringMarek Vasut
Add TI TCA9539 compatible string for yet another I2C GPIO expander. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Mario Six <mario.six@gdsys.cc> Cc: Peng Fan <van.freenix@gmail.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Peng Fan <peng.fan@nxp.com>
2019-07-11tpm: wait for valid statusRoman Kapl
The TPM specification says that the EXPECT_DATA bit is not valid until the VALID bit is set. Wait for that bit to be set. Fixes problems with Ifineon SPI TPM. Signed-off-by: Roman Kapl <rka@sysgo.com>
2019-07-11pci_ep: add pci endpoint sandbox driverRamon Fried
Add a dummy PCI endpoint for sandbox. Supporting only a single function, it allows setting and reading header configuration. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-11pci_ep: add Cadence PCIe endpoint driverRamon Fried
Add Cadence PCIe endpoint driver supporting configuration of header, bars and MSI for device. Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-11drivers: pci_ep: Introduce UCLASS_PCI_EP uclassRamon Fried
Introduce new UCLASS_PCI_EP class for handling PCI endpoint devices, allowing to set various attributes of the PCI endpoint device, such as: * configuration space header * BAR definitions * outband memory mapping * start/stop PCI link Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2019-07-11km/spi: remove deprecated SPI flash driver code for KM Kirkwood boardsPascal Linder
KM Kirkwood boards now implement the driver model for its SPI flash interface. Therefore, the old board specific claim and release functions can be deleted. The preprocessor definition CONFIG_SYS_KW_SPI_MPP is yet unused as well. All its appearances and dependencies are removed in the kirkwood_spi driver, header files and finally the configuration whitelist. Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch> Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-07-11km/spi: add weak functions to kirkwood_spi driver (DM part)Pascal Linder
The weak functions, known from the legacy code, are added to the DM part as well. For this purpose, the release operation first needs to be implemented. KM Kirkwood boards will overwrite those weak functions to change the MPP configuration when claiming/releasing the bus, because the hardware pins are shared between the SPI NOR and NAND devices. Signed-off-by: Pascal Linder <pascal.linder@edu.hefr.ch> Signed-off-by: Holger Brunck <holger.brunck@ch.abb.com> Signed-off-by: Stefan Roese <sr@denx.de>
2019-07-10drivers: pci: add API to issue FLR on a PCI function if supportedAlex Marginean
Adds dm_pci_flr API that issues a Function Level reset on a PCI-e function, if FLR is supported. Signed-off-by: Alex Marginean <alexm.osslist@gmail.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>