USB DCD always reports SDP on i.MX 7ULP EVKB

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

USB DCD always reports SDP on i.MX 7ULP EVKB

580 Views
nonoo
Contributor I

I want to use the i.MX 7ULP EVKB board as a USB gadget with battery charging support. USB mass storage device/gadget functionality is correctly working, so the kernel is properly configured for the device operation.

My issue is that the USB device charger detection process always reports the detected port type as SDP, even if it is connected to a charger port. I'm using the 5.4-2.2.x-imx branch of the kernel, which already has this patch applied. I've also tested with the default Yocto/Dunfell kernel branch 5.4-2.1.x-imx, with the same results.

I've tried setting all registers (except clock) the same as on a correctly working board with only a Kinetis MK26FN2M0xxx18, as both the MK26 and IMX7ULP use the same registers for DCD. Values written/read to/from the registers during a DCD can be seen here:

[ 10.639765] mxs_phy 40350000.usb-phy: control 02010000
[ 10.639789] mxs_phy 40350000.usb-phy: clock 000000e9
[ 10.639805] mxs_phy 40350000.usb-phy: timer0 00c80000
[ 10.639820] mxs_phy 40350000.usb-phy: timer1 003200c8
[ 10.639834] mxs_phy 40350000.usb-phy: timer2 00320032
[ 10.639843] mxs_phy 40350000.usb-phy: control-iebc 00020000
[ 10.639850] mxs_phy 40350000.usb-phy: control-start 01020000
[ 10.639858] mxs_phy 40350000.usb-phy: control 00020000
[ 10.639865] mxs_phy 40350000.usb-phy: status 00400302
[ 10.705551] mxs_phy 40350000.usb-phy: control 00020000
[ 10.705705] mxs_phy 40350000.usb-phy: status 00440905
[ 10.775542] mxs_phy 40350000.usb-phy: control 00020000
[ 10.775554] mxs_phy 40350000.usb-phy: status 00440905
[ 10.847297] mxs_phy 40350000.usb-phy: control 00020100
[ 10.847308] mxs_phy 40350000.usb-phy: status 0009010f
[ 10.847325] mxs_phy 40350000.usb-phy: SDP

Port is still always identified as SDP using the IMX7ULP EVKB, but the Kinetis board is correctly detecting the port type with these register values. I've tested a lot of chargers.

Can you help me fixing the DCD process?

0 Kudos
2 Replies

518 Views
nonoo
Contributor I

Can you please explain how this is related to the DCD process incorrectly recognizing a charge port as SDP, and how can I make it work correctly?

0 Kudos

528 Views
AldoG
NXP TechSupport
NXP TechSupport

Hello,

From hardware side on the EVK when wall adapter is not present or < 4.5V the path of USB input Charger IC is always enabled, otherwise is disabled.

image.png
You'll find this note on the SOM schematic page 4.

Regards,
Aldo.

0 Kudos