I was using one image and changing the Alternate Mode Entry register (0x38) mode order between display port 0xff01 and thunderbolt 0x8087.
In the 1st image I have 0x8087/mode 1 as the first SVID, and 0xFF01/mode 1 as the 2nd SVID. The 2nd image has the opposite order.
I download an image to my TPS65982 and then connect to a Dell laptop and trace the PD traffic. No matter which image I use, the Discover SVIDs Ack message that comes from the TPS65982 on my board has byte 6 = 01, byte 7 = FF, byte 8 = 87 and byte 9 = 80. Bytes A-D have 0x00 in them for the two required blank SVIDs. It doesn't matter which image I load, I always get the same order. Here is what the trace is in either case:
I checked the images in the Appl Configuration tool and looked at Register 0x38 in raw mode and they flip between the two images. The register 0x38 raw value for the DP first is: 0x180870001ff01. The register 0x38 raw value for the TBlt first is: 0x1ff0100018087.
And, if I use the HostInterface tool (HIT) after loading each image, and read register 0x38 over I2C I see that they flip in the two images and match the config tool. So the downloaded images are different.
For DPort 1st, the raw value read using the 'read' command is 0x180870001ff01L. Using the register list and reading register 0x38 I see the Highest Priority SVID = 0xff01, and Second = 0x8087.
For TBlt 1st, the raw value read using the 'read' command is 0x1ff0100018087L. Using the register list and reading register 0x38 I see the Highest Priority SVID = 0x8087, and Second = 0xff01. Here is a picture from the 2nd:
I also confirmed this by using the read/write commands and changing register 0x38 in one image. So, why is the TPS65982 responding with the SVIDs on the PD handshake going out in the same order, no matter what register 0x38 says?
I looked at the traffic with two different PD analyzers and they both show the same order. When I read the Data Status register with the HIT, it says that a TBlt connection is made with either image, so apparently bytes 8 & 9 of the Discover SVIDs Ack message has priority. The Rev3, v1.0 PD documentation isn't clear on which one of the two in a word has priority, it shows SVID0 = bits 31:16, and SVID1 = bits 15:0. It seems like the Dell is choosing bits 15:0?
My solution at the moment is to only have one SVID per image, and drop the other one. Then I don't have to worry about the priority, but I wanted to understand what is going on.
WST