Skip to content

Commit 055fac0

Browse files
committed
phy: apple: atc: Support 'set_lanes' in DP mode
Does not actually switch the number of lanes used for DisplayPort. Signed-off-by: Janne Grunau <j@jannau.net>
1 parent 57ab3ff commit 055fac0

1 file changed

Lines changed: 12 additions & 3 deletions

File tree

drivers/phy/apple/atc.c

Lines changed: 12 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1829,9 +1829,18 @@ static int atcphy_dpphy_configure(struct phy *phy,
18291829
if (opts->set_voltages)
18301830
return -EINVAL;
18311831

1832-
/* TODO? or maybe just ack since this mux_set should've done this? */
1833-
if (opts->set_lanes)
1834-
return -EINVAL;
1832+
/*
1833+
* Just ack set_lanes for compatibility with (lp)dptx-phy
1834+
* The mux_set should've done this anyway
1835+
*/
1836+
if (opts->set_lanes) {
1837+
if (((atcphy->mode == APPLE_ATCPHY_MODE_DP && opts->lanes != 4) ||
1838+
(atcphy->mode == APPLE_ATCPHY_MODE_USB3_DP && opts->lanes != 2)) &&
1839+
opts->lanes != 0)
1840+
dev_warn(atcphy->dev, "Unexpected lane count %u for mode %u\n",
1841+
opts->lanes, atcphy->mode);
1842+
1843+
}
18351844

18361845
if (opts->set_rate) {
18371846
switch (opts->link_rate) {

0 commit comments

Comments
 (0)