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>;
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";
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 {
0xff610000 0xa000>;
};
- amhdmitx: amhdmitx {
- compatible = "amlogic, amhdmitx";
- dev_name = "amhdmitx";
- status = "okay";
- repeater_tx = <0x0>;
- };
-
aocec: aocec {
compatible = "amlogic, aocec-tm2";
/*device_name = "aocec";*/
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>;
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";
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 {
0xff610000 0xa000>;
};
- amhdmitx: amhdmitx {
- compatible = "amlogic, amhdmitx";
- dev_name = "amhdmitx";
- status = "okay";
- repeater_tx = <0x0>;
- };
-
aocec: aocec {
compatible = "amlogic, aocec-tm2";
/*device_name = "aocec";*/
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>;
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";
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 {
0xff610000 0xa000>;
};
- amhdmitx: amhdmitx {
- compatible = "amlogic, amhdmitx";
- dev_name = "amhdmitx";
- status = "okay";
- repeater_tx = <0x0>;
- };
-
aocec: aocec {
compatible = "amlogic, aocec-tm2";
/*device_name = "aocec";*/
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>;
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";
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 {
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";*/
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>;
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";
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 {
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";*/
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>;
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";
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 {
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";*/
}
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
#include "hdmi_rx_edid.h"
-#define RX_VER0 "ver.2019-09-02"
+#define RX_VER0 "ver.2019-09-26"
/*
*
*
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);
}
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;
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) {
hdmirx_hw_config();
hpd_to_esm = 1;
/* mdelay(900); */
- rx_set_cur_hpd(1);
+ rx_set_cur_hpd(1, 4);
sm_pause = 0;
}
}
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);
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);
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);
}
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();
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;
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);
} 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;
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;
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);
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)