i.MX6Q How to enable using USB_H1_PWR (ALT6)

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

i.MX6Q How to enable using USB_H1_PWR (ALT6)

跳至解决方案
1,393 次查看
cbrust
Contributor III

I'm having difficulty understanding how to enable power using the USB_H1_PWR in ALT6.

Here's the u-boot setup for our custom board.

------------------------------------------------------

iomux_v3_cfg_t const usb_hc1_pads[] = {

    MX6_PAD_EIM_D31__USB_H1_PWR  |  MUX_PAD_CTRL(NO_PAD_CTRL),

    MX6_PAD_EIM_D30__USB_H1_OC     |  MUX_PAD_CTRL(NO_PAD_CTRL),

};

imx_iomux_v3_setup_multiple_pads(usb_hc1_pads,ARRAY_SIZE(usb_hc1_pads));

------------------------------------------------------

u-boot has the following line to enable power using gpio for standard configuration....

---> gpio_direction_output(IMX_GPIO_NR(1, 29), 1);

Question is; how do I enable the USB power for ALT6 mode?

标签 (2)
0 项奖励
回复
1 解答
1,198 次查看
cbrust
Contributor III

Sorry for the delay in replying to this but I wanted to post my final solution, if you can actually call it a "solution".  I researched the USB_nPORTSC1 bit and attempted to work that most confusing angle (IMHO).  I was unable to even read/write the PP bit and I never did figure out why.    However, one thing I noticed in the process of trying to figure this out was that the u-boot command "usb start" successfully turns on the USB devices via its internal code and hands the activated USB devices off to Linux without a hitch.  I tore through much of the u-boot USB code in an attempt to understand the USB power on process, but I was not totally successful in understanding it (more to do here).  In the mean time, the "solution" I finally opted for was to place a "usb start" command in the u-boot startup sequence inside the u-boot source code and just let the proven u-boot code turn on the port and hand it off.  This has worked flawlessly every time the system boots. It turns on USB, boots Linux and the USB device is ready  for use from the Linux O.S. once booted.

在原帖中查看解决方案

0 项奖励
回复
2 回复数
1,199 次查看
cbrust
Contributor III

Sorry for the delay in replying to this but I wanted to post my final solution, if you can actually call it a "solution".  I researched the USB_nPORTSC1 bit and attempted to work that most confusing angle (IMHO).  I was unable to even read/write the PP bit and I never did figure out why.    However, one thing I noticed in the process of trying to figure this out was that the u-boot command "usb start" successfully turns on the USB devices via its internal code and hands the activated USB devices off to Linux without a hitch.  I tore through much of the u-boot USB code in an attempt to understand the USB power on process, but I was not totally successful in understanding it (more to do here).  In the mean time, the "solution" I finally opted for was to place a "usb start" command in the u-boot startup sequence inside the u-boot source code and just let the proven u-boot code turn on the port and hand it off.  This has worked flawlessly every time the system boots. It turns on USB, boots Linux and the USB device is ready  for use from the Linux O.S. once booted.

0 项奖励
回复
1,198 次查看
igorpadykov
NXP Employee
NXP Employee

Hi C

this signal is controlled by USB module, check

register USB_nPORTSC1 bit  Port Power (PP).

Best regards

igor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复