summaryrefslogtreecommitdiffstats
path: root/drivers
Commit message (Collapse)AuthorAgeFilesLines
* tegra: video: support eDP displays on Tegra124 devicesSimon Glass2015-05-134-0/+465
| | | | | | | | | Connect up the clocks and the eDP driver to make these displays work with Tegra124-based devices. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
* tegra: video: Add Embedded DisplayPort driverSimon Glass2015-05-133-0/+1265
| | | | | | | | | | This interface is used on laptop devices based on Tegra. Add a driver which provides access to the eDP interface. The driver uses the display port uclass. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
* tegra: video: Support serial output resource (SOR) on tegra124Simon Glass2015-05-134-0/+1809
| | | | | | | | | The SOR is required for talking to eDP LCD panels. Add a driver for this which will be used by the DisplayPort driver. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
* dm: video: Add a uclass for display portSimon Glass2015-05-133-0/+45
| | | | | | | | | eDP (Embedded DisplayPort) is a standard widely used in laptops to drive LCD panels. Add a uclass for this which supports a few simple operations. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Anatolij Gustschin <agust@denx.de> Signed-off-by: Tom Warren <twarren@nvidia.com>
* power: Export register access functions from as3722Simon Glass2015-05-131-3/+13
| | | | | | | | With the full PMIC framework we may be able to avoid this. But for now we need access to the PMIC. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* dm: gpio: Add error handling and a function to claim vector GPIOsSimon Glass2015-05-131-3/+35
| | | | | | | | | gpio_get_values_as_int() should return an error if something goes wrong. Also provide gpio_claim_vector(), a function to request the GPIOs and set them to input mode. Otherwise callers have to do this themselves. Signed-off-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* Revert "stm32f4: fix serial output"Tom Rini2015-05-101-3/+0
| | | | | | | | | As per the author, we don't need this patch really since the other patch "stm32f4: fix serial output" superseded it. This reverts commit 85e5f5b7a7f8d889271f94791606cde62d81d53f. Signed-off-by: Tom Rini <trini@konsulko.com>
* serial: fdt: add device tree support for pl01xVikas Manocha2015-05-101-1/+29
| | | | | | | This patch adds device tree support for arm pl010/pl011 driver. Signed-off-by: Vikas Manocha <vikas.manocha@st.com> Acked-by: Simon Glass <sjg@chromium.org>
* stm32f4: add serial print portkunhuahuang2015-05-101-12/+59
| | | | | | | | | | | | Add the stm32F4 board's serial ports support. User can use it easily. The user only need to edit the number of the usart. The patch also fix the serial print out. Last, this version of patch fix the first patch checkpatch.pl error. Thanks to Kamil Lulko. Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
* stm32f4: fix serial outputkunhuahuang2015-05-101-0/+4
| | | | | | | | | This patch fix the serial output. The source is from Kamil Lulko's "stm32f429-discovery board support" Thanks, Varcain. I learned a lot. Signed-off-by: kunhuahuang <huangkunhua@gmail.com>
* gpio: stm32_gpio: Use clrsetbits_le32() at appropriate placesAxel Lin2015-05-081-13/+5
| | | | | | Use clrsetbits_le32() to replace clrbits_le32() + setbits_le32(). Signed-off-by: Axel Lin <axel.lin@ingics.com>
* misc: led: Add PCA9551 LED driverStefan Roese2015-05-083-0/+169
| | | | | | | | | | This patch adds a driver for the PCA9551 LED controller. Originated-by: Timo Herbrecher <t.herbrecher@gateware.de> Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com> Cc: Fabio Estevam <festevam@gmail.com> Reviewed-by: Fabio Estevam <fabio.estevam@freescale.com>
* dm: sf: Update default name of spi flash in structure udeviceHaikun.Wang@freescale.com2015-05-061-2/+2
| | | | | | | Default name of spi flash like this "0:0", update it to "spi_flash@0:0". Signed-off-by: Haikun Wang <haikun.wang@freescale.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: exynos: Drop legacy USB codeSimon Glass2015-05-062-225/+0
| | | | | | Drop the code that doesn't use driver model for USB. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: ohci: Don't log an error on interrupt packet timeoutHans de Goede2015-05-061-1/+2
| | | | | | | Interrupts transfers timing out is normal, so do not log an error for this. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Add proper cache flushing / invalidating for non cache coherent cpusHans de Goede2015-05-062-5/+84
| | | | | | | | Add proper cache flushing / invalidating for non cache coherent cpus, for now only enable this for new (driver-model) usb code to avoid regressions. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: ohci: Fix ctrl in messages with a data-len of 0Hans de Goede2015-05-061-1/+1
| | | | | | | Fix taken from the Linux kernel ohci driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Move static func and var declarations from ohci.h to ohci-hcd.cHans de Goede2015-05-062-93/+86
| | | | | | | Non static function and variable declarations do not belong in a .h file. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Remove unnecessary phcca variableHans de Goede2015-05-061-6/+3
| | | | | | | This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Move the td array struct to inside the ohci_dev structHans de Goede2015-05-062-20/+9
| | | | | | | This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Move the ohci_dev struct to inside the main ohci structHans de Goede2015-05-062-23/+19
| | | | | | | | | | | This is a preparation patch for adding driver-model support. Note we do keep ohci_dev as a separate struct so that we can later add support for interrupt-queues which requires allocating a separate ohci_dev per interrupt-queue. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Pass around a pointer to ohci_t rather then accessing global varsHans de Goede2015-05-061-60/+64
| | | | | | | This is a preparation patch for adding driver-model support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* usb: ohci: Remove unused devgone global variableHans de Goede2015-05-061-8/+0
| | | | | | | | devgone is never assigned a value, so the one comparisson reading it will never be true, and devgone can be completely removed. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Marek Vasut <marex@denx.de>
* dm: usb: Set desc_before_addr from ehci dm codeHans de Goede2015-05-051-0/+3
| | | | | | | Without this usb-1 device descriptors do not get read properly. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Fix finding of first upstream usb-2 hub in the ehci dm codeHans de Goede2015-05-051-12/+22
| | | | | | | | | | | | | | | | | | | | | | | | | The ehci driver model code for finding the first upstream usb-2 hub before this commit has a number of issues: 1) "if (!ttdev->speed != USB_SPEED_HIGH)" does not work because the '!' takes presedence over the '!=' this should simply be "if (ttdev->speed == USB_SPEED_HIGH)" 2) It makes ttdev point to the first upstream usb-2 hub, but ttdev should point to the last usb-1 device before the first usb-2 hub (when going upstream from the device), as ttdev is used to find the port of the first usb-2 hub to which the the last usb-1 device is connected. 3) parent_devnum however should be set to the devnum of the first usb-2 hub, so we need to keep pointers around to both usb_device structs. To complicate things further during enumeration usb_device.dev will point to the parent udevice, where as during normal use it will point to the actual udevice, we must handle both cases correctly. This commit fixes all this making usb-1 devices attached to usb-2 hubs, including usb-1 devices attached to usb-1 hubs attached to usb-2 hubs, work. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Use usb_get_bus in dm ehci codeHans de Goede2015-05-051-8/+1
| | | | | | | Use usb_get_bus in dm ehci code rather then re-implementing it. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Copy over usb_device values from usb_scan_device() to final usb_deviceHans de Goede2015-05-051-15/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently we copy over a number of usb_device values stored in the on stack struct usb_device probed in usb_scan_device() to the final driver-model managed struct usb_device in usb_child_pre_probe() through usb_device_platdata, and then call usb_select_config() to fill in the rest. There are 3 problems with this approach: 1) It does not fill in enough fields before calling usb_select_config(), specifically it does not fill in ep0's maxpacketsize causing a div by zero exception in the ehci driver. 2) It unnecessarily redoes a number of usb requests making usb probing slower 3) Calling usb_select_config() a second time fails on some usb-1 devices plugged into usb-2 hubs, causing u-boot to not recognize these devices. This commit fixes these issues by removing (*) the usb_select_config() call from usb_child_pre_probe(), and instead of copying over things field by field through usb_device_platdata, store a pointer to the in stack usb_device (which is still valid when usb_child_pre_probe() gets called) and copy over the entire struct. *) Except for devices which are explictly instantiated through device-tree rather then discovered through usb_scan_device() such as emulated usb devices in the sandbox. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Make usb_get_bus easier to use for callersHans de Goede2015-05-051-13/+4
| | | | | | | | | | | Make usb_get_bus easier to use for callers, by directly returning the bus rather then returning it via a pass-by-ref argument. This also removes the error checking from the current callers, as we already have an assert() for bus not being NULL in usb_get_bus(). Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: usb: Do not use bus->seq before device_probe(bus)Hans de Goede2015-05-051-2/+1
| | | | | | | | | Do not use bus->seq before device_probe(bus), as bus->seq is not set until after the device_probe() call. This fixes u-boot printing: "USB-1: " for each bus it scans. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: i2c-gpio: Remove redundant dm_gpio_set_value() callAxel Lin2015-05-051-6/+7
| | | | | | | | | dm_gpio_set_dir_flags() will also set gpio output value when switching to gpio output. So it's not necessary to call dm_gpio_set_value() after dm_gpio_set_dir_flags() call. Signed-off-by: Axel Lin <axel.lin@ingics.com> Acked-by: Simon Glass <sjg@chromium.org>
* dm: rtc: sandbox: Enable real-time clock supportSimon Glass2015-05-051-2/+0
| | | | | | Enable real-time-clock support in sandbox. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: rtc: sandbox: Add a driver for the sandbox I2C RTCSimon Glass2015-05-052-0/+109
| | | | | | | | Add a driver which communicates with the sandbox I2C emulation RTC device and permits it to be used in U-Boot. This driver is very simple - it just reads and writes selected I2C registers in the device. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: rtc: sandbox: Add an emulated I2C RTC deviceSimon Glass2015-05-052-0/+237
| | | | | | | | | | | | Add a sandbox I2C emulation device which emulates a real-time clock. The clock works off an offset from the current system time, and supports setting and getting the clock, as well as access to byte-width regisers in the RTC. It does not support changing the system time. This device can be used for testing the 'date' command on sandbox, as well as the RTC uclass. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: rtc: Add a uclass for real-time clocksSimon Glass2015-05-053-0/+106
| | | | | | | | | Add a uclass for real-time clocks which support getting the current time, setting it and resetting the chip to a known-working state. Some RTCs have additional registers which can be used to store settings, so also provide an interface to these. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: rtc: Rename mktime() and reduce the number of parametersSimon Glass2015-05-0512-34/+23
| | | | | | | | | Most callers unpack the structure and pass each member. It seems better to pass the whole structure instead, as with the C library. Also add an rtc_ prefix. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* dm: rtc: Rename to_tm() to rtc_to_tm() and add error codeSimon Glass2015-05-0512-13/+17
| | | | | | | | | | Rename this function so that it is clear that it is provided by the RTC. Also return an error when it cannot function as expected. This is unlikely to occur since it works for dates since 1752 and many RTCs do not support such old dates. Still it is better to be accurate. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* dm: rtc: Rename gregorian day functionSimon Glass2015-05-052-3/+8
| | | | | | | | Change this function name to something more descriptive. Also return a failure code if it cannot calculate a correct value. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* dm: i2c: Add an explicit test mode to the sandbox I2C driverSimon Glass2015-05-051-11/+23
| | | | | | | | | At present this driver has a few test features. They are needed for running the driver model unit tests but are confusing and unnecessary if using sandbox at the command line. Add a flag to enable the test mode, and don't enable it by default. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: i2c: Add functions to read and write a registerSimon Glass2015-05-051-0/+19
| | | | | | | | Add driver model versions of the legacy functions to read and write a single byte register. These are a useful shortcut in many cases. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* dm: i2c: sandbox: Add debugging to the speed limitSimon Glass2015-05-051-1/+3
| | | | | | | Print a debug() message with the I2C speed is exceeded. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Heiko Schocher <hs@denx.de>
* cros_ec: Handle the single duplex requirement in cros_ecSimon Glass2015-05-051-3/+20
| | | | | | | With several chips using the SPI protocol it seems better to put the single duplex functionality in the EC rather than the SPI driver. Signed-off-by: Simon Glass <sjg@chromium.org>
* cros_ec: Show the protocol version in the debug messageSimon Glass2015-05-051-1/+2
| | | | | | | When starting up, show the protocol version that has been negotiated with the EC. Signed-off-by: Simon Glass <sjg@chromium.org>
* dm: spi: Avoid setting the speed with every transferSimon Glass2015-05-051-3/+6
| | | | | | | | Only set the speed if it has changed from last time. Since the speed will be 0 when the device is probed it will always be changed on the first transfer after the device is probed. Signed-off-by: Simon Glass <sjg@chromium.org>
* sandbox: eth: Add a function to skip ping timeoutsJoe Hershberger2015-05-051-0/+17
| | | | | | | | | When called, the next call to receive will trigger a 10-second leap forward in time to avoid waiting for time to pass when tests are evaluating timeout behavior. Signed-off-by: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Simon Glass <sjg@chromium.org>
* Merge git://git.denx.de/u-boot-mpc85xxTom Rini2015-05-055-2/+119
|\
| * mmc: fsl_esdhc: Add peripheral clock supportYangbo Lu2015-05-041-0/+41
| | | | | | | | | | | | | | | | | | | | | | | | The SD clock could be generated by platform clock or peripheral clock for some platforms. This patch adds peripheral clock support for T1024/T1040/T2080. To enable it, define CONFIG_FSL_ESDHC_USE_PERIPHERAL_CLK. Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com> Cc: York Sun <yorksun@freescale.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * mmc: fsl_esdhc: Add adapter card type identification supportYangbo Lu2015-05-043-1/+46
| | | | | | | | | | | | | | | | | | | | | | | | Add adapter card type identification support by reading FPGA STAT_PRES1 register SDHC Card ID[0:2] bits. To use this function, define CONFIG_FSL_ESDHC_ADAPTER_IDENT. Signed-off-by: Yangbo Lu <yangbo.lu@freescale.com> Cc: York Sun <yorksun@freescale.com> Cc: Pantelis Antoniou <panto@antoniou-consulting.com> [York Sun: resolve conflicts in README.fsl-esdhc] Reviewed-by: York Sun <yorksun@freescale.com>
| * fsl/pci: Set CFG_READY for PCIe v3.0 and laterMinghuan Lian2015-05-041-1/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Freescale PCIe controllers v3.0 and later need to set bit CFG_READY to allow all inbound configuration transactions to be processed normally when in EP mode. However, bit CFG_READY has been moved from PCIe configuration space to CCSR PCIe configuration register comparing previous version. The patch is to set this bit according to PCIe version. Signed-off-by: Ed Swarthout <Ed.Swarthout@freescale.com> Signed-off-by: Roy Zang <tie-fei.zang@freescale.com> Signed-off-by: Minghuan Lian <Minghuan.Lian@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * T2080QDS/PCIe: Soft Reset PCIe on T2080QDS for down-training issueZhao Qiang2015-05-041-0/+15
| | | | | | | | | | | | | | | | | | T2080QDS PEX1/Slot#1 will down-train from x4 to x2, with SRDS_PRTCL_S1 = 0x66 and SRDS_PRTCL_S2 = 0x15. Soft reset PCIe can fix this issue. Signed-off-by: Zhao Qiang <B45475@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
| * drivers: usb: fsl: Workaround for Erratum A004477Nikhil Badola2015-05-041-0/+10
| | | | | | | | | | | | | | | | | | | | Add a delay of 1 microsecond before issuing soft reset to the controller to let ongoing ULPI transaction complete. This prevents corruption of ULPI Function Control Register which eventually prevents phy clock from entering to low power mode Signed-off-by: Nikhil Badola <nikhil.badola@freescale.com> Reviewed-by: York Sun <yorksun@freescale.com>
OpenPOWER on IntegriCloud