mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 19:30:30 +09:00
phy: rockchip: usbdp-phy: add phy_set_bus_width when power on
In usbdp-phy, the DP function can use all or only part of the phy lanes. This info need notify DP controller. Signed-off-by: Zhang Yubing <yubing.zhang@rock-chips.com> Change-Id: Ib943532d7a764602392837f9a9163af00e8e7918
This commit is contained in:
@@ -328,9 +328,9 @@ static int udphy_lane_enable(struct rockchip_udphy *udphy, int dp_lanes)
|
||||
return ret;
|
||||
}
|
||||
|
||||
static int udphy_lane_configure(struct rockchip_udphy *udphy)
|
||||
static int udphy_dplane_get(struct rockchip_udphy *udphy)
|
||||
{
|
||||
int ret, dp_lanes;
|
||||
int dp_lanes;
|
||||
|
||||
switch (udphy->mode) {
|
||||
case UDPHY_MODE_DP:
|
||||
@@ -346,11 +346,18 @@ static int udphy_lane_configure(struct rockchip_udphy *udphy)
|
||||
break;
|
||||
}
|
||||
|
||||
return dp_lanes;
|
||||
}
|
||||
|
||||
static int udphy_lane_configure(struct rockchip_udphy *udphy)
|
||||
{
|
||||
int ret;
|
||||
|
||||
ret = udphy_dplane_select(udphy);
|
||||
if (ret)
|
||||
return ret;
|
||||
|
||||
return udphy_lane_enable(udphy, dp_lanes);
|
||||
return udphy_lane_enable(udphy, udphy_dplane_get(udphy));
|
||||
}
|
||||
|
||||
static int upphy_set_typec_default_mapping(struct rockchip_udphy *udphy)
|
||||
@@ -639,6 +646,7 @@ static int rockchip_dp_phy_power_on(struct phy *phy)
|
||||
{
|
||||
struct rockchip_udphy *udphy = phy_get_drvdata(phy);
|
||||
|
||||
phy_set_bus_width(phy, udphy_dplane_get(udphy));
|
||||
return udphy_power_on(udphy, UDPHY_MODE_DP);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user