summaryrefslogtreecommitdiff
path: root/drivers/usb
Commit message (Collapse)AuthorAgeLines
* MA-7373 - [brillo]: store slot meta data in a raw partition, no file system.fang hui2015-12-24-96/+251
| | | | | | | | | | | | Partition name change from slotmeta to misc. Read/write raw data on partition misc, not use ext4 file system. Store meta in bootloader_message.slot_suffix, as defined in bootable/recovery/bootloader.h The first 4 bytes of boot_ctl are defined as magic number. Signed-off-by: fang hui <b31070@freescale.com>
* MA-7251 - [evk_6ul]: Support boot conctrol for brillofang hui2015-11-13-24/+550
| | | | | | | | | brillo need bootlader support boot control. bootlader can choose which slot(partition) to boot based on it's tactic. The commit support boot control for evk6ul Signed-off-by: fang hui <b31070@freescale.com>
* MA-7157 Check the error log in fastboot flashzhang sanshan2015-11-06-0/+2
| | | | | | | | The fastboot.exe will get var partition-type:* firstly when "fastboot flash * *". The uboot did not support get var partition-type: default. This patch mask info the error when gat cat partition-type. Signed-off-by: zhang sanshan <b51434@freescale.com>
* MLK-11823 USB:gadget Fix USB port interface issue in ci_udc driverYe.Li2015-11-04-1/+1
| | | | | | | | | | | | | The ci_udc driver tries to use the ULPI interface for the USB OTG controller, but this type is not supported by all i.MX6 and i.MX7 platforms. When setting to ULPI, other platforms except the 6UL refuse the settings and keep default value. But on 6UL, the PTW bit of PORTSC1 register which is documented as RO can change. This cause the interface setting problem with USB PHY. Fix the issue by removing the ULPI setting for i.MX6 and i.MX7. All will use default UTMI setting. Signed-off-by: Ye.Li <B37916@freescale.com>
* MA-6928 Bootargs cannot be setzhang sanshan2015-07-28-20/+0
| | | | | | | | | The bootargs is not set correctly. The final bootargs consist of uboot's bootargs and bootimg's bootargs. This patch set bootimg's bootargs as final bootargs if uboot's bootargs is not set. And take uboot's bootargs as final bootargs if uboot's bootargs is set. Signed-off-by: zhang sanshan <b51434@freescale.com>
* MA-6924 [Android_MX6_MX7] fastboot: 'fastboot reboot-bootloader' do not workzhang sanshan2015-07-27-6/+6
| | | | | | | | 'fastboot reboot-bootloader' is took as 'fastboot reboot' in V2015.04. The length of fastboot command is decided by the length of cmd_dispatch_info's cmd. So need put reboot-bootloader in front of reboot. Signed-off-by: zhang sanshan <b51434@freescale.com>
* MLK-11228-3 android: Add "data" partition in fastbootYe.Li2015-07-13-6/+13
| | | | | | | | | Enable fastboot command "fastboot flash data" Custom may need to update data partition in fastboot mode. This patch enable flash data partition in emmc\sd. Signed-off-by: Zhang Sanshan <b51434@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com>
* MLK-11228-2 android: Add fastboot command "reboot-bootloader" supportYe.Li2015-07-13-3/+17
| | | | | | | | | enable fastboot command: "fastboot reboot-bootloader" After type this command, the board will reboot to bootloader mode. Set ANDROID_FASTBOOT_BOOT flag in SNVS_LPGPR before reboot. Signed-off-by: Zhang Sanshan <b51434@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com>
* MLK-11228-1 android: Integrate community fastboot with FSL i.MX fastbootYe.Li2015-07-13-2/+1746
| | | | | | | | | | | | | | | | | | | | | 1. Replace the UDC driver with community's USB gadget d_dnl driver. 2. Integrate the FSL SD/SATA/NAND flash operations, since the GPT and EFI partitions are not support by i.MX. 3. Add FDT support to community's android image. 4. Change the booti command to boota, due to the booti has been used for ARM64 image boot. 5. Modify boota implementation to load ramdisk and fdt to their loading addresses specified in boot.img header, while bootm won't do it for android image. 6. Modify the android image HAB implementation. Authenticate the boot.img on the "load_addr" for both SD and NAND. 7. Enable new configuration CONFIG_FSL_FASTBOOT for Freescale's fastboot with relevant header file "fsl_fastboot.h". While disabling the configuration, the community fastboot is used. 8. Use community's way to combine cmdline in boot.img and u-boot environment, not overwrite the cmdline in boot.img Signed-off-by: Ye.Li <B37916@freescale.com>
* MLK-10363-1 udc: Update i.MX udc driver to support MX7Ye.Li2015-04-29-6/+7
| | | | | | | | | Update driver codes and registers define for MX7. Implement udc callback function in MX7 arch. Signed-off-by: Ye.Li <B37916@freescale.com> (cherry picked from commit e55c4f7bf5a66b34c2d01c42bac667cb3789b0c1) Signed-off-by: Peng Fan <Peng.Fan@freescale.com>
* MLK-10774-33 imx:mx6 add udc and fastboot supportPeng Fan2015-04-29-0/+1191
| | | | | | | | | | | | Add udc and fastboot support We did not use the upstream way. Currently use CI_UDC and USB_GAGDET of upstream can make fastboot work, but lack of flash operation, so we still use our way. Signed-off-by: Peng Fan <Peng.Fan@freescale.com> Signed-off-by: Nitin Garg <nitin.garg@freescale.com> Signed-off-by: Ye.Li <B37916@freescale.com>
* MLK-10178-2 usb:ehci-mx7 add usb driver for i.MX7DYe.Li2015-04-29-0/+106
| | | | | | | | Add usb driver for i.MX7D. Signed-off-by: Ye.Li <B37916@freescale.com> Signed-off-by: Peng Fan <Peng.Fan@freescale.com> (cherry picked from commit c78f52798d6b7dda775d272c3ccb9899e548d3d6)
* sunxi: musb: Fix some lo speed devices not working with musb hostHans de Goede2015-03-29-0/+14
| | | | | | | | | | | | | | | | The usb0 / otg phy on sunxi boards has a bug where it wrongly detects a high speed squelch on usb reset deassert when a lo speed device is plugged in. The android kernel has a work around for this in the form of temporary disabling the phy's squelch detection on reset deassert, this commit adds the same workaround to the u-boot sunxi musb code, thereby fixing various usb lo speed devices not working. Tested with a (before non working) usb keyboard and a usb 2.4 GHz wireless keyboard/mouse combo receiver. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* net: Add ethernet FCS length macro in net.hBin Meng2015-03-24-2/+0
| | | | | | | | | Some ethernet drivers use their own version of ethernet FCS length macro which is really common. We define ETH_FCS_LEN in net.h and replace those custom versions in various places. Signed-off-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* sunxi: musb: Return early on VBUS GPIO error instead of on a positive valuePaul Kocialkowski2015-03-21-1/+1
| | | | | | | | | This allows printing the error message when VBUS is detected, as it would with AXP VBUS detect. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* ARM: UniPhier: adjust device trees for business transferMasahiro Yamada2015-03-15-4/+6
| | | | | | | Panasonic's System LSI products, UniPhier SoC family, have been transferred to Socionext Inc. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* sunxi: musb: Support checking VBUS using AXP221 PMICChen-Yu Tsai2015-03-10-14/+38
| | | | | | | | | | | | | | | | This enables the musb glue layer to use the AXP221's VBUS detection function to check for VBUS. This fixes otg support on the A23 q8h tablets. Note that u-boot never calls musb_shutdown(), so once VBUS is enabled, it is never disabled until the system is powered off, or the OS does so. This can be used to our advantage to keep VBUS powered into the OS, where support for AXP221 is not available yet. Fixes: 52defe8f6570 ("sunxi: musb: Check Vbus-det before enabling otg port power") Signed-off-by: Chen-Yu Tsai <wens@csie.org> Acked-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* Merge git://git.denx.de/u-boot-usbTom Rini2015-03-02-6/+95
|\
| * usb: gadget: fastboot: Set the Serial Number for Fastboot GadgetDileep Katta2015-02-25-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | Configure the serial number using the serial# environment variable during the fastboot bind. This enables "fastboot devices" to return the serial number for the attached devices. Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Acked-by: Steve Rae <srae@broadcom.com> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
| * fastboot: OUT transaction length must be aligned to wMaxPacketSizeDileep Katta2015-02-25-5/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | OUT transactions must be aligned to wMaxPacketSize for each transfer, or else transfer will not complete successfully. This patch modifies rx_bytes_expected to return a transfer length that is aligned to wMaxPacketSize. Note that the value of wMaxPacketSize and ep->maxpacket may not be the same value, and it is the value of wMaxPacketSize that should be used for alignment. wMaxPacketSize is passed depending on the speed of connection. Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
| * usb: gadget: fastboot: Add fastboot eraseDileep Katta2015-02-25-0/+25
| | | | | | | | | | | | | | | | | | | | | | | | Adds the fastboot erase functionality, to erase a partition specified by name. The erase is performed based on erase group size, to avoid erasing other partitions. The start address and the size is aligned to the erase group size for this. Currently only supports erasing from eMMC. Signed-off-by: Dileep Katta <dileep.katta@linaro.org> Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
| * fastboot: add support for "oem format" commandRob Herring2015-02-25-0/+11
| | | | | | | | | | | | | | | | | | | | | | Add "oem format" command to write partition table. This relies on the env variable partitions to contain the list of partitions as required by the gpt command. Note that this does not erase any data other than the partition table. Signed-off-by: Rob Herring <robh@kernel.org> Reviewed-by: Steve Rae <srae@broadcom.com>
| * fastboot: add "fastboot oem" command supportMichael Scott2015-02-25-0/+15
| | | | | | | | | | | | | | | | | | Add code stub to handle "fastboot oem __" command. As unlock is a common fastboot command, distinguish that it is not implemented. Signed-off-by: Michael Scott <michael.scott@linaro.org> Signed-off-by: Rob Herring <robh@kernel.org> Tested-by: Steve Rae <srae@broadcom.com>
| * usb: musb-new: omap2430: Reset the MUSB controller earlyPaul Kocialkowski2015-02-24-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When booting from USB peripheral boot, the bootrom will not properly deinit the MUSB controller, which doesn't clearly indicate an USB disconnection to the host and leaves U-Boot to deal with the state of the previous USB session. On some host controller drivers (e.g. xhci_hcd), this ends up in a failure during set address, caused by the lack of proper disconnection notification. Resetting the controller early in U-Boot notifies the host of the disconnection and doesn't hurt other use cases. Signed-off-by: Paul Kocialkowski <contact@paulk.fr> Reviewed-by: Tom Rini <trini@ti.com>
| * exynos: usb: make dwc3_set_mode to staticJoonyoung Shim2015-02-24-1/+1
| | | | | | | | | | | | | | The dwc3_set_mode function is used only in drivers/usb/host/xhci-exynos5.c so make it to static. Signed-off-by: Joonyoung Shim <jy0922.shim@samsung.com>
* | usb: UniPhier: add UniPhier on-chip xHCI host driver supportMasahiro Yamada2015-03-01-0/+94
| | | | | | | | | | | | | | Support xHCI host driver used on Panasonic UniPhier platform. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* | ARM: UniPhier: move uniphier_ehci_reset() functionMasahiro Yamada2015-03-01-1/+14
| | | | | | | | | | | | | | | | Because uniphier_ehci_reset() is only called from ehci-uniphier.c, it can be a static function there. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* | ARM: UniPhier: remove EHCI platform devicesMasahiro Yamada2015-03-01-14/+2
| | | | | | | | | | | | | | | | | | | | | | Now UniPhier platform highly depends on Device Tree configuration (CONFIG_OF_CONTROL is select'ed by Kconfig). Since the EHCI is only used on main U-Boot, we can drop platform devices of the EHCI controllers. We still keep UART platform devices because they might be useful for SPL. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com> Acked-by: Marek Vasut <marex@denx.de>
* | ARM: UniPhier: include <mach/*.h> instead of <asm/arch/*.h>Masahiro Yamada2015-03-01-1/+1
|/ | | | | | | | | Since commit 0e7368c6c426 (kbuild: prepare for moving headers into mach-*/include/mach), we can replace #include <asm/arch/*.h> with <mach/*.h> so we do not need to create the symbolic link during the build. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
* sunxi: musb: Check Vbus-det before enabling otg port powerHans de Goede2015-02-21-0/+29
| | | | | | | | | | | | Sending out 5V when there is a charger connected to the otg port is not a good idea, so check for this and error out. Note this commit currently breaks otg support on the q8h tablets, as we need to do some magic with the pmic there to get vbus info, this is deliberate (better safe then sorry), fixing this is on my TODO list. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* sunxi: otg: Fix peripheral modeHans de Goede2015-02-16-12/+1
| | | | | | | | Peripheral mode needs us to signal vusb high to the phy for it to work, just like the host mode does. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* usb: pci: Add XHCI driver for PCISimon Glass2015-02-05-0/+61
| | | | | | | | Add a driver which locates the available XHCI controllers on the PCI bus and makes them available. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* usb: pci: Use pci_find_class() to find the deviceSimon Glass2015-02-05-52/+1
| | | | | | | Use the new utility function instead of local code. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* dm: usb: Remove use of fdtdec GPIO supportSimon Glass2015-01-29-30/+28
| | | | | | These functions are going away, so use the new uclass support instead. Signed-off-by: Simon Glass <sjg@chromium.org>
* usb: eth: asix88179: add ability to modify MAC addressRene Griessl2015-01-18-0/+14
| | | | | | | This patch enables U-Boot to modify the MAC address of the AX88179. Tested on RECS5250 (similar to Arndale5250) Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
* musb-new: Add interrupt queue supportHans de Goede2015-01-18-0/+65
| | | | | | | Add interrupt queue support, so that a usb keyboard can be used without causing huge latencies. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Add urb and hep parameters to construct_urbHans de Goede2015-01-18-32/+31
| | | | | | | | Make construct_urb take an urb and hep parameter, rather then having it always operate on the file global urb and hep structs. This is a preperation patch for adding interrupt queue support. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Properly remove a transfer from the schedule on timeoutHans de Goede2015-01-18-3/+14
| | | | | | | | | | | If a transfer / urb times-out, properly remove it from the schedule, rather then letting it sit on the ep head. This stops the musb code from getting confused and refusing to queue further transfers after a timeout. Tested by unplugging a usb-keyboard, replugging it and doing a usb-reset, before this commit the keyboard would not work after the usb-reset. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Fix reset sequence when in host modeHans de Goede2015-01-18-11/+20
| | | | | | | | | | | | | | | | | | | | | | This commit fixes a number of issues with the reset sequence of musb-new in host mode: 1) Our usb device probe relies on a second device reset being done after the first descriptors read. Factor the musb reset code into a usb_reset_root_port function (and add this as an empty define for other controllers), and call this when a device has no parent. 2) Just like with normal usb controllers there needs to be a delay after reset, for normal usb controllers, this is handled in hub_port_reset, add a delay to usb_reset_root_port. 3) Sync the musb reset sequence with the upstream kernel, clear all bits of power except bits 4-7, and increase the time reset is asserted to 50 ms. With these fixes an usb keyboard I have now always enumerates properly, where as earlier it would only enumerare properly once every 5 tries. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Fix interrupt transfers not workingHans de Goede2015-01-18-1/+1
| | | | | | | | | | | | | | For bulk and ctrl transfers common/usb.c sets udev->status = USB_ST_NOT_PROC, but it does not do so for interrupt transfers. musb_uboot.c: submit_urb() however was waiting for USB_ST_NOT_PROC to become 0, and thus without anyone setting USB_ST_NOT_PROC would exit immediately for interrupt urbs, returning the urb status of EINPROGRESS as error. This commit fixes this, thereby also making usb_kbd.c work together with musb_new and CONFIG_SYS_USB_EVENT_POLL. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Use time based timeouts rather then cpu-cycles based timeoutsHans de Goede2015-01-18-8/+8
| | | | | | | | | | | | CPU cycle based timeouts are no good, because how long they use depends on CPU speed. Instead use time based timeouts, and wait one second for a device connection to show up (per the USB spec), and wait USB_TIMEOUT_MS for various urbs to complete. This fixes "usb start" taking for ever when no device is plugged into the otg port. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Add sunxi musb controller supportHans de Goede2015-01-18-0/+280
| | | | | | | This is based on Jussi Kivilinna's work for the linux-sunxi-3.4 kernel to use the kernels musb driver instead of Allwinners own custom driver. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* musb-new: Add register defines for different reg layout on sunxiHans de Goede2015-01-18-0/+92
| | | | | | | The sunxi SoCs also have a musb controller, but with a different register layout. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: Add an interval parameter to create_int_queueHans de Goede2015-01-18-2/+2
| | | | | | | | Currently create_int_queue is only implemented by the ehci code, and that does not honor interrupt intervals, but other drivers which might also want to implement create_int_queue may honor intervals, so add an interval param. Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* usb: gadget: pxa25x_udc: fix use-before-initialized bugAlex Sadovsky2015-01-18-2/+2
| | | | | | | | | | | Fix use-before-initialized bug in pxa25x_udc driver. Function usb_gadget_register_driver calls udc_disable, and udc_disable calls pullup_off that uses dev->mach->udc_command. But dev->mach is initialized in usb_gadget_register_driver after calling udc_disable. This patch fixes the order of initialization. Signed-off-by: Alex Sadovsky <Nable.MainInbox@googlemail.com>
* usb: gadget: f_dfu: Add get_alt function to pass the USB compliance testStefan Roese2015-01-18-0/+8
| | | | | | | | | | | | | | | | | | | | Without this function the USB compliance test (USB 2.0 Command Verifier) will fail in the "Interface Descriptor Test" with this error message: FAIL (1.2.51) A successful GetInterface request must return the alternate setting set by a prior call to SetInterface. Lets add this function to read back the value so that the DFU device fully passes the USB compliance test. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Roger Meier <r.meier@siemens.com> Cc: Samuel Egli <samuel.egli@siemens.com> Cc: Enrico Leto <enrico.leto@siemens.com> Acked-by: Heiko Schocher <hs@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* usb: gadget: composite: Fix NULL pointer crash in USB compliance testStefan Roese2015-01-18-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the DXR2 board (AM335x using MUSB) the USB compliance test suite (USB 2.0 Command Verifier) will cause the board to crash and reset upon the "BOS Descriptor Test - Addressed state". Here the output from the DRX2 while running this test: GADGET DRIVER: usb_dnl_dfu musb-hdrc: peripheral reset irq lost! composite_setup (776) data abort pc : [<87f693ac>] lr : [<87f6911c>] sp : 86f33a58 ip : 00000000 fp : 86f3bbac r10: 00000f00 r9 : 86f33ef4 r8 : 86f37da8 r7 : 00000005 r6 : 86f33a90 r5 : 00000000 r4 : 86f37e30 r3 : 00000000 r2 : 00000000 r1 : 87f9c888 r0 : 00000016 Flags: Nzcv IRQs off FIQs on Mode SVC_32 Resetting CPU ... resetting ... By adding the case statement for USB_DT_BOS and therefore not running into the default case (jump to unkown label) this crash is fixed. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Roger Meier <r.meier@siemens.com> Cc: Samuel Egli <samuel.egli@siemens.com> Cc: Enrico Leto <enrico.leto@siemens.com> Acked-by: Heiko Schocher <hs@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Marek Vasut <marex@denx.de>
* sunxi: Move usb-controller init code out of ehci-sunxi.c for reuse for otgHans de Goede2015-01-14-203/+10
| | | | | | | | | | Most of the usb-controller init code found in ehci-sunxi.c also is necessary to init the otg usb controller, so move it to a common place. While at it also update various #ifdefs / defines for sun8i support. Signed-off-by: Hans de Goede <hdegoede@redhat.com> Acked-by: Ian Campbell <ijc@hellion.org.uk>
* usb: eth: add ASIX AX88179 DRIVERRene Griessl2014-12-31-0/+708
| | | | | | | | | | This patch adds driver support for the ASIX AX88179 USB3.0 to GbE network adapter. Driver has been tested on the RECS5250 COM module (similar to ARDALE5250). Testcase was DHCP and PXE boot. Signed-off-by: Rene Griessl <rgriessl@cit-ec.uni-bielefeld.de>
* gadget: f_thor: check pointers before use in download_tail()Przemyslaw Marczak2014-12-18-2/+14
| | | | | | | | | | Some pointers in function download_tail() were not checked before the use. This could possibly cause the data abort. To avoid this, check if the pointers are not null is added. Signed-off-by: Przemyslaw Marczak <p.marczak@samsung.com> Tested-by: Lukasz Majewski <l.majewski@samsung.com> [TestHW: Exynos4412-Trats2]