18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0 28c2ecf20Sopenharmony_ci# 38c2ecf20Sopenharmony_ci# USB Dual Role (OTG-ready) Controller Drivers 48c2ecf20Sopenharmony_ci# for silicon based on Mentor Graphics INVENTRA designs 58c2ecf20Sopenharmony_ci# 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ci# (M)HDRC = (Multipoint) Highspeed Dual-Role Controller 88c2ecf20Sopenharmony_ciconfig USB_MUSB_HDRC 98c2ecf20Sopenharmony_ci tristate 'Inventra Highspeed Dual Role Controller' 108c2ecf20Sopenharmony_ci depends on (USB || USB_GADGET) 118c2ecf20Sopenharmony_ci depends on HAS_IOMEM 128c2ecf20Sopenharmony_ci help 138c2ecf20Sopenharmony_ci Say Y here if your system has a dual role high speed USB 148c2ecf20Sopenharmony_ci controller based on the Mentor Graphics silicon IP. Then 158c2ecf20Sopenharmony_ci configure options to match your silicon and the board 168c2ecf20Sopenharmony_ci it's being used with, including the USB peripheral role, 178c2ecf20Sopenharmony_ci or the USB host role, or both. 188c2ecf20Sopenharmony_ci 198c2ecf20Sopenharmony_ci Texas Instruments families using this IP include DaVinci 208c2ecf20Sopenharmony_ci (35x, 644x ...), OMAP 243x, OMAP 3, and TUSB 6010. 218c2ecf20Sopenharmony_ci 228c2ecf20Sopenharmony_ci Allwinner SoCs using this IP include A10, A13, A20, ... 238c2ecf20Sopenharmony_ci 248c2ecf20Sopenharmony_ci If you do not know what this is, please say N. 258c2ecf20Sopenharmony_ci 268c2ecf20Sopenharmony_ci To compile this driver as a module, choose M here; the 278c2ecf20Sopenharmony_ci module will be called "musb-hdrc". 288c2ecf20Sopenharmony_ci 298c2ecf20Sopenharmony_ciif USB_MUSB_HDRC 308c2ecf20Sopenharmony_ci 318c2ecf20Sopenharmony_cichoice 328c2ecf20Sopenharmony_ci bool "MUSB Mode Selection" 338c2ecf20Sopenharmony_ci default USB_MUSB_DUAL_ROLE if (USB && USB_GADGET) 348c2ecf20Sopenharmony_ci default USB_MUSB_HOST if (USB && !USB_GADGET) 358c2ecf20Sopenharmony_ci default USB_MUSB_GADGET if (!USB && USB_GADGET) 368c2ecf20Sopenharmony_ci 378c2ecf20Sopenharmony_ciconfig USB_MUSB_HOST 388c2ecf20Sopenharmony_ci bool "Host only mode" 398c2ecf20Sopenharmony_ci depends on USB=y || USB=USB_MUSB_HDRC 408c2ecf20Sopenharmony_ci help 418c2ecf20Sopenharmony_ci Select this when you want to use MUSB in host mode only, 428c2ecf20Sopenharmony_ci thereby the gadget feature will be regressed. 438c2ecf20Sopenharmony_ci 448c2ecf20Sopenharmony_ciconfig USB_MUSB_GADGET 458c2ecf20Sopenharmony_ci bool "Gadget only mode" 468c2ecf20Sopenharmony_ci depends on USB_GADGET=y || USB_GADGET=USB_MUSB_HDRC 478c2ecf20Sopenharmony_ci depends on HAS_DMA 488c2ecf20Sopenharmony_ci help 498c2ecf20Sopenharmony_ci Select this when you want to use MUSB in gadget mode only, 508c2ecf20Sopenharmony_ci thereby the host feature will be regressed. 518c2ecf20Sopenharmony_ci 528c2ecf20Sopenharmony_ciconfig USB_MUSB_DUAL_ROLE 538c2ecf20Sopenharmony_ci bool "Dual Role mode" 548c2ecf20Sopenharmony_ci depends on ((USB=y || USB=USB_MUSB_HDRC) && (USB_GADGET=y || USB_GADGET=USB_MUSB_HDRC)) 558c2ecf20Sopenharmony_ci depends on HAS_DMA 568c2ecf20Sopenharmony_ci help 578c2ecf20Sopenharmony_ci This is the default mode of working of MUSB controller where 588c2ecf20Sopenharmony_ci both host and gadget features are enabled. 598c2ecf20Sopenharmony_ci 608c2ecf20Sopenharmony_ciendchoice 618c2ecf20Sopenharmony_ci 628c2ecf20Sopenharmony_cicomment "Platform Glue Layer" 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ciconfig USB_MUSB_SUNXI 658c2ecf20Sopenharmony_ci tristate "Allwinner (sunxi)" 668c2ecf20Sopenharmony_ci depends on ARCH_SUNXI 678c2ecf20Sopenharmony_ci depends on NOP_USB_XCEIV 688c2ecf20Sopenharmony_ci depends on PHY_SUN4I_USB 698c2ecf20Sopenharmony_ci depends on EXTCON 708c2ecf20Sopenharmony_ci select GENERIC_PHY 718c2ecf20Sopenharmony_ci select SUNXI_SRAM 728c2ecf20Sopenharmony_ci 738c2ecf20Sopenharmony_ciconfig USB_MUSB_DAVINCI 748c2ecf20Sopenharmony_ci tristate "DaVinci" 758c2ecf20Sopenharmony_ci depends on ARCH_DAVINCI_DMx 768c2ecf20Sopenharmony_ci depends on NOP_USB_XCEIV 778c2ecf20Sopenharmony_ci depends on BROKEN 788c2ecf20Sopenharmony_ci 798c2ecf20Sopenharmony_ciconfig USB_MUSB_DA8XX 808c2ecf20Sopenharmony_ci tristate "DA8xx/OMAP-L1x" 818c2ecf20Sopenharmony_ci depends on ARCH_DAVINCI_DA8XX 828c2ecf20Sopenharmony_ci depends on NOP_USB_XCEIV 838c2ecf20Sopenharmony_ci select PHY_DA8XX_USB 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ciconfig USB_MUSB_TUSB6010 868c2ecf20Sopenharmony_ci tristate "TUSB6010" 878c2ecf20Sopenharmony_ci depends on HAS_IOMEM 888c2ecf20Sopenharmony_ci depends on ARCH_OMAP2PLUS || COMPILE_TEST 898c2ecf20Sopenharmony_ci depends on NOP_USB_XCEIV = USB_MUSB_HDRC # both built-in or both modules 908c2ecf20Sopenharmony_ci 918c2ecf20Sopenharmony_ciconfig USB_MUSB_OMAP2PLUS 928c2ecf20Sopenharmony_ci tristate "OMAP2430 and onwards" 938c2ecf20Sopenharmony_ci depends on ARCH_OMAP2PLUS && USB 948c2ecf20Sopenharmony_ci depends on OMAP_CONTROL_PHY || !OMAP_CONTROL_PHY 958c2ecf20Sopenharmony_ci select GENERIC_PHY 968c2ecf20Sopenharmony_ci 978c2ecf20Sopenharmony_ciconfig USB_MUSB_AM35X 988c2ecf20Sopenharmony_ci tristate "AM35x" 998c2ecf20Sopenharmony_ci depends on ARCH_OMAP 1008c2ecf20Sopenharmony_ci depends on NOP_USB_XCEIV 1018c2ecf20Sopenharmony_ci 1028c2ecf20Sopenharmony_ciconfig USB_MUSB_DSPS 1038c2ecf20Sopenharmony_ci tristate "TI DSPS platforms" 1048c2ecf20Sopenharmony_ci depends on ARCH_OMAP2PLUS || COMPILE_TEST 1058c2ecf20Sopenharmony_ci depends on OF_IRQ 1068c2ecf20Sopenharmony_ci 1078c2ecf20Sopenharmony_ciconfig USB_MUSB_UX500 1088c2ecf20Sopenharmony_ci tristate "Ux500 platforms" 1098c2ecf20Sopenharmony_ci depends on ARCH_U8500 || COMPILE_TEST 1108c2ecf20Sopenharmony_ci 1118c2ecf20Sopenharmony_ciconfig USB_MUSB_JZ4740 1128c2ecf20Sopenharmony_ci tristate "JZ4740" 1138c2ecf20Sopenharmony_ci depends on OF 1148c2ecf20Sopenharmony_ci depends on MIPS || COMPILE_TEST 1158c2ecf20Sopenharmony_ci depends on USB_MUSB_GADGET 1168c2ecf20Sopenharmony_ci depends on USB=n || USB_OTG_DISABLE_EXTERNAL_HUB 1178c2ecf20Sopenharmony_ci select USB_ROLE_SWITCH 1188c2ecf20Sopenharmony_ci 1198c2ecf20Sopenharmony_ciconfig USB_MUSB_MEDIATEK 1208c2ecf20Sopenharmony_ci tristate "MediaTek platforms" 1218c2ecf20Sopenharmony_ci depends on ARCH_MEDIATEK || COMPILE_TEST 1228c2ecf20Sopenharmony_ci depends on NOP_USB_XCEIV 1238c2ecf20Sopenharmony_ci select GENERIC_PHY 1248c2ecf20Sopenharmony_ci select USB_ROLE_SWITCH 1258c2ecf20Sopenharmony_ci 1268c2ecf20Sopenharmony_cicomment "MUSB DMA mode" 1278c2ecf20Sopenharmony_ci 1288c2ecf20Sopenharmony_ciconfig MUSB_PIO_ONLY 1298c2ecf20Sopenharmony_ci bool 'Disable DMA (always use PIO)' 1308c2ecf20Sopenharmony_ci help 1318c2ecf20Sopenharmony_ci All data is copied between memory and FIFO by the CPU. 1328c2ecf20Sopenharmony_ci DMA controllers are ignored. 1338c2ecf20Sopenharmony_ci 1348c2ecf20Sopenharmony_ci Do not choose this unless DMA support for your SOC or board 1358c2ecf20Sopenharmony_ci is unavailable (or unstable). When DMA is enabled at compile time, 1368c2ecf20Sopenharmony_ci you can still disable it at run time using the "use_dma=n" module 1378c2ecf20Sopenharmony_ci parameter. 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ciif !MUSB_PIO_ONLY 1408c2ecf20Sopenharmony_ci 1418c2ecf20Sopenharmony_ciconfig USB_UX500_DMA 1428c2ecf20Sopenharmony_ci bool 'ST Ericsson Ux500' 1438c2ecf20Sopenharmony_ci depends on USB_MUSB_UX500 1448c2ecf20Sopenharmony_ci help 1458c2ecf20Sopenharmony_ci Enable DMA transfers on UX500 platforms. 1468c2ecf20Sopenharmony_ci 1478c2ecf20Sopenharmony_ciconfig USB_INVENTRA_DMA 1488c2ecf20Sopenharmony_ci bool 'Inventra' 1498c2ecf20Sopenharmony_ci depends on USB_MUSB_OMAP2PLUS || USB_MUSB_MEDIATEK || USB_MUSB_JZ4740 1508c2ecf20Sopenharmony_ci help 1518c2ecf20Sopenharmony_ci Enable DMA transfers using Mentor's engine. 1528c2ecf20Sopenharmony_ci 1538c2ecf20Sopenharmony_ciconfig USB_TI_CPPI_DMA 1548c2ecf20Sopenharmony_ci bool 'TI CPPI (Davinci)' 1558c2ecf20Sopenharmony_ci depends on USB_MUSB_DAVINCI 1568c2ecf20Sopenharmony_ci help 1578c2ecf20Sopenharmony_ci Enable DMA transfers when TI CPPI DMA is available. 1588c2ecf20Sopenharmony_ci 1598c2ecf20Sopenharmony_ciconfig USB_TI_CPPI41_DMA 1608c2ecf20Sopenharmony_ci bool 'TI CPPI 4.1' 1618c2ecf20Sopenharmony_ci depends on (ARCH_OMAP || ARCH_DAVINCI_DA8XX) && DMADEVICES 1628c2ecf20Sopenharmony_ci select TI_CPPI41 1638c2ecf20Sopenharmony_ci 1648c2ecf20Sopenharmony_ciconfig USB_TUSB_OMAP_DMA 1658c2ecf20Sopenharmony_ci bool 'TUSB 6010' 1668c2ecf20Sopenharmony_ci depends on USB_MUSB_TUSB6010 = USB_MUSB_HDRC # both built-in or both modules 1678c2ecf20Sopenharmony_ci depends on ARCH_OMAP 1688c2ecf20Sopenharmony_ci help 1698c2ecf20Sopenharmony_ci Enable DMA transfers on TUSB 6010 when OMAP DMA is available. 1708c2ecf20Sopenharmony_ci 1718c2ecf20Sopenharmony_ciendif # !MUSB_PIO_ONLY 1728c2ecf20Sopenharmony_ci 1738c2ecf20Sopenharmony_ciendif # USB_MUSB_HDRC 174