summaryrefslogtreecommitdiff
path: root/drivers/usb
Commit message (Collapse)AuthorAgeLines
* usb: gadget: dfu: correct size for USB_REQ_DFU_GETSTATE resultPatrick Delaunay2017-02-26-11/+11
| | | | | | | | | | | | | | | return the correct size for DFU_GETSTATE result (1 byte in DFU 1.1 spec) to avoid issue in USB protocol and the variable "value" is propagated to req->lenght as all the in the other request with answer - DFU_GETSTATUS - DFU_DNLOAD - DFU_UPLOAD Then the buffer is correctly treated in USB driver NB: it was the only request witch directly change "req->actual" Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
* usb: gadget: dfu: add functional descriptor in descriptor setPatrick Delaunay2017-02-26-1/+9
| | | | | | | | | | | The "DFU descriptor set" must contain the "DFU functional descriptor" but it is missing today in U-Boot code (cf: DFU spec 1.1, chapter 4.2 DFU Mode Descriptor Set) This patch only allocate buffer and copy DFU functional descriptor after interfaces. Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com> Signed-off-by: Patrick Delaunay <patrick.delaunay73@gmail.com>
* usb: dwc3: gadget: Remove unused header inclusionVincent Tinelli2017-02-26-1/+0
| | | | | | | Remove sys_proto.h inclusion which is not used by the driver. Signed-off-by: Vincent Tinelli <vincent.tinelli@intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
* dm: core: Replace of_offset with accessorSimon Glass2017-02-08-23/+25
| | | | | | | | | At present devices use a simple integer offset to record the device tree node associated with the device. In preparation for supporting a live device tree, which uses a node pointer instead, refactor existing code to access this field through an inline function. Signed-off-by: Simon Glass <sjg@chromium.org>
* drivers: usb: gadget: ether: Fix compiler warningLokesh Vutla2017-01-17-0/+2
| | | | | | | | | | | Latest gcc 6.2 compiler is throwing the below warning for am335x_baltos_defconfig drivers/usb/gadget/ether.c:501:17: warning: 'mdlm_detail_desc' defined but not used [-Wunused-const-variable=] static const u8 mdlm_detail_desc[] = { Guard mdlm_detail_desc with CONFIG_USB_ETH_SUBSET to avoid the warning Reported-by: Dan Murphy <dmurphy@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
* usb: ehci-mx6: handle vbus-supplyPeng Fan2017-01-17-3/+27
| | | | | | | | | | Drop board_ehci_power when dm usb used and switch to use regulator api to handle vbus. Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de>
* usb: ehci-mx6: implement ofdata_to_platdataPeng Fan2017-01-17-0/+75
| | | | | | | | | | | | Implement ofdata_to_platdata to set the type to host or device. - Check "dr-mode" property. - If there is no "dr-mode", check phy_ctrl for i.MX6 and phy_status for i.MX7 Signed-off-by: Peng Fan <peng.fan@nxp.com> Cc: Marek Vasut <marex@denx.de> Cc: Simon Glass <sjg@chromium.org> Cc: Stefano Babic <sbabic@denx.de>
* drivers: usb: Add USB_XHCI_ZYNQMP to KconfigMichal Simek2017-01-17-0/+6
| | | | | | Move symbol to Kconfig to cleanup configuration file. Signed-off-by: Michal Simek <michal.simek@xilinx.com>
* usb: dwc2-otg: remove unused variableMasahiro Yamada2017-01-17-2/+0
| | | | | | | | | | | GCC 6.1 complains about this. drivers/usb/gadget/dwc2_udc_otg.c:72:19: warning: 'driver_desc' defined but not used [-Wunused-const-variable=] static const char driver_desc[] = DRIVER_DESC; ^~~~~~~~~~~ Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* drivers: usb: gadget: ether/rndis: convert driver to adopt device driver modelMugunthan V N2017-01-09-15/+174
| | | | | | Adopt usb ether gadget and rndis driver to adopt driver model Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com>
* Update Maintainer and Author's email addressAjay Bhargav2016-12-27-2/+2
| | | | | | | | I am not longer using my old email address "ajay.bhargav@einfochips.com". For U-Boot development email address is now updated to contact@8051projects.net Signed-off-by: Ajay Bhargav <contact@8051projects.net>
* net: usb: r8152: Use ALLOC_CACHE_ALIGN_BUFFER() to allocate the buffersStefan Roese2016-12-08-6/+16
| | | | | | | | | | | | | | | | Testing on theadorable (Armada XP) has shown, that using this driver results in many cache misaligned warning, such as: CACHE: Misaligned operation at range [7fabd8fc, 7fabd900] This patch now uses the ALLOC_CACHE_ALIGN_BUFFER() macro to allocate the buffers on a cache aligned boundary. This fixes all warnings seen on the Armada XP platform. Signed-off-by: Stefan Roese <sr@denx.de> Cc: Ted Chen <tedchen@realtek.com> Cc: Joe Hershberger <joe.hershberger@ni.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* usb: xhci-pci: Add DM supportStefan Roese2016-12-06-0/+81
| | | | | | | | | | | | | | | | | | This patch adds DM support to the xHCI PCI driver. Enabling its use e.g. in x86 platforms. Status: On the congatec BayTrail SoM, xHCI still does not work correctly with this patch. Some internal timeouts lead to resets (BUG). Additional work is needed here. I'm posting this version as WIP so that other developers interested in this support might use it as a start. I might get back to it in a few weeks as well. Signed-off-by: Stefan Roese <sr@denx.de> Cc: George McCollister <george.mccollister@gmail.com> Cc: Simon Glass <sjg@chromium.org> Cc: Bin Meng <bmeng.cn@gmail.com> Cc: Marek Vasut <marex@denx.de> Reviewed-by: Simon Glass <sjg@chromium.org>
* fsl/usb: enable the errata-a005697 for ls1012ajerry.huang@nxp.com2016-12-05-0/+4
| | | | | | | Enable the errata-a005697 for ls1012a Signed-off-by: Changming Huang <jerry.huang@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* usb: gadget: remove unused shortname variableAndre Przywara2016-12-04-1/+0
| | | | | | | | | | | The shortname variable isn't referenced anywhere in the code, so just remove it. Pointed out by a GCC 6.2 default warning option. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: eth: r8152_fw: fix indentationAndre Przywara2016-12-04-4/+4
| | | | | | | | | | | Apparently the indentation is wrong here, fix this to avoid compiler warnings and puzzled readers. Pointed out by GCC 6.2's -Wmisleading-indentation warning. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Marek Vasut <marex@denx.de> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* Merge branch 'master' of git://www.denx.de/git/u-boot-dmTom Rini2016-12-03-64/+391
|\
| * drivers: usb: musb: add ti musb host driver with driver model supportMugunthan V N2016-12-02-0/+191
| | | | | | | | | | | | | | | | | | Add a TI MUSB host driver with driver model support and the driver will be bound by the MUSB wrapper driver based on the dr_mode device tree entry. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * drivers: usb: musb: adopt musb backend driver to driver modelMugunthan V N2016-12-02-11/+11
| | | | | | | | | | | | | | | | | | | | Currently all backend driver ops uses hard coded physical address, so to adopt the driver to DM, add device pointer to ops call backs so that drivers can get physical addresses from the usb driver priv/plat data. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * drivers: usb: musb: add ti musb misc driver for wrapperMugunthan V N2016-12-02-0/+74
| | | | | | | | | | | | | | | | Add a misc driver for MUSB wrapper, so that based on dr_mode the USB devices can bind to USB host or USB device drivers. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
| * drivers: usb: gadget: ether: prepare driver for driver model migrationMugunthan V N2016-12-02-21/+52
| | | | | | | | | | | | | | prepare driver for driver model migration Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * drivers: usb: gadget: ether: use net device priv to pass usb ether privMugunthan V N2016-12-02-25/+21
| | | | | | | | | | | | | | | | | | Use net device priv to pass usb ether priv and use it in net device ops callback. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * drivers: usb: gadget: ether: consolidate global devices to single structMugunthan V N2016-12-02-27/+26
| | | | | | | | | | | | | | | | | | | | Consolidate the net device, usb eth device and gadget device struct to single struct and a single global variable so that the same can be passed as priv of ethernet driver. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * drivers: usb: gadget: ether: adopt to usb driver modelMugunthan V N2016-12-02-0/+36
| | | | | | | | | | | | | | | | Convert usb ether gadget to adopt usb driver model Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
| * drivers: usb: gadget: ether: access network_started using local variableMugunthan V N2016-12-02-5/+5
| | | | | | | | | | | | | | | | | | network_started of struct eth_dev can be accessed using local variable dev and no reason to access it with the global struct. Signed-off-by: Mugunthan V N <mugunthanvnm@ti.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* | ARM: DRA7x/AM57xx: Get rid of CONFIG_AM57XXNishanth Menon2016-12-03-2/+2
|/ | | | | | | | | | | CONFIG_AM57XX is just an unnecessary macro that is redundant given So, remove the same instead of spreading through out the u-boot source code and getting in the way to maintain common code for DRA7x family. Acked-by: Andrew F. Davis <afd@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* spl: add USB Gadget config optionStefan Agner2016-11-28-1/+2
| | | | | | | | | Introduce USB Gadget config option. This allows to combine Makefile entries for SPL_USBETH_SUPPORT and SPL_DFU_SUPPORT. Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Acked-by: Lukasz Majewski <l.majewski@samsung.com> Tested-by: Ravi Babu <ravibabu@ti.com>
* spl: dfu: move DFU Kconfig to SPL KconfigStefan Agner2016-11-28-2/+6
| | | | | | | | | | | | | | | | The DFU Kconfig menu entries should be part of the SPL Kconfig file. Also avoid using the top level Makefile by moving the config dependent build artifacts to the driver/ and driver/usb/gadget/ Makfiles. With that, DFU can be built again in SPL if CONFIG_SPL_DFU_SUPPORT is enabled. Fixes: 6ad6102246d8 ("usb:gadget: Disallow DFU in SPL for now") Signed-off-by: Stefan Agner <stefan.agner@toradex.com> Reviewed-by: Simon Glass <sjg@chromium.org> Acked-by: Lukasz Majewski <l.majewski@samsung.com>
* Fix spelling of "resetting".Vagrant Cascadian2016-10-31-2/+2
| | | | | | | | Cover-Letter: Fixes several spelling errors for the words "resetting", "extended", "occur", and "multiple". Signed-off-by: Vagrant Cascadian <vagrant@debian.org> Reviewed-by: Simon Glass <sjg@chromium.org>
* Merge branch 'master' of http://git.denx.de/u-boot-sunxiTom Rini2016-10-30-3/+5
|\
| * sunxi: A64: enable USB supportAmit Singh Tomar2016-10-30-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Mostly by adding MACH_SUN50I to some existing #ifdefs enable support for the the HCI0 USB host controller on the A64. Fix up some minor 64-bit hiccups on the way. Add the bare minimum DT bits to the A64 .dtsi and enable the controllers and the PHY on the Pine64. This is limited to the first USB controller at the moment, which is connected to the lower USB socket on the Pine64 board. [Andre: remove unneeded defines, enable OHCI, add commit message] Signed-off-by: Amit Singh Tomar <amittomer25@gmail.com> Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Signed-off-by: Hans de Goede <hdegoede@redhat.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-10-29-33/+21
|\ \ | |/ |/|
| * drivers: USB: OHCI: allow compilation for 64-bit targetsAndre Przywara2016-10-29-15/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | OHCI has a known limitation of allowing only 32-bit DMA buffer addresses, so we have a lot of u32 variables around, which are assigned to pointers and vice versa. This obviously creates issues with 64-bit systems, so the compiler complains here and there. To allow compilation for 64-bit boards which use only memory below 4GB anyway (and to avoid more invasive fixes), adjust some casts and types and assume that the EDs and TDs are all located in the lower 4GB. This fixes compilation of the OHCI driver for the Pine64. Signed-off-by: Andre Przywara <andre.przywara@arm.com> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
| * usb: xhci-mvebu: use xhci_deregister() for .remove callbackMasahiro Yamada2016-10-27-6/+1
| | | | | | | | | | | | No need to use a wrapper that is equivalent to xhci_deregister(). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
| * usb: ehci-vf: use ehci_deregister() for .remove callbackMasahiro Yamada2016-10-27-12/+1
| | | | | | | | | | | | | | | | This driver was recently converted to Driver Model, so missed the subsystem-wide cleanups by commit 405273427366 ("usb: replace ehci_*_remove() with usb_deregister()"). Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com>
* | usb: ehci-atmel: Remove unnecessary clock callingWenyou Yang2016-10-28-15/+0
|/ | | | | | | | Due to the peripheral clock driver improvement, remove the unnecessary clock calling. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Reviewed-by: Andreas Bießmann <andreas@biessmann.org>
* Remove some merge markersSimon Glass2016-10-23-3/+3
| | | | | | | | | | These two files have patch merge markers in them, within comments or strings. Remove then, so that a search for merge markers does not show up matches in these files. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Tom Rini <trini@konsulko.com> Reviewed-by: Jagan Teki <jteki@openedev.com>
* net: smsc95xx: fix DM MAC address readingStephen Warren2016-10-13-0/+16
| | | | | | | | | | | | | | | | | | | eth-uclass.c expects DM-capable Ethernet adapters to implement ops-> read_rom_hwaddr(), or for some other mechanism to set pdata->enetaddr, or for the user to set environment variable $usbethaddr. Without any of these, it will refuse to initialize the device since no valid MAC address is known. Implement this function for the smsc95xx driver. With this feature implemented, there is no point smsc95xx_init_common() re-reading the MAC address from ROM, so ifdef out this code when DM_ETH is enabled. This allows (at least) the built-in Ethernet on the NVIDIA Harmony board to operate again. Fixes: 0990fcb77219 ("net: smsc95xx: Add driver-model support") Signed-off-by: Stephen Warren <swarren@nvidia.com> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* usb: pci: Fix cast for 64-bit compilationSimon Glass2016-10-11-2/+2
| | | | | | | Fix a cast that causes warnings on 64-bit machines. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Merge branch 'master' of git://git.denx.de/u-boot-usbTom Rini2016-09-30-54/+277
|\ | | | | | | | | | | | | Signed-off-by: Tom Rini <trini@konsulko.com> Conflicts: include/configs/dra7xx_evm.h
| * drivers: usb: xhci-fsl: Implement Erratum A-010151 for FSL USB3 controllerSriram Dash2016-09-27-0/+39
| | | | | | | | | | | | | | | | | | | | | | Currently the controller by default enables the Receive Detect feature in P3 mode in USB 3.0 PHY. However, USB 3.0 PHY does not reliably support receive detection in P3 mode. Enabling the USB3 controller to configure USB in P2 mode whenever the Receive Detect feature is required. Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com>
| * usb: fsl: Renaming fdt_fixup_erratum and fdt_fixup_usb_erratumSriram Dash2016-09-27-22/+23
| | | | | | | | | | | | | | | | The functions fdt_fixup_erratum and fdt_fixup_usb_erratum are fsl/nxp specific. So, make them explicit by renaming them fsl_fdt_fixup_erratum and fsl_fdt_fixup_usb_erratum Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
| * usb: fsl: Rename fdt_fixup_dr_usbSriram Dash2016-09-27-1/+1
| | | | | | | | | | | | | | | | The function fdt_fixup_dr_usb is specific to fsl/nxp. So, make the function name explicit and rename fdt_fixup_dr_usb into fsl_fdt_fixup_dr_usb. Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
| * usb: host: ehci-vf: Migrate Vybrid USB to driver modelSanchayan Maity2016-09-27-7/+201
| | | | | | | | | | | | Add driver model support for Vybrid USB driver. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
| * drivers: usb: xhci-fsl: Change burst beat and outstanding pipelined ↵Sriram Dash2016-09-27-0/+10
| | | | | | | | | | | | | | | | | | | | | | transfers requests This is required for better performance, and performs below tuning: 1. Enable burst length set, and define it as 4/8/16. 2. Set burst request limit to 16 requests. Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Signed-off-by: Sriram Dash <sriram.dash@nxp.com>
| * net: asix: Fix ASIX 88772B with driver modelAlban Bedel2016-09-27-24/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit 147271209a9d ("net: asix: fix operation without eeprom") added a special handling for ASIX 88772B that enable another type of header. This break the driver in DM mode as the extra handling needed in the receive path is missing. However this new header mode is not required and only seems to increase the code complexity, so this patch revert this part of commit 147271209a9d. This also reverts commit 41d1258aceb45b45f9e68f67a9c40f0afbc09dc9 ("net: asix: Fix AX88772B when used with DriverModel") of late. Fixes: 147271209a9d ("net: asix: fix operation without eeprom") Signed-off-by: Alban Bedel <alban.bedel@avionic-design.de> Signed-off-by: Marcel Ziswiler <marcel.ziswiler@toradex.com>
* | mpc85xx: powerpc: usb: Update the list of Socs afftected by erratum A006261Sriram Dash2016-09-28-9/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Apply the erratum A006261 for the following Socs: P2041 rev 2.0, P2040 rev 2.0, P5040 rev 2.0, 2.1 Do not apply erratum A006261 for the following Socs: T4160, T4080, T1040, T1042, T1020, T1022, T2080, T2081 Erratum A006261 is applicable for the following Socs: P1010(1.0, 2.0), P2041(1.0, 1.1, 2.0, 2.1), P2040(1.0, 1.1, 2.0, 2.1), P3041(1.0, 1.1, 2.0, 2.1), P5010(1.0, 2.0), P5020(1.0, 2.0), P5021(1.0, 2.0), T4240(1.0, 2.0), P5040(1.0,2.0,2.1). Signed-off-by: Sriram Dash <sriram.dash@nxp.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@nxp.com> Reviewed-by: York Sun <york.sun@nxp.com>
* | Merge branch 'master' of git://git.denx.de/u-boot-tegraTom Rini2016-09-27-2/+11
|\ \
| * | ARM: tegra: fix USB ULPI PHY reset signal inversion confusionStephen Warren2016-09-27-2/+11
| |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | USB ULPI PHY reset signals are typically active low. Consequently, they should be marked as GPIO_ACTIVE_LOW in device tree, and indeed they are in the Linux kernel DTs, and in DT properties that U-Boot doesn't yet use. However, in DT properties that U-Boot does use, the value has been set to 0 (== GPIO_ACTIVE_HIGH) to work around a bug in U-Boot. This change fixes the DT to correctly represent the HW, and fixes the Tegra USB driver to cope with the fact that dm_gpio_set_value() internally handles any inversions implied by the DT value GPIO_ACTIVE_LOW. Cc: Marcel Ziswiler <marcel.ziswiler@toradex.com> Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Simon Glass <sjg@chromium.org> Signed-off-by: Tom Warren <twarren@nvidia.com>
* | Merge git://www.denx.de/git/u-boot-marvellTom Rini2016-09-27-7/+159
|\ \