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()
35 * Ignore USB3 ports here as USB core will set up device links between in tb_acpi_add_link()
37 * USB3 ports might not even have a physical device yet if xHCI driver in tb_acpi_add_link()
58 pm_runtime_get_sync(&pdev->dev); in tb_acpi_add_link()
60 link = device_link_add(&pdev->dev, &nhi->pdev->dev, in tb_acpi_add_link()
65 dev_dbg(&nhi->pdev->dev, "created link from %s\n", in tb_acpi_add_link()
66 dev_name(&pdev->dev)); in tb_acpi_add_link()
69 dev_warn(&nhi->pdev->dev, "device link creation from %s failed\n", in tb_acpi_add_link()
70 dev_name(&pdev->dev)); in tb_acpi_add_link()
73 pm_runtime_put(&pdev->dev); in tb_acpi_add_link()
82 * tb_acpi_add_links() - Add device links based on ACPI description
85 * Goes over ACPI namespace finding tunneled ports that reference to
96 if (!has_acpi_companion(&nhi->pdev->dev)) in tb_acpi_add_links()
100 * Find all devices that have usb4-host-controller interface in tb_acpi_add_links()
106 dev_warn(&nhi->pdev->dev, "failed to enumerate tunneled ports\n"); in tb_acpi_add_links()
114 * tb_acpi_is_native() - Did the platform grant native TBT/USB4 control
116 * Returns %true if the platform granted OS native control over
127 * tb_acpi_may_tunnel_usb3() - Is USB3 tunneling allowed by the platform
140 * tb_acpi_may_tunnel_dp() - Is DisplayPort tunneling allowed by the platform
153 * tb_acpi_may_tunnel_pcie() - Is PCIe tunneling allowed by the platform
166 * tb_acpi_is_xdomain_allowed() - Are XDomain connections allowed
178 /* UUID for retimer _DSM: e0053122-795b-4122-8a5e-57be1d26acb3 */
188 struct usb4_port *usb4 = port->usb4; in tb_acpi_retimer_set_power()
194 if (!usb4->can_offline) in tb_acpi_retimer_set_power()
197 adev = ACPI_COMPANION(&usb4->dev); in tb_acpi_retimer_set_power()
202 obj = acpi_evaluate_dsm_typed(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_retimer_set_power()
207 return -EIO; in tb_acpi_retimer_set_power()
210 ret = obj->integer.value; in tb_acpi_retimer_set_power()
225 obj = acpi_evaluate_dsm_typed(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_retimer_set_power()
231 return -EIO; in tb_acpi_retimer_set_power()
234 ret = obj->integer.value; in tb_acpi_retimer_set_power()
239 return ret == 1 ? 0 : -EBUSY; in tb_acpi_retimer_set_power()
244 return -EIO; in tb_acpi_retimer_set_power()
248 * tb_acpi_power_on_retimers() - Call platform to power on retimers
254 * spec). Note if this returns %-EBUSY it means the type-C port is in
255 * non-USB4/TBT mode (there is non-USB4/TBT device connected).
267 * tb_acpi_power_off_retimers() - Call platform to power off retimers
298 port_adev = acpi_find_child_by_adr(ACPI_COMPANION(&parent_sw->dev), in tb_acpi_switch_find_companion()
299 port->port); in tb_acpi_switch_find_companion()
303 struct tb_nhi *nhi = sw->tb->nhi; in tb_acpi_switch_find_companion()
306 parent_adev = ACPI_COMPANION(&nhi->pdev->dev); in tb_acpi_switch_find_companion()
321 * Device (DFP0) // Downstream port _ADR == lane 0 adapter in tb_acpi_find_companion()
323 * Device (UFP) // Upstream port _ADR == lane 0 adapter in tb_acpi_find_companion()
324 * Device (DFP1) // Downstream port _ADR == lane 0 adapter number in tb_acpi_find_companion()
332 return acpi_find_child_by_adr(ACPI_COMPANION(dev->parent), in tb_acpi_find_companion()
333 tb_to_usb4_port_device(dev)->port->port); in tb_acpi_find_companion()
345 if (acpi_check_dsm(adev->handle, &retimer_dsm_guid, 1, in tb_acpi_setup()
348 usb4->can_offline = true; in tb_acpi_setup()