diff mbox series

[3/3] usb: dwc2: disable Link Power Management on STM32MP15 HS OTG

Message ID 20201123090114.12641-4-amelie.delaunay@st.com
State New
Headers show
Series STM32MP15 OTG params updates | expand

Commit Message

Amelie DELAUNAY Nov. 23, 2020, 9:01 a.m. UTC
Link Power Management (LPM) on STM32MP15 OTG HS encounters instabilities
with some Host controllers. OTG core fails to exit L1 state in 200us:
"dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us."
Then the device is still not enumerated.

To avoid this issue, disable Link Power Management on STM32MP15 HS OTG.

Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>
---
 drivers/usb/dwc2/params.c | 4 ++++
 1 file changed, 4 insertions(+)

Comments

Minas Harutyunyan Nov. 30, 2020, 6:17 a.m. UTC | #1
On 11/23/2020 1:01 PM, Amelie Delaunay wrote:
> Link Power Management (LPM) on STM32MP15 OTG HS encounters instabilities

> with some Host controllers. OTG core fails to exit L1 state in 200us:

> "dwc2 49000000.usb-otg: Failed to exit L1 sleep state in 200us."

> Then the device is still not enumerated.

> 

> To avoid this issue, disable Link Power Management on STM32MP15 HS OTG.

> 

> Signed-off-by: Amelie Delaunay <amelie.delaunay@st.com>


Acked-by: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>


> ---

>   drivers/usb/dwc2/params.c | 4 ++++

>   1 file changed, 4 insertions(+)

> 

> diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c

> index 9e5dd7f3f2f6..92df3d620f7d 100644

> --- a/drivers/usb/dwc2/params.c

> +++ b/drivers/usb/dwc2/params.c

> @@ -194,6 +194,10 @@ static void dwc2_set_stm32mp15_hsotg_params(struct dwc2_hsotg *hsotg)

>   	p->host_perio_tx_fifo_size = 256;

>   	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT;

>   	p->power_down = DWC2_POWER_DOWN_PARAM_NONE;

> +	p->lpm = false;

> +	p->lpm_clock_gating = false;

> +	p->besl = false;

> +	p->hird_threshold_en = false;

>   }

>   

>   const struct of_device_id dwc2_of_match_table[] = {

>
diff mbox series

Patch

diff --git a/drivers/usb/dwc2/params.c b/drivers/usb/dwc2/params.c
index 9e5dd7f3f2f6..92df3d620f7d 100644
--- a/drivers/usb/dwc2/params.c
+++ b/drivers/usb/dwc2/params.c
@@ -194,6 +194,10 @@  static void dwc2_set_stm32mp15_hsotg_params(struct dwc2_hsotg *hsotg)
 	p->host_perio_tx_fifo_size = 256;
 	p->ahbcfg = GAHBCFG_HBSTLEN_INCR16 << GAHBCFG_HBSTLEN_SHIFT;
 	p->power_down = DWC2_POWER_DOWN_PARAM_NONE;
+	p->lpm = false;
+	p->lpm_clock_gating = false;
+	p->besl = false;
+	p->hird_threshold_en = false;
 }
 
 const struct of_device_id dwc2_of_match_table[] = {