summaryrefslogtreecommitdiff
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* Merge git://git.denx.de/u-boot-dmTom Rini2018-08-095-25/+232
|\
| * test: dm: pci: Add cases for finding PCI capability APIsBin Meng2018-08-081-0/+21
| | | | | | | | | | | | | | | | | | Add several PCI capability and extended capability ID registers in the swap_case driver, so that we can add test case for dm_pci_find_capability() and dm_pci_find_ext_capability(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: pci: Add APIs to find capability and extended capabilityBin Meng2018-08-081-0/+68
| | | | | | | | | | | | | | | | | | This introduces two new APIs dm_pci_find_capability() and dm_pci_find_ext_capability() to get PCI capability address and PCI express extended capability address for a given PCI device. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * pci: sandbox: emul: Rename priv structureBin Meng2018-08-081-4/+4
| | | | | | | | | | | | | | | | We have "struct sandbox_pci_priv" in pci_sandbox driver. To avoid confusion, rename the emul's priv to "struct sandbox_pci_emul_priv". Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * pci: sandbox: swap_case: Declare dynamic driver matchingBin Meng2018-08-081-0/+7
| | | | | | | | | | | | | | This adds a U_BOOT_PCI_DEVICE() declaration to the swap_case driver. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * pci: sandbox: Support dynamically binding device driverBin Meng2018-08-082-10/+82
| | | | | | | | | | | | | | | | | | | | At present all emulated sandbox pci devices must be present in the device tree in order to be used. The real world pci uclass driver supports pci device driver matching, and we should add such support on sandbox too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: pci: Assign correct driver data when binding a driverBin Meng2018-08-081-1/+1
| | | | | | | | | | | | | | | | The correct driver data comes from the matching 'id' instead of 'find_id' in pci_find_and_bind_driver(). Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * pci: sandbox: emul: Fix the call to pci_bus_find_devfn()Bin Meng2018-08-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the newly added test cases for PCI configuration access, we get: => ut dm pci_busdev Test: dm_test_pci_busdev: pci.c test/dm/pci.c:49, dm_test_pci_busdev(): SANDBOX_PCI_VENDOR_ID == vendor: Expected 4660, got 65535 Test: dm_test_pci_busdev: pci.c (flat tree) test/dm/pci.c:49, dm_test_pci_busdev(): SANDBOX_PCI_VENDOR_ID == vendor: Expected 4660, got 65535 Failures: 2 The bug only shows up when bus number is not equal to zero. This is caused by the plain find_devfn parameter is passed to function call pci_bus_find_devfn(), inside which find_devfn is compared to devfn in the device's pplat structure. However pplat->devfn does not carry the bus number. Fix this by passing find_devfn with bus number masked. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * pci: sandbox: swap_case: Preserve space indicator bit in BAR registersBin Meng2018-08-081-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | With the newly added testing of more than one device, we get: => ut dm pci_swapcase Test: dm_test_pci_swapcase: pci.c test/dm/pci.c:88, dm_test_pci_swapcase(): "tHIS IS A tESt" = ptr: Expected "tHIS IS A tESt", got "this is a test" Test: dm_test_pci_swapcase: pci.c (flat tree) test/dm/pci.c:88, dm_test_pci_swapcase(): "tHIS IS A tESt" = ptr: Expected "tHIS IS A tESt", got "this is a test" Failures: 2 The failure only happens on the 2nd swap_case device on the PCI bus. The case passes on the 1st device. It turns out the swap_case driver does not emulate bit#0 in BAR registers as a read-only bit. This corrects the implementation. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: pci: Fix scanning multi-function deviceBin Meng2018-08-081-0/+2
| | | | | | | | | | | | | | | | | | The flag to control whether to scan multi-function device during enumeration should be cleared at the beginning of each iteration if the device's function number equals to zero. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: pci: Extract vendor/device id in child_post_bind()Bin Meng2018-08-081-6/+5
| | | | | | | | | | | | | | | | | | Currently only devfn is extracted in child_post_bind(). Now that we have the live-tree version API to look up PCI vendor and device id from the compatible string, let's extract and save them too. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * dm: core: Add ofnode function to read PCI vendor and device idBin Meng2018-08-081-0/+36
| | | | | | | | | | | | | | | | We don't have the live-tree version of fdtdec_get_pci_vendev(). This adds the API. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'master' of git://git.denx.de/u-boot-mipsTom Rini2018-08-084-11/+40
|\ \
| * | bcm6838: add initial supportPhilippe Reynes2018-08-081-0/+33
| | | | | | | | | | | | | | | | | | | | | | | | This adds the initial support of the Broadcom BCM6838 SoC familly, only cpu, dram, uart and leds are supported. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
| * | bmips: ram: add an option to force the size of the ramPhilippe Reynes2018-08-081-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | This adds an option to force the size of the ram, and avoid the detection of ram size. Signed-off-by: Philippe Reynes <philippe.reynes@softathome.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
| * | mips: au1x00: Remove support for these SoCsTom Rini2018-08-082-10/+0
| |/ | | | | | | | | | | | | | | | | | | | | The only platform left for the AU1x00 SoCs was the pb1x00 platform, an apparent clone of the dbau1x00 platform. As pb1x00 had no listed maintainer I am assuming that it is also orphaned. Remove this platform and then remove the unused SoC support. Cc: Daniel Schwierzeck <daniel.schwierzeck@gmail.com> Signed-off-by: Tom Rini <trini@konsulko.com> Reviewed-by: Daniel Schwierzeck <daniel.schwierzeck@gmail.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-samsungTom Rini2018-08-071-16/+21
|\ \ | |/ |/|
| * ARM: Odroid XU3: Modify exynos dw_mmc driver to support Odroid XU3 in DM MMCLukasz Majewski2018-08-061-0/+1
| | | | | | | | | | | | | | | | This commit enables support for Exynos Designware MMC driver based on DM. Signed-off-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * ARM: Odroid XU3: Fix the dwmci_exynos *priv data assignment for DM_MMC ↵Lukasz Majewski2018-08-061-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | (sdr_timing) By convention for DM_MMC the host->priv is used to store struct udevice *dev pointer. Unfortunately, the legacy Exynos DW MMC code uses this field to store pointer to dwmci_exynos_priv_data struct Hence, we do need to get data in other way - namely by using container_of when host pointer is present. In this way the sdr_timing data is properly accessed. Signed-off-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
| * ARM: dw_mmc: Exclude dwmci Exynos priv_data allocation from ↵Lukasz Majewski2018-08-061-15/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | exynos_dwmci_get_config() This commit prevents memory leak when this function is used with DM_MMC as the struct dwmci_exynos_priv_data is already allocated by DM. It is necessary for NON DM aware devices to allocate this struct first. Signed-off-by: Lukasz Majewski <lukma@denx.de> Tested-by: Anand Moon <linux.amoon@gmail.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge tag 'xilinx-for-v2018.09-rc2' of git://git.denx.de/u-boot-microblazeTom Rini2018-08-073-388/+103
|\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Xilinx fixes for v2018.09-rc2 xilinx: - Add support for zybo z7 and ultra96 - Tune zynq and zynqmp mini configurations - Move SYS_MALLOC_LEN to Kconfig fdt - make static funcs gpio: - Fix soft gpio driver - Fix Zynq gpio driver by using platdata microblaze: - Fix Kconfig entry spi - Move ISSI to Kconfig
| * | gpio: xilinx: Add support for using label propertyMichal Simek2018-08-072-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for reading label property from DT and set up bank name based on that. If label property is not present full device node name is used. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * | gpio: xilinx: Return 0 from xilinx_gpio_set_valueMichal Simek2018-08-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .set_value functions have no specified return value and gpio_uclass is not working with it too. But this patch is returning 0 to be in sync with others DM gpio drivers. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * | gpio: xilinx: Not read output values via regsMichal Simek2018-08-071-4/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | Reading registers for finding out output value is not working because input value is read instead in case of tristate. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * | gpio: xilinx: Simplify logic in xilinx_gpio_set_valueMichal Simek2018-08-071-7/+6
| | | | | | | | | | | | | | | | | | | | | | | | There is no reason to do read/write for if/else separately. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * | gpio: xilinx: Set value before changing directionMichal Simek2018-08-071-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Set a value before changing gpio direction. This will ensure that the old value is not propagated when direction has changed but new value is not written yet. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * | gpio: xilinx: Remove !DM driverMichal Simek2018-08-071-336/+2
| | | | | | | | | | | | | | | | | | There is no user for !DM driver that's why remove it. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | gpio: xilinx: Find out bank before use in xilinx_gpio_get_function()Michal Simek2018-08-071-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | Call xilinx_gpio_get_bank_pin() before use. Reported-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net> Signed-off-by: Michal Simek <michal.simek@xilinx.com> Reviewed-by: Stefan Herbrechtsmeier <stefan@herbrechtsmeier.net>
| * | gpio: zynq: Used platdata structure for storing static data instead of privVipul Kumar2018-08-061-33/+34
| | | | | | | | | | | | | | | | | | | | | | | | | | | This patch used platdata structure instead of priv for storing static information read from DT. Signed-off-by: Vipul Kumar <vipul.kumar@xilinx.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Michal Simek <michal.simek@xilinx.com>
| * | spi: Kconfig: Create ISSI Kconfig entryMichal Simek2018-08-061-0/+5
| | | | | | | | | | | | | | | | | | | | | Add ISSI to Kconfig to make it selectable via menuconfig. Also convert all current platforms. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* | | Merge branch 'master' of git://git.denx.de/u-boot-videoTom Rini2018-08-072-1/+11
|\ \ \
| * | | dm: panel: get timings from panelYannick Fertré2018-08-011-0/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Get timings from panel instead of read device tree. Signed-off-by: Yannick Fertré <yannick.fertre@st.com> Reviewed-by: Simon Glass <sjg@chromium.org>
| * | | video: kconfig: remove DM_I2C dependency of I2C_EDIDLuis Araneda2018-08-011-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Drop the DM_I2C dependency, as the library only implements the parsing of EDID data and doesn't depend on any driver One user of this library, the i2c command, implements support for legacy and DM I2C drivers Tested on a Zynq board, whose I2C driver is not ported yet to DM Signed-off-by: Luis Araneda <luaraneda@gmail.com>
* | | | i2c: imx_lpi2c: add uclass api supportPeng Fan2018-08-061-7/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Use uclass clk api to get per clk when CONFIG_CLK enabled. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
* | | | i2c-mux: pca954x: support pca9646 i2c switchPeng Fan2018-08-061-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the PCA9646 support, which is 2-wire bus switch and buffered 4-channel. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Anatolij Gustschin <agust@denx.de>
* | | | dm: core: device: enable power domain in probePeng Fan2018-08-061-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Enable power domain associated with the device when probe. Signed-off-by: Peng Fan <peng.fan@nxp.com> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | | power: Add CONFIG_SPL_POWER_DOMAIN configPeng Fan2018-08-062-1/+2
| |/ / |/| | | | | | | | | | | | | | | | | | | | | | | Add CONFIG_SPL_POWER_DOMAIN config entry. Build drivers/power/domain if this config is selected. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* | | Merge branch 'master' of git://git.denx.de/u-boot-spiTom Rini2018-08-045-3/+476
|\ \ \
| * | | arm: sunxi: Allwinner A10 SPI driverStefan Mavrodiev2018-08-033-0/+462
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add spi driver for sun4i, sun5i and sun7i SoCs. The driver is adapted from mailine kernel. Signed-off-by: Stefan Mavrodiev <stefan@olimex.com> Reviewed-by: Jagan Teki <jagan@openedev.com>
| * | | spi: kirkwood: add orion-spi compatible stringChris Packham2018-08-031-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This matches the compatible string used by the Linux kernel. This will allow u-boot to use the same device tree files. Signed-off-by: Chris Packham <judge.packham@gmail.com> Reviewed-by: Jagan Teki <jagan@openedev.com> [jagan: use armada instead of orion on .data] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | spi: kirkwood: Get drvdata in .ofdata_to_platdataJagan Teki2018-08-031-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Get the is_errata_50mhz_ac in .ofdata_to_platdata, and reuse it in .set_mode this can eventually initialized dt code at once and adding room to add platdata. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | mtd: add spi flash id s25fl128lClément Laigle2018-08-031-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add support for SPANSION s25fl128l Signed-off-by: Clément Laigle <c.laigle@catie.fr> Reviewed-by: Jagan Teki <jagan@amarulasolutions.com> [jagan: fixed , at the end of } ] Signed-off-by: Jagan Teki <jagan@amarulasolutions.com>
* | | | Merge branch 'master' of git://git.denx.de/u-boot-sunxiTom Rini2018-08-045-11/+21
|\ \ \ \
| * | | | mtd: nand: sunxi: Return on set_feature only when not ENOTSUPPMylène Josserand2018-07-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Return the error code of the set_features function only if the error code is not ENOTSUPP. Otherwise, if this function is not supported, it will return and fail to initialize the NAND. Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
| * | | | mtd: nand: nand_base: Convert EINVAL into ENOTSUPPMylène Josserand2018-07-311-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Convert the EINVAL error into ENOTSUPP when the GET/SET_FEATURES is not supported. Signed-off-by: Mylène Josserand <mylene.josserand@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
| * | | | phy: sun4i-usb: Update PHY#3 rst_mask only for H3_H5Jagan Teki2018-07-311-3/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Only H3 and H5 have 4 PHYS so restrict rst_mask only for them by checking PHY id as 3 and update the proper bits. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | | phy: sun4i-usb: Remove usb_clk_cfg set in probeJagan Teki2018-07-311-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | usb_clk_cfg is setting CTRL_PHYGATE bit value in probe which is BIT 0 for sun4i, 6i and 8 for a83t but all these were handling in phy ops init exit calls. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | | phy: sun4i-usb: Call phy_passby even for PHY#0Jagan Teki2018-07-311-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On newer Allwinner SoC, there is a pair of EHCI/OHCI USB hosts for OTG host mode. USB PHY passby must be configured for its corresponding PHY. so we can call for PHY#0. on the other hand in past usb-phy code the same thing can be restricted for Lower SoC's, other than H3/H5/A64. Now there is no need to restrict usb passby since the phy driver is DT enabled, and the respective phy calls will trigger based DT information initiated by the drivers. Signed-off-by: Jagan Teki <jagan@amarulasolutions.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>
| * | | | video: sunxi: de2: fix SimpleFB node creation when DE2 not probedIcenowy Zheng2018-07-311-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sometimes when a monitor without EDID information is plugged, the DE2 won't be probed (because of lack of timing information), but the HDMI node is probed, thus a SimpleFB node with invalid information will be populated. Also detect whether DE2 is probed when creating SimpleFB node. Fixes: be5b96f0e411 ("sunxi: setup simplefb for Allwinner DE2") Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Acked-by: Maxime Ripard <maxime.ripard@bootlin.com> Acked-by: Jagan Teki <jagan@openedev.com>
| * | | | sunxi: add MMC support for H6Icenowy Zheng2018-07-311-1/+12
| | |/ / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The Allwinner H6 SoC has 3 MMC controllers like the ones in A64, with the MMC2 come with the capability to do crypto by EMCE. Add MMC support for H6. EMCE support is not added yet. Signed-off-by: Icenowy Zheng <icenowy@aosc.io> Reviewed-by: Jagan Teki <jagan@openedev.com> Tested-by: Jagan Teki <jagan@amarulasolutions.com>