usb: dwc2: allow peripheral mode for OTG configuration
authorPatrick Delaunay <patrick.delaunay@st.com>
Tue, 18 Jun 2019 14:57:18 +0000 (16:57 +0200)
committerPatrice Chotard <patrice.chotard@st.com>
Wed, 19 Jun 2019 14:56:11 +0000 (16:56 +0200)
commit7c654683464dc4cd89f9a8198e26336263390b57
tree864cd0a8a0d81ed5c9a542424f27ba89270be10f
parentde6e4a6f5c3cd12ccda8d408ea60079211346e5e
usb: dwc2: allow peripheral mode for OTG configuration

Allow device mode in DWC2 driver when device tree select the dr_mode
"peripheral" or "otg".

The device mode is not allowed when dr_mode = "host" in device tree.

Signed-off-by: Patrick Delaunay <patrick.delaunay@st.com>
Reviewed-by: Marek Vasut <marex@denx.de>
drivers/usb/gadget/dwc2_udc_otg.c