BSVIS interrupt not generated on USB hotplug on custom board based on imx8m mini

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

BSVIS interrupt not generated on USB hotplug on custom board based on imx8m mini

1,049 Views
BHAVANI_S
Contributor I

We are having a custom board based on I.MX 8M mini. We want to have the usb charger detection functionality to limit the current drawn from a max charger IC.

We are facing some issues during the detection. We are testing the detection in various scenarios and the  details are as mentioned below.

1. USB is connected before booting the kernel:

The detection of the host charger connected is happening fine when the cable is connected to the charger before kernel boots up. 

2.   USB is not connected before booting the kernel and then hotplugged:

The detection is also happening fine when the cable is not connected to the charger and on ,kernel bootup the cable is hotplugged. We observe that in this case the BSVIS[USBx_nOTGSC[19]] interrupt which indicates that "VBus has either risen above or fallen below the B session valid threshold" is set  and hence it is enabling the vbus comparator, entering the "usb_gadget_vbus_connect" function in kernel/drivers/usb/gadget/udc/core.c and also completing the detection process.

3.  USB is connected before booting the kernel and then again hotplugged:

In this case the "BSVIS"[USBx_nOTGSC[19] register bit] is not getting set  and hence not indicating that there is a change in vbus connected and its not entering the detection process. 

 

We are stuck with this issue and require your help in understanding the reason for the interrupt not getting generated and also how can we reinitiate the detection process on hotplug.

 

Thanks and Regards,

Bhavani S

0 Kudos
Reply
1 Reply

1,027 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

BSVIS detects that VBUS valid or not, you should check the VBUS signal using scope when you hotplug. The defalut valid VBUS is 4.75V.

Qmiller_0-1671518070759.png

BSVIS is a flag of  VBUS Detect comparator.  The Session Valid threshold is > 0.8V and < 2.0V on this USB PHY.

Qmiller_1-1671518461523.png

 

 

 

0 Kudos
Reply