LS1046A can not detect USB device on u-boot

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

LS1046A can not detect USB device on u-boot

Jump to solution
790 Views
__OTL__
Contributor III

Hi

I am working on our custom board of LS1046A.

usb start can not drive USB_DRVVBUS or detect any device (when set the DRVVBUS as a GPIO and drive it high)

There is no power fault error on USB_PWRFAULT.

=> gpio set 125
gpio: pin 125 (gpio 125) value is 1
=> usb start
starting USB...
Bus usb@2f00000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3000000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@2f00000 for devices... 1 USB Device(s) found
scanning bus usb@3000000 for devices... 1 USB Device(s) found
scanning bus usb@3100000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

 

I tried to read the SCFG_USB_REFCLK_SELCR and found its reset is asserted :

=> md 01570418 1
01570418: 9e000080 ....

 

 

After maually deassertting the reset, the USB device can be detected normally

=> md 01570418 1
01570418: 9e000000 ....
=> usb reset
resetting USB...
Bus usb@2f00000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3000000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
Bus usb@3100000: Register 200017f NbrPorts 2
Starting the controller
USB XHCI 1.00
scanning bus usb@2f00000 for devices... 2 USB Device(s) found
scanning bus usb@3000000 for devices... 1 USB Device(s) found
scanning bus usb@3100000 for devices... 1 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found

 

Could you tell me how on what case the usb reset is asserted?

Does "usb start" is not enough?

What else should I do to enable usb instead of writing register directly? 

 

 

The usb related configuration :  

CONFIG_USB=y
CONFIG_DM_USB=y
CONFIG_USB_XHCI_HCD=y
CONFIG_USB_XHCI_DWC3=y

 

Could you give me any ideas, please.

0 Kudos
1 Solution
763 Views
mrudangshelat-13
NXP TechSupport
NXP TechSupport

Hi @__OTL__,

 

The USB PHY frequency (SCFG_USB_REFCLK_SELCRn) should be programmed in the PBI phase such that the USB PHY comes out of reset before SYSTEM_READY. Refer to 'Initialization on USB reset' mentioned in the LS1046A reference manual.

 

Regards,

Mrudang

View solution in original post

0 Kudos
3 Replies
752 Views
__OTL__
Contributor III

Hi Mrudang

Thank you.

I successed to do this after adding

CCSR Write to 0x570418, data=0x0000009e

to PBI Data.

 

But I have to say this is so hard to be noticed...

I wish you could also add a note in the LSDKUG Driver Chapter.

0 Kudos
764 Views
mrudangshelat-13
NXP TechSupport
NXP TechSupport

Hi @__OTL__,

 

The USB PHY frequency (SCFG_USB_REFCLK_SELCRn) should be programmed in the PBI phase such that the USB PHY comes out of reset before SYSTEM_READY. Refer to 'Initialization on USB reset' mentioned in the LS1046A reference manual.

 

Regards,

Mrudang

0 Kudos
786 Views
__OTL__
Contributor III

After maually deassertting the reset, the USB device can be detected normally

I mean use this command

mw 01570418 9e000000

 

0 Kudos