xref: /openbmc/linux/drivers/usb/mtu3/Kconfig (revision 1ac91ac5)
1cae8dc3bSGreg Kroah-Hartman# SPDX-License-Identifier: GPL-2.0
2cae8dc3bSGreg Kroah-Hartman#
3df2069acSChunfeng Yun# For MTK USB3.0 IP
4df2069acSChunfeng Yun
5df2069acSChunfeng Yunconfig USB_MTU3
6df2069acSChunfeng Yun	tristate "MediaTek USB3 Dual Role controller"
7109e37a6SGreg Kroah-Hartman	depends on USB || USB_GADGET
8df2069acSChunfeng Yun	depends on ARCH_MEDIATEK || COMPILE_TEST
93d54d10cSArnd Bergmann	depends on EXTCON || !EXTCON
10b3f4e727SChunfeng Yun	select USB_XHCI_MTK if USB_SUPPORT && USB_XHCI_HCD
11df2069acSChunfeng Yun	help
12df2069acSChunfeng Yun	  Say Y or M here if your system runs on MediaTek SoCs with
13df2069acSChunfeng Yun	  Dual Role SuperSpeed USB controller. You can select usb
14df2069acSChunfeng Yun	  mode as peripheral role or host role, or both.
15df2069acSChunfeng Yun
16df2069acSChunfeng Yun	  If you don't know what this is, please say N.
17df2069acSChunfeng Yun
18df2069acSChunfeng Yun	  Choose M here to compile this driver as a module, and it
19df2069acSChunfeng Yun	  will be called mtu3.ko.
20df2069acSChunfeng Yun
21df2069acSChunfeng Yun
22df2069acSChunfeng Yunif USB_MTU3
23df2069acSChunfeng Yunchoice
24df2069acSChunfeng Yun	bool "MTU3 Mode Selection"
25d0ed062aSChunfeng Yun	default USB_MTU3_DUAL_ROLE if (USB && USB_GADGET)
26b3f4e727SChunfeng Yun	default USB_MTU3_HOST if (USB && !USB_GADGET)
27df2069acSChunfeng Yun	default USB_MTU3_GADGET if (!USB && USB_GADGET)
28df2069acSChunfeng Yun
29b3f4e727SChunfeng Yunconfig USB_MTU3_HOST
30b3f4e727SChunfeng Yun	bool "Host only mode"
31b3f4e727SChunfeng Yun	depends on USB=y || USB=USB_MTU3
32b3f4e727SChunfeng Yun	help
33b3f4e727SChunfeng Yun	  Select this when you want to use MTU3 in host mode only,
34b3f4e727SChunfeng Yun	  thereby the gadget feature will be regressed.
35b3f4e727SChunfeng Yun
36df2069acSChunfeng Yunconfig USB_MTU3_GADGET
37df2069acSChunfeng Yun	bool "Gadget only mode"
38df2069acSChunfeng Yun	depends on USB_GADGET=y || USB_GADGET=USB_MTU3
39df2069acSChunfeng Yun	help
40df2069acSChunfeng Yun	  Select this when you want to use MTU3 in gadget mode only,
41df2069acSChunfeng Yun	  thereby the host feature will be regressed.
42df2069acSChunfeng Yun
43d0ed062aSChunfeng Yunconfig USB_MTU3_DUAL_ROLE
44d0ed062aSChunfeng Yun	bool "Dual Role mode"
45d0ed062aSChunfeng Yun	depends on ((USB=y || USB=USB_MTU3) && (USB_GADGET=y || USB_GADGET=USB_MTU3))
46f3984682SChunfeng Yun	depends on (EXTCON=y || EXTCON=USB_MTU3)
471ac91ac5SChunfeng Yun	select USB_ROLE_SWITCH
48d0ed062aSChunfeng Yun	help
49d0ed062aSChunfeng Yun	  This is the default mode of working of MTU3 controller where
50d0ed062aSChunfeng Yun	  both host and gadget features are enabled.
51d0ed062aSChunfeng Yun
52df2069acSChunfeng Yunendchoice
53df2069acSChunfeng Yun
54d0ed062aSChunfeng Yunconfig USB_MTU3_DEBUG
55d0ed062aSChunfeng Yun	bool "Enable Debugging Messages"
56d0ed062aSChunfeng Yun	help
57d0ed062aSChunfeng Yun	  Say Y here to enable debugging messages in the MTU3 Driver.
58d0ed062aSChunfeng Yun
59df2069acSChunfeng Yunendif
60