mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-10 12:57:06 +09:00
hdmirx: add repeater22 [1/1]
PD#SWPL-12503 Problem: TM2 cannot support repeater22 Solution: add repreater2.2 Verify: TM2 Change-Id: Idda626632641939dccab79bf3d958e8f2c462c82 Signed-off-by: Lei Yang <lei.yang@amlogic.com>
This commit is contained in:
@@ -693,7 +693,7 @@
|
||||
compatible = "amlogic, unifykey";
|
||||
status = "okay";
|
||||
|
||||
unifykey-num = <24>;
|
||||
unifykey-num = <21>;
|
||||
unifykey-index-0 = <&keysn_0>;
|
||||
unifykey-index-1 = <&keysn_1>;
|
||||
unifykey-index-2 = <&keysn_2>;
|
||||
@@ -715,9 +715,6 @@
|
||||
unifykey-index-18 = <&keysn_18>;
|
||||
unifykey-index-19 = <&keysn_19>;
|
||||
unifykey-index-20 = <&keysn_20>;
|
||||
unifykey-index-21 = <&keysn_21>;
|
||||
unifykey-index-22 = <&keysn_22>;
|
||||
unifykey-index-23 = <&keysn_23>;
|
||||
|
||||
keysn_0: key_0{
|
||||
key-name = "usid";
|
||||
@@ -829,21 +826,6 @@
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_21:key_21{
|
||||
key-name = "hdcp22_rprx_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_22:key_22{
|
||||
key-name = "hdcp22_rprp_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_23:key_23{
|
||||
key-name = "hdcp22_rp_private";
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
}; /* End unifykey */
|
||||
|
||||
amlvideo2_0 {
|
||||
@@ -920,13 +902,6 @@
|
||||
0xff610000 0xa000>;
|
||||
};
|
||||
|
||||
amhdmitx: amhdmitx {
|
||||
compatible = "amlogic, amhdmitx";
|
||||
dev_name = "amhdmitx";
|
||||
status = "okay";
|
||||
repeater_tx = <0x0>;
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
|
||||
@@ -714,7 +714,7 @@
|
||||
compatible = "amlogic, unifykey";
|
||||
status = "okay";
|
||||
|
||||
unifykey-num = <24>;
|
||||
unifykey-num = <21>;
|
||||
unifykey-index-0 = <&keysn_0>;
|
||||
unifykey-index-1 = <&keysn_1>;
|
||||
unifykey-index-2 = <&keysn_2>;
|
||||
@@ -736,9 +736,6 @@
|
||||
unifykey-index-18 = <&keysn_18>;
|
||||
unifykey-index-19 = <&keysn_19>;
|
||||
unifykey-index-20 = <&keysn_20>;
|
||||
unifykey-index-21 = <&keysn_21>;
|
||||
unifykey-index-22 = <&keysn_22>;
|
||||
unifykey-index-23 = <&keysn_23>;
|
||||
|
||||
keysn_0: key_0{
|
||||
key-name = "usid";
|
||||
@@ -850,21 +847,6 @@
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_21:key_21{
|
||||
key-name = "hdcp22_rprx_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_22:key_22{
|
||||
key-name = "hdcp22_rprp_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_23:key_23{
|
||||
key-name = "hdcp22_rp_private";
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
}; /* End unifykey */
|
||||
|
||||
hdmirx {
|
||||
@@ -925,13 +907,6 @@
|
||||
0xff610000 0xa000>;
|
||||
};
|
||||
|
||||
amhdmitx: amhdmitx {
|
||||
compatible = "amlogic, amhdmitx";
|
||||
dev_name = "amhdmitx";
|
||||
status = "okay";
|
||||
repeater_tx = <0x0>;
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
|
||||
@@ -699,7 +699,7 @@
|
||||
compatible = "amlogic, unifykey";
|
||||
status = "okay";
|
||||
|
||||
unifykey-num = <24>;
|
||||
unifykey-num = <21>;
|
||||
unifykey-index-0 = <&keysn_0>;
|
||||
unifykey-index-1 = <&keysn_1>;
|
||||
unifykey-index-2 = <&keysn_2>;
|
||||
@@ -721,9 +721,6 @@
|
||||
unifykey-index-18 = <&keysn_18>;
|
||||
unifykey-index-19 = <&keysn_19>;
|
||||
unifykey-index-20 = <&keysn_20>;
|
||||
unifykey-index-21 = <&keysn_21>;
|
||||
unifykey-index-22 = <&keysn_22>;
|
||||
unifykey-index-23 = <&keysn_23>;
|
||||
|
||||
keysn_0: key_0{
|
||||
key-name = "usid";
|
||||
@@ -835,21 +832,6 @@
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_21:key_21{
|
||||
key-name = "hdcp22_rprx_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_22:key_22{
|
||||
key-name = "hdcp22_rprp_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_23:key_23{
|
||||
key-name = "hdcp22_rp_private";
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
}; /* End unifykey */
|
||||
|
||||
amlvideo2_0 {
|
||||
@@ -926,13 +908,6 @@
|
||||
0xff610000 0xa000>;
|
||||
};
|
||||
|
||||
amhdmitx: amhdmitx {
|
||||
compatible = "amlogic, amhdmitx";
|
||||
dev_name = "amhdmitx";
|
||||
status = "okay";
|
||||
repeater_tx = <0x0>;
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
|
||||
@@ -691,7 +691,7 @@
|
||||
compatible = "amlogic, unifykey";
|
||||
status = "okay";
|
||||
|
||||
unifykey-num = <24>;
|
||||
unifykey-num = <21>;
|
||||
unifykey-index-0 = <&keysn_0>;
|
||||
unifykey-index-1 = <&keysn_1>;
|
||||
unifykey-index-2 = <&keysn_2>;
|
||||
@@ -713,9 +713,6 @@
|
||||
unifykey-index-18 = <&keysn_18>;
|
||||
unifykey-index-19 = <&keysn_19>;
|
||||
unifykey-index-20 = <&keysn_20>;
|
||||
unifykey-index-21 = <&keysn_21>;
|
||||
unifykey-index-22 = <&keysn_22>;
|
||||
unifykey-index-23 = <&keysn_23>;
|
||||
|
||||
keysn_0: key_0{
|
||||
key-name = "usid";
|
||||
@@ -827,21 +824,6 @@
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_21:key_21{
|
||||
key-name = "hdcp22_rprx_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_22:key_22{
|
||||
key-name = "hdcp22_rprp_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_23:key_23{
|
||||
key-name = "hdcp22_rp_private";
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
}; /* End unifykey */
|
||||
|
||||
amlvideo2_0 {
|
||||
@@ -918,13 +900,6 @@
|
||||
0x0 0xff610000 0x0 0xa000>;
|
||||
};
|
||||
|
||||
amhdmitx: amhdmitx {
|
||||
compatible = "amlogic, amhdmitx";
|
||||
dev_name = "amhdmitx";
|
||||
status = "okay";
|
||||
repeater_tx = <0x0>;
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
|
||||
@@ -714,7 +714,7 @@
|
||||
compatible = "amlogic, unifykey";
|
||||
status = "okay";
|
||||
|
||||
unifykey-num = <24>;
|
||||
unifykey-num = <21>;
|
||||
unifykey-index-0 = <&keysn_0>;
|
||||
unifykey-index-1 = <&keysn_1>;
|
||||
unifykey-index-2 = <&keysn_2>;
|
||||
@@ -736,9 +736,6 @@
|
||||
unifykey-index-18 = <&keysn_18>;
|
||||
unifykey-index-19 = <&keysn_19>;
|
||||
unifykey-index-20 = <&keysn_20>;
|
||||
unifykey-index-21 = <&keysn_21>;
|
||||
unifykey-index-22 = <&keysn_22>;
|
||||
unifykey-index-23 = <&keysn_23>;
|
||||
|
||||
keysn_0: key_0{
|
||||
key-name = "usid";
|
||||
@@ -850,21 +847,6 @@
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_21:key_21{
|
||||
key-name = "hdcp22_rprx_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_22:key_22{
|
||||
key-name = "hdcp22_rprp_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_23:key_23{
|
||||
key-name = "hdcp22_rp_private";
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
}; /* End unifykey */
|
||||
|
||||
hdmirx {
|
||||
@@ -925,13 +907,6 @@
|
||||
0x0 0xff610000 0x0 0xa000>;
|
||||
};
|
||||
|
||||
amhdmitx: amhdmitx {
|
||||
compatible = "amlogic, amhdmitx";
|
||||
dev_name = "amhdmitx";
|
||||
status = "okay";
|
||||
repeater_tx = <0x0>;
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
|
||||
@@ -702,7 +702,7 @@
|
||||
compatible = "amlogic, unifykey";
|
||||
status = "okay";
|
||||
|
||||
unifykey-num = <24>;
|
||||
unifykey-num = <21>;
|
||||
unifykey-index-0 = <&keysn_0>;
|
||||
unifykey-index-1 = <&keysn_1>;
|
||||
unifykey-index-2 = <&keysn_2>;
|
||||
@@ -724,9 +724,6 @@
|
||||
unifykey-index-18 = <&keysn_18>;
|
||||
unifykey-index-19 = <&keysn_19>;
|
||||
unifykey-index-20 = <&keysn_20>;
|
||||
unifykey-index-21 = <&keysn_21>;
|
||||
unifykey-index-22 = <&keysn_22>;
|
||||
unifykey-index-23 = <&keysn_23>;
|
||||
|
||||
keysn_0: key_0{
|
||||
key-name = "usid";
|
||||
@@ -838,21 +835,6 @@
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_21:key_21{
|
||||
key-name = "hdcp22_rprx_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_22:key_22{
|
||||
key-name = "hdcp22_rprp_fw";
|
||||
key-device = "normal";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
keysn_23:key_23{
|
||||
key-name = "hdcp22_rp_private";
|
||||
key-device = "secure";
|
||||
key-permit = "read","write","del";
|
||||
};
|
||||
}; /* End unifykey */
|
||||
|
||||
amlvideo2_0 {
|
||||
@@ -929,13 +911,6 @@
|
||||
0x0 0xff610000 0x0 0xa000>;
|
||||
};
|
||||
|
||||
amhdmitx: amhdmitx {
|
||||
compatible = "amlogic, amhdmitx";
|
||||
dev_name = "amhdmitx";
|
||||
status = "okay";
|
||||
repeater_tx = <0x0>;
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
|
||||
@@ -1024,18 +1024,18 @@ static long hdmirx_ioctl(struct file *file, unsigned int cmd,
|
||||
}
|
||||
case HDMI_IOC_HDCP_ON:
|
||||
hdcp_enable = 1;
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 4);
|
||||
/*fsm_restart();*/
|
||||
break;
|
||||
case HDMI_IOC_HDCP_OFF:
|
||||
hdcp_enable = 0;
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 4);
|
||||
hdmirx_hw_config();
|
||||
/*fsm_restart();*/
|
||||
break;
|
||||
case HDMI_IOC_EDID_UPDATE:
|
||||
if (rx.open_fg) {
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 4);
|
||||
edid_update_flag = 1;
|
||||
}
|
||||
#if 0
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include "hdmi_rx_edid.h"
|
||||
|
||||
|
||||
#define RX_VER0 "ver.2019-09-02"
|
||||
#define RX_VER0 "ver.2019-09-26"
|
||||
/*
|
||||
*
|
||||
*
|
||||
|
||||
@@ -1602,8 +1602,12 @@ int rx_set_port_hpd(uint8_t port_id, bool val)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void rx_set_cur_hpd(uint8_t val)
|
||||
/* add param to differentiate repeater/main state machine/etc
|
||||
* 0: main loop; 2: workaround; 3: repeater flow; 4: special use
|
||||
*/
|
||||
void rx_set_cur_hpd(u8 val, u8 func)
|
||||
{
|
||||
rx_pr("func-%d to", func);
|
||||
rx_set_port_hpd(rx.port, val);
|
||||
}
|
||||
|
||||
@@ -2362,7 +2366,7 @@ void hdmirx_load_firm_reset(int type)
|
||||
rx.firm_change = 1;
|
||||
msleep(20);
|
||||
/*External_Mute(1);rx_aud_pll_ctl(0);*/
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 4);
|
||||
/*type 2 only pull down hpd*/
|
||||
if (type == 2) {
|
||||
downstream_hpd_flag = 0;
|
||||
@@ -3035,7 +3039,7 @@ void rx_debug_load22key(void)
|
||||
if (ret) {
|
||||
rx_pr("load 2.2 key\n");
|
||||
sm_pause = 1;
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 4);
|
||||
hdcp22_on = 1;
|
||||
hdcp22_kill_esm = 1;
|
||||
while (wait_kill_done_cnt++ < 10) {
|
||||
@@ -3061,7 +3065,7 @@ void rx_debug_load22key(void)
|
||||
hdmirx_hw_config();
|
||||
hpd_to_esm = 1;
|
||||
/* mdelay(900); */
|
||||
rx_set_cur_hpd(1);
|
||||
rx_set_cur_hpd(1, 4);
|
||||
sm_pause = 0;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1213,7 +1213,7 @@ extern unsigned int rx_hdcp22_rd_reg_bits(unsigned int addr, unsigned int mask);
|
||||
extern int rx_get_aud_pll_err_sts(void);
|
||||
extern void rx_force_hpd_cfg(uint8_t hpd_level);
|
||||
extern int rx_set_port_hpd(uint8_t port_id, bool val);
|
||||
extern void rx_set_cur_hpd(uint8_t val);
|
||||
void rx_set_cur_hpd(u8 val, u8 func);
|
||||
extern unsigned int rx_get_hdmi5v_sts(void);
|
||||
extern unsigned int rx_get_hpd_sts(void);
|
||||
|
||||
|
||||
@@ -101,7 +101,8 @@ void rx_check_repeat(void)
|
||||
|
||||
if (rx.hdcp.repeat != repeat_plug) {
|
||||
/*pull down hpd if downstream plug low*/
|
||||
rx_set_cur_hpd(0);
|
||||
/* rx_set_cur_hpd(0, 3); */
|
||||
rx_send_hpd_pulse();
|
||||
rx_pr("firm_change:%d,repeat_plug:%d,repeat:%d\n",
|
||||
rx.firm_change, repeat_plug, rx.hdcp.repeat);
|
||||
rx_set_repeat_signal(repeat_plug);
|
||||
@@ -113,7 +114,7 @@ void rx_check_repeat(void)
|
||||
memset(&receive_edid, 0, sizeof(receive_edid));
|
||||
up_phy_addr = 0;
|
||||
/*new_edid = true;*/
|
||||
/* rx_set_cur_hpd(1); */
|
||||
/* rx_set_cur_hpd(1, 3); */
|
||||
/*rx.firm_change = 0;*/
|
||||
rx_pr("1firm_change:%d,repeat_plug:%d,repeat:%d\n",
|
||||
rx.firm_change, repeat_plug, rx.hdcp.repeat);
|
||||
|
||||
@@ -1906,7 +1906,7 @@ void hdmirx_open_port(enum tvin_port_e port)
|
||||
}
|
||||
if (rx.state > FSM_HPD_LOW)
|
||||
rx.state = FSM_HPD_LOW;
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 0);
|
||||
/* need reset the whole module when switch port */
|
||||
wait_ddc_idle();
|
||||
hdmi_rx_top_edid_update();
|
||||
@@ -2139,7 +2139,7 @@ void rx_main_state_machine(void)
|
||||
fsm_restart();
|
||||
break;
|
||||
case FSM_HPD_LOW:
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 0);
|
||||
set_scdc_cfg(1, 0);
|
||||
rx.state = FSM_INIT;
|
||||
break;
|
||||
@@ -2160,7 +2160,7 @@ void rx_main_state_machine(void)
|
||||
downstream_hpd_flag = 0;
|
||||
edid_update_flag = 0;
|
||||
pre_port = rx.port;
|
||||
rx_set_cur_hpd(1);
|
||||
rx_set_cur_hpd(1, 0);
|
||||
rx.phy.cable_clk = 0;
|
||||
rx.phy.cablesel = 0;
|
||||
set_scdc_cfg(0, 1);
|
||||
@@ -2229,7 +2229,7 @@ void rx_main_state_machine(void)
|
||||
} else
|
||||
rx.err_rec_mode = ERR_REC_HPD_RST;
|
||||
} else if (rx.err_rec_mode == ERR_REC_HPD_RST) {
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 2);
|
||||
rx.phy.cable_clk = 0;
|
||||
rx.state = FSM_INIT;
|
||||
rx.err_rec_mode = ERR_REC_EQ_RETRY;
|
||||
@@ -2323,7 +2323,7 @@ void rx_main_state_machine(void)
|
||||
rx.err_rec_mode = ERR_REC_HPD_RST;
|
||||
rx_set_eq_run_state(E_EQ_START);
|
||||
} else if (rx.err_rec_mode == ERR_REC_HPD_RST) {
|
||||
rx_set_cur_hpd(0);
|
||||
rx_set_cur_hpd(0, 2);
|
||||
rx.phy.cable_clk = 0;
|
||||
rx.state = FSM_INIT;
|
||||
rx.err_rec_mode = ERR_REC_EQ_RETRY;
|
||||
@@ -2839,7 +2839,7 @@ int hdmirx_debug(const char *buf, int size)
|
||||
if (strncmp(tmpbuf, "help", 4) == 0) {
|
||||
rx_debug_help();
|
||||
} else if (strncmp(tmpbuf, "hpd", 3) == 0)
|
||||
rx_set_cur_hpd(tmpbuf[3] == '0' ? 0 : 1);
|
||||
rx_set_cur_hpd((tmpbuf[3] == '0' ? 0 : 1), 4);
|
||||
else if (strncmp(tmpbuf, "cable_status", 12) == 0) {
|
||||
size = hdmirx_rd_top(TOP_HPD_PWR5V) >> 20;
|
||||
rx_pr("cable_status = %x\n", size);
|
||||
@@ -2980,7 +2980,7 @@ int hdmirx_debug(const char *buf, int size)
|
||||
|
||||
void rx_dw_edid_monitor(void)
|
||||
{
|
||||
if (!hdmi_cec_en)
|
||||
if ((!hdmi_cec_en) || (hdmirx_repeat_support()))
|
||||
return;
|
||||
if (tx_hpd_event == E_RCV) {
|
||||
if (rx.open_fg)
|
||||
|
||||
Reference in New Issue
Block a user