* USB 2.0 host controller for Thunderbolt 4
@ 2023-05-23 8:53 Tomasz Moń
2023-05-23 9:01 ` Mika Westerberg
2023-05-23 9:44 ` Oliver Neukum
0 siblings, 2 replies; 7+ messages in thread
From: Tomasz Moń @ 2023-05-23 8:53 UTC (permalink / raw)
To: Andreas Noever, Michael Jamet, Mika Westerberg, Yehezkel Bernat,
linux-usb
Cc: Tomasz Moń
Hello,
Dell Latitude 5330 with 12th Gen Intel(R) Core(TM) i7-1265U contains
following PCI devices:
* 8086:461e - Alder Lake-P Thunderbolt 4 USB Controller
* 8086:51ed - Alder Lake PCH USB 3.2 xHCI Host Controller
Thunderbolt 4 USB Controller initializes first and therefore following
usb host controllers are registered:
* usb1 - USB 2.0 High-Speed
* usb2 - USB 3.2 Enhanced SuperSpeed
* usb3 - USB 2.0 High-Speed
* usb4 - USB 3.1 Enhanced SuperSpeed
When I connect SuperSpeed device directly to the Dell Latitude, it ends
up on usb4. Low/Full/High-Speed devices end up on usb3 as expected.
When I connect Thunderbolt 3 dock, two new host controllers show up:
* usb5 - USB 2.0 High-Speed
* usb6 - USB 3.0 SuperSpeed
Devices connected through Thunderbolt 3 dock end up on expected host
controllers, i.e. Low/Full/High-Speed devices connect to usb5 and
SuperSpeed devices end up on usb6.
Is Thunderbolt 3 essentially tunnelling the USB 2.0 traffic (by
tunnelling PCIe xHCI host controller traffic) on the superspeed
differential pairs (operating in alternate TBT3 mode)?
When I connect Thunderbolt 4 dock, the SuperSpeed devices connected to
dock ports end up on usb2 host controller. However, Low/Full/High-Speed
devices do end up on usb3 (USB 3.2 xHCI) and not on usb1 (Alder Lake-P
Thunderbolt 4 USB Controller).
Is there any condition under which the Low/Full/High-Speed devices
would end up on usb1 (USB 2.0 High-Speed host controller interface
created for Thunderbolt 4 USB Controller)?
Does the Alder Lake-P Thunderbolt 4 USB Controller even feature USB 2.0
interface? If not, should the (effectively dummy) usb1 host controller
even be registered? Is the USB 2.0 functionality provided entirely by
the Alder Lake PCH USB 3.2 xHCI Host Controller (i.e. when there is no
TBT3 dock connected)?
--
Tomasz Moń | Senior Firmware Engineer
P +48 882 826 111 | Wrocław, Poland
nordicsemi.com | devzone.nordicsemi.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: USB 2.0 host controller for Thunderbolt 4
2023-05-23 8:53 USB 2.0 host controller for Thunderbolt 4 Tomasz Moń
@ 2023-05-23 9:01 ` Mika Westerberg
2023-05-23 9:45 ` Moń, Tomasz
2023-05-23 9:44 ` Oliver Neukum
1 sibling, 1 reply; 7+ messages in thread
From: Mika Westerberg @ 2023-05-23 9:01 UTC (permalink / raw)
To: Tomasz Moń; +Cc: Andreas Noever, Michael Jamet, Yehezkel Bernat, linux-usb
Hi,
On Tue, May 23, 2023 at 10:53:17AM +0200, Tomasz Moń wrote:
> Hello,
>
> Dell Latitude 5330 with 12th Gen Intel(R) Core(TM) i7-1265U contains
> following PCI devices:
> * 8086:461e - Alder Lake-P Thunderbolt 4 USB Controller
> * 8086:51ed - Alder Lake PCH USB 3.2 xHCI Host Controller
>
> Thunderbolt 4 USB Controller initializes first and therefore following
> usb host controllers are registered:
> * usb1 - USB 2.0 High-Speed
> * usb2 - USB 3.2 Enhanced SuperSpeed
> * usb3 - USB 2.0 High-Speed
> * usb4 - USB 3.1 Enhanced SuperSpeed
>
> When I connect SuperSpeed device directly to the Dell Latitude, it ends
> up on usb4. Low/Full/High-Speed devices end up on usb3 as expected.
>
> When I connect Thunderbolt 3 dock, two new host controllers show up:
> * usb5 - USB 2.0 High-Speed
> * usb6 - USB 3.0 SuperSpeed
>
> Devices connected through Thunderbolt 3 dock end up on expected host
> controllers, i.e. Low/Full/High-Speed devices connect to usb5 and
> SuperSpeed devices end up on usb6.
>
> Is Thunderbolt 3 essentially tunnelling the USB 2.0 traffic (by
> tunnelling PCIe xHCI host controller traffic) on the superspeed
> differential pairs (operating in alternate TBT3 mode)?
It is not. The USB 2.x wires are separate on type-C cables.
> When I connect Thunderbolt 4 dock, the SuperSpeed devices connected to
> dock ports end up on usb2 host controller. However, Low/Full/High-Speed
> devices do end up on usb3 (USB 3.2 xHCI) and not on usb1 (Alder Lake-P
> Thunderbolt 4 USB Controller).
Yes, that's expected the TBT USB controller (on the host) does not
support USB 2.x so it is routed to the PCH one.
> Is there any condition under which the Low/Full/High-Speed devices
> would end up on usb1 (USB 2.0 High-Speed host controller interface
> created for Thunderbolt 4 USB Controller)?
If I understood this right, then no.
> Does the Alder Lake-P Thunderbolt 4 USB Controller even feature USB 2.0
> interface? If not, should the (effectively dummy) usb1 host controller
> even be registered? Is the USB 2.0 functionality provided entirely by
> the Alder Lake PCH USB 3.2 xHCI Host Controller (i.e. when there is no
> TBT3 dock connected)?
It does not.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: USB 2.0 host controller for Thunderbolt 4
2023-05-23 9:01 ` Mika Westerberg
@ 2023-05-23 9:45 ` Moń, Tomasz
2023-05-23 11:03 ` Mathias Nyman
2023-05-23 12:54 ` mika.westerberg
0 siblings, 2 replies; 7+ messages in thread
From: Moń, Tomasz @ 2023-05-23 9:45 UTC (permalink / raw)
To: mika.westerberg@linux.intel.com
Cc: YehezkelShB@gmail.com, andreas.noever@gmail.com,
michael.jamet@intel.com, linux-usb@vger.kernel.org
On Tue, 2023-05-23 at 12:01 +0300, Mika Westerberg wrote:
> On Tue, May 23, 2023 at 10:53:17AM +0200, Tomasz Moń wrote:
> > When I connect Thunderbolt 3 dock, two new host controllers show up:
> > * usb5 - USB 2.0 High-Speed
> > * usb6 - USB 3.0 SuperSpeed
> >
> > Devices connected through Thunderbolt 3 dock end up on expected host
> > controllers, i.e. Low/Full/High-Speed devices connect to usb5 and
> > SuperSpeed devices end up on usb6.
> >
> > Is Thunderbolt 3 essentially tunnelling the USB 2.0 traffic (by
> > tunnelling PCIe xHCI host controller traffic) on the superspeed
> > differential pairs (operating in alternate TBT3 mode)?
>
> It is not. The USB 2.x wires are separate on type-C cables.
Yes, the USB 2.x wires are separate on type-C cables. But this does not
answer the question why there is new USB 2.0 High-Speed controller
showing up that the devices do connect to.
Wouldn't the Low/Full/High-Speed devices traffic appear on usb3 (PCH
controller) if the USB 2.x wires in type-C cable were really used in
this case (instead of the usb5 which appeared only after Thunderbolt 3
was connected)?
I forgot to mention that the Thunderbolt 3 docking station in question
has Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C
2015] and ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller.
The way I understand it, that the usb5 and usb6 come from ASM1042A
(which implements xHCI). The communication would then be:
* Dell Latitude <-> Thunderbolt 3 dock (TBT3 tunnelling PCIe xHCI)
* ASM1042 (in Thunderbolt 3 dock) <-> USB 2.x devices connected to
the dock (data never makes it to type-C D+/D- wires, because it is
ASM1042 that generates the tokens)
Is there a flaw in my understanding?
> > When I connect Thunderbolt 4 dock, the SuperSpeed devices connected to
> > dock ports end up on usb2 host controller. However, Low/Full/High-Speed
> > devices do end up on usb3 (USB 3.2 xHCI) and not on usb1 (Alder Lake-P
> > Thunderbolt 4 USB Controller).
>
> Yes, that's expected the TBT USB controller (on the host) does not
> support USB 2.x so it is routed to the PCH one.
Should the driver be changed to not even register the dummy USB 2.0
interface in such case?
--
Tomasz Moń | Senior Firmware Engineer
P +48 882 826 111 | Wrocław, Poland
nordicsemi.com | devzone.nordicsemi.com
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: USB 2.0 host controller for Thunderbolt 4
2023-05-23 9:45 ` Moń, Tomasz
@ 2023-05-23 11:03 ` Mathias Nyman
2023-05-23 12:54 ` mika.westerberg
1 sibling, 0 replies; 7+ messages in thread
From: Mathias Nyman @ 2023-05-23 11:03 UTC (permalink / raw)
To: Moń, Tomasz, mika.westerberg@linux.intel.com
Cc: YehezkelShB@gmail.com, andreas.noever@gmail.com,
michael.jamet@intel.com, linux-usb@vger.kernel.org
On 23.5.2023 12.45, Moń, Tomasz wrote:
> On Tue, 2023-05-23 at 12:01 +0300, Mika Westerberg wrote:
>> On Tue, May 23, 2023 at 10:53:17AM +0200, Tomasz Moń wrote:
>>> When I connect Thunderbolt 3 dock, two new host controllers show up:
>>> * usb5 - USB 2.0 High-Speed
>>> * usb6 - USB 3.0 SuperSpeed
>>>
>>> Devices connected through Thunderbolt 3 dock end up on expected host
>>> controllers, i.e. Low/Full/High-Speed devices connect to usb5 and
>>> SuperSpeed devices end up on usb6.
>>>
>>> Is Thunderbolt 3 essentially tunnelling the USB 2.0 traffic (by
>>> tunnelling PCIe xHCI host controller traffic) on the superspeed
>>> differential pairs (operating in alternate TBT3 mode)?
>>
>> It is not. The USB 2.x wires are separate on type-C cables.
>
> Yes, the USB 2.x wires are separate on type-C cables. But this does not
> answer the question why there is new USB 2.0 High-Speed controller
> showing up that the devices do connect to.
>
> Wouldn't the Low/Full/High-Speed devices traffic appear on usb3 (PCH
> controller) if the USB 2.x wires in type-C cable were really used in
> this case (instead of the usb5 which appeared only after Thunderbolt 3
> was connected)?
>
> I forgot to mention that the Thunderbolt 3 docking station in question
> has Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C
> 2015] and ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller.
>
> The way I understand it, that the usb5 and usb6 come from ASM1042A
> (which implements xHCI). The communication would then be:
> * Dell Latitude <-> Thunderbolt 3 dock (TBT3 tunnelling PCIe xHCI)
> * ASM1042 (in Thunderbolt 3 dock) <-> USB 2.x devices connected to
> the dock (data never makes it to type-C D+/D- wires, because it is
> ASM1042 that generates the tokens)
>
> Is there a flaw in my understanding?
>
>>> When I connect Thunderbolt 4 dock, the SuperSpeed devices connected to
>>> dock ports end up on usb2 host controller. However, Low/Full/High-Speed
>>> devices do end up on usb3 (USB 3.2 xHCI) and not on usb1 (Alder Lake-P
>>> Thunderbolt 4 USB Controller).
>>
>> Yes, that's expected the TBT USB controller (on the host) does not
>> support USB 2.x so it is routed to the PCH one.
>
> Should the driver be changed to not even register the dummy USB 2.0
> interface in such case?
>
Even if nothing is routed to the TBT USB xHCI USB 2.x ports, the controller
itself reports it supports both Low/Full/High-Speed ports and SuperSpeed
ports, so driver creates roothubs for both.
This might be due to xHCI spec 7.2.2.1 USB Protocols stating:
"USB 2.0 and USB 3.x Supported Protocol Capabilities shall be declared
if any USB3 connectors are associated with xHCI Root Hub ports that enable user
attached devices. Refer to sections 11.1 and 11.3 in the USB3 spec."
xhci driver was recently changed to support xHCI hosts with only one
roothub (USB 2.x or USB 3.x) for xHCI platform devices, there is some minor
work needed in xhci-pci.c to support only one roothub for PCI xHCI controllers.
But as long as the controller reports having both USB 2.x and USB 3.x ports the
driver will create roothubs for both.
Thanks
Mathias
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: USB 2.0 host controller for Thunderbolt 4
2023-05-23 9:45 ` Moń, Tomasz
2023-05-23 11:03 ` Mathias Nyman
@ 2023-05-23 12:54 ` mika.westerberg
1 sibling, 0 replies; 7+ messages in thread
From: mika.westerberg @ 2023-05-23 12:54 UTC (permalink / raw)
To: Moń, Tomasz
Cc: YehezkelShB@gmail.com, andreas.noever@gmail.com,
michael.jamet@intel.com, linux-usb@vger.kernel.org
On Tue, May 23, 2023 at 09:45:49AM +0000, Moń, Tomasz wrote:
> On Tue, 2023-05-23 at 12:01 +0300, Mika Westerberg wrote:
> > On Tue, May 23, 2023 at 10:53:17AM +0200, Tomasz Moń wrote:
> > > When I connect Thunderbolt 3 dock, two new host controllers show up:
> > > * usb5 - USB 2.0 High-Speed
> > > * usb6 - USB 3.0 SuperSpeed
> > >
> > > Devices connected through Thunderbolt 3 dock end up on expected host
> > > controllers, i.e. Low/Full/High-Speed devices connect to usb5 and
> > > SuperSpeed devices end up on usb6.
> > >
> > > Is Thunderbolt 3 essentially tunnelling the USB 2.0 traffic (by
> > > tunnelling PCIe xHCI host controller traffic) on the superspeed
> > > differential pairs (operating in alternate TBT3 mode)?
> >
> > It is not. The USB 2.x wires are separate on type-C cables.
>
> Yes, the USB 2.x wires are separate on type-C cables. But this does not
> answer the question why there is new USB 2.0 High-Speed controller
> showing up that the devices do connect to.
So for the xHCI on the dock itself, I think this is what you mean, it is
just a normal PCIe endpoint and all that traffic goes over a PCIe
tunnel, including the USB 2.x.
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: USB 2.0 host controller for Thunderbolt 4
2023-05-23 8:53 USB 2.0 host controller for Thunderbolt 4 Tomasz Moń
2023-05-23 9:01 ` Mika Westerberg
@ 2023-05-23 9:44 ` Oliver Neukum
2023-05-23 9:49 ` Tomasz Moń
1 sibling, 1 reply; 7+ messages in thread
From: Oliver Neukum @ 2023-05-23 9:44 UTC (permalink / raw)
To: Tomasz Moń, Andreas Noever, Michael Jamet, Mika Westerberg,
Yehezkel Bernat, linux-usb
On 23.05.23 10:53, Tomasz Moń wrote:
> Hello,
>
> Dell Latitude 5330 with 12th Gen Intel(R) Core(TM) i7-1265U contains
> following PCI devices:
> * 8086:461e - Alder Lake-P Thunderbolt 4 USB Controller
> * 8086:51ed - Alder Lake PCH USB 3.2 xHCI Host Controller
>
> Thunderbolt 4 USB Controller initializes first and therefore following
> usb host controllers are registered:
> * usb1 - USB 2.0 High-Speed
> * usb2 - USB 3.2 Enhanced SuperSpeed
> * usb3 - USB 2.0 High-Speed
> * usb4 - USB 3.1 Enhanced SuperSpeed
>
> When I connect SuperSpeed device directly to the Dell Latitude, it ends
> up on usb4. Low/Full/High-Speed devices end up on usb3 as expected.
>
> When I connect Thunderbolt 3 dock, two new host controllers show up:
> * usb5 - USB 2.0 High-Speed
> * usb6 - USB 3.0 SuperSpeed
Could you provide lspci in that state?
AFAICT there is nothing that would prevent a vendor from putting
a PCI HC into a TB3 docking station.
Regards
Oliver
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: USB 2.0 host controller for Thunderbolt 4
2023-05-23 9:44 ` Oliver Neukum
@ 2023-05-23 9:49 ` Tomasz Moń
0 siblings, 0 replies; 7+ messages in thread
From: Tomasz Moń @ 2023-05-23 9:49 UTC (permalink / raw)
To: Oliver Neukum, Andreas Noever, Michael Jamet, Mika Westerberg,
Yehezkel Bernat, linux-usb
On Tue, 2023-05-23 at 11:44 +0200, Oliver Neukum wrote:
> On 23.05.23 10:53, Tomasz Moń wrote:
> > Hello,
> >
> > Dell Latitude 5330 with 12th Gen Intel(R) Core(TM) i7-1265U contains
> > following PCI devices:
> > * 8086:461e - Alder Lake-P Thunderbolt 4 USB Controller
> > * 8086:51ed - Alder Lake PCH USB 3.2 xHCI Host Controller
> >
> > Thunderbolt 4 USB Controller initializes first and therefore following
> > usb host controllers are registered:
> > * usb1 - USB 2.0 High-Speed
> > * usb2 - USB 3.2 Enhanced SuperSpeed
> > * usb3 - USB 2.0 High-Speed
> > * usb4 - USB 3.1 Enhanced SuperSpeed
> >
> > When I connect SuperSpeed device directly to the Dell Latitude, it ends
> > up on usb4. Low/Full/High-Speed devices end up on usb3 as expected.
> >
> > When I connect Thunderbolt 3 dock, two new host controllers show up:
> > * usb5 - USB 2.0 High-Speed
> > * usb6 - USB 3.0 SuperSpeed
>
> Could you provide lspci in that state?
> AFAICT there is nothing that would prevent a vendor from putting
> a PCI HC into a TB3 docking station.
Below is diff between lspci output without and with Thunderbolt 3 dock
connected.
--- no-dock 2023-05-23 11:20:13.709836495 +0200
+++ tbt3-dock 2023-05-23 11:21:31.052970007 +0200
@@ -1,24 +1,31 @@
00:00.0 Host bridge: Intel Corporation Device 4601 (rev 04)
00:02.0 VGA compatible controller: Intel Corporation Alder Lake-UP3 GT2 [Iris Xe Graphics] (rev 0c)
00:04.0 Signal processing controller: Intel Corporation Alder Lake Innovation Platform Framework Processor Participant (rev 04)
00:06.0 PCI bridge: Intel Corporation 12th Gen Core Processor PCI Express x4 Controller #0 (rev 04)
00:07.0 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #0 (rev 04)
00:07.1 PCI bridge: Intel Corporation Alder Lake-P Thunderbolt 4 PCI Express Root Port #1 (rev 04)
00:08.0 System peripheral: Intel Corporation 12th Gen Core Processor Gaussian & Neural Accelerator (rev 04)
00:0d.0 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 USB Controller (rev 04)
00:0d.2 USB controller: Intel Corporation Alder Lake-P Thunderbolt 4 NHI #0 (rev 04)
00:12.0 Serial controller: Intel Corporation Alder Lake-P Integrated Sensor Hub (rev 01)
00:14.0 USB controller: Intel Corporation Alder Lake PCH USB 3.2 xHCI Host Controller (rev 01)
00:14.2 RAM memory: Intel Corporation Alder Lake PCH Shared SRAM (rev 01)
00:14.3 Network controller: Intel Corporation Alder Lake-P PCH CNVi WiFi (rev 01)
00:15.0 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #0 (rev 01)
00:15.1 Serial bus controller: Intel Corporation Alder Lake PCH Serial IO I2C Controller #1 (rev 01)
00:16.0 Communication controller: Intel Corporation Alder Lake PCH HECI Controller (rev 01)
00:16.3 Serial controller: Intel Corporation Alder Lake AMT SOL Redirection (rev 01)
00:1d.0 PCI bridge: Intel Corporation Alder Lake PCI Express x1 Root Port #10 (rev 01)
00:1f.0 ISA bridge: Intel Corporation Alder Lake PCH eSPI Controller (rev 01)
00:1f.3 Audio device: Intel Corporation Alder Lake PCH-P High Definition Audio Controller (rev 01)
00:1f.4 SMBus: Intel Corporation Alder Lake PCH-P SMBus Host Controller (rev 01)
00:1f.5 Serial bus controller: Intel Corporation Alder Lake-P PCH SPI Controller (rev 01)
01:00.0 Non-Volatile memory controller: Sandisk Corp Device 5015 (rev 01)
+3a:00.0 PCI bridge: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
+3b:01.0 PCI bridge: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
+3b:04.0 PCI bridge: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
+3d:00.0 PCI bridge: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
+3e:01.0 PCI bridge: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
+3e:04.0 PCI bridge: Intel Corporation DSL6540 Thunderbolt 3 Bridge [Alpine Ridge 4C 2015]
+3f:00.0 USB controller: ASMedia Technology Inc. ASM1042A USB 3.0 Host Controller
72:00.0 Unassigned class [ff00]: Realtek Semiconductor Co., Ltd. RTS525A PCI Express Card Reader (rev 01)
--
Tomasz Moń | Senior Firmware Engineer
P +48 882 826 111 | Wrocław, Poland
nordicsemi.com | devzone.nordicsemi.com
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2023-05-23 12:54 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-05-23 8:53 USB 2.0 host controller for Thunderbolt 4 Tomasz Moń
2023-05-23 9:01 ` Mika Westerberg
2023-05-23 9:45 ` Moń, Tomasz
2023-05-23 11:03 ` Mathias Nyman
2023-05-23 12:54 ` mika.westerberg
2023-05-23 9:44 ` Oliver Neukum
2023-05-23 9:49 ` Tomasz Moń
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox