18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ci#
38c2ecf20Sopenharmony_ci# For MTK USB3.0 IP
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciconfig USB_MTU3
68c2ecf20Sopenharmony_ci	tristate "MediaTek USB3 Dual Role controller"
78c2ecf20Sopenharmony_ci	depends on USB || USB_GADGET
88c2ecf20Sopenharmony_ci	depends on ARCH_MEDIATEK || COMPILE_TEST
98c2ecf20Sopenharmony_ci	depends on EXTCON || !EXTCON
108c2ecf20Sopenharmony_ci	select USB_XHCI_MTK if USB_SUPPORT && USB_XHCI_HCD
118c2ecf20Sopenharmony_ci	help
128c2ecf20Sopenharmony_ci	  Say Y or M here if your system runs on MediaTek SoCs with
138c2ecf20Sopenharmony_ci	  Dual Role SuperSpeed USB controller. You can select usb
148c2ecf20Sopenharmony_ci	  mode as peripheral role or host role, or both.
158c2ecf20Sopenharmony_ci
168c2ecf20Sopenharmony_ci	  If you don't know what this is, please say N.
178c2ecf20Sopenharmony_ci
188c2ecf20Sopenharmony_ci	  Choose M here to compile this driver as a module, and it
198c2ecf20Sopenharmony_ci	  will be called mtu3.ko.
208c2ecf20Sopenharmony_ci
218c2ecf20Sopenharmony_ci
228c2ecf20Sopenharmony_ciif USB_MTU3
238c2ecf20Sopenharmony_cichoice
248c2ecf20Sopenharmony_ci	bool "MTU3 Mode Selection"
258c2ecf20Sopenharmony_ci	default USB_MTU3_DUAL_ROLE if (USB && USB_GADGET)
268c2ecf20Sopenharmony_ci	default USB_MTU3_HOST if (USB && !USB_GADGET)
278c2ecf20Sopenharmony_ci	default USB_MTU3_GADGET if (!USB && USB_GADGET)
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciconfig USB_MTU3_HOST
308c2ecf20Sopenharmony_ci	bool "Host only mode"
318c2ecf20Sopenharmony_ci	depends on USB=y || USB=USB_MTU3
328c2ecf20Sopenharmony_ci	help
338c2ecf20Sopenharmony_ci	  Select this when you want to use MTU3 in host mode only,
348c2ecf20Sopenharmony_ci	  thereby the gadget feature will be regressed.
358c2ecf20Sopenharmony_ci
368c2ecf20Sopenharmony_ciconfig USB_MTU3_GADGET
378c2ecf20Sopenharmony_ci	bool "Gadget only mode"
388c2ecf20Sopenharmony_ci	depends on USB_GADGET=y || USB_GADGET=USB_MTU3
398c2ecf20Sopenharmony_ci	help
408c2ecf20Sopenharmony_ci	  Select this when you want to use MTU3 in gadget mode only,
418c2ecf20Sopenharmony_ci	  thereby the host feature will be regressed.
428c2ecf20Sopenharmony_ci
438c2ecf20Sopenharmony_ciconfig USB_MTU3_DUAL_ROLE
448c2ecf20Sopenharmony_ci	bool "Dual Role mode"
458c2ecf20Sopenharmony_ci	depends on ((USB=y || USB=USB_MTU3) && (USB_GADGET=y || USB_GADGET=USB_MTU3))
468c2ecf20Sopenharmony_ci	depends on (EXTCON=y || EXTCON=USB_MTU3)
478c2ecf20Sopenharmony_ci	select USB_ROLE_SWITCH
488c2ecf20Sopenharmony_ci	help
498c2ecf20Sopenharmony_ci	  This is the default mode of working of MTU3 controller where
508c2ecf20Sopenharmony_ci	  both host and gadget features are enabled.
518c2ecf20Sopenharmony_ci
528c2ecf20Sopenharmony_ciendchoice
538c2ecf20Sopenharmony_ci
548c2ecf20Sopenharmony_ciconfig USB_MTU3_DEBUG
558c2ecf20Sopenharmony_ci	bool "Enable Debugging Messages"
568c2ecf20Sopenharmony_ci	help
578c2ecf20Sopenharmony_ci	  Say Y here to enable debugging messages in the MTU3 Driver.
588c2ecf20Sopenharmony_ci
598c2ecf20Sopenharmony_ciendif
60