All of lore.kernel.org
 help / color / mirror / Atom feed
* imx7: USB modem reset causes modem to not re-connect
@ 2022-12-12 18:10 Fabio Estevam
  2022-12-12 19:01 ` Fabio Estevam
  2022-12-13  8:12 ` Jun Li
  0 siblings, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2022-12-12 18:10 UTC (permalink / raw)
  To: bjorn, Peter Chen, Marek Vasut, Li Jun
  Cc: netdev, USB list, Alexander Stein, Schrempf Frieder

Hi,

On an imx7d-based board running kernel 5.10.158, I noticed that a
Quectel BG96 modem is gone after sending a reset command via AT:

# microcom /dev/ttyUSB3
>AT+CFUN=1,1
OK
 usb 2-1: USB disconnect, device number 6
option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
option 2-1:1.0: device disconnected
option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
option 2-1:1.1: device disconnected
option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
option 2-1:1.2: device disconnected
option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
option 2-1:1.3: device disconnected
qmi_wwan 2-1:1.4 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI device

# lsusb
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

The USB modem is gone.

Forcing an 'echo on' to power/control makes the USB modem reappear:

# echo 'on' > /sys/bus/usb/devices/usb2/power/control
usb 2-1: new high-speed USB device number 7 using ci_hdrc
 usb 2-1: New USB device found, idVendor=2c7c, idProduct=0296, bcdDevice= 0.00
 usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
usb 2-1: Product: Qualcomm CDMA Technologies MSM
 usb 2-1: Manufacturer: Qualcomm, Incorporated
usb 2-1: SerialNumber: 7d1563c1
option 2-1:1.0: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
 option 2-1:1.1: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
option 2-1:1.2: GSM modem (1-port) converter detected
 usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
option 2-1:1.3: GSM modem (1-port) converter detected
usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
qmi_wwan 2-1:1.4: cdc-wdm0: USB WDM device
qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-ci_hdrc.1-1,
WWAN/QMI device, 12:bc:8c:zz:yy:xx

# lsusb
Bus 002 Device 007: ID 2c7c:0296 Quectel Wireless Solutions Co., Ltd.
BG96 CAT-M1/NB-IoT modem
Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub

Sending the AT reset command afterward works fine, and the modem keeps
connected.

Previously, this board used a vendor-based 4.14 kernel and such a
problem did not happen.

Kernels 5.10 and 4.14 have the same 'auto' option selected by default.

Also tested kernel 6.1 and it behaves the same as 5.10.158.

What can be done so that the reset modem command does not cause the
modem to disappear by default?

Thanks,

Fabio Estevam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: imx7: USB modem reset causes modem to not re-connect
  2022-12-12 18:10 imx7: USB modem reset causes modem to not re-connect Fabio Estevam
@ 2022-12-12 19:01 ` Fabio Estevam
  2022-12-13  7:31   ` Alexander Stein
  2022-12-13  8:15   ` Jun Li
  2022-12-13  8:12 ` Jun Li
  1 sibling, 2 replies; 8+ messages in thread
From: Fabio Estevam @ 2022-12-12 19:01 UTC (permalink / raw)
  To: bjorn, Peter Chen, Marek Vasut, Li Jun
  Cc: netdev, USB list, Alexander Stein, Schrempf Frieder

On Mon, Dec 12, 2022 at 3:10 PM Fabio Estevam <festevam@gmail.com> wrote:
>
> Hi,
>
> On an imx7d-based board running kernel 5.10.158, I noticed that a
> Quectel BG96 modem is gone after sending a reset command via AT:

Disabling runtime pm like this:

diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c
b/drivers/usb/chipidea/ci_hdrc_imx.c
index 9ffcecd3058c..e2a263d583f9 100644
--- a/drivers/usb/chipidea/ci_hdrc_imx.c
+++ b/drivers/usb/chipidea/ci_hdrc_imx.c
@@ -62,7 +62,6 @@ static const struct ci_hdrc_imx_platform_flag
imx6ul_usb_data = {
 };

 static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
-       .flags = CI_HDRC_SUPPORTS_RUNTIME_PM,
 };

 static const struct ci_hdrc_imx_platform_flag imx7ulp_usb_data = {

makes the USB modem to stay connected after the reset command:

# microcom /dev/ttyUSB3
>AT+CFUN=1,1
OK
[   31.339416] usb 2-1: USB disconnect, device number 2
[   31.349480] option1 ttyUSB0: GSM modem (1-port) converter now
disconnected from ttyUSB0
[   31.358298] option 2-1:1.0: device disconnected
[   31.366390] option1 ttyUSB1: GSM modem (1-port) converter now
disconnected from ttyUSB1
[   31.374883] option 2-1:1.1: device disconnected
[   31.383359] option1 ttyUSB2: GSM modem (1-port) converter now
disconnected from ttyUSB2
[   31.391800] option 2-1:1.2: device disconnected
[   31.404700] option1 ttyUSB3: GSM modem (1-port) converter now
disconnected from ttyUSB3
# [   31.413261] option 2-1:1.3: device disconnected
[   36.151388] usb 2-1: new high-speed USB device number 3 using ci_hdrc
[   36.354398] usb 2-1: New USB device found, idVendor=2c7c,
idProduct=0296, bcdDevice= 0.00
[   36.362768] usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
[   36.370031] usb 2-1: Product: Qualcomm CDMA Technologies MSM
[   36.375818] usb 2-1: Manufacturer: Qualcomm, Incorporated
[   36.381355] usb 2-1: SerialNumber: 7d1563c1
[   36.389915] option 2-1:1.0: GSM modem (1-port) converter detected
[   36.397679] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
[   36.412591] option 2-1:1.1: GSM modem (1-port) converter detected
[   36.420237] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
[   36.434988] option 2-1:1.2: GSM modem (1-port) converter detected
[   36.442792] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
[   36.457745] option 2-1:1.3: GSM modem (1-port) converter detected
[   36.465709] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3

Does anyone have any suggestions as to what could be the problem with
runtime pm?

^ permalink raw reply related	[flat|nested] 8+ messages in thread

* Re: imx7: USB modem reset causes modem to not re-connect
  2022-12-12 19:01 ` Fabio Estevam
@ 2022-12-13  7:31   ` Alexander Stein
  2022-12-13  8:15   ` Jun Li
  1 sibling, 0 replies; 8+ messages in thread
From: Alexander Stein @ 2022-12-13  7:31 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: bjorn, Peter Chen, Marek Vasut, Li Jun, netdev, USB list,
	Schrempf Frieder

Hello Fabio,

I had a problem regarding runtime suspend and detecting USB hub events on a 
non-removable downstream hub. Disabling runtime suspend did work as well, but
this was eventually fixed by 552ca27929ab2 ("ARM: dts: imx7: Move hsic_phy 
power domain to HSIC PHY node").
Maybe your USB device doesn't support some low power mode, but I'm not well 
versed in that area.

Best regards,
Alexander

Am Montag, 12. Dezember 2022, 20:01:25 CET schrieb Fabio Estevam:
> On Mon, Dec 12, 2022 at 3:10 PM Fabio Estevam <festevam@gmail.com> wrote:
> > Hi,
> > 
> > On an imx7d-based board running kernel 5.10.158, I noticed that a
> 
> > Quectel BG96 modem is gone after sending a reset command via AT:
> Disabling runtime pm like this:
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c
> b/drivers/usb/chipidea/ci_hdrc_imx.c
> index 9ffcecd3058c..e2a263d583f9 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -62,7 +62,6 @@ static const struct ci_hdrc_imx_platform_flag
> imx6ul_usb_data = {
>  };
> 
>  static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
> -       .flags = CI_HDRC_SUPPORTS_RUNTIME_PM,
>  };
> 
>  static const struct ci_hdrc_imx_platform_flag imx7ulp_usb_data = {
> 
> makes the USB modem to stay connected after the reset command:
> 
> # microcom /dev/ttyUSB3
> 
> >AT+CFUN=1,1
> 
> OK
> [   31.339416] usb 2-1: USB disconnect, device number 2
> [   31.349480] option1 ttyUSB0: GSM modem (1-port) converter now
> disconnected from ttyUSB0
> [   31.358298] option 2-1:1.0: device disconnected
> [   31.366390] option1 ttyUSB1: GSM modem (1-port) converter now
> disconnected from ttyUSB1
> [   31.374883] option 2-1:1.1: device disconnected
> [   31.383359] option1 ttyUSB2: GSM modem (1-port) converter now
> disconnected from ttyUSB2
> [   31.391800] option 2-1:1.2: device disconnected
> [   31.404700] option1 ttyUSB3: GSM modem (1-port) converter now
> disconnected from ttyUSB3
> # [   31.413261] option 2-1:1.3: device disconnected
> [   36.151388] usb 2-1: new high-speed USB device number 3 using ci_hdrc
> [   36.354398] usb 2-1: New USB device found, idVendor=2c7c,
> idProduct=0296, bcdDevice= 0.00
> [   36.362768] usb 2-1: New USB device strings: Mfr=3, Product=2,
> SerialNumber=4 [   36.370031] usb 2-1: Product: Qualcomm CDMA Technologies
> MSM
> [   36.375818] usb 2-1: Manufacturer: Qualcomm, Incorporated
> [   36.381355] usb 2-1: SerialNumber: 7d1563c1
> [   36.389915] option 2-1:1.0: GSM modem (1-port) converter detected
> [   36.397679] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
> [   36.412591] option 2-1:1.1: GSM modem (1-port) converter detected [  
> 36.420237] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1 [ 
>  36.434988] option 2-1:1.2: GSM modem (1-port) converter detected [  
> 36.442792] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2 [ 
>  36.457745] option 2-1:1.3: GSM modem (1-port) converter detected [  
> 36.465709] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
> 
> Does anyone have any suggestions as to what could be the problem with
> runtime pm?





^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: imx7: USB modem reset causes modem to not re-connect
  2022-12-12 18:10 imx7: USB modem reset causes modem to not re-connect Fabio Estevam
  2022-12-12 19:01 ` Fabio Estevam
@ 2022-12-13  8:12 ` Jun Li
  1 sibling, 0 replies; 8+ messages in thread
From: Jun Li @ 2022-12-13  8:12 UTC (permalink / raw)
  To: Fabio Estevam, bjorn, Peter Chen, Marek Vasut
  Cc: netdev, USB list, Alexander Stein, Schrempf Frieder



> -----Original Message-----
> From: Fabio Estevam <festevam@gmail.com>
> Sent: Tuesday, December 13, 2022 2:11 AM
> To: bjorn@mork.no; Peter Chen <peter.chen@kernel.org>; Marek Vasut
> <marex@denx.de>; Jun Li <jun.li@nxp.com>
> Cc: netdev <netdev@vger.kernel.org>; USB list <linux-usb@vger.kernel.org>;
> Alexander Stein <alexander.stein@ew.tq-group.com>; Schrempf Frieder
> <frieder.schrempf@kontron.de>
> Subject: imx7: USB modem reset causes modem to not re-connect
> 
> Hi,
> 
> On an imx7d-based board running kernel 5.10.158, I noticed that a
> Quectel BG96 modem is gone after sending a reset command via AT:
> 
> # microcom /dev/ttyUSB3
> >AT+CFUN=1,1
> OK
>  usb 2-1: USB disconnect, device number 6
> option1 ttyUSB0: GSM modem (1-port) converter now disconnected from ttyUSB0
> option 2-1:1.0: device disconnected
> option1 ttyUSB1: GSM modem (1-port) converter now disconnected from ttyUSB1
> option 2-1:1.1: device disconnected
> option1 ttyUSB2: GSM modem (1-port) converter now disconnected from ttyUSB2
> option 2-1:1.2: device disconnected
> option1 ttyUSB3: GSM modem (1-port) converter now disconnected from ttyUSB3
> option 2-1:1.3: device disconnected
> qmi_wwan 2-1:1.4 wwan0: unregister 'qmi_wwan' usb-ci_hdrc.1-1, WWAN/QMI
> device
> 
> # lsusb
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> The USB modem is gone.
> 
> Forcing an 'echo on' to power/control makes the USB modem reappear:
> 
> # echo 'on' > /sys/bus/usb/devices/usb2/power/control
> usb 2-1: new high-speed USB device number 7 using ci_hdrc
>  usb 2-1: New USB device found, idVendor=2c7c, idProduct=0296, bcdDevice=
> 0.00
>  usb 2-1: New USB device strings: Mfr=3, Product=2, SerialNumber=4
> usb 2-1: Product: Qualcomm CDMA Technologies MSM
>  usb 2-1: Manufacturer: Qualcomm, Incorporated
> usb 2-1: SerialNumber: 7d1563c1
> option 2-1:1.0: GSM modem (1-port) converter detected
> usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
>  option 2-1:1.1: GSM modem (1-port) converter detected
> usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
> option 2-1:1.2: GSM modem (1-port) converter detected
>  usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
> option 2-1:1.3: GSM modem (1-port) converter detected
> usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3
> qmi_wwan 2-1:1.4: cdc-wdm0: USB WDM device
> qmi_wwan 2-1:1.4 wwan0: register 'qmi_wwan' at usb-ci_hdrc.1-1,
> WWAN/QMI device, 12:bc:8c:zz:yy:xx
> 
> # lsusb
> Bus 002 Device 007: ID 2c7c:0296 Quectel Wireless Solutions Co., Ltd.
> BG96 CAT-M1/NB-IoT modem
> Bus 002 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
> 
> Sending the AT reset command afterward works fine, and the modem keeps
> connected.

On this try, is the modem "firstly disconnect and then connect" or
it "keeps connects before and after" you sending the AT reset command?

From your next email, I am seeing it's a "firstly disconnect and then connect"
in that try, I want to understand what's the modem behavior of AT reset
command, both on SW(host driver, force a disconnect?) and HW(modem side,
it actually physically disconnect and then connect?).

Li Jun

> 
> Previously, this board used a vendor-based 4.14 kernel and such a
> problem did not happen.
> 
> Kernels 5.10 and 4.14 have the same 'auto' option selected by default.
> 
> Also tested kernel 6.1 and it behaves the same as 5.10.158.
> 
> What can be done so that the reset modem command does not cause the
> modem to disappear by default?
> 
> Thanks,
> 
> Fabio Estevam

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: imx7: USB modem reset causes modem to not re-connect
  2022-12-12 19:01 ` Fabio Estevam
  2022-12-13  7:31   ` Alexander Stein
@ 2022-12-13  8:15   ` Jun Li
  2022-12-13  9:33     ` Fabio Estevam
  1 sibling, 1 reply; 8+ messages in thread
From: Jun Li @ 2022-12-13  8:15 UTC (permalink / raw)
  To: Fabio Estevam, bjorn, Peter Chen, Marek Vasut
  Cc: netdev, USB list, Alexander Stein, Schrempf Frieder



> -----Original Message-----
> From: Fabio Estevam <festevam@gmail.com>
> Sent: Tuesday, December 13, 2022 3:01 AM
> To: bjorn@mork.no; Peter Chen <peter.chen@kernel.org>; Marek Vasut
> <marex@denx.de>; Jun Li <jun.li@nxp.com>
> Cc: netdev <netdev@vger.kernel.org>; USB list <linux-usb@vger.kernel.org>;
> Alexander Stein <alexander.stein@ew.tq-group.com>; Schrempf Frieder
> <frieder.schrempf@kontron.de>
> Subject: Re: imx7: USB modem reset causes modem to not re-connect
> 
> On Mon, Dec 12, 2022 at 3:10 PM Fabio Estevam <festevam@gmail.com> wrote:
> >
> > Hi,
> >
> > On an imx7d-based board running kernel 5.10.158, I noticed that a
> > Quectel BG96 modem is gone after sending a reset command via AT:
> 
> Disabling runtime pm like this:
> 
> diff --git a/drivers/usb/chipidea/ci_hdrc_imx.c
> b/drivers/usb/chipidea/ci_hdrc_imx.c
> index 9ffcecd3058c..e2a263d583f9 100644
> --- a/drivers/usb/chipidea/ci_hdrc_imx.c
> +++ b/drivers/usb/chipidea/ci_hdrc_imx.c
> @@ -62,7 +62,6 @@ static const struct ci_hdrc_imx_platform_flag
> imx6ul_usb_data = {  };
> 
>  static const struct ci_hdrc_imx_platform_flag imx7d_usb_data = {
> -       .flags = CI_HDRC_SUPPORTS_RUNTIME_PM,
>  };
> 
>  static const struct ci_hdrc_imx_platform_flag imx7ulp_usb_data = {
> 
> makes the USB modem to stay connected after the reset command:
> 
> # microcom /dev/ttyUSB3
> >AT+CFUN=1,1
> OK
> [   31.339416] usb 2-1: USB disconnect, device number 2

So disconnect happened.

> [   31.349480] option1 ttyUSB0: GSM modem (1-port) converter now
> disconnected from ttyUSB0
> [   31.358298] option 2-1:1.0: device disconnected
> [   31.366390] option1 ttyUSB1: GSM modem (1-port) converter now
> disconnected from ttyUSB1
> [   31.374883] option 2-1:1.1: device disconnected
> [   31.383359] option1 ttyUSB2: GSM modem (1-port) converter now
> disconnected from ttyUSB2
> [   31.391800] option 2-1:1.2: device disconnected
> [   31.404700] option1 ttyUSB3: GSM modem (1-port) converter now
> disconnected from ttyUSB3
> # [   31.413261] option 2-1:1.3: device disconnected

After a while, re-emulation happens.  

> [   36.151388] usb 2-1: new high-speed USB device number 3 using ci_hdrc
> [   36.354398] usb 2-1: New USB device found, idVendor=2c7c,
> idProduct=0296, bcdDevice= 0.00
> [   36.362768] usb 2-1: New USB device strings: Mfr=3, Product=2,
> SerialNumber=4
> [   36.370031] usb 2-1: Product: Qualcomm CDMA Technologies MSM
> [   36.375818] usb 2-1: Manufacturer: Qualcomm, Incorporated
> [   36.381355] usb 2-1: SerialNumber: 7d1563c1
> [   36.389915] option 2-1:1.0: GSM modem (1-port) converter detected
> [   36.397679] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB0
> [   36.412591] option 2-1:1.1: GSM modem (1-port) converter detected
> [   36.420237] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB1
> [   36.434988] option 2-1:1.2: GSM modem (1-port) converter detected
> [   36.442792] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB2
> [   36.457745] option 2-1:1.3: GSM modem (1-port) converter detected
> [   36.465709] usb 2-1: GSM modem (1-port) converter now attached to ttyUSB3

So this disconnect and then connect is you expected behavior?

Li Jun
> 
> Does anyone have any suggestions as to what could be the problem with runtime
> pm?

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: imx7: USB modem reset causes modem to not re-connect
  2022-12-13  8:15   ` Jun Li
@ 2022-12-13  9:33     ` Fabio Estevam
  2022-12-13 11:17       ` Jun Li
  0 siblings, 1 reply; 8+ messages in thread
From: Fabio Estevam @ 2022-12-13  9:33 UTC (permalink / raw)
  To: Jun Li
  Cc: bjorn, Peter Chen, Marek Vasut, netdev, USB list,
	Alexander Stein, Schrempf Frieder

Hi Li Jun,

On Tue, Dec 13, 2022 at 5:15 AM Jun Li <jun.li@nxp.com> wrote:

> So this disconnect and then connect is you expected behavior?

Yes, correct.

I found a way to get this behavior in both 5.10 as well as 6.1 kernels:
If I remove the USB_OTG2_OC pinctrl entry and pass
'disable-over-current', it works as expected.

On this board, the MX7D_PAD_UART3_RTS_B__USB_OTG2_OC pad goes to 3.3V
via a 10Kohm pullup resistor.

Could you please explain why removing theUSB_OTG2_OC entry makes things to work?

Thanks

^ permalink raw reply	[flat|nested] 8+ messages in thread

* RE: imx7: USB modem reset causes modem to not re-connect
  2022-12-13  9:33     ` Fabio Estevam
@ 2022-12-13 11:17       ` Jun Li
  2022-12-16 12:00         ` Fabio Estevam
  0 siblings, 1 reply; 8+ messages in thread
From: Jun Li @ 2022-12-13 11:17 UTC (permalink / raw)
  To: Fabio Estevam
  Cc: bjorn, Peter Chen, Marek Vasut, netdev, USB list,
	Alexander Stein, Schrempf Frieder



> -----Original Message-----
> From: Fabio Estevam <festevam@gmail.com>
> Sent: Tuesday, December 13, 2022 5:33 PM
> To: Jun Li <jun.li@nxp.com>
> Cc: bjorn@mork.no; Peter Chen <peter.chen@kernel.org>; Marek Vasut
> <marex@denx.de>; netdev <netdev@vger.kernel.org>; USB list
> <linux-usb@vger.kernel.org>; Alexander Stein
> <alexander.stein@ew.tq-group.com>; Schrempf Frieder
> <frieder.schrempf@kontron.de>
> Subject: Re: imx7: USB modem reset causes modem to not re-connect
> 
> Hi Li Jun,
> 
> On Tue, Dec 13, 2022 at 5:15 AM Jun Li <jun.li@nxp.com> wrote:
> 
> > So this disconnect and then connect is you expected behavior?
> 
> Yes, correct.
> 
> I found a way to get this behavior in both 5.10 as well as 6.1 kernels:
> If I remove the USB_OTG2_OC pinctrl entry and pass 'disable-over-current',
> it works as expected.

So the pinctrl is using MX7D_PAD_UART3_RTS_B__USB_OTG2_OC?

> 
> On this board, the MX7D_PAD_UART3_RTS_B__USB_OTG2_OC pad goes to 3.3V via
> a 10Kohm pullup resistor.

So the pad is fixed at 3.3V, never can be tied low?

> 
> Could you please explain why removing theUSB_OTG2_OC entry makes things to
> work?

So the actual board design does not want to have OC feature, right? if that
is the case, disable-over-current is the right way.

What's the OC polarity config in your SW, active low, or active high?
Basically if the OC condition is active, the host mode cannot work
well.

Li Jun
> 
> Thanks

^ permalink raw reply	[flat|nested] 8+ messages in thread

* Re: imx7: USB modem reset causes modem to not re-connect
  2022-12-13 11:17       ` Jun Li
@ 2022-12-16 12:00         ` Fabio Estevam
  0 siblings, 0 replies; 8+ messages in thread
From: Fabio Estevam @ 2022-12-16 12:00 UTC (permalink / raw)
  To: Jun Li
  Cc: bjorn, Peter Chen, Marek Vasut, netdev, USB list,
	Alexander Stein, Schrempf Frieder

Hi Li Jun,

On Tue, Dec 13, 2022 at 8:17 AM Jun Li <jun.li@nxp.com> wrote:

> What's the OC polarity config in your SW, active low, or active high?
> Basically if the OC condition is active, the host mode cannot work
> well.

Yes, if I keep the OC pinctrl definition and pass
'over-current-active-low;' the problem
does not happen.

Thanks a lot,

Fabio Estevam

^ permalink raw reply	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2022-12-16 12:01 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-12-12 18:10 imx7: USB modem reset causes modem to not re-connect Fabio Estevam
2022-12-12 19:01 ` Fabio Estevam
2022-12-13  7:31   ` Alexander Stein
2022-12-13  8:15   ` Jun Li
2022-12-13  9:33     ` Fabio Estevam
2022-12-13 11:17       ` Jun Li
2022-12-16 12:00         ` Fabio Estevam
2022-12-13  8:12 ` Jun Li

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.