summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
...
* | usb: gadget: add Faraday FOTG210 USB gadget supportKuo-Jung Su2013-06-123-0/+957
| | | | | | | | | | | | | | | | The Faraday FOTG210 is an OTG chip which could operate as either an EHCI Host or a USB Device at a time. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
* | usb: ehci: add Faraday USB 2.0 EHCI supportKuo-Jung Su2013-06-123-0/+154
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support to both Faraday FUSBH200 and FOTG210, the differences between Faraday EHCI and standard EHCI are listed bellow: 1. The PORTSC starts at 0x30 instead of 0x44. 2. The CONFIGFLAG(0x40) is not only un-implemented, and also has its address space removed. 3. Faraday EHCI is a TDI design, but it doesn't compatible with the general TDI implementation found at both U-Boot and Linux. 4. The ISOC descriptors differ from standard EHCI in several ways. But since U-boot doesn't support ISOC, we don't have to worry about that. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
* | usb: ehci: add weak-aliased function for PORTSCKuo-Jung Su2013-06-121-4/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There is at least one non-EHCI compliant controller (i.e. Faraday EHCI) not only leave RESERVED and CONFIGFLAG registers un-implemented but also has their address spaces removed. As an result, the PORTSC register of Faraday EHCI always starts from 0x30 instead of 0x44 in standard EHCI. So that we'll need a weak-aliased function for abstraction. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
* | usb: ehci: prevent bad PORTSC register accessKuo-Jung Su2013-06-121-5/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The 'index' of ehci_submit_root() is not always > 0. e.g. While it gets invoked from usb_get_descriptor(), the 'index' is always a '0'. (See ch.9 of USB2.0) 2. The PORTSC register is not always required, and thus it should only report a port error when necessary. It would cause a port scan failure if the ehci_submit_root() always gets terminated by a port error. Signed-off-by: Kuo-Jung Su <dantesu@faraday-tech.com> CC: Marek Vasut <marex@denx.de>
* | usb: gadget: Use unaligned access for wMaxPacketSizeVivek Gautam2013-06-122-7/+9
| | | | | | | | | | | | | | | | | | | | | | | | Use get_unaligned() while fetching wMaxPacketSize to avoid voilating any alignment rules. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Piotr Wilczek <p.wilczek@samsung.com> Cc: Kyungmin Park <kyungmin.park@samsung.com> Cc: Lukasz Dalek <luk0104@gmail.com> Cc: Marek Vasut <marex@denx.de>
* | usb: asix: Move software resets to basic_initJulius Werner2013-06-121-23/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ASIX driver calls a basic_init() function during get_info(), so that not all initialization tasks need to be redone on every init(). Unfortunately, the most important one is still triggered too often: the driver does a full port and MII reset on every asix_init(), requiring up to several seconds to reestablish the link. This patch confines that software reset into the asix_basic_init() function so that it will only be executed once. This saves about a second of boot time on systems using BOOTP. Note: this patch was previously submitted many moons ago as: usb: usbeth: asix: Do a fast init if link already established That patch seens to have been lost or forgotten, so this is a rebased version. It is tested on snow with a Asix USB dongle (Cisco). Signed-off-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Simon Glass <sjg@chromium.org> Reviewed-by: Vadim Bendebury <vbendeb@chromium.org>
* | usb: Correct CLEAR_FEATURE code in ehci-hcdSimon Glass2013-06-121-4/+6
|/ | | | | | | | | | | | | | | This commit broke USB2 on link (Chromebook Pixel): 020bbcb usb: hub: Power-cycle on root-hub ports However the root cause seems to be a missing mask and missing 'break' in ehci-hcd.c. This patch fixes both. On link, 'usb start' with a USB keyboard and memory stick inserted now finds both. The keyboard works as expected. Also ext2ls shows a directory listing from the memory stick. Signed-off-by: Simon Glass <sjg@chromium.org>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-303-35/+45
|\ | | | | | | | | | | Conflicts: common/cmd_fpga.c drivers/usb/host/ohci-at91.c
| * OMAP5: Enable USB Ethernet support with LAN9730Lubomir Popov2013-05-141-0/+1
| | | | | | | | | | | | | | | | Added the LAN9730 to list of supported devices. This chip is used in the sEVM, uEVM and som5_evb. Tested on the som5_evb with dhcp and ping. Signed-off-by: Lubomir Popov <lpopov@mm-sol.com>
| * usb: common: Use a global definition for 'min3'Vivek Gautam2013-05-061-10/+0
| | | | | | | | | | | | | | | | | | We can use a common global method for calculating minimum of 3 numbers. Put the same in 'common header' and let 'ehci' use it. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Acked-by: Tom Rini <trini@ti.com>
| * USB: ohci-at91: make OHCI work on at91sam9g10 SoCBo Shen2013-05-051-2/+2
| | | | | | | | | | | | The at91sam9g10 need to configure HCK0 to make OHCI work Signed-off-by: Bo Shen <voice.shen@atmel.com>
| * usb: Add new command to set USB 2.0 port test modesJulius Werner2013-05-051-11/+14
| | | | | | | | | | | | | | | | | | This patch adds a new 'usb test' command, that will set a port to a USB 2.0 test mode (see USB 2.0 spec 7.1.20). It supports all five test modes on both downstream hub ports and ordinary device's upstream ports. In addition, it supports EHCI root hub ports. Signed-off-by: Julius Werner <jwerner@chromium.org>
| * USB: EHCI: Add weak functions to support new chipJim Lin2013-05-051-12/+28
| | | | | | | | | | | | | | Add ehci_get_port_speed() and ehci_set_usbmode() weak functions for platform driver to support new chip. Signed-off-by: Jim Lin <jilin@nvidia.com>
* | USB: ohci-at91: support sama5d3x devicesBo Shen2013-05-211-2/+12
| | | | | | | | | | | | | | Add OHCI support for sama5d3x devices Signed-off-by: Bo Shen <voice.shen@atmel.com> Signed-off-by: Andreas Bießmann <andreas.devel@googlemail.com>
* | Merge branch 'u-boot-ti/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-111-24/+24
|\ \
| * | twl4030: make twl4030_i2c_read_u8 prototype consistentNishanth Menon2013-05-101-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | u-boot standard i2c read prototype is i2c_read(addr, reg, 1, &buf, 1) twl4030_i2c_read_u8(u8 addr, u8 *val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_read_u8(u8 addr, u8 reg, u8 *val) Signed-off-by: Nishanth Menon <nm@ti.com>
| * | twl4030: make twl4030_i2c_write_u8 prototype consistentNishanth Menon2013-05-101-23/+23
| |/ | | | | | | | | | | | | | | | | | | | | | | u-boot standard i2c register write prototype is i2c_reg_write(u8 addr, u8 reg, u8 val) twl4030_i2c_write_u8(u8 addr, u8 val, u8 reg) does not provide consistency, so switch the prototype to be consistent with rest of u-boot i2c operations: twl4030_i2c_write_u8(u8 addr, u8 reg, u8 val) Signed-off-by: Nishanth Menon <nm@ti.com>
* | Merge branch 'u-boot-imx/master' into 'u-boot-arm/master'Albert ARIBAUD2013-05-111-73/+0
|\ \ | | | | | | | | | | | | | | | Conflicts: drivers/mtd/nand/mxc_nand_spl.c include/configs/m28evk.h
| * | imx: mx5: Remove legacy iomux supportBenoît Thébaudeau2013-05-051-73/+0
| |/ | | | | | | | | | | | | | | Legacy iomux support is no longer needed now that all boards have been converted to iomux-v3. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com> Reviewed-by: Marek Vasut <marex@denx.de>
* | pxa27x_udc: remove call to unimplemented set_GPIO_mode()Mike Dunn2013-05-051-1/+3
|/ | | | | | | | | | | | | | If CONFIG_USB_DEV_PULLUP_GPIO is defined, a link error occurs because the set_GPIO_mode() helper function is not implemented. This function doesn't do much except make the code a little more readable, so I just manually coded its equivalent and removed the prototype from the header file. It is invoked no where else in the code. While I was at it, I noticed that two other function prototypes in the same header file are also neither implemented nor invoked anywhere, so I removed them as well. Signed-off-by: Mike Dunn <mikedunn@newsguy.com>
* Merge branch 'u-boot/master' into 'u-boot-arm/master'Albert ARIBAUD2013-04-121-2/+0
|\ | | | | | | | | Conflicts: drivers/video/exynos_fb.c
| * Consolidate bool typeYork Sun2013-04-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | 'bool' is defined in random places. This patch consolidates them into a single header file include/linux/types.h, using stdbool.h introduced in C99. All other #define, typedef and enum are removed. They are all consistent with true = 1, false = 0. Replace FALSE, False with false. Replace TRUE, True with true. Skip *.py, *.php, lib/* files. Signed-off-by: York Sun <yorksun@freescale.com>
* | arm: Remove support for unused s3c64xxBenoît Thébaudeau2013-04-123-47/+0
| | | | | | | | | | | | | | | | Following the removal of the smdk6400 board, the s3c64xx SoC becomes unused, so remove associated code. It will still be possible to restore it later from the Git history if necessary. Signed-off-by: Benoît Thébaudeau <benoit.thebaudeau@advansee.com>
* | musb: set MUSB speed based on CONFIGBin Liu2013-04-082-1/+3
| | | | | | | | | | | | | | | | Do not config MUSB to highspeed mode if CONFIG_USB_GADGET_DUALSPEED is not set, in which case Ether gadget only operates in fullspeed. Reviewed-by: Tom Rini <trini@ti.com> Signed-off-by: Bin Liu <b-liu@ti.com>
* | musb: am335x: disable bulk split-combine featureBin Liu2013-04-081-0/+5
|/ | | | | | | | | | | | | | | | | | | On TI AM335x devices, MUSB has bulk split/combine feature enabled in the ConfigData register, but the current MUSB driver does not support it yet. Therefore, disable the feature for now, until the driver adds the support. One usecase which is broken because of this feature is that Ether gadget stops working in Fullspeed mode (by un-defining CONFIG_USB_GADGET_DUALSPEED) After desabled this feature, MUSB driver send packets in proper size (no more than 64 bytes) in Fullspeed mode. This has been validated with Ether gadget in Fullspeed mode on AM335x EVM. Signed-off-by: Bin Liu <b-liu@ti.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2013-03-1813-46/+3937
|\
| * usb: Add multiple controllers support for EHCI PCIVincent Palatin2013-03-181-9/+16
| | | | | | | | | | | | | | Use the ability to have several active EHCI controller on a system in the PCI EHCI controller implementation. Signed-off-by: Simon Glass <sjg@chromium.org>
| * usb: usbeth: smsc95xx: remove EEPROM loaded checkMichael Spang2013-03-181-4/+0
| | | | | | | | | | | | | | | | | | | | | | | | [port of Linux kernel commit bcd218be5aeb by Steve Glendinning] The eeprom read & write commands currently check the E2P_CMD_LOADED_ bit is set before allowing any operations. This prevents any reading or writing unless a correctly programmed EEPROM is installed. Signed-off-by: Michael Spang <spang@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
| * usb: ehci: Fix aliasing issue in EHCI interrupt codeVincent Palatin2013-03-181-1/+1
| | | | | | | | | | | | | | | | | | | | The interrupt endpoint handling code stores the buffer pointer in the QH padding field. We need to make it the size of a pointer to avoid strict aliasing issue with the compiler. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
| * usb: ehci: Support interrupt transfers via periodic listPatrick Georgi2013-03-182-5/+316
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Interrupt transfers aren't meant to be used from the async list (the EHCI spec indicates trouble with low/full-speed intr on async). Build a periodic list instead, and provide an API to make use of it. Then, use that API from the existing interrupt transfer API. This provides support for USB keyboards using EHCI. Use timeouts to ensure we cannot get stuck in the keyboard scanning if something wrong happens (USB device unplugged or fatal I/O error) Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Julius Werner <jwerner@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
| * usb: ehci: exynos: Enable non-dt pathVivek Gautam2013-03-181-0/+7
| | | | | | | | | | | | | | | | Enabling the non-dt path for the driver so that we don't get any build errors for non-dt configuration. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Acked-by: Simon Glass <sjg@chromium.org>
| * usb: ehci: exynos: Fix multiple FDT decodeVivek Gautam2013-03-181-28/+16
| | | | | | | | | | | | | | | | | | | | With current FDT support driver tries to parse device node twice in ehci_hcd_init() and ehci_hcd_stop(), which shouldn't happen ideally. Making provision to store data in a global structure and thereby passing its pointer when needed. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
| * usb:gadget: USB Mass Storage Gadget supportLukasz Majewski2013-03-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds the USB Mass Storage Gadget to u-boot New command called "ums" is implemented to provide access to on-device embedded persistent memory. USB Mass Storage is supposed to work on top of the USB Gadget framework Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Marek Vasut <marek.vasut@gmail.com>
| * usb:composite: USB Mass Storage - f_mass_storage.c from Linux kernelPiotr Wilczek2013-03-181-0/+2793
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The f_mass_storage.c source file from v2.6.36 Linux kernel. commit 8876f5e7d3b2a320777dd4f6f5301d474c97a06c Author: Michal Nazarewicz <m.nazarewicz@samsung.com> Date: Mon Jun 21 13:57:09 2010 +0200 USB: gadget: f_mass_storage: added eject callback Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Piotr Wilczek <p.wilczek@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Marek Vasut <marek.vasut@gmail.com>
| * usb:composite: USB Mass Storage - storage_common.c from Linux kernelLukasz Majewski2013-03-181-0/+653
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The storage_common.c source file from v2.6.36 Linux kernel. commit d26a6aa08b9f12b44fb1ee65625e7480d3d5bb81 Author: Michal Nazarewicz <m.nazarewicz@samsung.com> Date: Mon Nov 9 14:15:23 2009 +0100 USB: g_mass_storage: code cleaned up and comments updated Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Andrzej Pietrasiewicz <andrzej.p@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> CC: Marek Vasut <marek.vasut@gmail.com>
| * usb:composite:fix Provide function data when addressing device with only one ↵Lukasz Majewski2013-03-181-0/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | interface This commit fixes problems with some non-standard requests send with device address instead of interface address (bmRequestType.Receipent field). This happens with dfu-util (debian version: 0.5), which address non standard requests (like w_value=0x21 and bRequest=GET_DESCRIPTOR) to device. Without this fix, the above request is STALLED, and hence causes dfu-util to assume some standard configuration (packet size = 1024B instead of 4096B) In turn it displays following errors: Error obtaining DFU functional descriptor Warning: Assuming DFU version 1.0 Warning: Transfer size can not be detected ... Warning: Trying default transfer size 1024 This fix allows passing non-standard request to function setup code, where it shall be handled. Tested at: Trats (exynos4210) Tested with:DFU and UMS gadgets Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
| * usb/host/ehci: Add support for EHCI on spearVipin Kumar2013-03-162-0/+60
| | | | | | | | | | | | | | Add EHCI support for spear boards Signed-off-by: Armando Visconti <armando.visconti@st.com> Signed-off-by: Vipin Kumar <vipin.kumar@st.com>
| * usb: Fix bug when both DFU & ETHER are definedPantelis Antoniou2013-03-161-2/+8
| | | | | | | | | | | | | | | | | | | | | | When both CONFIG_USB_GADGET & CONFIG_USB_ETHER are defined the makefile links objects twice. This patch uses a Makefile specific idiom of 'if defined(CONFIG_USB_GADGET) || defined(CONFIG_USB_ETHER)' to handle the case. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * dfu: Properly zero out timeout valuePantelis Antoniou2013-03-161-0/+3
| | | | | | | | | | | | | | Zero out timeout value; letting it filled with undefined values ends up with the dfu host hanging. Signed-off-by: Pantelis Antoniou <panto@antoniou-consulting.com>
| * usb: ehci: Add 64-bit controller supportVincent Palatin2013-03-161-0/+3
| | | | | | | | | | | | | | | | On EHCI controller with 64-bit address space support, we must initialize properly the high word for the PCI bus master accesses. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Simon Glass <sjg@chromium.org>
| * usb: ehci: generic PCI supportVincent Palatin2013-03-161-1/+40
| | | | | | | | | | | | | | | | | | Instead of hardcoding the PCI IDs on the USB controller, use the PCI class to detect them. Ensure the busmaster bit is properly set in the PCI configuration. Signed-off-by: Simon Glass <sjg@chromium.org>
* | Merge branch 'u-boot-tegra/master' into 'u-boot-arm/master'Albert ARIBAUD2013-03-151-16/+530
|\ \
| * | tegra: usb: move [start|stop]_port into ehci_hcd_[init|stop]Lucas Stach2013-03-141-68/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The ehci_hcd entry points were just calling into the Tegra USB functions. Now that they are in the same file we can just move over the implementation. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
| * | tegra: usb: move implementation into right directoryLucas Stach2013-03-141-2/+533
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This moves the Tegra USB implementation into the drivers/usb/host directory. Note that this merges the old /arch/arm/cpu/armv7/tegra20/usb.c file into ehci-tegra.c. No code changes, just moving stuff around. v2: While at it also move some defines and the usb.h header file to make usb driver usable for Tegra30. NOTE: A lot more work is required to properly init the PHYs and PLL_U on Tegra30, this is just to make porting easier and it does no harm here. Signed-off-by: Lucas Stach <dev@lynxeye.de> Acked-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* | mxs: Make ehci-mxs multiport capableMarek Vasut2013-03-071-68/+81
| | | | | | | | | | | | | | | | | | | | | | Rework ehci-mxs so it supports both ports on MX28. It was necessary to wrap the per-port configuration into struct ehci_mxs_port and pull out the clock configuration function. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Stefano Babic <sbabic@denx.de>
* | mxs: Squash the header file usage in ehci-mxsMarek Vasut2013-03-071-5/+1
| | | | | | | | | | | | | | | | | | | | | | | | The ehci-mxs driver included the register definitions directly. Use imx-regs.h instead since it contains proper handling of the differences between mx23 and mx28. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Fabio Estevam <fabio.estevam@freescale.com> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Stefano Babic <sbabic@denx.de> Acked-by: Otavio Salvador <otavio@ossystems.com.br>
* | USB: drop unneeded header in ehci-mx6Stefano Babic2013-03-071-1/+0
|/ | | | | | | | | | | Including header for pads is not needed and breaks board after renaming pin definitions. Series-to: u-boot Series-cc: marex@denx.de,fabio.estevam@freescale.com,eric.nelson@boundarydevices.com Signed-off-by: Stefano Babic <sbabic@denx.de>
* Merge branch 'u-boot-samsung/master' into 'u-boot-arm/master'Albert ARIBAUD2013-01-141-7/+85
|\
| * EHCI: Exynos: Add fdt supportRajeshwari Shinde2013-01-081-7/+85
| | | | | | | | | | | | | | | | | | Adding fdt support to ehci-exynos in order to parse register base addresses from the device node. Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Signed-off-by: Rajeshwari Shinde <rajeshwari.s@samsung.com> Signed-off-by: Minkyu Kang <mk7.kang@samsung.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-armTom Rini2013-01-111-2/+4
|\ \
OpenPOWER on IntegriCloud