mirror of
https://github.com/hardkernel/kernel_common_drivers.git
synced 2026-06-25 12:03:48 +09:00
hdmitx21: s7 add Rterm config [1/3]
PD#SWPL-158230 Problem: set the PHY Rterm value with efuse trimming Solution: add Rterm config Verify: s7_bh201 Test: DRM-TX-112、DRM-TX-79,DRM-TX-80,DRM-TX-81,DRM-TX-82 Change-Id: Icadf95536121823b0be38c0547a20295da7b6a2b Signed-off-by: xiang.wu1 <xiang.wu1@amlogic.com>
This commit is contained in:
committed by
gerrit autosubmit
parent
4d958d7508
commit
490df3c31c
@@ -174,6 +174,9 @@ void hdmitx21_phy_bandgap_en_s7(void)
|
||||
|
||||
void set21_phy_by_mode_s7(u32 mode)
|
||||
{
|
||||
struct arm_smccc_res res;
|
||||
u8 rterm = 0; /* this will get from ufuse */
|
||||
|
||||
switch (mode) {
|
||||
case HDMI_PHYPARA_6G: /* 5.94/4.5/3.7Gbps */
|
||||
case HDMI_PHYPARA_4p5G:
|
||||
@@ -195,6 +198,18 @@ void set21_phy_by_mode_s7(u32 mode)
|
||||
hd21_write_reg(ANACTRL_HDMIPHY_CTRL3, 0x004ef001);
|
||||
break;
|
||||
}
|
||||
|
||||
/* write Rterm */
|
||||
arm_smccc_smc(HDCPTX_IOOPR, HDMITX_GET_RTERM, 0, 0, 0, 0, 0, 0, &res);
|
||||
rterm = (unsigned int)((res.a0) & 0xffffffff);
|
||||
/* default value when efuse invalid, 0xff indicate efuse invalid */
|
||||
if (rterm != 0xff) {
|
||||
HDMITX_INFO("%s[%d] rterm = %d\n", __func__, __LINE__, rterm);
|
||||
hd21_set_reg_bits(ANACTRL_HDMIPHY_CTRL0, rterm, 28, 4);
|
||||
} else {
|
||||
HDMITX_INFO("efuse invalid, use default value\n");
|
||||
}
|
||||
|
||||
/* The bit with resetn is configured later than other bits. */
|
||||
usleep_range(100, 110);
|
||||
hd21_set_reg_bits(ANACTRL_HDMIPHY_CTRL3, 3, 10, 2);
|
||||
|
||||
Reference in New Issue
Block a user