mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-09-21 23:21:58 +00:00
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>
This commit is contained in:
parent
de6e4a6f5c
commit
7c65468346
1 changed files with 2 additions and 1 deletions
|
@ -1041,7 +1041,8 @@ static int dwc2_udc_otg_ofdata_to_platdata(struct udevice *dev)
|
|||
void (*set_params)(struct dwc2_plat_otg_data *data);
|
||||
int ret;
|
||||
|
||||
if (usb_get_dr_mode(node) != USB_DR_MODE_PERIPHERAL) {
|
||||
if (usb_get_dr_mode(node) != USB_DR_MODE_PERIPHERAL &&
|
||||
usb_get_dr_mode(node) != USB_DR_MODE_OTG) {
|
||||
dev_dbg(dev, "Invalid mode\n");
|
||||
return -ENODEV;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue