vlock: bring up for tm2 [1/1]

PD#SWPL-6576

Problem:
bringup for tm2

Solution:
add some chip id for match tm2

Verify:
tm2

Change-Id: I857ec687b7888782efb8875f8edee538dd615947
Signed-off-by: Yong Qin <yong.qin@amlogic.com>
This commit is contained in:
Yong Qin
2019-04-01 15:45:36 +08:00
committed by Jianxiong Pan
parent 68487523f5
commit dcb1587f3e
8 changed files with 22 additions and 10 deletions

View File

@@ -479,7 +479,7 @@
};
amlvecm {
compatible = "amlogic, vecm-tl1";
compatible = "amlogic, vecm-tm2";
dev_name = "aml_vecm";
status = "okay";
gamma_en = <1>;/*1:enabel ;0:disable*/

View File

@@ -474,7 +474,7 @@
};
amlvecm {
compatible = "amlogic, vecm-tl1";
compatible = "amlogic, vecm-tm2";
dev_name = "aml_vecm";
status = "okay";
gamma_en = <1>;/*1:enabel ;0:disable*/

View File

@@ -475,7 +475,7 @@
};
amlvecm {
compatible = "amlogic, vecm-tl1";
compatible = "amlogic, vecm-tm2";
dev_name = "aml_vecm";
status = "okay";
gamma_en = <1>;/*1:enabel ;0:disable*/

View File

@@ -474,7 +474,7 @@
};
amlvecm {
compatible = "amlogic, vecm";
compatible = "amlogic, vecm-tm2";
dev_name = "aml_vecm";
status = "okay";
gamma_en = <1>;/*1:enabel ;0:disable*/

View File

@@ -473,7 +473,7 @@
};
amlvecm {
compatible = "amlogic, vecm-tl1";
compatible = "amlogic, vecm-tm2";
dev_name = "aml_vecm";
status = "okay";
gamma_en = <1>;/*1:enabel ;0:disable*/

View File

@@ -474,7 +474,7 @@
};
amlvecm {
compatible = "amlogic, vecm-tl1";
compatible = "amlogic, vecm-tm2";
dev_name = "aml_vecm";
status = "okay";
gamma_en = <1>;/*1:enabel ;0:disable*/

View File

@@ -6532,6 +6532,14 @@ static const struct vecm_match_data_s vecm_dt_tl1 = {
.vlk_phlock_en = false,
};
static const struct vecm_match_data_s vecm_dt_tm2 = {
.vlk_support = true,
.vlk_new_fsm = 1,
.vlk_hwver = vlock_hw_ver2,
.vlk_phlock_en = false,
};
static const struct of_device_id aml_vecm_dt_match[] = {
{
.compatible = "amlogic, vecm",
@@ -6541,6 +6549,10 @@ static const struct of_device_id aml_vecm_dt_match[] = {
.compatible = "amlogic, vecm-tl1",
.data = &vecm_dt_tl1,
},
{
.compatible = "amlogic, vecm-tm2",
.data = &vecm_dt_tm2,
},
{},
};

View File

@@ -504,7 +504,7 @@ static void vlock_setting(struct vframe_s *vf,
/*enable vlock to adj pll*/
/* CFG_VID_LOCK_ADJ_EN disable */
WRITE_VPP_REG_BITS(ENCL_MAX_LINE_SWITCH_POINT, 0, 13, 1);
WRITE_VPP_REG_BITS(enc_max_line_switch_addr, 0, 13, 1);
/* disable to adjust enc */
WRITE_VPP_REG_BITS(VPU_VLOCK_CTRL, 0, 30, 1);
/* VLOCK_CNTL_EN enable */
@@ -1034,7 +1034,7 @@ static void vlock_enable_step3_soft_enc(void)
WRITE_VPP_REG(ENCL_VIDEO_MAX_LNCNT,
pre_enc_max_line + line_adj);
if (!(vlock_debug & VLOCK_DEBUG_ENC_PIXEL_ADJ_DIS))
WRITE_VPP_REG(ENCL_MAX_LINE_SWITCH_POINT,
WRITE_VPP_REG(enc_max_line_switch_addr,
pre_enc_max_pixel + pixel_adj);
last_i_vsync = READ_VPP_REG(0x3011);
@@ -1494,13 +1494,13 @@ void vlock_status_init(void)
vlock_mode = VLOCK_MODE_MANUAL_PLL;
if (is_meson_gxtvbb_cpu() ||
is_meson_txl_cpu() || is_meson_txlx_cpu()
|| is_meson_tl1_cpu())
|| is_meson_tl1_cpu() || is_meson_tm2_cpu())
vlock_en = 1;
else
vlock_en = 0;
/*initial pll register address*/
if (is_meson_tl1_cpu()) {
if (is_meson_tl1_cpu() || is_meson_tm2_cpu()) {
hhi_pll_reg_m = HHI_TCON_PLL_CNTL0;
hhi_pll_reg_frac = HHI_TCON_PLL_CNTL1;
/*hhi_pll_reg_vlock_ctl = HHI_HDMI_PLL_VLOCK_CNTL;*/