RE: USB type-C altmode support for UCSI
From: Mario.Limonciello
Date: Mon Sep 10 2018 - 17:25:56 EST
> -----Original Message-----
> From: whitequark [mailto:whitequark@xxxxxxxxxxxxxx]
> Sent: Friday, September 7, 2018 6:04 AM
> To: Limonciello, Mario
> Cc: heikki.krogerus@xxxxxxxxxxxxxxx; mika.westerberg@xxxxxxxxxxxxxxx; linux-
> kernel@xxxxxxxxxxxxxxx
> Subject: Re: USB type-C altmode support for UCSI
>
> On 2018-09-05 14:13, whitequark wrote:
> > On 2018-09-05 13:50, Mario.Limonciello@xxxxxxxx wrote:
> >> Some Dell XPS systems do not support that TBT2<->TBT3 adapter. I think
> >> I
> >> tried this on XPS 15 9550 and XPS 13 9365 and in both cases it is
> >> rejected. I think it has something to do with the PD controller
> >> firmware. Same goes if you Plug TB16 dock and to that dock then
> >> connect
> >> the adapter + device.
> >
> > This is my understanding as well, however I'd like to fix this issue.
> > From looking at the BIOS image I can see that the 9360 uses a TPS65982
> > USB PD controller. The adapter uses a TPS65983A (confusingly remarked
> > by Apple as CD3215B). I've seen reports on the web that there is some
> > inherent incompatibility between TPS65982 and TPS65983, however TI is
> > for some reason extremely secretive about TPS65983 and I wasn't able
> > to get anything definitive about it.
> >
> > Anyway, I've reverse engineered a nontrivial part of the TI TPS6598x
> > firmware and register layout, however my understanding of Thunderbolt
> > and USB PD is not sufficient to proceed.
> >
> > Mario, do you think you could get in touch with the people at Dell who
> > work with USB PD and ask if:
> >
> > (a) the adapter advertising an altmode with SVID:0x8087
> > VDO:0x00010001
> > is the problem here, and
> > (b) whether configuring the register 0x52 Intel VID Configuration in
> > the adapter's USB PD controller to set TBTModeDataTXSOP=0x0000
> > would help.
>
> I have been able to verify two things by reflashing the adapter with
> upstream
> (non-Apple) firmware and experimenting with the configuration:
>
> (a) the altmode with SVID:0x8087 VDO:0x00010001 (16th bit set) means
> that
> this is an altmode advertised by a legacy Thunderbolt (3 to 2)
> adapter.
> So the adapter is fine here.
Be really careful flashing to "upstream firmware" when it comes to PD
controllers. The configuration is usually tied to behavior of the firmware
on there and on in some instances can be modified at runtime via various
mechanisms.
>
> (b) the Dell USB PD controller doesn't try to negotiate the altmode even
> with
> advertised VDO:0x00000001. Something else is missing in the
> configuration.
>
> --
> whitequark
I did inquire to folks who work on PD (not for this notebook)
and they told me that that indeed it's likely it's an alt mode bit missing in
the configuration.
Also they had said it would be interesting to know if anything newer suffers
this same fault (such as XPS 9370 or Precision 5530).
I'll reach out to the right folks for this system to see if we can get that changed,
but this will take some time, so don't expect a quick turnaround.