Question about USB Host power up timing

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

Question about USB Host power up timing

841 次查看
marco_lam
Contributor I

Dear All,

I am working with a custom iMX 7D Board referenced to iMX7D Sabre Rev D Board.

An external USB device is expect to connect to USB Host.

I would like to delay the detection of the USB device after most of the /etc/init.d scripts had been executed.

The board is using the same IC (SP2526A) and USB_OTG2_PWR is connected to GPIO1_IO07 as same as the Sabre board.

Looking into the device tree and the "regulator-fixed" driver, I tried to add "startup-delay-us" with different values.

I also added some debug prints around the delay with help me to verify with debug messages.

However, with the help of oscilloscope, I found that even the system is "correctly" sleeping during the delay, the signal level of USB_OTG2_PWR had already been pulled-up before the delay start.

Not sure if I had set anything incorrectly or misunderstood the usage of this property.

If I wish to achieve my goal, are there any alternative method?

Please help to advise.

Thanks

Marco

标签 (2)
0 项奖励
回复
3 回复数

702 次查看
CarlosCasillas
NXP Employee
NXP Employee

Hi Marco,

The delay will not be enough to init the USB later. If you want to initialize USB, it is recommended completely removing its initialization from the init.d file, and adding this initialization as a Module that would be loaded later.

The following thread may provide some hints:

Compile kernel module for specific Linux version on i.MX


Hope this will be useful for you.
Best regards!
/Carlos
-------------------------------------------------------------------------------
Note:
- If this post answers your question, please click the "Mark Correct" button. Thank you!
-------------------------------------------------------------------------------

0 项奖励
回复

702 次查看
ankitr_patel
Senior Contributor II

Hi Marco Lam,

Also from the HW perspective: Based on Sabre board schematic, NVCC_3V3 is providing pull-up to USB_OTG2_PWR of  SP2526A IC (We believe you have connected pull-up in R252). And NVC_3V3 is generating from the PMIC. Which will always generated based on the power sequence of PMIC and it will not have any delay for the voltage generation. So once NVCC_3V3 will be available on board the USB_OTG2_PWR will be high due to the pull-up. And even if you can add delay to NVCC_3V3, it will break the power sequence and also it will effect other peripherals which are operated on NVCC_3V3 supply.

Regards,

Ankit Patel

0 项奖励
回复

702 次查看
marco_lam
Contributor I

Hi Ankit,

Actually USB_OTG2_PWR on our design is pulled down with R254 installed. (Same as the schematic we are referring).

So the signal should be driven by iMX7D but not PMIC.

Actually I have tried to comment out the related parts of "usb_otg2_vbus" in the device tree, and drive the gpio level via sysfs. USB_OTG2_PWR  & USB_HOST_VBUS is correctly controlled by the gpio level, but some how iMX can't detect the usb device (may be some driver related issue which I'm not focusing atm)

Thanks,
Marco

0 项奖励
回复