exynos: dts: Add USB VBUS GPIOs to the device tree

This patch adds a new samsung,vbus-gpio parameter to the device tree, in
preparation of replacing the currently hardcoded VBUS GPIO mechanism in
exynos5-dt.c with a device tree controlled solution, just as it already
exists in the Linux kernel.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com>
Cc: Simon Glass <sjg@chromium.org>
Cc: Minkyu Kang <mk7.kang@samsung.com>
Cc: Marek Vasut <marex@denx.de>
ARM: OMAP5: Power: Add new function to turn on SMPS10

Add new functionality to turn on SMPS10 regulator.
This supplies the VBUS to devices connected to the
USB host ports

Signed-off-by: Dan Murphy <dmurphy@ti.com>
ARM: OMAP5: Add registers and defines for USBOTG SS

Add the prcm registers and the bit definitions to enable the
USB SS port of the OMAP5 device.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAP5: USB: Add OMAP xHCI file and header

Add the OMAP file for the xHCI Host controller
This code will initilialize the proper components within the
OMAP5 to enable the xHCI host controller.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
OMAP5-uevm: USB: Add xHCI host contoller support

Add the call back into the board file for to enable
the SMPS10 VBUS regulator.

Signed-off-by: Dan Murphy <dmurphy@ti.com>
usb: gadget: ether set wMaxPacketSize

set wMaxPacketSize for full speed descriptors
fs_source_desc, fs_sink_desc to 64.

Full-speed bulk endpoint can have a maximum packet size of
8, 16, 32, or 64 bytes, so choice 64.

The hs_source_desc, hs_sink_desc, already have their wMaxPacketSize
set to 512. That is the only legal value for high speed bulk endpoints.

Strictly speaking, this patch is not needed because
usb_ep_autoconfig will call ep_matches which will
override wMaxPacketSize for BULK endpoints only with
the size associated with the endpoint setup by the udc driver.
But if you want to rely on this, you may as well combine the
full speed descriptor with the high speed descriptor to
minimize confusion.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: ether: return error from rx_submit if no request

This prevents a crash if tftpboot is given a bad filename.

rx_req will be released by eth_reset_config
which is called by eth_disconnect,
which is called using the .disconnect member of usb_gadget_driver by mv_pullup in mv_udc
which is called using the .pullup member of usb_gadget_ops by usb_gadget_disconnect
which is called by usb_eth_halt
which is called using the .halt member of eth_device by eth_halt
which is called by TftpHandler when TFTP_ERR_FILE_NOT_FOUND or TFTP_ERR_ACCESS_DENIED occurs

I trigger this with the following commands
setenv ipaddr 10.0.0.2 && setenv netmask 255.255.255.0 && setenv serverip 10.0.0.1
setenv usbnet_devaddr 00:11:22:33:44:55 && setenv usbnet_hostaddr 00:aa:bb:cc:dd:ee
setenv ethprime usb_ether && setenv ethact usb_ether && setenv ncip 10.0.0.1
tftpboot 10800000 10.0.0.1:missing_file

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: fix typo in error message

Change 'nfo=' to 'info='

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: set is_dualspeed = 1

This controller support full and high speed.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: flush item before head

Make sure the transfer descriptor is flushed
before the queue is updated so that the controller
will not see old information.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: zero transfer descriptor memory on probe

Since we flush the TD, we may as well set it to a known value.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: gadget: mv_udc: clear desc upon ep_disable

desc is set at ep_enable, so for symmetry,
clear it at ep_disable.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
mx6: iomux: add GPR1 defines for use with nitrogen6x

Select GPIO1 as the USB OTG ID pin for Nitrogen6x

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
nitrogen6x: add otg usb host/device mode support

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
nitrogen6x: add CONFIG_MV_UDC

Also, add other USB related config items.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
usb: new board-specific USB init interface

This commit unifies board-specific USB initialization implementations
under one symbol (usb_board_init), declaration of which is available in
usb.h.

New API allows selective initialization of USB controllers whenever needed.

Signed-off-by: Mateusz Zalega <m.zalega@samsung.com>
Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com>
Reviewed-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
Cc: Lukasz Majewski <l.majewski@samsung.com>
usb:smsx95xx LED activity for USB net driver

Add LED activity for SMSX95XX USB Ether driver.

Signed-off-by: “Suriyan Ramasami" <suriyan.r@gmail.com>
Acked-by: Simon Glass <sjg@chromium.org>
usb:udc:s3c: Reduce dcache invalidate range for UDC receive buffer

The s3c udc driver sends data in a max packet size. Therefore the dcache
invalidate range shall be equal to max packet, not the entire
DMA_BUFFER_SIZE.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
Cc: Marek Vasut <marex@denx.de>
dfu:core: Find DFU alt setting number by passing its name

New function - dfu_get_alt() - has been added to dfu core. If present, it
returns alt setting's number corresponding to passed name.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
dfu:core: Export dfu_{get|free}_buf functions

Define the dfu_get_buf() and dfu_free_buf() as global functions.
They are necessary for zero copy buffer management, when DFU backend is
used for storing data.

Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>