Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 5be19a9d authored by Xiaochen Shen's avatar Xiaochen Shen Committed by Greg Kroah-Hartman
Browse files

USB: Add Intel Langwell USB Device Controller driver



Intel Langwell USB Device Controller is a High-Speed USB OTG device
controller in Intel Moorestown platform. It can work in OTG device mode
with Intel Langwell USB OTG transceiver driver as well as device-only
mode. The number of programmable endpoints is different through
controller revision.

NOTE:
This patch is the first version Intel Langwell USB OTG device controller
driver. The bug fixing is on going for some hardware and software
issues.  Intel Langwell USB OTG transceiver driver and EHCI driver
patches will be submitted later.

Supported features:
 - USB OTG protocol support with Intel Langwell USB OTG transceiver
   driver (turn on CONFIG_USB_LANGWELL_OTG)
 - Support control, bulk, interrupt and isochronous endpoints
   (isochronous not tested)
 - PCI D0/D3 power management support
 - Link Power Management (LPM) support

Tested gadget drivers:
 - g_file_storage
 - g_ether
 - g_zero

The passed tests:
 - g_file_storage: USBCV Chapter 9 tests
 - g_file_storage: USBCV MSC tests
 - g_file_storage: from/to host files copying
 - g_ether: ping, ftp and scp files from/to host
 - Hotplug, with and without hubs

Known issues:
 - g_ether: failed part of USBCV chap9 tests
 - LPM support not fully tested

TODO:
 - g_ether: pass all USBCV chap9 tests
 - g_zero: pass usbtest tests
 - Stress tests on different gadget drivers
 - On-chip private SRAM caching support

Signed-off-by: default avatarXiaochen Shen <xiaochen.shen@intel.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@suse.de>
parent f9c99bb8
Loading
Loading
Loading
Loading
+21 −0
Original line number Original line Diff line number Diff line
@@ -474,6 +474,27 @@ config USB_GOKU
	default USB_GADGET
	default USB_GADGET
	select USB_GADGET_SELECTED
	select USB_GADGET_SELECTED


config USB_GADGET_LANGWELL
	boolean "Intel Langwell USB Device Controller"
	depends on PCI
	select USB_GADGET_DUALSPEED
	help
	   Intel Langwell USB Device Controller is a High-Speed USB
	   On-The-Go device controller.

	   The number of programmable endpoints is different through
	   controller revision.

	   Say "y" to link the driver statically, or "m" to build a
	   dynamically linked module called "langwell_udc" and force all
	   gadget drivers to also be dynamically linked.

config USB_LANGWELL
	tristate
	depends on USB_GADGET_LANGWELL
	default USB_GADGET
	select USB_GADGET_SELECTED



#
#
# LAST -- dummy/emulated controller
# LAST -- dummy/emulated controller
+1 −0
Original line number Original line Diff line number Diff line
@@ -26,6 +26,7 @@ obj-$(CONFIG_USB_M66592) += m66592-udc.o
obj-$(CONFIG_USB_FSL_QE)	+= fsl_qe_udc.o
obj-$(CONFIG_USB_FSL_QE)	+= fsl_qe_udc.o
obj-$(CONFIG_USB_CI13XXX)	+= ci13xxx_udc.o
obj-$(CONFIG_USB_CI13XXX)	+= ci13xxx_udc.o
obj-$(CONFIG_USB_S3C_HSOTG)	+= s3c-hsotg.o
obj-$(CONFIG_USB_S3C_HSOTG)	+= s3c-hsotg.o
obj-$(CONFIG_USB_LANGWELL)	+= langwell_udc.o


#
#
# USB gadget drivers
# USB gadget drivers
+8 −0
Original line number Original line Diff line number Diff line
@@ -137,6 +137,12 @@
#define gadget_is_musbhdrc(g)	0
#define gadget_is_musbhdrc(g)	0
#endif
#endif


#ifdef CONFIG_USB_GADGET_LANGWELL
#define gadget_is_langwell(g)	(!strcmp("langwell_udc", (g)->name))
#else
#define gadget_is_langwell(g)	0
#endif

/* from Montavista kernel (?) */
/* from Montavista kernel (?) */
#ifdef CONFIG_USB_GADGET_MPC8272
#ifdef CONFIG_USB_GADGET_MPC8272
#define gadget_is_mpc8272(g)	!strcmp("mpc8272_udc", (g)->name)
#define gadget_is_mpc8272(g)	!strcmp("mpc8272_udc", (g)->name)
@@ -231,6 +237,8 @@ static inline int usb_gadget_controller_number(struct usb_gadget *gadget)
		return 0x22;
		return 0x22;
	else if (gadget_is_ci13xxx(gadget))
	else if (gadget_is_ci13xxx(gadget))
		return 0x23;
		return 0x23;
	else if (gadget_is_langwell(gadget))
		return 0x24;
	return -ENOENT;
	return -ENOENT;
}
}


Loading