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

Commit 744543c5 authored by Hans de Goede's avatar Hans de Goede Committed by Felipe Balbi
Browse files

usb: musb: sunxi: Add support for the Allwinner sunxi musb controller



This is based on initial code to get the Allwinner sunxi musb controller
supported by Chen-Yu Tsai and Roman Byshko.

This adds support for the Allwinner sunxi musb controller in both host only
and otg mode. Peripheral only mode is not supported, as no boards use that.

This has been tested on a cubietruck (A20 SoC) and an UTOO P66 tablet
(A13 SoC) with a variety of devices in host mode and with the g_serial gadget
driver in peripheral mode, plugging otg / host cables in/out a lot of times
in all possible imaginable plug orders.

Signed-off-by: default avatarHans de Goede <hdegoede@redhat.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent 4cfbd952
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
Allwinner sun4i A10 musb DRC/OTG controller
-------------------------------------------

Required properties:
 - compatible      : "allwinner,sun4i-a10-musb"
 - reg             : mmio address range of the musb controller
 - clocks          : clock specifier for the musb controller ahb gate clock
 - interrupts      : interrupt to which the musb controller is connected
 - interrupt-names : must be "mc"
 - phys            : phy specifier for the otg phy
 - phy-names       : must be "usb"
 - dr_mode         : Dual-Role mode must be "host" or "otg"
 - extcon          : extcon specifier for the otg phy

Example:

	usb_otg: usb@01c13000 {
		compatible = "allwinner,sun4i-a10-musb";
		reg = <0x01c13000 0x0400>;
		clocks = <&ahb_gates 0>;
		interrupts = <38>;
		interrupt-names = "mc";
		phys = <&usbphy 0>;
		phy-names = "usb";
		extcon = <&usbphy 0>;
		status = "disabled";
	};
+12 −1
Original line number Diff line number Diff line
@@ -5,7 +5,7 @@

# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller
config USB_MUSB_HDRC
	tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, ...)'
	tristate 'Inventra Highspeed Dual Role Controller (TI, ADI, AW, ...)'
	depends on (USB || USB_GADGET)
	help
	  Say Y here if your system has a dual role high speed USB
@@ -20,6 +20,8 @@ config USB_MUSB_HDRC
	  Analog Devices parts using this IP include Blackfin BF54x,
	  BF525 and BF527.

	  Allwinner SoCs using this IP include A10, A13, A20, ...

	  If you do not know what this is, please say N.

	  To compile this driver as a module, choose M here; the
@@ -60,6 +62,15 @@ endchoice

comment "Platform Glue Layer"

config USB_MUSB_SUNXI
	tristate "Allwinner (sunxi)"
	depends on ARCH_SUNXI
	depends on NOP_USB_XCEIV
	depends on PHY_SUN4I_USB
	depends on EXTCON
	depends on GENERIC_PHY
	select SUNXI_SRAM

config USB_MUSB_DAVINCI
	tristate "DaVinci"
	depends on ARCH_DAVINCI_DMx
+1 −0
Original line number Diff line number Diff line
@@ -20,6 +20,7 @@ obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
obj-$(CONFIG_USB_MUSB_BLACKFIN)			+= blackfin.o
obj-$(CONFIG_USB_MUSB_UX500)			+= ux500.o
obj-$(CONFIG_USB_MUSB_JZ4740)			+= jz4740.o
obj-$(CONFIG_USB_MUSB_SUNXI)			+= sunxi.o


obj-$(CONFIG_USB_MUSB_AM335X_CHILD)		+= musb_am335x.o
+703 −0

File added.

Preview size limit exceeded, changes collapsed.