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.

TPS65987D: Charging through Docking Station

Part Number: TPS65987D
Other Parts Discussed in Thread: TPS65987

The current project requires charging through the docking station. When the docking station is connected to a device, an I2C interrupt (configured through firmware, as shown in Figure 1) will be generated. When the device power supply is detected as a source, we will raise gpio114 in the interrupt function. At this time, TPS65987D has a 5v vcharge input and a 5v vbus output (as shown in Figure 2 and Figure 3), so that the device outputs 5v to power the docking station. However, when the adapter is inserted into the docking station port c to power the device, it cannot respond to the I2C interrupt, But we need to lower gpio114 in the interrupt function. May I ask how to solve this problem?

  • Hello!

    You have given a good description of the setup and what you want to accomplish. But I am unsure how to help and will need some answers to the following questions:

    But we need to lower gpio114

    Do you mean GPIO11? Or GPIO14? I do not see this.

    Based on Figure 2 and 3. I cannot identify the GPIO on the TPS65987D going to wire OTG_ENGPIO114 in figure 3. What is this GPIO?

    What is the GPIO Config setting for the GPIO you have chosen?

    Thanks,

    Chris

  • Hi, Chris!

    Perhaps my description was not clear enough, I will try my best to explain it more clearly below.
    GPIO114 is on the CPU side, as shown in Figure, so you can think that GPIO114 refers to OTG_ ENGPIO114,and there is no GPIO on the TPS65987D to wire OTG_ENGPIO114.

    And GPIO27 is also on the CPU side, which is the GPIO to wire I2C1_IRQ on the TPS65987D (Used to generate I2C interrupt), as shown in Figure below.

    When the docking station is connected to a device, the I2C1_IRQ on the TPS65987D will respond to the I2C interrupt, which is caused by GPIO27.We will raise gpio114 in the interrupt function to make TPS65987D has a 5v vcharge input and a 5v vbus output.However, when the adapter is inserted into the docking station port c to power the device, we also need TPS65987D to respond to the I2C interrupt, because we need to lower gpio114 in the interrupt function. That's what we need to solve!

  • Hello,

    Chris is out of office today. Please expect delay in response. 

    Best regards,
    Rohit. 

  • Ok I think I am getting a better picture!

    So is the 'Plug Insert or Removal' not generating the IRQ for your EC?

    Typically the flow is this with Plug Insert or Removal enabled:

    • TypeC device plugged in
    • PD will pull I2C1_IRQ LOW
    • EC will read-back 0x14 (Interrupt Event)
    • EC will write-back to 0x18 (Interrupt Clear)

    It sounds like this is happening, but you are looking for a interrupt event to disable? Is this correct?

    However, when the adapter is inserted into the docking station port c to power the device, we also need TPS65987D to respond to the I2C interrupt

    What do you mean by respond to the I2C interrupt? It sounds like the Plug Insert or Removal is asserting?

    Thanks,

    Chris

  • You misunderstood what I meant.

    When I plug the docking station into the Type-C port of my device and will generate the IRQ, as shown in Figure.

    Then I plug the adapter into the C port of the docking station to power the device, there is no IRQ generate at this time, as shown in Figure.But I want TPS65987D can generate the IRQ when I plug the adapter into the C port of the docking station so that I can lower gpio114 in the interrupt function.

  • We cannot detect the plug-in on the 2 item here since we are not the dock

    When you plug in the 2nd USB-PD, is there a Power-role swap happening? If so, you can use the PR_Swap complete interrupt event:

  • Thanks, this resolved my issue.

    By the way, if my device is currently in a shutdown state. How can the TPS65987 detect the plug-in on the 2 item and enter the shutdown charging state.

  • I do not think there is a way to communicate this over PD from device 2 plug to device 1 plug. The dock would be responsible for this.

  • you mean that if the dock support to communicate this over PD from device 2 plug to device 1 plug, then my device can charge even it is in a shutdown state, right? And if the dock can't support that, my device can't charge when it is power off.

  • Hi Wu,

    The device expert is currently out of the office and will look into this when they return later this week. Please expect a delay in their response accordingly. 

    Thanks,
    Field

  • you mean that if the dock support to communicate this over PD from device 2 plug to device 1 plug

    The dock (Device labeled 2) is an independent device from TPS65987 (Device 1).

    I am under the assumption that when you say 'Device 2 plug' you mean connection 'A':

    There is no way for Device 1 to know over connection B to C if connection A is removed or added in Device 2.

    Device 2 may trigger a Power-role swap depending on the connection but it is NOT something Device 2 can manage.

    then my device can charge even it is in a shutdown state, right?

    Which is my device? Do you mean Device 1? What defines a shutdown state? What connection A or B is removed?

    Thanks,

    Chris

  • yeah, I mean Device 1, and it is power off normally now. How can Device 1 know connection A is added so that Device 1 can be charged.

  • There is no way for Device 1 to know connection A has been added except if Device 2 issues a Power-Role Swap request.

    Thanks,

    Chris

  • But actually, even if Device 1 is powered off,  it should still be able to be charged when connection A plug to Device 2 (the docking station). This is also a normal usage scenario, so I want to know if TPS65987D support that.

    Thanks,

    Wu

  • Wu,

    This would be a valid use-case!

    So in the case described, Device 2 would be powered up.

    IF Device 2 supports being a Source on Port labeled 'C' then once Device 2 is done powering up, it should recognize Device 1 from Device 1, Port B being powered off.

    IF NOT Device 2 supports being a Source, then Device 1 will never be powered.

    Thanks,

    Chris

  • yeah,i did agree.

    I found that if connection A is added in Device 2 first and then connecion B plug to Device1, it would be charged. 

    However if connection B is added in Device 1 first and connection A plug to Device 2, it can't be charged. 

    Why this happen?                                                         

  • Second scenario:

    Connection B added to Device 1 first so Device 2 is powered by Device 2.

    Device 1 is the Source and DFP. Device 2 is Sink.

    Connection A is plugged into Device 2.

    Device 2 is still being powered by Device 1. It is up to Device 2 to determine which connection powers it. There is nothing Device 1 can do about this issue unless Device 2 requests a Power-Role Swap. Device 1 cannot recognize the swap.

    Thanks,

    Chris

  • So in this case, there is no way to configure the firmware using the Application Customization Tool to PD negotiate between Device 1 (the TPS6987D) and Device 2 (the Docking station) to recognize the connection A plug unless device 2 requests a power role swap.

    You said: There is nothing Device 1 can do about this issue unless Device 2 requests a Power-Role Swap. Device 1 cannot recognize the swap. Why Device 1 cannot recognize the swap?

    By the way, In Second scenario, Device 1 cannot be charged at first and keep the Connection A, then I used the debug mode of the Application Customization Tool to send the command 4CC "Gaid" causes a warm restart of TPS65987D and Device 1 could be charged. Could you explain that?

    Thanks,

    Wu

  • There is nothing Device 1 can do about this issue unless Device 2 requests a Power-Role Swap. Device 1 cannot recognize the swap. Why Device 1 cannot recognize the swap?

    Device 2 has to tell Device 1 there is another power source. This would be the problem of Device 2 to send a PR_Swap request.

    By the way, In Second scenario, Device 1 cannot be charged at first and keep the Connection A, then I used the debug mode of the Application Customization Tool to send the command 4CC "Gaid" causes a warm restart of TPS65987D and Device 1 could be charged. Could you explain that?

    Is Device 1 Bus-Powered only?

    Thanks,

    Chris