aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2018-07-31GPIO: CREG: improve flexibility of hsdk-creg-gpio driverEugeniy Paltsev
CREG GPIO is a driver for weird soc-specific output ports, which are controlled by some fields in memory mapped register. Example: 31 9 7 5 0 < bit number | | | | | [ not used | gpio-1 | gpio-0 | <-shift-> ] < 32 bit register ^ ^ | | write 0x2 == set output to "1" (activate) write 0x3 == set output to "0" (deactivate) As of tooday we only support fixed (hardcoded) bit per gpio line, activate / deactivatei and shift values. Fix that by read them from device tree to be able to use this driver for other boards. Remove "hsdk" prefix from compatible string as this driver can be used with different boards like HSDK, AXS101, AXS103, etc. Signed-off-by: Eugeniy Paltsev <Eugeniy.Paltsev@synopsys.com> Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com>
2018-07-30Merge tag 'signed-efi-next' of git://github.com/agraf/u-bootTom Rini
Patch queue for efi - 2018-07-25 Highlights this time: - Many small fixes to improve spec compatibility (found by SCT) - Almost enough to run with sandbox target - GetTime() improvements - Enable EFI_LOADER and HYP entry on ARMv7 with NONSEC=y
2018-07-30Kconfig: Remove trailing whitespaces in promptMichal Simek
Remove additional trailing whitespaces in prompt reported by kconfiglib: warning: DM_PMIC_SANDBOX (defined at drivers/power/pmic/Kconfig:133) has leading or trailing whitespace in its prompt warning: <choice> (defined at dts/Kconfig:204) has leading or trailing whitespace in its prompt Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Felix Brack <fb@ltec.ch>
2018-07-28drivers: rtc: correctly set week day for mc146818Heinrich Schuchardt
The driver sets the weekday incorrectly when called by the 'date set' command. Sunday is 1, Saturday is 7 unlike in U-Boot (see data sheet https://www.nxp.com/docs/en/data-sheet/MC146818.pdf, table 3). Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-28tpm: make TPM_V2 be compiled by defaultMiquel Raynal
TPM_V1 was already compiled by default. Now that both can be compiled at the same time, compiled them both by default. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28tpm: allow TPM v1 and v2 to be compiled at the same timeMiquel Raynal
While there is probably no reason to do so in a real life situation, it will allow to compile test both stacks with the same sandbox defconfig. As we cannot define two 'tpm' commands at the same time, the command for TPM v1 is still called 'tpm' and the one for TPM v2 'tpm2'. While this is the exact command name that must be written into eg. test files, any user already using the TPM v2 stack can continue to do so by just writing 'tpm' because as long as TPM v1 support is not compiled, U-Boot prompt will search for the closest command named after 'tpm'. The command set can also be changed at runtime (not supported yet, but ready to be), but as one can compile only either one stack or the other, there is still one spot in the code where conditionals are used: to retrieve the v1 or v2 command set. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org> [trini: In sandbox_tpm2_fill_buf() use NULL not \0 to ensure NULL terminated string due to LLVM warning] Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-28tpm: remove stale symbol in KconfigMiquel Raynal
The TPM_DRIVER_SELECTED symbol was used in one of the initial series about TPMv2 but its use has been dropped, making these selects useless, remove them. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-28tpm: compile Sandbox driver by defaultMiquel Raynal
When Sandbox and the TPM stack are both selected, compile Sandbox TPM driver by default. Signed-off-by: Miquel Raynal <miquel.raynal@bootlin.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-27Merge git://git.denx.de/u-boot-fsl-qoriqTom Rini
2018-07-26net: zynq_gem: convert to use livetreeSiva Durga Prasad Paladugu
This patch updates the zynq gem driver to support livetree. Signed-off-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com> Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26drivers: net: zynq_gem: fix phy dt node settingGrygorii Strashko
Now zynq_gem driver will overwrite UCLASS_ETH node when PHY is connected and configured which is not correct. Use struct phydev->node instead. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26drivers: net: cpsw: fix phy dt node settingGrygorii Strashko
Now CPSW driver will overwrite UCLASS_ETH node when PHY is connected and configured which is not correct. Use struct phydev->node instead. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: xilinx: switch to use phy_get_ofnode()Grygorii Strashko
Use PHY API phy_get_ofnode() helper to get PHY DT node. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: dp83867: switch to use phy_get_ofnode()Grygorii Strashko
Use PHY API phy_get_ofnode() helper to get PHY DT node. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26net: phy: add ofnode node to struct phy_deviceGrygorii Strashko
Now the UCLASS_ETH device "node" field is owerwritten by some network drivers in case of Ethernet PHYs which are linked to UCLASS_ETH device using "phy-handle" DT property and when Ethernet PHY driver needs to read some additional information from DT. In such cases following happens (in general): - network drivers priv->phydev = phy_connect(priv->bus, priv->phyaddr, dev, priv->interface); <-- phydev is connected to dev which is UCLASS_ETH device if (priv->phy_of_handle > 0) dev_set_of_offset(priv->phydev->dev, priv->phy_of_handle); <-- phydev->dev->node is overwritten by phy-handle DT node - PHY driver in .config() callback int node = dev_of_offset(dev); <-- PHY driver uses overwritten dev->node const void *fdt = gd->fdt_blob; if (fdtdec_get_bool(fdt, node, "property")) ... As result, UCLASS_ETH device can't be used any more for DT accessing. This patch adds additional ofnode node field to struct phy_device which can be set explicitly by network drivers and used by PHY drivers, so overwriting can be avoided. Also add helper function phy_get_ofnode() which will check and return phy_device->node or dev_ofnode(phydev->dev) for backward compatibility with existing drivers. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: Clean up includes of common.hJoe Hershberger
We want to be able to include some other system headers in phy.h but that requires us to have included common.h in the top-level first. Also, common.h includes config.h as the first thing it does, so don't include it directly. Series-to: u-boot Series-cc: Grygorii Strashko <grygorii.strashko@ti.com> Seried-cc: ti Series-process-log: sort, uniq Cover-letter: Prepare for net: phy: prevent uclass_eth device "node" field overwriting Prepare for [1] so that it doesn't break the build for a bunch of boards. There are a number of reasons this series broke the build but none of them depend on changes in the series, so fix up those situations ahead of applying that series. [1] https://patchwork.ozlabs.org/cover/940104/ END Signed-off-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: phy: dp83867: switch to use ofnode apiGrygorii Strashko
Switch to use more generic ofnode API instead of FDT API. Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26net: phy: dp83867: add workaround for incorrect RX_CTRL pin strapMurali Karicheri
The data manual for DP83867IR/CR, SNLS484E[1], revised march 2017, advises that strapping RX_DV/RX_CTRL pin in mode 1 and 2 is not supported (see note below Table 5 (4-Level Strap Pins)). It further advises that if a board has this pin strapped in mode 1 and mode 2, then bit[7] of Configuration Register 4 (address 0x0031) must be cleared to 0. This is to ensure proper operation of PHY. Since it is not possible to detect in software if RX_DV/RX_CTRL pin is incorrectly strapped, add a device-tree property to advertise this and allow corrective action in software. [1] http://www.ti.com/lit/ds/snls484e/snls484e.pdf Signed-off-by: Murali Karicheri <m-karicheri2@ti.com> Reviewed-by: Hannes Schmelzer <oe5hpm@oevsv.at> Acked-by: Joe Hershberger <joe.hershberger@ni.com> Tested-by: Siva Durga Prasad Paladugu <siva.durga.paladugu@xilinx.com>
2018-07-26net: mvgbe: convert to DMChris Packham
Add driver model support to the mvgbe driver. As a temporary measure both DM and non-DM uses are supported. Once all the users have been converted the non-DM support can be dropped. Signed-off-by: Chris Packham <judge.packham@gmail.com> Tested-by: Michael Walle <michael@walle.cc> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26net: mvgbe: prepare for conversion to driver modelChris Packham
Extract some function bodies to helper functions that can be reused in the DM/non-DM implementations. Signed-off-by: Chris Packham <judge.packham@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-26sandbox: eth-raw: Add a SIMPLE_BUS to enumerate host interfacesJoe Hershberger
Ask the OS for each of its interfaces and for each one, bind a U-Boot device and then probe it. This will allocate the priv data structure that is then populated. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26sandbox: eth-raw: Make random MAC addresses available to eth-rawJoe Hershberger
We don't necessarily know how many MAC addresses we'll need, so implement a ROM read so we always have something valid. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26sandbox: eth-raw: Allow interface to be specified by indexJoe Hershberger
With systemd stable interface names, eth0 will almost never exist. Instead of using that name in the sandbox.dts, use an index. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26sandbox: eth-raw: Add a function to ask the host about localhostJoe Hershberger
Instead of doing a simple string compare against "lo", look for the flag that indicates a localhost interface. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26net: sandbox-raw: Convert raw eth driver to livetreeJoe Hershberger
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26net: sandbox: Convert sandbox mock eth driver to livetreeJoe Hershberger
Use the dev_ functions to access DT properties. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26net: Correct comment in KconfigJoe Hershberger
Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26sandbox: Don't disable ctrlc() on sandbox if in raw modeJoe Hershberger
In raw mode, handle ctrl-c as normal. This allows normal ctrl-c behavior such as aborting a command that is timing out without completely terminating the sandbox executable. In [1], Simon disabled this. His reason for it was that it interferes with piping test scripts. Piping should be done in cooked mode, so this change should still not interfere. [1] commit 8969ea3e9f2db04a6b3675 ("sandbox: Disable Ctrl-C") Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-26drivers/ddr/fsl: fix '__hwconfig without a buffer' messagesJeremy Gebben
Pass an empty buffer instead of NULL if the hwconfig environment variable isn't set. Signed-off-by: Jeremy Gebben <jgebben@sweptlaser.com> Cc: Stefano Babic <sbabic@denx.de> Cc: York Sun <york.sun@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
2018-07-26scsi: ceva: add ls1012a soc supportYuantian Tang
Make the code structure more general so that more socs can be added easily and also remove speed limitation restriction. Add the ls1012a sata support as well. Signed-off-by: Tang Yuantian <andy.tang@nxp.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Tested-by: Michal Simek <michal.simek@xilinx.com> (with and without CONFIG_OF_LIVE on zynqmp zcu102) Reviewed-by: York Sun <york.sun@nxp.com>
2018-07-25rtc: remove CONFIG_CMD_DATE dependencyHeinrich Schuchardt
The EFI subsystem accesses the real time clock and is enabled by default. So we should drop any CONFIG_CMD_DATE dependency from the real time clock drivers. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Signed-off-by: Alexander Graf <agraf@suse.de>
2018-07-24Merge branch 'master' of git://git.denx.de/u-boot-uniphierTom Rini
2018-07-25mtd: nand: denali: correct buffer alignment for DMA transferMasahiro Yamada
The NAND framework makes sure to pass in the buffer with at least chip->buf_align alignment. Currently, the Denali NAND driver only requests 16 byte alignment. This causes unaligned cache operations for the DMA transfer. [Error Example] => nand read 81000010 0 1000 NAND read: device 0 offset 0x0, size 0x1000 CACHE: Misaligned operation at range [81000010, 81001010] CACHE: Misaligned operation at range [81000010, 81001010] CACHE: Misaligned operation at range [81000010, 81001010] CACHE: Misaligned operation at range [81000010, 81001010] 4096 bytes read: OK Reported-by: Marek Vasut <marex@denx.de> Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
2018-07-24rtc: compile date.c if DM_RTCAKASHI Takahiro
rtc_to_tm() and rtc_mktime() are required for some RTC drivers, at least PL031. Without this patch, we also need to enable CONFIG_CMD_DATE even if we don't want or need this command. Signed-off-by: AKASHI Takahiro <takahiro.akashi@linaro.org> Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
2018-07-23Convert CONFIG_DA8XX_GPIO to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_DA8XX_GPIO Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-23spi: stm32_qspi: rework mode managementChristophe Kerello
This patch solves quad read issue with Macronix/Micron spi nor. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-07-23spi: stm32_qspi: assign functional operation mode in _stm32_qspi_gen_ccrChristophe Kerello
This patch assigns the functional operation mode in _stm32_qspi_gen_ccr function. Signed-off-by: Christophe Kerello <christophe.kerello@st.com> Signed-off-by: Patrice Chotard <patrice.chotard@st.com>
2018-07-23bios_emulator: remove assignment without effectHeinrich Schuchardt
Assigning a parameter which is not used afterwards has not effect. Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
2018-07-23Merge branch 'master' of git://git.denx.de/u-boot-imxTom Rini
trini: Update colibri-imx6ull to use Kconfig for mtdparts related options. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-07-23eth: dm: fec: Add gpio phy reset bindingMichael Trimarchi
Add the missing gpio phy reset binding to the gpio and reset time configuration Signed-off-by: Michael Trimarchi <michael@amarulasolutions.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
2018-07-23mmc: break out get_op_cond code to its own functionJon Nettleton
This code is useful for testing the existance of devices that do not have card detect capabilities. This breaks out the core functionality and leaves the actual init logic and error reporting in mmc_start_init(). Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefano Babic <sbabic@denx.de>
2018-07-23mtd: nand: mxs_nand: add device tree support for i.MX 6Stefan Agner
Support i.MX 6 NAND GPMI driver data from device tree. Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
2018-07-23bootcount: flush after storing the bootcounterStefano Babic
If the bootcounter address is in a cached memory, a flush of dcache must occur after updateing the bootcounter. Issue found on i.MX6 where bootcounter is put into the internal (cached) IRAM. Signed-off-by: Stefano Babic <sbabic@denx.de>
2018-07-22Convert CONFIG_MTD_PARTITIONS et al to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_MTD_PARTITIONS CONFIG_MTD_DEVICE Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-21Convert CONFIG_NAND_DAVINCI to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_NAND_DAVINCI Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-21Convert CONFIG_NAND_ATMEL to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_NAND_ATMEL Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-21Convert CONFIG_NAND_LPC32XX_SLC to KconfigAdam Ford
This converts the following to Kconfig: CONFIG_NAND_LPC32XX_SLC Signed-off-by: Adam Ford <aford173@gmail.com>
2018-07-20Merge branch 'master' of git://git.denx.de/u-boot-rockchipTom Rini
2018-07-21rockchip: i2c: enable i2c controller for rk3066 and rk3188Alexander Kochetkov
rk3066 and rk3188 has two I2C controller implementations. Current I2C driver wan't work with legacy implementation. Switching between controllers is performed using a bit inside GFR_SOC_CON1 register. The bit setting is performed by pinctrl driver. The patch ask pinctrl to do settings. Signed-off-by: Alexander Kochetkov <al.kochet@gmail.com> Acked-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> Reviewed-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com> [fix warnings by including the rk3228 variant in the compatible-list]: Signed-off-by: Philipp Tomsich <philipp.tomsich@theobroma-systems.com>
2018-07-20Merge git://git.denx.de/u-boot-x86Tom Rini