Lines Matching +full:single +full:- +full:lane

1 // SPDX-License-Identifier: GPL-2.0
5 * Copyright (C) 2020 - 2023, Intel Corporation
16 MODULE_PARM_DESC(clx, "allow low power states on the high-speed lanes (default: true)");
44 port->cap_phy + LANE_ADP_CS_1, 1); in tb_port_pm_secondary_set()
54 port->cap_phy + LANE_ADP_CS_1, 1); in tb_port_pm_secondary_set()
73 /* Don't enable CLx in case of two single-lane links */ in tb_port_clx_supported()
74 if (!port->bonded && port->dual_link_port) in tb_port_clx_supported()
77 /* Don't enable CLx in case of inter-domain link */ in tb_port_clx_supported()
78 if (port->xdomain) in tb_port_clx_supported()
81 if (tb_switch_is_usb4(port->sw)) { in tb_port_clx_supported()
96 port->cap_phy + LANE_ADP_CS_0, 1); in tb_port_clx_supported()
116 return -EOPNOTSUPP; in tb_port_clx_set()
119 port->cap_phy + LANE_ADP_CS_1, 1); in tb_port_clx_set()
129 port->cap_phy + LANE_ADP_CS_1, 1); in tb_port_clx_set()
151 port->cap_phy + LANE_ADP_CS_1, 1); in tb_port_clx()
166 * tb_port_clx_is_enabled() - Is given CL state enabled
178 * tb_switch_clx_is_supported() - Is CLx supported on this type of router
186 if (sw->quirks & QUIRK_NO_CLX) in tb_switch_clx_is_supported()
200 * tb_switch_clx_init() - Initialize router CL states
233 sw->clx = clx; in tb_switch_clx_init()
256 int up_port = sw->config.upstream_port_number; in tb_switch_mask_clx_objections()
260 /* Only Titan Ridge of pre-USB4 devices support CLx states */ in tb_switch_mask_clx_objections()
268 * In Titan Ridge there are only 2 dual-lane Thunderbolt ports: in tb_switch_mask_clx_objections()
269 * Port A consists of lane adapters 1,2 and in tb_switch_mask_clx_objections()
270 * Port B consists of lane adapters 3,4 in tb_switch_mask_clx_objections()
272 * port B (lanes 3,4) and unmask objections from Port A and vice-versa. in tb_switch_mask_clx_objections()
285 sw->cap_lp + offset, ARRAY_SIZE(val)); in tb_switch_mask_clx_objections()
295 sw->cap_lp + offset, ARRAY_SIZE(val)); in tb_switch_mask_clx_objections()
307 * tb_switch_clx_enable() - Enable CLx on upstream port of specified router
312 * of the link are not configured as two single lane links and only if the link
313 * is not inter-domain link. The complete set of conditions is described in CM
325 if (!clx || sw->clx == clx) in tb_switch_clx_enable()
329 return -EINVAL; in tb_switch_clx_enable()
343 return -EOPNOTSUPP; in tb_switch_clx_enable()
361 return -EOPNOTSUPP; in tb_switch_clx_enable()
380 sw->clx |= clx; in tb_switch_clx_enable()
387 * tb_switch_clx_disable() - Disable CLx on upstream port of specified router
398 unsigned int clx = sw->clx; in tb_switch_clx_disable()
408 if (sw->is_unplugged) in tb_switch_clx_disable()
422 sw->clx = 0; in tb_switch_clx_disable()