drm/rockchip: dw_hdmi: Add support for rk3368

Change-Id: I6a49447a5edd53013ed81875f351089793914f77
Signed-off-by: WeiYong Bi <bivvy.bi@rock-chips.com>
This commit is contained in:
WeiYong Bi 2017-04-25 08:38:50 +08:00 committed by Huang, Tao
parent 12b4781f5b
commit f474e5b012
4 changed files with 23 additions and 2 deletions

View File

@ -3,6 +3,7 @@ Rockchip specific extensions to the Synopsys Designware HDMI
Required properties:
- compatible: "rockchip,rk3288-dw-hdmi",
"rockchip,rk3368-dw-hdmi",
"rockchip,rk3399-dw-hdmi";
- reg: Physical base address and length of the controller's registers.
- clocks: phandle to hdmi iahb and isfr clocks.

View File

@ -1281,7 +1281,7 @@ static int hdmi_phy_configure(struct dw_hdmi *hdmi, unsigned char prep,
* to enable mpll pre-divider.
*/
if (hdmi->hdmi_data.enc_in_format == YCBCR420 &&
hdmi->dev_type == RK3399_HDMI)
(hdmi->dev_type == RK3399_HDMI || hdmi->dev_type == RK3368_HDMI))
hdmi_phy_i2c_write(hdmi, mpll_config->res[res_idx].cpce | 4,
0x06);
else

View File

@ -404,6 +404,14 @@ static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = {
.tmds_n_table = rockchip_werid_tmds_n_table,
};
static const struct dw_hdmi_plat_data rk3368_hdmi_drv_data = {
.mode_valid = dw_hdmi_rockchip_mode_valid,
.mpll_cfg = rockchip_mpll_cfg,
.cur_ctr = rockchip_cur_ctr,
.phy_config = rockchip_phy_config,
.dev_type = RK3368_HDMI,
};
static const struct dw_hdmi_plat_data rk3399_hdmi_drv_data = {
.mode_valid = dw_hdmi_rockchip_mode_valid,
.mpll_cfg = rockchip_mpll_cfg,
@ -416,6 +424,10 @@ static const struct of_device_id dw_hdmi_rockchip_dt_ids[] = {
{ .compatible = "rockchip,rk3288-dw-hdmi",
.data = &rk3288_hdmi_drv_data
},
{
.compatible = "rockchip,rk3368-dw-hdmi",
.data = &rk3368_hdmi_drv_data
},
{ .compatible = "rockchip,rk3399-dw-hdmi",
.data = &rk3399_hdmi_drv_data
},

View File

@ -25,6 +25,7 @@ enum dw_hdmi_devtype {
IMX6Q_HDMI,
IMX6DL_HDMI,
RK3288_HDMI,
RK3368_HDMI,
RK3399_HDMI,
};
@ -67,7 +68,14 @@ struct dw_hdmi_plat_data {
static inline bool is_rockchip(enum dw_hdmi_devtype dev_type)
{
return dev_type == RK3288_HDMI || dev_type == RK3399_HDMI;
switch (dev_type) {
case RK3288_HDMI:
case RK3368_HDMI:
case RK3399_HDMI:
return true;
default:
return false;
}
}
void dw_hdmi_unbind(struct device *dev, struct device *master, void *data);