mdss: display-port: add support to share lanes and orientation to DP Phy
The DisplayPort PHY driver needs information about the number of lanes and the plug orientation to do additional settings. Add code to support this. Change-Id: Iafb890596283320dbcb2b4e2e0d83cabfdfcd18e Signed-off-by: Chandan Uddaraju <chandanu@codeaurora.org>
This commit is contained in:
parent
0cfcf4427c
commit
c9334f3d33
3 changed files with 21 additions and 0 deletions
|
@ -1076,6 +1076,9 @@ int mdss_dp_on(struct mdss_panel_data *pdata)
|
||||||
goto exit;
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
mdss_dp_phy_share_lane_config(&dp_drv->phy_io,
|
||||||
|
orientation, dp_drv->dpcd.max_lane_count);
|
||||||
|
|
||||||
pr_debug("link_rate = 0x%x\n", dp_drv->link_rate);
|
pr_debug("link_rate = 0x%x\n", dp_drv->link_rate);
|
||||||
|
|
||||||
dp_drv->power_data[DP_CTRL_PM].clk_config[0].rate =
|
dp_drv->power_data[DP_CTRL_PM].clk_config[0].rate =
|
||||||
|
@ -1294,6 +1297,9 @@ static int mdss_dp_host_init(struct mdss_panel_data *pdata)
|
||||||
mdss_dp_get_ctrl_hw_version(&dp_drv->ctrl_io),
|
mdss_dp_get_ctrl_hw_version(&dp_drv->ctrl_io),
|
||||||
mdss_dp_get_phy_hw_version(&dp_drv->phy_io));
|
mdss_dp_get_phy_hw_version(&dp_drv->phy_io));
|
||||||
|
|
||||||
|
pr_debug("plug Orientation = %d\n",
|
||||||
|
usbpd_get_plug_orientation(dp_drv->pd));
|
||||||
|
|
||||||
mdss_dp_phy_aux_setup(&dp_drv->phy_io);
|
mdss_dp_phy_aux_setup(&dp_drv->phy_io);
|
||||||
|
|
||||||
mdss_dp_irq_enable(dp_drv);
|
mdss_dp_irq_enable(dp_drv);
|
||||||
|
|
|
@ -441,6 +441,17 @@ u32 mdss_dp_usbpd_gen_config_pkt(struct mdss_dp_drv_pdata *dp)
|
||||||
return config;
|
return config;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void mdss_dp_phy_share_lane_config(struct dss_io_data *phy_io,
|
||||||
|
u8 orientation, u8 ln_cnt)
|
||||||
|
{
|
||||||
|
u32 info = 0x0;
|
||||||
|
|
||||||
|
info |= (ln_cnt & 0x0F);
|
||||||
|
info |= ((orientation & 0x0F) << 4);
|
||||||
|
pr_debug("Shared Info = 0x%x\n", info);
|
||||||
|
writel_relaxed(info, phy_io->base + DP_PHY_SPARE0);
|
||||||
|
}
|
||||||
|
|
||||||
void mdss_dp_config_audio_acr_ctrl(struct dss_io_data *ctrl_io, char link_rate)
|
void mdss_dp_config_audio_acr_ctrl(struct dss_io_data *ctrl_io, char link_rate)
|
||||||
{
|
{
|
||||||
u32 acr_ctrl = 0;
|
u32 acr_ctrl = 0;
|
||||||
|
|
|
@ -150,6 +150,8 @@
|
||||||
#define DP_PHY_AUX_INTERRUPT_MASK (0x00000044)
|
#define DP_PHY_AUX_INTERRUPT_MASK (0x00000044)
|
||||||
#define DP_PHY_AUX_INTERRUPT_CLEAR (0x00000048)
|
#define DP_PHY_AUX_INTERRUPT_CLEAR (0x00000048)
|
||||||
|
|
||||||
|
#define DP_PHY_SPARE0 0x00A8
|
||||||
|
|
||||||
#define QSERDES_TX0_OFFSET 0x0400
|
#define QSERDES_TX0_OFFSET 0x0400
|
||||||
#define QSERDES_TX1_OFFSET 0x0800
|
#define QSERDES_TX1_OFFSET 0x0800
|
||||||
|
|
||||||
|
@ -231,6 +233,8 @@ void mdss_dp_usbpd_ext_dp_status(struct usbpd_dp_status *dp_status);
|
||||||
u32 mdss_dp_usbpd_gen_config_pkt(struct mdss_dp_drv_pdata *dp);
|
u32 mdss_dp_usbpd_gen_config_pkt(struct mdss_dp_drv_pdata *dp);
|
||||||
void mdss_dp_ctrl_lane_mapping(struct dss_io_data *ctrl_io,
|
void mdss_dp_ctrl_lane_mapping(struct dss_io_data *ctrl_io,
|
||||||
struct lane_mapping l_map);
|
struct lane_mapping l_map);
|
||||||
|
void mdss_dp_phy_share_lane_config(struct dss_io_data *phy_io,
|
||||||
|
u8 orientation, u8 ln_cnt);
|
||||||
void mdss_dp_config_audio_acr_ctrl(struct dss_io_data *ctrl_io,
|
void mdss_dp_config_audio_acr_ctrl(struct dss_io_data *ctrl_io,
|
||||||
char link_rate);
|
char link_rate);
|
||||||
void mdss_dp_audio_setup_sdps(struct dss_io_data *ctrl_io);
|
void mdss_dp_audio_setup_sdps(struct dss_io_data *ctrl_io);
|
||||||
|
|
Loading…
Add table
Reference in a new issue