phy: rockchip-typec: support DP phy switch
authorChris Zhong <zyw@rock-chips.com>
Fri, 16 Feb 2018 12:09:55 +0000 (13:09 +0100)
committerKishon Vijay Abraham I <kishon@ti.com>
Fri, 16 Mar 2018 11:25:35 +0000 (16:55 +0530)
commit866d4087f30170187b2d456e7f40cd4e7f29041b
treedc57502e62d6645cfa7255521d464b2439968751
parent5eac5e9c0f515f8e452321b159b4093065dfc757
phy: rockchip-typec: support DP phy switch

There are 2 Type-c PHYs in RK3399, but only one DP controller. Hence
only one PHY can connect to DP controller at one time, the other should
be disconnected. The GRF_SOC_CON26 register has a switch bit to do it,
set this bit means enable PHY 1, clear this bit means enable PHY 0.

Signed-off-by: Chris Zhong <zyw@rock-chips.com>
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
Reviewed-by: Heiko Stuebner <heiko@sntech.de>
Signed-off-by: Kishon Vijay Abraham I <kishon@ti.com>
drivers/phy/rockchip/phy-rockchip-typec.c