choice
bool "DWC3 Mode Selection"
default USB_DWC3_DUAL_ROLE if (USB && USB_GADGET)
+ default USB_DWC3_OTG if (USB && USB_GADGET && USB_OTG && USB_OTG_FSM)
default USB_DWC3_HOST if (USB && !USB_GADGET)
default USB_DWC3_GADGET if (!USB && USB_GADGET)
This is the default mode of working of DWC3 controller where
both host and gadget features are enabled.
+config USB_DWC3_OTG
+ bool "Dual Role mode + OTG"
+ depends on ((USB=y || USB=USB_DWC3) && (USB_GADGET=y || USB_GADGET=USB_DWC3) && USB_OTG && USB_OTG_FSM && PM)
+ help
+ This is the default mode of working of DWC3 controller where
+ both host and gadget features are enabled with OTG support.
+
endchoice
comment "Platform Glue Driver Support"
dwc3-y += trace.o
endif
-ifneq ($(filter y,$(CONFIG_USB_DWC3_HOST) $(CONFIG_USB_DWC3_DUAL_ROLE)),)
+ifneq ($(filter y,$(CONFIG_USB_DWC3_HOST) $(CONFIG_USB_DWC3_DUAL_ROLE) $(CONFIG_USB_DWC3_OTG)),)
dwc3-y += host.o
endif
dwc3-y += gadget.o ep0.o gadget_hibernation.o
endif
+ifneq ($(CONFIG_USB_DWC3_OTG),)
+ dwc3-y += otg.o
+endif
+
ifneq ($(CONFIG_USB_DWC3_DUAL_ROLE),)
dwc3-y += drd.o
endif