From bca462073774feb32b642899a35b4cab4599b788 Mon Sep 17 00:00:00 2001 From: Shunqing Chen Date: Wed, 15 Jul 2020 15:19:11 +0800 Subject: [PATCH] drm: rockchip: dw-hdmi: add YCbCr420 support for RK3288W Change-Id: I47621ca905b9e32550f0274efe6dc35df0490e3a Signed-off-by: Shunqing Chen --- drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c | 41 +++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c index f045c528e8ed..856561f8389b 100644 --- a/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c +++ b/drivers/gpu/drm/rockchip/dw_hdmi-rockchip.c @@ -288,6 +288,46 @@ static const struct dw_hdmi_mpll_config rockchip_mpll_cfg_420[] = { } }; +static const struct dw_hdmi_mpll_config rockchip_rk3288w_mpll_cfg_420[] = { + { + 30666000, { + { 0x00b7, 0x0000 }, + { 0x2157, 0x0000 }, + { 0x40f7, 0x0000 }, + }, + }, { + 92000000, { + { 0x00b7, 0x0000 }, + { 0x2143, 0x0001 }, + { 0x40a3, 0x0001 }, + }, + }, { + 184000000, { + { 0x0073, 0x0001 }, + { 0x2146, 0x0002 }, + { 0x4062, 0x0002 }, + }, + }, { + 340000000, { + { 0x0052, 0x0003 }, + { 0x214d, 0x0003 }, + { 0x4065, 0x0003 }, + }, + }, { + 600000000, { + { 0x0040, 0x0003 }, + { 0x3b4c, 0x0003 }, + { 0x5a65, 0x0003 }, + }, + }, { + ~0UL, { + { 0x0000, 0x0000 }, + { 0x0000, 0x0000 }, + { 0x0000, 0x0000 }, + }, + } +}; + static const struct dw_hdmi_curr_ctrl rockchip_cur_ctr[] = { /* pixelclk bpp8 bpp10 bpp12 */ { @@ -1198,6 +1238,7 @@ static struct rockchip_hdmi_chip_data rk3288_chip_data = { static const struct dw_hdmi_plat_data rk3288_hdmi_drv_data = { .mode_valid = dw_hdmi_rockchip_mode_valid, .mpll_cfg = rockchip_mpll_cfg, + .mpll_cfg_420 = rockchip_rk3288w_mpll_cfg_420, .cur_ctr = rockchip_cur_ctr, .phy_config = rockchip_phy_config, .phy_data = &rk3288_chip_data,