diff options
author | Amelie Delaunay <amelie.delaunay@st.com> | 2020-06-16 16:07:16 +0200 |
---|---|---|
committer | Felipe Balbi <balbi@kernel.org> | 2020-07-23 14:45:36 +0300 |
commit | 916f8b627288039d9e771a9b2ab1b3c79b303039 (patch) | |
tree | 52b638aca8b8a3cbc6f52e8b49240705cf94d541 /drivers/usb/dwc2 | |
parent | bc0f0d4a5853e32ba97a0318f774570428fc5634 (diff) |
usb: dwc2: don't use ID/Vbus detection if usb-role-switch on STM32MP15 SoCs
If usb-role-switch is present in the device tree, it means that ID and Vbus
signals are not connected to the OTG controller but to an external
component (GPIOs, Type-C controller). In this configuration, usb role
switch is used to force valid sessions on STM32MP15 SoCs.
Acked-by: Minas Harutyunyan <hminas@synopsys.com>
Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
Signed-off-by: Felipe Balbi <balbi@kernel.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r-- | drivers/usb/dwc2/params.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c index 8f9d061c4d5f..bd792c9cdef9 100644 --- a/drivers/usb/dwc2/params.c +++ b/drivers/usb/dwc2/params.c @@ -183,9 +183,11 @@ static void dwc2_set_stm32mp15_fsotg_params(struct dwc2_hsotg *hsotg) static void dwc2_set_stm32mp15_hsotg_params(struct dwc2_hsotg *hsotg) { struct dwc2_core_params *p = &hsotg->params; + struct device_node *np = hsotg->dev->of_node; p->otg_cap = DWC2_CAP_PARAM_NO_HNP_SRP_CAPABLE; - p->activate_stm_id_vb_detection = true; + p->activate_stm_id_vb_detection = + !of_property_read_bool(np, "usb-role-switch"); p->host_rx_fifo_size = 440; p->host_nperio_tx_fifo_size = 256; p->host_perio_tx_fifo_size = 256; |