diff options
Diffstat (limited to 'src/soc/mediatek/mt8173/dsi.c')
-rw-r--r-- | src/soc/mediatek/mt8173/dsi.c | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8173/dsi.c b/src/soc/mediatek/mt8173/dsi.c index 1d195719b0..3500bf1d01 100644 --- a/src/soc/mediatek/mt8173/dsi.c +++ b/src/soc/mediatek/mt8173/dsi.c @@ -20,6 +20,7 @@ #include <soc/i2c.h> #include <soc/gpio.h> #include <soc/dsi.h> +#include <timer.h> static int mtk_dsi_phy_clk_setting(u32 format, u32 lanes, const struct edid *edid) @@ -298,3 +299,21 @@ int mtk_dsi_init(u32 mode_flags, u32 format, u32 lanes, return 0; } + +void mtk_dsi_pin_drv_ctrl(void) +{ + struct stopwatch sw; + + setbits_le32(&lvds_tx1->vopll_ctl3, RG_DA_LVDSTX_PWR_ON); + + stopwatch_init_usecs_expire(&sw, 1000); + + do { + if (stopwatch_expired(&sw)) { + printk(BIOS_ERR, "enable lvdstx_power failed!!!\n"); + return; + } + } while ((read32(&lvds_tx1->vopll_ctl3) & RG_AD_LVDSTX_PWR_ACK) == 0); + + clrbits_le32(&lvds_tx1->vopll_ctl3, RG_DA_LVDS_ISO_EN); +} |