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