USB: gadget driver for LPC32xx
This patch adds a USB gadget driver for the LPC32xx ARM SoC. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
8b7c3b6810
commit
24a28e4283
5 changed files with 3581 additions and 0 deletions
28
Documentation/devicetree/bindings/usb/lpc32xx-udc.txt
Normal file
28
Documentation/devicetree/bindings/usb/lpc32xx-udc.txt
Normal file
|
@ -0,0 +1,28 @@
|
|||
* NXP LPC32xx SoC USB Device Controller (UDC)
|
||||
|
||||
Required properties:
|
||||
- compatible: Must be "nxp,lpc3220-udc"
|
||||
- reg: Physical base address of the controller and length of memory mapped
|
||||
region.
|
||||
- interrupts: The USB interrupts:
|
||||
* USB Device Low Priority Interrupt
|
||||
* USB Device High Priority Interrupt
|
||||
* USB Device DMA Interrupt
|
||||
* External USB Transceiver Interrupt (OTG ATX)
|
||||
- transceiver: phandle of the associated ISP1301 device - this is necessary for
|
||||
the UDC controller for connecting to the USB physical layer
|
||||
|
||||
Example:
|
||||
|
||||
isp1301: usb-transceiver@2c {
|
||||
compatible = "nxp,isp1301";
|
||||
reg = <0x2c>;
|
||||
};
|
||||
|
||||
usbd@31020000 {
|
||||
compatible = "nxp,lpc3220-udc";
|
||||
reg = <0x31020000 0x300>;
|
||||
interrupt-parent = <&mic>;
|
||||
interrupts = <0x3d 0>, <0x3e 0>, <0x3c 0>, <0x3a 0>;
|
||||
transceiver = <&isp1301>;
|
||||
};
|
|
@ -147,6 +147,17 @@ config USB_AT91
|
|||
dynamically linked module called "at91_udc" and force all
|
||||
gadget drivers to also be dynamically linked.
|
||||
|
||||
config USB_LPC32XX
|
||||
tristate "LPC32XX USB Peripheral Controller"
|
||||
depends on ARCH_LPC32XX
|
||||
select USB_ISP1301
|
||||
help
|
||||
This option selects the USB device controller in the LPC32xx SoC.
|
||||
|
||||
Say "y" to link the driver statically, or "m" to build a
|
||||
dynamically linked module called "lpc32xx_udc" and force all
|
||||
gadget drivers to also be dynamically linked.
|
||||
|
||||
config USB_ATMEL_USBA
|
||||
tristate "Atmel USBA"
|
||||
select USB_GADGET_DUALSPEED
|
||||
|
|
|
@ -26,6 +26,7 @@ obj-$(CONFIG_USB_CI13XXX_PCI) += ci13xxx_pci.o
|
|||
obj-$(CONFIG_USB_S3C_HSOTG) += s3c-hsotg.o
|
||||
obj-$(CONFIG_USB_S3C_HSUDC) += s3c-hsudc.o
|
||||
obj-$(CONFIG_USB_LANGWELL) += langwell_udc.o
|
||||
obj-$(CONFIG_USB_LPC32XX) += lpc32xx_udc.o
|
||||
obj-$(CONFIG_USB_EG20T) += pch_udc.o
|
||||
obj-$(CONFIG_USB_MV_UDC) += mv_udc.o
|
||||
mv_udc-y := mv_udc_core.o
|
||||
|
|
|
@ -37,6 +37,7 @@
|
|||
#define gadget_is_goku(g) (!strcmp("goku_udc", (g)->name))
|
||||
#define gadget_is_imx(g) (!strcmp("imx_udc", (g)->name))
|
||||
#define gadget_is_langwell(g) (!strcmp("langwell_udc", (g)->name))
|
||||
#define gadget_is_lpc32xx(g) (!strcmp("lpc32xx_udc", (g)->name))
|
||||
#define gadget_is_m66592(g) (!strcmp("m66592_udc", (g)->name))
|
||||
#define gadget_is_musbhdrc(g) (!strcmp("musb-hdrc", (g)->name))
|
||||
#define gadget_is_net2272(g) (!strcmp("net2272", (g)->name))
|
||||
|
@ -118,6 +119,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
|
|||
return 0x31;
|
||||
else if (gadget_is_dwc3(gadget))
|
||||
return 0x32;
|
||||
else if (gadget_is_lpc32xx(gadget))
|
||||
return 0x33;
|
||||
|
||||
return -ENOENT;
|
||||
}
|
||||
|
|
3538
drivers/usb/gadget/lpc32xx_udc.c
Normal file
3538
drivers/usb/gadget/lpc32xx_udc.c
Normal file
File diff suppressed because it is too large
Load diff
Loading…
Reference in a new issue