1cae8dc3bSGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0 2550a7375SFelipe Balbi# 3550a7375SFelipe Balbi# USB Dual Role (OTG-ready) Controller Drivers 4550a7375SFelipe Balbi# for silicon based on Mentor Graphics INVENTRA designs 5550a7375SFelipe Balbi# 6550a7375SFelipe Balbi 7550a7375SFelipe Balbi# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller 8550a7375SFelipe Balbiconfig USB_MUSB_HDRC 9a9762b70SArnd Bergmann tristate 'Inventra Highspeed Dual Role Controller' 10845c071bSEzequiel Garcia depends on (USB || USB_GADGET) 1117987ea5SVegard Nossum depends on HAS_IOMEM 12550a7375SFelipe Balbi help 13550a7375SFelipe Balbi Say Y here if your system has a dual role high speed USB 14550a7375SFelipe Balbi controller based on the Mentor Graphics silicon IP. Then 15550a7375SFelipe Balbi configure options to match your silicon and the board 16550a7375SFelipe Balbi it's being used with, including the USB peripheral role, 17550a7375SFelipe Balbi or the USB host role, or both. 18550a7375SFelipe Balbi 1957bfc0a7SPeter Meerwald Texas Instruments families using this IP include DaVinci 20a227fd7dSDavid Brownell (35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010. 21550a7375SFelipe Balbi 22744543c5SHans de Goede Allwinner SoCs using this IP include A10, A13, A20, ... 23744543c5SHans de Goede 24550a7375SFelipe Balbi If you do not know what this is, please say N. 25550a7375SFelipe Balbi 261376d92fSFelipe Balbi To compile this driver as a module, choose M here; the 271376d92fSFelipe Balbi module will be called "musb-hdrc". 28550a7375SFelipe Balbi 29c6bde9b5SFelipe Contrerasif USB_MUSB_HDRC 30c6bde9b5SFelipe Contreras 317c925546SFelipe Balbichoice 32b7b741eaSDaniel Mack bool "MUSB Mode Selection" 33b7b741eaSDaniel Mack default USB_MUSB_DUAL_ROLE if (USB && USB_GADGET) 34b7b741eaSDaniel Mack default USB_MUSB_HOST if (USB && !USB_GADGET) 35b7b741eaSDaniel Mack default USB_MUSB_GADGET if (!USB && USB_GADGET) 36b7b741eaSDaniel Mack 37b7b741eaSDaniel Mackconfig USB_MUSB_HOST 38b7b741eaSDaniel Mack bool "Host only mode" 39845c071bSEzequiel Garcia depends on USB=y || USB=USB_MUSB_HDRC 40b7b741eaSDaniel Mack help 41b7b741eaSDaniel Mack Select this when you want to use MUSB in host mode only, 42b7b741eaSDaniel Mack thereby the gadget feature will be regressed. 43b7b741eaSDaniel Mack 44b7b741eaSDaniel Mackconfig USB_MUSB_GADGET 45b7b741eaSDaniel Mack bool "Gadget only mode" 46845c071bSEzequiel Garcia depends on USB_GADGET=y || USB_GADGET=USB_MUSB_HDRC 473f83e538SGeert Uytterhoeven depends on HAS_DMA 48b7b741eaSDaniel Mack help 49b7b741eaSDaniel Mack Select this when you want to use MUSB in gadget mode only, 50b7b741eaSDaniel Mack thereby the host feature will be regressed. 51b7b741eaSDaniel Mack 52b7b741eaSDaniel Mackconfig USB_MUSB_DUAL_ROLE 53b7b741eaSDaniel Mack bool "Dual Role mode" 54845c071bSEzequiel Garcia depends on ((USB=y || USB=USB_MUSB_HDRC) && (USB_GADGET=y || USB_GADGET=USB_MUSB_HDRC)) 553f83e538SGeert Uytterhoeven depends on HAS_DMA 56b7b741eaSDaniel Mack help 57b7b741eaSDaniel Mack This is the default mode of working of MUSB controller where 58b7b741eaSDaniel Mack both host and gadget features are enabled. 59b7b741eaSDaniel Mack 60b7b741eaSDaniel Mackendchoice 61b7b741eaSDaniel Mack 6282c02f58STony Lindgrencomment "Platform Glue Layer" 63550a7375SFelipe Balbi 64744543c5SHans de Goedeconfig USB_MUSB_SUNXI 65744543c5SHans de Goede tristate "Allwinner (sunxi)" 66744543c5SHans de Goede depends on ARCH_SUNXI 67744543c5SHans de Goede depends on NOP_USB_XCEIV 68744543c5SHans de Goede depends on PHY_SUN4I_USB 69744543c5SHans de Goede depends on EXTCON 70a84014e1SSamuel Holland select GENERIC_PHY 71744543c5SHans de Goede select SUNXI_SRAM 72744543c5SHans de Goede 737c925546SFelipe Balbiconfig USB_MUSB_DA8XX 741376d92fSFelipe Balbi tristate "DA8xx/OMAP-L1x" 757c925546SFelipe Balbi depends on ARCH_DAVINCI_DA8XX 76a0cb12e2SArnd Bergmann depends on NOP_USB_XCEIV 77947c49afSDavid Lechner select PHY_DA8XX_USB 783ee076deSSergei Shtylyov 797c925546SFelipe Balbiconfig USB_MUSB_TUSB6010 801376d92fSFelipe Balbi tristate "TUSB6010" 8149f77e3dSVegard Nossum depends on HAS_IOMEM 82a687a533SArnd Bergmann depends on ARCH_OMAP2PLUS || COMPILE_TEST 83a3f2fd22SArnd Bergmann depends on NOP_USB_XCEIV!=m || USB_MUSB_HDRC=m 84550a7375SFelipe Balbi 857c925546SFelipe Balbiconfig USB_MUSB_OMAP2PLUS 861376d92fSFelipe Balbi tristate "OMAP2430 and onwards" 871c390eb3SArnd Bergmann depends on ARCH_OMAP2PLUS && USB 881c390eb3SArnd Bergmann depends on OMAP_CONTROL_PHY || !OMAP_CONTROL_PHY 893e3101d5SKishon Vijay Abraham I select GENERIC_PHY 90085ad406SBryan Wu 919ecb8875SAjay Kumar Guptaconfig USB_MUSB_DSPS 929ecb8875SAjay Kumar Gupta tristate "TI DSPS platforms" 93c0442479STony Lindgren depends on ARCH_OMAP2PLUS || COMPILE_TEST 94eff196adSFelipe Balbi depends on OF_IRQ 959ecb8875SAjay Kumar Gupta 964bc36fd3SMian Yousaf Kaukabconfig USB_MUSB_UX500 971860c925SLinus Walleij tristate "Ux500 platforms" 98c0442479STony Lindgren depends on ARCH_U8500 || COMPILE_TEST 994bc36fd3SMian Yousaf Kaukab 10010434d27SApelete Seketeliconfig USB_MUSB_JZ4740 10110434d27SApelete Seketeli tristate "JZ4740" 102c12aa5beSPaul Cercueil depends on OF 103874b08baSPaul Cercueil depends on MIPS || COMPILE_TEST 10410434d27SApelete Seketeli depends on USB_MUSB_GADGET 1055004eaa2SPaul Cercueil select USB_ROLE_SWITCH 10610434d27SApelete Seketeli 1070990366bSMin Guoconfig USB_MUSB_MEDIATEK 1080990366bSMin Guo tristate "MediaTek platforms" 1090990366bSMin Guo depends on ARCH_MEDIATEK || COMPILE_TEST 1100990366bSMin Guo depends on NOP_USB_XCEIV 111fde1fbedSRandy Dunlap select GENERIC_PHY 1120990366bSMin Guo select USB_ROLE_SWITCH 1130990366bSMin Guo 1147a96b6eaSConor Dooleyconfig USB_MUSB_POLARFIRE_SOC 1157a96b6eaSConor Dooley tristate "Microchip PolarFire SoC platforms" 116*a20bf02aSConor Dooley depends on ARCH_MICROCHIP_POLARFIRE || COMPILE_TEST 1177a96b6eaSConor Dooley depends on NOP_USB_XCEIV 1187a96b6eaSConor Dooley select USB_MUSB_DUAL_ROLE 1197a96b6eaSConor Dooley help 1207a96b6eaSConor Dooley Say Y here to enable support for USB on Microchip's PolarFire SoC. 1217a96b6eaSConor Dooley 1227a96b6eaSConor Dooley This support is also available as a module. If so, the module 1237a96b6eaSConor Dooley will be called mpfs. 1247a96b6eaSConor Dooley 1252f0bb2a0STony Lindgrencomment "MUSB DMA mode" 1262f0bb2a0STony Lindgren 1272f0bb2a0STony Lindgrenconfig MUSB_PIO_ONLY 1282f0bb2a0STony Lindgren bool 'Disable DMA (always use PIO)' 129550a7375SFelipe Balbi help 1302f0bb2a0STony Lindgren All data is copied between memory and FIFO by the CPU. 1312f0bb2a0STony Lindgren DMA controllers are ignored. 1322f0bb2a0STony Lindgren 1332f0bb2a0STony Lindgren Do not choose this unless DMA support for your SOC or board 1342f0bb2a0STony Lindgren is unavailable (or unstable). When DMA is enabled at compile time, 1352f0bb2a0STony Lindgren you can still disable it at run time using the "use_dma=n" module 1362f0bb2a0STony Lindgren parameter. 1372f0bb2a0STony Lindgren 1382f0bb2a0STony Lindgrenif !MUSB_PIO_ONLY 139550a7375SFelipe Balbi 140d2389440SMian Yousaf Kaukabconfig USB_UX500_DMA 1411860c925SLinus Walleij bool 'ST Ericsson Ux500' 1422e7fc3baSArnd Bergmann depends on USB_MUSB_UX500 143d2389440SMian Yousaf Kaukab help 144d2389440SMian Yousaf Kaukab Enable DMA transfers on UX500 platforms. 145d2389440SMian Yousaf Kaukab 146550a7375SFelipe Balbiconfig USB_INVENTRA_DMA 1472e7fc3baSArnd Bergmann bool 'Inventra' 1487a96b6eaSConor Dooley depends on USB_MUSB_OMAP2PLUS || USB_MUSB_MEDIATEK || USB_MUSB_JZ4740 || USB_MUSB_POLARFIRE_SOC 149550a7375SFelipe Balbi help 150550a7375SFelipe Balbi Enable DMA transfers using Mentor's engine. 151550a7375SFelipe Balbi 1529b3452d1SSebastian Andrzej Siewiorconfig USB_TI_CPPI41_DMA 153d6299b6eSAlexandre Bailon bool 'TI CPPI 4.1' 154d6299b6eSAlexandre Bailon depends on (ARCH_OMAP || ARCH_DAVINCI_DA8XX) && DMADEVICES 155411dd19cSGeorge Cherian select TI_CPPI41 1569b3452d1SSebastian Andrzej Siewior 157550a7375SFelipe Balbiconfig USB_TUSB_OMAP_DMA 1582e7fc3baSArnd Bergmann bool 'TUSB 6010' 15970c1ff4bSArnd Bergmann depends on USB_MUSB_TUSB6010 = USB_MUSB_HDRC # both built-in or both modules 160550a7375SFelipe Balbi depends on ARCH_OMAP 161550a7375SFelipe Balbi help 162550a7375SFelipe Balbi Enable DMA transfers on TUSB 6010 when OMAP DMA is available. 163550a7375SFelipe Balbi 1642f0bb2a0STony Lindgrenendif # !MUSB_PIO_ONLY 165c6bde9b5SFelipe Contreras 166c6bde9b5SFelipe Contrerasendif # USB_MUSB_HDRC 167