Lines Matching +full:ports +full:- +full:lane +full:- +full:control
1 // SPDX-License-Identifier: GPL-2.0
26 fwnode = fwnode_find_reference(acpi_fwnode_handle(adev), "usb4-host-interface", 0); in tb_acpi_add_link()
31 if (dev_fwnode(&nhi->pdev->dev) != fwnode) in tb_acpi_add_link()
37 * bound so the USB3 SuperSpeed ports are not yet created. in tb_acpi_add_link()
49 * SuperSpeed ports have this property and they are not power in tb_acpi_add_link()
54 dev = dev->parent; in tb_acpi_add_link()
65 if (pdev->class == PCI_CLASS_SERIAL_USB_XHCI || in tb_acpi_add_link()
78 pm_runtime_get_sync(&pdev->dev); in tb_acpi_add_link()
80 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_acpi_add_link()
85 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_acpi_add_link()
86 dev_name(&pdev->dev)); in tb_acpi_add_link()
89 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_acpi_add_link()
90 dev_name(&pdev->dev)); in tb_acpi_add_link()
93 pm_runtime_put(&pdev->dev); in tb_acpi_add_link()
102 * tb_acpi_add_links() - Add device links based on ACPI description
105 * Goes over ACPI namespace finding tunneled ports that reference to
116 if (!has_acpi_companion(&nhi->pdev->dev)) in tb_acpi_add_links()
120 * Find all devices that have usb4-host-controller interface in tb_acpi_add_links()
126 dev_warn(&nhi->pdev->dev, "failed to enumerate tunneled ports\n"); in tb_acpi_add_links()
134 * tb_acpi_is_native() - Did the platform grant native TBT/USB4 control
136 * Returns %true if the platform granted OS native control over
147 * tb_acpi_may_tunnel_usb3() - Is USB3 tunneling allowed by the platform
160 * tb_acpi_may_tunnel_dp() - Is DisplayPort tunneling allowed by the platform
173 * tb_acpi_may_tunnel_pcie() - Is PCIe tunneling allowed by the platform
186 * tb_acpi_is_xdomain_allowed() - Are XDomain connections allowed
198 /* UUID for retimer _DSM: e0053122-795b-4122-8a5e-57be1d26acb3 */
208 struct usb4_port *usb4 = port->usb4; in tb_acpi_retimer_set_power()
214 if (!usb4->can_offline) in tb_acpi_retimer_set_power()
217 adev = ACPI_COMPANION(&usb4->dev); in tb_acpi_retimer_set_power()
222 obj = acpi_evaluate_dsm_typed(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_retimer_set_power()
227 return -EIO; in tb_acpi_retimer_set_power()
230 ret = obj->integer.value; in tb_acpi_retimer_set_power()
245 obj = acpi_evaluate_dsm_typed(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_retimer_set_power()
251 return -EIO; in tb_acpi_retimer_set_power()
254 ret = obj->integer.value; in tb_acpi_retimer_set_power()
259 return ret == 1 ? 0 : -EBUSY; in tb_acpi_retimer_set_power()
264 return -EIO; in tb_acpi_retimer_set_power()
268 * tb_acpi_power_on_retimers() - Call platform to power on retimers
274 * spec). Note if this returns %-EBUSY it means the type-C port is in
275 * non-USB4/TBT mode (there is non-USB4/TBT device connected).
287 * tb_acpi_power_off_retimers() - Call platform to power off retimers
318 port_adev = acpi_find_child_by_adr(ACPI_COMPANION(&parent_sw->dev), in tb_acpi_switch_find_companion()
319 port->port); in tb_acpi_switch_find_companion()
323 struct tb_nhi *nhi = sw->tb->nhi; in tb_acpi_switch_find_companion()
326 parent_adev = ACPI_COMPANION(&nhi->pdev->dev); in tb_acpi_switch_find_companion()
341 * Device (DFP0) // Downstream port _ADR == lane 0 adapter in tb_acpi_find_companion()
343 * Device (UFP) // Upstream port _ADR == lane 0 adapter in tb_acpi_find_companion()
344 * Device (DFP1) // Downstream port _ADR == lane 0 adapter number in tb_acpi_find_companion()
352 return acpi_find_child_by_adr(ACPI_COMPANION(dev->parent), in tb_acpi_find_companion()
353 tb_to_usb4_port_device(dev)->port->port); in tb_acpi_find_companion()
365 if (acpi_check_dsm(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_setup()
368 usb4->can_offline = true; in tb_acpi_setup()