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: Issue with Thunderbolt pcie riser and TPS65987D source

Part Number: TPS65987D
Other Parts Discussed in Thread: TPS65987

Tool/software:

Hello app engineers,

I want to ask you for help, to save our 1 year of development of equipment for the high end film industry. 

(follow up on this E2E - e2e.ti.com/.../tps65987d-docking-station---100w-source-usb-3-2-hub)

Introduction:
We are developing device where is implemented TPS65987D 100W only source with UFP data role, and USB hub IC USB7206 (Hub need UFP port config).

There is also implemented Pcie riser TH3P4 Lite which works independently of TPS65987D and USB7206. So, one cable going from TCPC and one cable to second macbook port going from Pcie riser. Block diagram below:

We found a problem when both USB-C cables are connected to Macbook. In my opinion there is some problem with my TCPC (TPS65987D) configuration.

Now I explain you behavior to better understand it. 

1. Pcie riser don't want to allow TPS65987D to source the mackbook. When both USB-C cables are connected, Mackbook report only 15W charging. (Pcie riser don't have USB PD, so the 15W is probably 5V/3A. I tried these steps:
Firstly connected TPS65987D+USB7206 USB-C cable - Macbook reported 100W charging. Then I connected Pcie riser cable to macbook and it start reporting 15W charging. TPS65987D stop providing the power to macbook. TPS load switch is still closed but there is only 5V, not 20V. According to the E2E thread, you can see how I control the feedback of a USB PD buck-boost converter.

I tried to debug where might be a problem. I did some changes in my TCPC config but that not help. Than I tried to replace block TPS65987D+USB7206 with another USB PD sources. Check below.
2. I tried combination - Pcie riser + 60W wall adapter. In this case mackbook reported 60W charging. Pcie riser worked and also macbook was powered from wall adapter.
3. Next combination - Pcie riser + 100W PD source with MAX25432B. In this case mackbook reported 100W charging. Pcie riser worked and also macbook was powered from MAX25432.
4. Last combination - Pcie riser + Dell dock WD22TB4. In this case mackbook reported 90W charging. Pcie riser worked and also macbook was powered from Dell dock.

Here is my configuration project:
advanced_v2.4_DRP_MenicCTRL.pjt

I hope, something can be done about this and it is just a problem TCPC configuration. Something like: I don't have any "highest source priority" settings?
(I hope I didn't lose 1 year of my life developing with the wrong TCPC Weary)

Thank you
Best regards,
Martin

  • Hi Martin, 

    Thank you for reaching out!

    Here are a couple suggestions that may help: 

    1-Since this is a source-only application, the port configuration in register 28h should be set to "DFP" 

     

    2- Since this is a UFP, Data Capable as USB Device should be enabled, and Data Capable as USB Host should be disabled. 

    Please let me know if the following changes have an impact on the observed behavior. 

    Best Regards, 

    Aya Khedr 

  • Hi Aya,

    I tried your changes, but still same behavior. After plugging TH3P4 riser the macbook start reporting 15W charging.

    Any suggestions, please?

    Regards,
    Martin

  • Hi,

    Are there PD log for each cases, pass and fail case?

    Regards

  • Hi Tommy,

    Could you explain me what do you mean with PD log?

    Thanks
    Martin

  • Martin,

    USB-PD protocol is a communication done over usb-c tp usb-c cables between the macbook amd the tps65987. From your issue it sounds like the macbook is accepting the 100W contract before the pcie riser is plugged in. This means PD protocol is happening. We would need to see the PD logs for this scenario:

    Firstly connected TPS65987D+USB7206 USB-C cable - Macbook reported 100W charging. Then I connected Pcie riser cable to macbook and it start reporting 15W charging. TPS65987D stop providing the power to macbook.

    We would need PD logs of the Tps65987 to macbook. Then repeat the experiment for maxbook to pcie riser. 

    Thanks,

    Chris

  • Hi Christodulos,

    How can I get the PD log? I don't have PD analyzer Disappointed

    I also did one more test a minute ago. I connected Dell dock and my board with Tps65987 to macbook. Same behavior. Dell dock have "higher source priority" and charging the macbook.

    Regards,
    Martin

  • I have an idea... Could you try to use my config with EVAL board and use some dock to see if you will have same behavior?

  • Hi Christodulos,

    I found this PD decoder https://sigrok.org/wiki/Protocol_decoder_HOWTO

    I will try to make it work and then try to decode the CC communication and let you know the result. Hope, to the end of the week.

    Thank you for your support.
    Regards,
    Martin

  • Martin,

    There are several options that could help us determine what is happening. 

    1. If you have a Saleae logic analyzer we can use this to get some PD logs! https://discuss.saleae.com/t/pd-3-1-analyzer/2788/2

    2. If you can probe both sides of the macbook's Type C connectors with VBUS, CC1, CC2. We can see the CC communication and VBUS being provided to determine what is happening. It would not be ideal but would help. 

    Thanks,

    Chris

  • Hi Cristodulos,

    I have an update. I did PD communication decoding.

    Please, download the PulseView from provided website to be able check my measurement - https://sigrok.org/wiki/Downloads
    After downloading and installing, open attached files in PulseView. With scroll on mouse you can easily zoom and check the decoded values.

    Picture for preview how decoded data looks.

    I am not able to upload here saved data from PulseView directly. Probably you are blocking non-standard file suffixes. I add all to zip.

    PD_analyze_PulseView.zip

    Files description:
    TPS_plug.sr - only my board with TPS65987D connected to Macbook.

    riser_plug_afterTPS.srTPS65987D was connected first. Than I plugged TH3P4 Lite riser to the Macbook. The data in file show only what happened after the Riser was connected. (Before the Riser connection the decoded data looked like in TPS_plug.sr.)

    DellDock_plug_afterTPS.sr - TPS65987D was connected first. Than I plugged Dell dock to the Macbook. The data in file show only what happened after Dell dock was connected. (Before the Riser connection the decoded data looked like in TPS_plug.sr.)

    TPS+Riser_withDell_laptop.sr - Today I did test with Windows laptop Dell Latitude 5540. This measurement refer to situation when Riser was connected to Dell Latitude and laptop reporting slow charging. Then I plug my board with TPS65987D and laptop start charging from my board. (TPS Load switch closed and 20V on the USB-C Vbus pins). In this situation everything look seems to be working.

    According to the test with windows laptop (Dell), it looks like that there is some problem with macbook/macOS? What do you think about it?

    All these measurements was did on CC pin on my board with TPS65987D. So, decoded signals refer to the changes which happened to TPS65987D.

    In TPS65987D was uploaded this config below. There are applied advices from Aya.
    advanced_v2.4_DRP_MenicCTRL2.pjt

    Hope provided data will help you. Let me know.

    Thank you
    Best regards,
    Martin

  • riser_plug_afterTPS.srTPS65987D was connected first. Than I plugged TH3P4 Lite riser to the Macbook. The data in file show only what happened after the Riser was connected. (Before the Riser connection the decoded data looked like in TPS_plug.sr.)

    If I am understanding these logs, I think I found the issue. Please correct the assumption below:

    The riser_plug_afterTPS.sr - This is a PD connection between the TPS65987 and the Macbook. If this is true, then the problem is the macbook changing the PDO contract from 20V/4.7A in the TPS_plug.sr logs to 5V/0A when the riser is plugged in:

    If this is the case, this is the macbook deciding to change the PDO which seems odd but maybe the macbook favors to power over one port more than the other?

  • HI Christodulos,

    The riser_plug_afterTPS.sr - This is a PD connection between the TPS65987 and the Macbook. If this is true, then the problem is the macbook changing the PDO contract from 20V/4.7A in the TPS_plug.sr logs to 5V/0A when the riser is plugged in:

    You are right. I understand it same. I am so confused about this.

    Also, you mention that you found a issue... Do you have any solution how to fix it?

    I want to try one more thing... Regarding to my Buck-boost feedback network the 5V is fixed output and I have Buck-boost still Enabled (EN=High). I will try to change ENpin control and I will control it with one GPIO from TPS65987. I want to check if some changes occurs in decoded data.

    Second idea... I must to create some PCB with USB-C connector to be able measure CC communication from Dell dock and than decode it.

    If this is the case, this is the macbook deciding to change the PDO which seems odd but maybe the macbook favors to power over one port more than the other?

    Thank you for mentioning this. I tried this, and plug USB-C cables do different ports on macbook. This don't have any affect.

    Thank you
    Best regards,
    Martin

  • Hi Christodulos,

    I tested my board (TPS65987) with standard AC/DC 65W USB-C wall charger and macbook start reporting 65W when 65W charger was plugged to laptop instead of 100W (higher power).

    I did same test - 65W wall charger and Dell dock. The result is that macbook reporting 90W (dell dock) charging.

    So, my question is.. is there any way how to set the source priority? I am trying to find this info on the internet, but I haven't found it yet.

    Second question.. is the TPS65987 GUI enough to configure more complex power management systems? Or is the GUI only for some simply systems? And if user want something more complex, then must to write whole code and control the TPS65987 for example via I2C?

    Thank you
    Best regards,
    Martin

  • Martin, 

    So, my question is.. is there any way how to set the source priority?

    For the macbook? I do not know and that would be something out of my expertise. 

    is the TPS65987 GUI enough to configure more complex power management systems? Or is the GUI only for some simply systems?

    You can use an EC to control the registers in the TPS65987 at runtime. I2C1 can be used to send 4CC commands, write/read registers, etc. 

    Thanks,

    Chris

  • Hi Christodulos,

    Since you haven't given me any suggestion on how to fix it yet, are you telling me that none of your customers have ever encountered a similar problem?

    Please, could you contact some "TI PD big brain" and ask him for suggestion?

    Or could you test it? Just take some macbook, USB-C wall charger and TPS EVAL board.

    Thank you
    Martin

  • Since you haven't given me any suggestion on how to fix it yet, are you telling me that none of your customers have ever encountered a similar problem?

    The problem is the Macbook in this case. There is not a way to have the TPS65987 tell the Macbook to accept the 100W PDO instead of the 65W. 

    I asked for additional clarification because I cannot provide the full support without it. So please help answer and clarify these queries:

    I tested my board (TPS65987) with standard AC/DC 65W USB-C wall charger and macbook start reporting 65W when 65W charger was plugged to laptop instead of 100W (higher power).
    • This test is just the Macbook and TPS65987 correct? There are no other devices plugged into Macbook?
    I did same test - 65W wall charger and Dell dock. The result is that macbook reporting 90W (dell dock) charging.
    • This test please clarify my assumptions: There are now 2 devices plugged into the Macbook? a 65W from TPS65987 on Port X of Macbook, and a 90W Dell Dock on Port Y of Macbook?

    Thanks,

    Chris

  • Hi Chris,

    I tested my board (TPS65987) with standard AC/DC 65W USB-C wall charger and macbook start reporting 65W when 65W charger was plugged to laptop instead of 100W (higher power)

    In this case, I plugged TPS65987 first, mac start reporting 100W, then I plugged 65W USB-C charger. After charger was connected macbook start reporting 65W and TPS got 5Vout request from macbook. No other devices were connected. Is it clear for you?

    If I connect a TPS and than any other USB PD device to my MacBook, the TPS stops charging. Something caused a configuration change and I can't figure out how to fix it yet. Logically, I thought that a source with higher power would always have a higher priority compared to a source with lower power.

    I did same test - 65W wall charger and Dell dock. The result is that macbook reporting 90W (dell dock) charging.

    In this case, TPS was not connected. Only 65W charger and Dell dock was connected. 65W charger was connected first and then dell dock. Dell dock stay powering the macbook. I wanted to point out with this test that the device that reported higher power 90W vs 65W stays charging the macbook.

    Let me know if everything is clear now.

    Thank you
    Martin

  • Martin,

    Much more clear! Thank you. 

    I plugged TPS65987 first, mac start reporting 100W, then I plugged 65W USB-C charger. After charger was connected macbook start reporting 65W and TPS got 5Vout request from macbook.

    The problem is the Macbook is driving this. Not the TPS65987. The TPS65987 is NOT reducing the advertised PDOs. When the second device is plugged in, the Macbook is driving the renegotiation on the TPS port each time. In both the Dell Dock and the 65W charger there is a renegotiation to 5V/0A PDO with the TPS65987

    65W Charger:

    Dell Dock:

    Note these requests are coming from the Macbook which controls the source contracts. The Source can advertise 100W, if the sink (Macbook) does not request it, source (TPS65987) cannot provide it. 

    TPS65987 is doing all things correctly, the Macbook is doing something odd and deciding to change power contracts based on the latest connection, not highest power. There are no config changes that could help resolve this but I may have some suggestions to try:

    • Connect the 65W charger first, then the TPS65987. If the Macbook is behaving like I suspect, the TPS65987 contract will be providing power. 
    • Another option could be to send the 4CC command 'SSrC' - Send Source Capabilities AFTER the other device is connected. This may get the Macbook to renegotiate with the TPS for the higher power.
    In this case, TPS was not connected. Only 65W charger and Dell dock was connected. 65W charger was connected first and then dell dock. Dell dock stay powering the macbook. I wanted to point out with this test that the device that reported higher power 90W vs 65W stays charging the macbook.

    If you do this in the reverse order (connect Dell dock then 65W charger), I suspect the Macbook will be charging with 65W. 

    Thanks,

    Chris

  • Hi Chris,

    The problem is the Macbook is driving this. Not the TPS65987. The TPS65987 is NOT reducing the advertised PDOs. When the second device is plugged in, the Macbook is driving the renegotiation on the TPS port each time. In both the Dell Dock and the 65W charger there is a renegotiation to 5V/0A PDO with the TPS65987

    I understand this. Is there some way how to influence it? In my opinion, it must exist.

    Note these requests are coming from the Macbook which controls the source contracts. The Source can advertise 100W, if the sink (Macbook) does not request it, source (TPS65987) cannot provide it

    Understand.

    Another option could be to send the 4CC command 'SSrC' - Send Source Capabilities AFTER the other device is connected. This may get the Macbook to renegotiate with the TPS for the higher power.

    This looks as a possible solution. I will try it, but it will take me longer to create the code.

    If you do this in the reverse order (connect Dell dock then 65W charger), I suspect the Macbook will be charging with 65W. 

    This has no effect. Always, the Dell dock charges the macbook.

    Thank you
    Martin

  • I understand this. Is there some way how to influence it? In my opinion, it must exist.

    As a PD expert, there is no way to influence this. The USB-PD protocol is required to advertise 5V PDO at all times to ensure backwards compatibility. We cannot control the Macbook behavior in this scenario. 

    This has no effect. Always, the Dell dock charges the macbook.

    Can you share the logs of the following sequence of events:

    • Have Logic Analyzer on Port X
    • Connect Dell Dock to Port X 
    • Connect 65W Charger to Port Y 

    I suspect there may be some power contract re-negotiation on the Port X in this scenario when Port Y is plugged in. 

    Thanks,

    Chris 

  • Hi Chris,

    Can you share the logs of the following sequence of events:

    • Have Logic Analyzer on Port X
    • Connect Dell Dock to Port X 
    • Connect 65W Charger to Port Y

    I will try this in next two days and let you know ASAP. I need to prepare some board with two usbC connectors to be able measure CC communication.

    Also, is it OK that the Dell dock is thunderbolt dock? Will be the communication on CC pins the same?

    Best regards, 

    Martin

  • Thanks Martin! 

    That may play a partial role in the Macbook preferring TBT connection power. But unlikely as that would be data-related and not power-related. Also I did not see any TBT Entry process on the logs shared. But maybe the Dell dock PD logs were just not present! 

  • Hi Chris, 

    • Have Logic Analyzer on Port X
    • Connect Dell Dock to Port X 
    • Connect 65W Charger to Port Y 

    Check provided data measured according your guidelines. I don't notice nothing special in decoded info. At the end, there is a non-decoded part. This is probably thunderbolt or some different communication? I noticed it only when I tried to decode CCpins of Dell dock. 

    FirstDock_then_65Wcharger.zip

    Let me know what do you think about it. 

    I have an idea, would it be better to measure CC pins on both connected devices? Then we can compare the communication. For now, I created one of this crazy CC debuger. Need to find two more usbC connectors and I will be ready to decode two devices in same time. 

    Thank and regards, 

    Martin 

  • The USB-PD decoder seems to fail partially though the log you captured but I can split it up and get some interesting data. 

    Also, the CC debugger is very impressive thought in that! Can you add VBUS as well to these guys? I do not know if logic analyzer can handle 20V. 

    I think I may have found the potential issue. In the first PDO there is an option for Unconstrained to be set or not. For the TPS65987 the initial PDO does NOT have this bit set:

    However from the Dell Dock and 65W Charger, this bit is set:

    I think this is our issue as the Macbook is seeing this bit NOT set by the TPS65987 and preferring the other devices because not setting this bit causes the Macbook to think the TPS65987 is running off some finite power source and cannot supply the source power indefinitely. 

    We can fix this I believe by setting the 'Externally Powered' bit in Port Control (0x29):

    I cannot save the PJT at this time but please try this out! If it does not provide better results, then we will need to do your suggestion of capturing both ports and VBUS (is possible)

  • Hi Chis,

    You solved my problem! It is working now. Many thanks! This is my Christmas present :D

    I am going to test it in next days, and let you know if I notice some non-standard behavior.

    Enjoy the holidays, take a rest!

    Thank you very much once again!
    Martin