Skip to content

Commit 0990366

Browse files
Min Guogregkh
authored andcommitted
usb: musb: Add support for MediaTek musb controller
This adds support for MediaTek musb controller in host, peripheral and otg mode. There are some quirk of MediaTek musb controller, such as: -W1C interrupt status registers -Private data toggle registers -No dedicated DMA interrupt line Signed-off-by: Min Guo <[email protected]> Signed-off-by: Yonglong Wu <[email protected]> Signed-off-by: Bin Liu <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 9c93d7f commit 0990366

File tree

3 files changed

+591
-1
lines changed

3 files changed

+591
-1
lines changed

drivers/usb/musb/Kconfig

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,13 @@ config USB_MUSB_JZ4740
115115
depends on USB_MUSB_GADGET
116116
depends on USB=n || USB_OTG_BLACKLIST_HUB
117117

118+
config USB_MUSB_MEDIATEK
119+
tristate "MediaTek platforms"
120+
depends on ARCH_MEDIATEK || COMPILE_TEST
121+
depends on NOP_USB_XCEIV
122+
depends on GENERIC_PHY
123+
select USB_ROLE_SWITCH
124+
118125
config USB_MUSB_AM335X_CHILD
119126
tristate
120127

@@ -141,7 +148,7 @@ config USB_UX500_DMA
141148

142149
config USB_INVENTRA_DMA
143150
bool 'Inventra'
144-
depends on USB_MUSB_OMAP2PLUS
151+
depends on USB_MUSB_OMAP2PLUS || USB_MUSB_MEDIATEK
145152
help
146153
Enable DMA transfers using Mentor's engine.
147154

drivers/usb/musb/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ obj-$(CONFIG_USB_MUSB_DA8XX) += da8xx.o
2424
obj-$(CONFIG_USB_MUSB_UX500) += ux500.o
2525
obj-$(CONFIG_USB_MUSB_JZ4740) += jz4740.o
2626
obj-$(CONFIG_USB_MUSB_SUNXI) += sunxi.o
27+
obj-$(CONFIG_USB_MUSB_MEDIATEK) += mediatek.o
2728

2829

2930
obj-$(CONFIG_USB_MUSB_AM335X_CHILD) += musb_am335x.o

0 commit comments

Comments
 (0)