MLK-16887-1: drm: imx: hdp: add aux config for HDMI ARC
authorShengjiu Wang <shengjiu.wang@nxp.com>
Fri, 17 Nov 2017 07:24:06 +0000 (15:24 +0800)
committerLeonard Crestez <leonard.crestez@nxp.com>
Wed, 17 Apr 2019 23:51:34 +0000 (02:51 +0300)
Add aux config for HDMI ARC, the config is from the HDMI usr
guide

Signed-off-by: Shengjiu Wang <shengjiu.wang@nxp.com>
drivers/gpu/drm/imx/hdp/API_AFE_t28hpc_hdmitx.c

index 3e6c18e..9141c11 100644 (file)
@@ -56,6 +56,27 @@ static char inside(u32 value, u32 left_sharp_corner,
        return true;
 }
 
+void aux_cfg_t28hpc(state_struct *state)
+{
+       Afe_write(state, 0x5025, 0x0001);
+
+       Afe_write(state, 0x5024, 36);
+
+       Afe_write(state, 0x5021, 0x0100);
+       Afe_write(state, 0x5021, 0x0300);
+       Afe_write(state, 0x5026, 0x0000);
+       Afe_write(state, 0x5020, 0x2008);
+       Afe_write(state, 0x5020, 0x2018);
+       Afe_write(state, 0x5020, 0xA018);
+       Afe_write(state, 0x5021, 0x030C);
+       Afe_write(state, 0x5029, 0x0000);
+       Afe_write(state, 0x5027, 0x4001);
+       Afe_write(state, 0x5020, 0xA098);
+       Afe_write(state, 0x5020, 0xA198);
+       Afe_write(state, 0x5021, 0x030D);
+       Afe_write(state, 0x5021, 0x030F);
+}
+
 int phy_cfg_t28hpc(state_struct *state, int num_lanes, VIC_MODES vicMode, int bpp,
                VIC_PXL_ENCODING_FORMAT format, bool pixel_clk_from_phy)
 {
@@ -1797,6 +1818,8 @@ int phy_cfg_t28hpc(state_struct *state, int num_lanes, VIC_MODES vicMode, int bp
        /* End of task phy_cfg_hdp */
        /* register PHY_HDP_MODE_CTL */
        Afe_write(state, 0xC008, 0x0004);
+
+       aux_cfg_t28hpc(state);
        return character_freq_khz;
 
 }