AnsweredAssumed Answered

USB Host Initialization OTG1 port IMX6SX VBUS Power

Question asked by Ed Smith on Nov 29, 2016
Latest reply on Dec 6, 2016 by Ed Smith
I’m trying to get the OTG1 HOST mode of the MQX usb_v2 stack to work on the IMX6SX for a customer.  It’s failing to initialize because there is an inversion in the state of the the VBUS power specifically the USB_OTG1_PWR control signal.  I have tried a work-a-round using a GPIO for the power issue but this may have caused other problems with resting a connected device during initialization.
1.  The problem.  When the stack starts up it tries to enable VBUS power by setting the PP bit in the PORTSC1 register.  This bit should enable power to the VBUS when it is set and disable power when it clear.  However on the IMX6SoloX Saber board (rev C) the opposite is true.  Power is enabled when the bit is clear and disabled when the bit is set.  While one might think that simply reversing the state should solve the problem there appears to be other operations controlled by the PP bit.  It seems if this bit is set to 0 all internal operations of the USB hardware will not work.
2.  My work-a-round was to change the USB_OTG1_PWR (GPIO1_IO09) into a gpio line and manually control the enable and disable of power.  This has basically worked but there seems to still be other related problems with the initialization and here is where I’m hoping that you have a work-a-round for this problem or can point me to some Linux code that initializes and works with the OTG1 port in host mode.  This is definitely a problem related to using the port in host mode.