linux/drivers/thunderbolt
Mika Westerberg b2be2b05cf thunderbolt: Create device links from ACPI description
The new way to describe relationship between tunneled ports and USB4 NHI
(Native Host Interface) is with ACPI _DSD looking like below for a PCIe
downstream port:

    Scope (\_SB.PCI0)
    {
        Device (NHI0) { } // Thunderbolt NHI

        Device (DSB0) // Hotplug downstream port
        {
            Name (_DSD, Package () {
                ToUUID("daffd814-6eba-4d8c-8a91-bc9bbf4aa301"),
                Package () {
                    Package () {"usb4-host-interface", \_SB.PCI0.NHI0},
                    ...
                }
            })
        }
    }

This is "documented" in these [1] USB-IF slides and being used on
systems that ship with Windows.

The _DSD can be added to tunneled USB3 and PCIe ports, and is needed to
make sure the USB4 NHI is resumed before any of the tunneled ports so
the protocol tunnels get established properly before the actual port
itself is resumed. Othwerwise the USB/PCI core find the link may not be
established and starts tearing down the device stack.

This parses the ACPI description each time NHI is probed and tries to
find devices that has the property and it references the NHI in
question. For each matching device a device link from that device to the
NHI is created.

Since USB3 ports themselves do not get runtime suspended with the parent
device (hub) we do not add the link from the USB3 port to USB4 NHI but
instead we add the link from the xHCI device. This makes the device link
usable for runtime PM as well.

[1] https://www.usb.org/sites/default/files/D1T2-2%20-%20USB4%20on%20Windows.pdf

Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com>
Acked-by: Rafael J. Wysocki <rafael.j.wysocki@intel.com>
2020-09-03 12:06:42 +03:00
..
Kconfig thunderbolt: Add KUnit tests for path walking 2020-06-22 19:58:20 +03:00
Makefile thunderbolt: Create device links from ACPI description 2020-09-03 12:06:42 +03:00
acpi.c thunderbolt: Create device links from ACPI description 2020-09-03 12:06:42 +03:00
cap.c thunderbolt: Make tb_switch_find_cap() available to other files 2019-12-18 15:40:36 +01:00
ctl.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
ctl.h thunderbolt: Populate PG field in hot plug acknowledgment packet 2019-12-18 15:34:25 +01:00
dma_port.c thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
dma_port.h thunderbolt: Convert rest of the driver files to use SPDX identifier 2018-10-02 15:52:08 -07:00
domain.c thunderbolt: Enable wakes from system suspend 2020-09-03 12:06:42 +03:00
eeprom.c thunderbolt: Add support for authenticate on disconnect 2020-07-01 13:51:49 +03:00
icm.c thunderbolt: Use bit 31 to check if Firmware CM is running in Tiger Lake 2020-09-03 12:06:40 +03:00
lc.c thunderbolt: Enable wakes from system suspend 2020-09-03 12:06:42 +03:00
nhi.c thunderbolt: Create device links from ACPI description 2020-09-03 12:06:42 +03:00
nhi.h thunderbolt: Add support for Intel Tiger Lake 2020-04-23 09:57:59 +03:00
nhi_ops.c thunderbolt: Software CM only should set force power in Tiger Lake 2020-09-03 12:06:40 +03:00
nhi_regs.h thunderbolt: Add support for Intel Ice Lake 2019-08-26 12:15:06 +03:00
nvm.c thunderbolt: Add support for separating the flush to SPI and authenticate 2020-07-01 13:51:49 +03:00
path.c thunderbolt: Add USB3 bandwidth management 2020-06-22 19:58:20 +03:00
property.c thunderbolt: property: Fix a missing check of kzalloc 2019-03-28 11:30:47 +03:00
quirks.c thunderbolt: Fix old style declaration warning 2020-07-02 14:50:11 +03:00
retimer.c thunderbolt: Add support for on-board retimers 2020-06-22 19:58:32 +03:00
sb_regs.h thunderbolt: Add support for on-board retimers 2020-06-22 19:58:32 +03:00
switch.c thunderbolt: Enable wakes from system suspend 2020-09-03 12:06:42 +03:00
tb.c thunderbolt: Disable lane 1 for XDomain connection 2020-09-03 12:06:41 +03:00
tb.h thunderbolt: Create device links from ACPI description 2020-09-03 12:06:42 +03:00
tb_msgs.h thunderbolt: Populate PG field in hot plug acknowledgment packet 2019-12-18 15:34:25 +01:00
tb_regs.h thunderbolt: Enable wakes from system suspend 2020-09-03 12:06:42 +03:00
test.c thunderbolt: merge fix for kunix_resource changes 2020-08-09 11:06:10 -07:00
tmu.c thunderbolt: Add support for Time Management Unit 2019-12-18 15:41:15 +01:00
tunnel.c treewide: Use fallthrough pseudo-keyword 2020-08-23 17:36:59 -05:00
tunnel.h thunderbolt: Add USB3 bandwidth management 2020-06-22 19:58:20 +03:00
usb4.c thunderbolt: Enable wakes from system suspend 2020-09-03 12:06:42 +03:00
xdomain.c thunderbolt: Build initial XDomain property block upon first connect 2020-06-22 19:58:05 +03:00