This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TPS65950/30/20: USB status bits - STS_VBUS AND STS_USB

Other Parts Discussed in Thread: TPS65950

Q: On powering on the platform without USB cable connected, PM_MASTER: STS_HW_CONDITIONS STS_VBUS and STS_USB seem to report opposite values. However, by setting PMRECIEVERVUSB_DEDICATED1::WKUPCOMP_EN to 1, the bits seem to stay in sync. Is there a reason for the same?

A: STS_VBUS checks if VBUS voltage is 5 V. STS_USB checks if ID pin is grounded. 
This explains the behavior on board.

When a USB device is plugged, it grounds ID pin and this is what STS_USB indicates.

WKUPCOMP     VBUS = 5V       ID = 0      STS_VBUS    STS_USB                                            
     0                        X                   X                    0                      0                           
     1                        NO                NO                0                      0   
     1                        NO               YES               0                      1   
     1                        YES              NO                1                      0   
     1                        YES             YES               1                      1   

If WKUPCOMP is LOW, it disables both the VBUS and ID comparators and hence the status bits will never get updated.

 

  • There seem to be documentation bugs in this area, which took time to sort out:

    • Section 15.4.8.1 should say WKUPCOMP is a second way to disable that function; it now says using battery backup mode is the only way it gets disabled.
    • That and section 15.4.8.2 say VBUS_PRES, but should instead reference HW_CONDITIONS:STS_VBUS; according to the rest of the TRM, VBUS_PRES doesn't exist.
    • That and section 15.4.8.3 say ID_PRES, but should instead reference HW_CONDITIONS:STS_USB; likewise, ID_PRES doesn't exist, according to the rest of the TRM

    Definitions of those HW_CONDITIONS bits would be much improved if they referenced their 15.4.8.x sections for complete behavior specs; and the definition of the PM module's USB interrupt would be improved by referencing 15.4.8.1 in the same way.  But the three points above seem to be clear bugs, rather than just expecting readers to search the whole 900+ pages of TRM to find what how that stuff really works.

    In addition, I'm seeing STS_ID sometimes not registering at all... the PM interrupt is generated when I insert the mini-A into a 3430SDP, but that bit is not set.  I'm about to test whether setting OTG_CTRL.IDPULLUP resolves that.  But what puzzles me is how, if that needs to be explicitly set, it ever registers at all.  Could the OMAP 3430 (ES 3.0) be clearing that bit as part of HNP?

  • Turns out that setting IDPULLUP and waiting 50 msec does NOT make HW_CONDITIONS:STS_USB go high even after re-enabling the VUSB3V1 regulator. I'm puzzled.  Hooking up a Mini-A connector should ground ID, and I have no reason to suspect there's any electrical problem making it not do so.  (It does in other cases... like when the Mini-A connector is present during warm reset.)

    The problem is that the OTG state machine in the OMAP is now misbehaving.  It could easily be caused by this incorrect reporting of the ID signal.  What regulators are needed before STS_USB works correctly?  Is Figure 15-32 correct?

    15.4.8.3 also references an ID_RES_EN signal, which seems like in conjunction with VUSB3V1 enabled would let ID_STATUS:ID_GND do what I need.  But I can't find a register defining that signal.

  • Hi,

          VUSB3P1 regulator is enough to get the behavior you need. 

    In order to have the comparator working, along with ID_COMP_EN and ID_PULLUP, ID_RES_EN too is a must.  The register definition for this is :

    POWER_CTRL -> used to control OTG section of USB.  Bit[2] is ID_RES_EN.

    Fig 15-32 is correct. In this:

    VUSB3P1 : Used to pull-up ID and also supply the RES_DIV network.

    ID_PULLUP:Control signal that enables the pull up .

    ID_RES_EN: This will enable the RES_DIV network (shown in fig) and sets proper reference to the comparators.

    Hope this information helps.

     

    Regards,

    Kartik

     

  • Dear Gandhar,

    We have connected tps65950, ID pin to VBUS.3P1 pin and we would like to connect a host device. As per the specs the host device can be operated if ID pin is grounded for TPS65950. Now as the hardware cannot be modified, can you please suggest a software solution how to make the TPS65950 to work in HOST USB mode.

    Regards

    Maimuna

     

  • Hi Maimuna,

    The s/w work around to configure the PMIC USB in HOST mode is as follows:
     
    To configure the FS HOST mode operation:
    Write FUNC_CTRL 0x45          <-  FS mode operation
    Write OTG_CTRL 0x26            <-  pull down Dp and Dm. and Drive VBUS to 5V
     
    To configure the LS HOST mode operation:
    Write FUNC_CTRL 0x46    <- LS mode operation
    Write OTG_CTRL  0x26     <- pull down DP and DM, drive VBUS to 5V

    I hope this helps.


    Regards,
    Gandhar.