i.MX6Q How to enable using USB_H1_PWR (ALT6)

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

i.MX6Q How to enable using USB_H1_PWR (ALT6)

Jump to solution
1,033 Views
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?

Labels (2)
0 Kudos
1 Solution
838 Views
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.

View solution in original post

0 Kudos
2 Replies
839 Views
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 Kudos
838 Views
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 Kudos