summaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-11-10mmc: dw_mmc: Add RCRC handlingMarek Vasut
This patch adds check for command response CRC failure. The driver is currently ignoring CRC check failure on command resposes which have CRC atteched to it, which can be potentially dangerous. Even more grueling problem happens when the command response is followed by data transfer though, as in that case, the dwmci_data_transfer() function will spin until it reaches the 240s timeout. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Heiko Stuebner <heiko@sntech.de> Cc: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-11-09dm: Fix typo - missed semicolonAndy Shevchenko
The commit 484fdf5ba058 ("dm: Add support for all targets which requires MANUAL_RELOC") introduces subtle typo, i.e. missed semicolon. Fixes: 484fdf5ba058 ("dm: Add support for all targets which requires MANUAL_RELOC") Cc: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com>
2018-11-04Merge branch 'master' of git://git.denx.de/u-boot-shTom Rini
2018-11-02mmc: tmio: sdhi: Merge DTCNTL access into single register writeMarek Vasut
It is perfectly fine to write th DTCNTL TAP count and enable the SCC sampling clock operation in the same write. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: sdhi: Implement waiting for DAT0 line stateMarek Vasut
When the bus switches to 1.8V mode of operation, it is necessary to verify that the card correctly initiated and completed the voltage switch. This is done by reading out the state of DATA0 line. This patch implement support for reading out the state of the DATA0 line, so the MMC core code can correctly switch to 1.8V mode. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: sdhi: Clear HS400 settings when resetting SCCMarek Vasut
Make sure to clear HS400 configuration when resetting the SCC block. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: sdhi: Touch SCC only when UHS capableMarek Vasut
Add check to avoid touching the SCC tuning registers in case the IP doesn't support them or if the support isn't in place yet. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: Preinitialize regulator to 3.3VMarek Vasut
Preinitialize the SD card signals regulator to 3.3V, which is the default post-reset setting, to be sure the regulator is set to a valid value. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: Configure clock before any other IOSMarek Vasut
Configure the clock settings before reconfiguring any other IO settings. This is required when the clock must be stopped before changing eg. the pin configuration or any of the other properties of the bus. Running the clock configuration first allows the MMC core to do just that. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: Silence transfer errors when tuningMarek Vasut
In case the controller performs card tuning, that is, sends MMC command 19 or 21, silence possible CRC error warning prints. The warnings are bound to happen, since the tuning will fail for some settings while searching for the optimal configuration of the bus and that is perfectly OK. This patch passes around the MMC command structure and adds check into tmio_sd_check_error() to avoid printing CRC error warning when the tuning happens. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: Improve error handlingMarek Vasut
Properly handle return values and abort operations when they are non-zero. This is a minor improvement, which fixes two remaining unchecked return values. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02mmc: tmio: Simplify pinmux handlingMarek Vasut
The SD UHS SDR12, SDR25, SDR50, SDR104, DDR50 and MMC HS200, HS400 modes all use 1.8V signaling, while all the legacy modes use 3.3V signaling. While there are extra modes which use 1.2V signaling, the existing hardware does not support those. Simplify the pinmux such that 3.3V signaling implies legacy mode pinmux and the rest implies UHS mode pinmux. This prevents the massive case statement from growing further. Moreover, it fixes an edge case where during SD 1.8V switch, the bus mode is still set to default while the signaling is already set to 1.8V, which results in an attempt to communicate with a 1.8V card using pins in 3.3V mode and thus communication failure. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-11-02pinctrl: renesas: Add POCCTRL handling to r8a77990Marek Vasut
Add definition of the POCCTRL register and bits therein to R8A77990 E3 pincontrol driver. This allows the pincontrol driver to configure SDHI pin voltage according to power-source DT property. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-11-02pinctrl: renesas: Fix DRV register offsetMarek Vasut
Use fixed 4bit size for generating the DRV register element mask, not the size of the value, which can be smaller. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2018-11-01power: spl: add SPL_DM_REGULATOR_GPIO in KconfigLokesh Vutla
The Makefile already tests for SPL_DM_REGULATOR_GPIO, but Kconfig does not provide it. This adds SPL_DM_REGULATOR_GPIO to Kconfig. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
2018-11-01w1: fix data abort if no one wire bus master presentMartin Fuzzey
When the "w1 bus" command is used with no bus master present a data abort may occur. This is because uclass_first_device() returns zero, but sets the output struct udevice pointer to NULL in the no device found case. Fix w1_get_bus() to account for this and return an error code as is expected by the callers. Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
2018-11-01w1-eeprom: ds24xxx: fix data abort in ds24xxx_probe()Martin Fuzzey
Data abort was occurring when using "w1 bus" with a DS24B33 present. The abort occurred in the ds24xxx_probe() because the struct w1_device pointer was NULL. This is because that structure is allocated by the parent device uclass (by .per_child_platdata_auto_alloc_size) and thus the correct accessor is dev_get_parent_platdata() not dev_get_platdata() Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Reviewed-by: Eugen Hristev <eugen.hristev@microchip.com>
2018-10-31Merge branch 'master' of git://git.denx.de/u-boot-socfpgaTom Rini
2018-10-31arm: socfpga: fpga: fix type of local variableSimon Goldschmidt
The 'status' variable in 'socfpga_load()' for both gen5 and arria10 is of type 'unsigned long' while it is always used as 'int' only. Change it to 'int'. Signed-off-by: Simon Goldschmidt <simon.k.r.goldschmidt@gmail.com>
2018-10-29powerpc: t1040: Correct RCW EC2 settingsBin Meng
Per T1040RM (Rev. 1, 08/2015), there are 2 issues with the RCW EC2 settings. - The value of FSL_CORENET_RCWSR13_EC2_FM1_GPIO is wrong and should be 0x04000000 (value of 1 in RCW bit [420:421]) - Value of 2/3 are reserved in RCW bit [420:421], hence there is no macro FSL_CORENET_RCWSR13_EC2_FM1_DTSEC5_MII. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Poonam Aggrwal <poonam.aggrwal@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-10-29fsl/usb: Workaround for USB erratum-A005275Chris Packham
Workaround makes FS as default mode on all affected socs. Add support to check erratum-A005275 validity for an soc. This info is required to determine whether a given soc is affected by this erratum. Add quirk for this erratum "has_fsl_erratum_a005275" . This quirk is used to enable workaround for the errata Force FS mode as default by: - making EPS as FS - setting PFSC bit to disable HS chirping This workaround can be disabled by mentioning "no_erratum_a005275" in hwconfig string Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-10-29Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini
2018-10-28drivers: cosmetic: Convert SPDX license tags to Linux Kernel stylePatrick Delaunay
Complete in the drivers directory the work started with commit 83d290c56fab ("SPDX: Convert all of our single license tags to Linux Kernel style"). Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
2018-10-25Merge branch 'master' of git://git.denx.de/u-boot-netTom Rini
2018-10-25Merge tag 'u-boot-imx-20181025' of git://git.denx.de/u-boot-imxTom Rini
Merged imx8 architecture, fix build for imx8 + warnings
2018-10-24net: fec_mxc: add support for i.MX8XAnatolij Gustschin
Add compatible property and enable the FEC ipg clock when probing on i.MX8X. Add specific function for reading FEC clock rate via clock driver when configuring MII speed register. Allow FEC_MXC selection for i.MX8. Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24net: mvpp2: increase PHY reset pulseBaruch Siach
The default Linux PHY reset delay is 10ms. This is also the requirement for Marvell 88E151x PHYs, which are likely to be used with this Ethernet MAC. Cc: Stefan Chulski <stefanc@marvell.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefan Roese <sr@denx.de>
2018-10-24net: mvpp2: fix polarity of PHY reset signalBaruch Siach
The dm_gpio_set_value() call sets the logical level of the GPIO signal. That is, it takes the GPIO_ACTIVE_{LOW,HIGH} property into account. The driver needs to assert the reset, and then deassert it. Not the other way around. Cc: Stefan Chulski <stefanc@marvell.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Stefan Roese <sr@denx.de>
2018-10-24net: dm: fec: Obtain the transceiver type from the DTMartin Fuzzey
The DT property "phy-mode" already provides the transceiver type. Use it so that we do not have to also set CONFIG_FEC_XCV_TYPE Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24net: dm: fec: Support the phy-supply bindingMartin Fuzzey
Configure the phy regulator if defined by the "phy-supply" DT phandle. Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24net: dm: fec: Fix phy-reset-duration clamping and defaultsMartin Fuzzey
The DT binding says: - phy-reset-duration : Reset duration in milliseconds. Should present only if property "phy-reset-gpios" is available. Missing the property will have the duration be 1 millisecond. Numbers greater than 1000 are invalid and 1 millisecond will be used instead. However the current code: - clamps values greater than 1000ms to 1000ms rather than 1. - does not initialize the delay if the property does not exist (else clause mismatch) - returns an error if phy-reset-gpios is not defined Fix all this and simplify by using dev_read_u32_default() Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24net: dm: fec: Fix time unit error in phy-reset-durationMartin Fuzzey
The DT binding says that phy-reset-duration is in ms, but the driver currently uses udelay(). Switch to mdelay() to fix this. Signed-off-by: Martin Fuzzey <martin.fuzzey@flowbird.group> Reviewed-by: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24net: phy: aquantia: autodetect if firmware needs to be loadedJeremy Gebben
If the phy reports a valid firmware version and doesn't indicate a fault, skip loading the firmware. This allows the same image to be used on boards that have firmware storage and those that do not. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24net: phy: aquantia: add firmware loading supportJeremy Gebben
Aquantia phys have firmware that can be loaded automatically from storage directly attached to the phy or via MDIO commands. Add support for loading firmware from either a file or a raw location on an MMC device. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24configs: migrate CONFIG_PHY_AQUANTIA to KconfigJeremy Gebben
The aquantia driver requires both CONFIG_PHY_GIGE and CONFIG_PHYLIB_10G. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-10-24sunxi: display: Mark sunxi_rgb2yuv_coef array as constPriit Laes
sunxi_rgb2yuv_coef is readonly and never modified. Signed-off-by: Priit Laes <plaes@plaes.org> Acked-by: Anatolij Gustschin <agust@denx.de> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-24pwm: sunxi: choose best prescaler to improve PWM resolutionVasily Khoruzhick
Choose best prescaler to improve PWM resolution. Without this change driver chooses first prescaler that gives us period value within range, but it could be not the best one. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Tested-by: Vagrant Cascadian <vagrant@debian.org> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-24pwm: sunxi: use new prescaler when configuring PWMVasily Khoruzhick
Looks like old prescaler was used when configuring PWM, fix it. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-24pwm: sunxi: fix off-by-one that prevented PWM to use prescaler bypassVasily Khoruzhick
Fix off-by-one that prevented PWM driver to use prescaler bypass. Without this change prescaler is always enabled. Signed-off-by: Vasily Khoruzhick <anarsoul@gmail.com> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
2018-10-22Merge git://git.denx.de/u-boot-x86Tom Rini
2018-10-22serial: mxc: Add match string for i.mx6 quad/dual lite serialBernhard Messerklinger
Signed-off-by: Bernhard Messerklinger <bernhard.messerklinger@br-automation.com> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Tested-by: Hannes Schmelzer <oe5hpm@oevsv.at>
2018-10-22watchdog: aspeed: restore default value of reset_maskCédric Le Goater
This is required for the current Linux kernel to reboot. It should also probably be fixed in Linux. Signed-off-by: Cédric Le Goater <clg@kaod.org> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-10-22nand: atmel: Initialize pmecc smu with correct sizeBin Meng
Currently in pmecc_get_sigma(), the code tries to clear the memory pointed by smu with wrong size 'sizeof(int16_t) * ARRAY_SIZE(smu)'. Since smu is actually a pointer, not an array, so ARRAY_SIZE(smu) does not generate correct size to be cleared. In fact, GCC 8.1.0 reports a warning against it: error: division 'sizeof (int16_t * {aka short int *}) / sizeof (int16_t {aka short int})' does not compute the number of array elements [-Werror=sizeof-pointer-div] Fix it by using the correct size. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Miquel Raynal <miquel.raynal@bootlin.com>
2018-10-22i2c: imx_lpi2c: fix typo and register base address formatAnatolij Gustschin
Output the register base address in hex notation. Signed-off-by: Anatolij Gustschin <agust@denx.de> Acked-by: Heiko Schocher <hs@denx.de>
2018-10-22Kconfig: Convert CONFIG_IMX_WATCHDOG to KconfigXiaoliang Yang
Move this option to Kconfig and tidy up the config file of eight boards which use it. Signed-off-by: Xiaoliang Yang <xiaoliang.yang_1@nxp.com>
2018-10-22mmc: fsl_esdhc: add uclass clk supportPeng Fan
When CONIFG_CLK is enabled, use uclass clk api to handle the clock. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com> Cc: Stefano Babic <sbabic@denx.de>
2018-10-22fsl_esdhc: Update usdhc driver to support i.MX8Ye Li
Add CONFIG_ARCH_IMX8 to use the 64bits support in usdhc driver. Signed-off-by: Ye Li <ye.li@nxp.com> Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Jaehoon Chung <jh80.chung@samsung.com>
2018-10-22serial: lpuart: support uclass clk apiPeng Fan
Modify most APIs to use udevice as the first parameter, then it will be easy to get the clk reference by using udevice pointer. Use uclass api to get lpuart clk when CONFIG_CLK is enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com> Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2018-10-22serial: lpuart: Enable RX and TX FIFOYe Li
Enable the RX and TX FIFO in LPUART driver to avoid the input lost during U-Boot boot up. Signed-off-by: Ye Li <ye.li@nxp.com> Acked-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>
2018-10-22serial_lpuart: Update lpuart driver to support i.MX8Peng Fan
Add i.MX8 compatible string and cpu type support to lpuart driver, to use little endian 32 bits configurations. Also, according to RM, the Receive FIFO Enable (RXFE) field in LPUART FIFO register is bit 3, so this definition should change to 0x08 (not 0x40) for i.MX8, otherwise the Receive FIFO is not disabled. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de> Cc: Stefano Babic <sbabic@denx.de>