hdmirx: add repeater14 for TM2 [1/2]
authorLei Yang <lei.yang@amlogic.com>
Mon, 2 Sep 2019 07:40:18 +0000 (15:40 +0800)
committerTao Zeng <tao.zeng@amlogic.com>
Wed, 4 Sep 2019 13:16:19 +0000 (06:16 -0700)
PD#SWPL-12502

Problem:
new function

Solution:
add new function of TM2

Verify:
T962E2

Change-Id: Idd5843d39bb9235fe0abdf9aaaca3be6dd2795e7
Signed-off-by: Lei Yang <lei.yang@amlogic.com>
14 files changed:
arch/arm/boot/dts/amlogic/tm2_t962e2_ab311.dts
arch/arm/boot/dts/amlogic/tm2_t962e2_ab319.dts
arch/arm/boot/dts/amlogic/tm2_t962x3_ab301.dts
arch/arm/boot/dts/amlogic/tm2_t962x3_ab309.dts
arch/arm/boot/dts/amlogic/tm2_t962x3_t312.dts
arch/arm64/boot/dts/amlogic/tm2_t962e2_ab311.dts
arch/arm64/boot/dts/amlogic/tm2_t962e2_ab319.dts
arch/arm64/boot/dts/amlogic/tm2_t962x3_ab301.dts
arch/arm64/boot/dts/amlogic/tm2_t962x3_ab309.dts
arch/arm64/boot/dts/amlogic/tm2_t962x3_t312.dts
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_hw.c
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_repeater.c
drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_wrapper.c

index a5594d98e6a88e329e1b75e2a90366dffdb078c6..6769cff29b5b07ae4b5044be7fb18fb359f96d3a 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
        status = "okay";
 };
 
-&amhdmitx {
-       status = "okay";
-};
index 6627307d4c1d54e9e58527c1fffea432c980384d..1a0045ee9ef3aee5dcf4e85d4a9f2a7ba52e569f 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index 03882c921d7e6bd8ce4202d4927e7444e23825a3..c8c0803b480c4b94b538ee24d4043f4282405e69 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index e40305d485a823dcdb8ec3aee66ed8a5883e40a4..9c82e09c6e10a6ab4a2682adb1b61c7207469b4e 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index 70a351994c820eb9349ac25ed5313582395a4d66..5e0e86ee47750b9a071feb7cc03e13c0e1ad3fe9 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index c61acf561a669e9ace9853ada684851a911ff0ea..10a734953e312d03ee2e3d67727ea8be1cd69158 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
        status = "okay";
 };
 
-&amhdmitx {
-       status = "okay";
-};
index 0288d51806432371c6a443a1db781f9cf05985e6..31ea48604382275f5af4435b8b57f9a88a8a39ee 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
 &efuse {
        status = "okay";
 };
-
-&amhdmitx {
-       status = "okay";
-};
index 8d23cee950051e846f5687de889a669a6ffb1c52..bed852395dbee2127f0c4fe232e6226387ed3f32 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index b5a2de97bcfbf5974013315198931dac676c18a2..3cb3feebfe6e50144f7b5bda9b753969ed22282a 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index e650b79506bcc17240e756aa43b63f8a7c045dd9..8e1da08a244a7c1dfe344ab91b493221ce2be1e1 100644 (file)
                compatible = "amlogic, unifykey";
                status = "okay";
 
-               unifykey-num = <21>;
+               unifykey-num = <24>;
                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";*/
index 3915a5f9134860173b6469b336c1404db6ea5398..12574bdee8e6862fd1c0e01fcd72050313d143dd 100644 (file)
@@ -34,7 +34,7 @@
 #include "hdmi_rx_edid.h"
 
 
-#define RX_VER0 "ver.2019-08-08"
+#define RX_VER0 "ver.2019-09-02"
 /*
  *
  *
index 23aedcf6d6839ccc11d29af647d926d2a38aed02..600df2f339dee57d908b78c57c73e7441522b609 100644 (file)
@@ -1805,7 +1805,6 @@ void hdmirx_hdcp22_hpd(bool value)
  */
 void hdcp_22_off(void)
 {
-       hdcp22_clk_en(0);
        /* note: can't pull down hpd before enter suspend */
        /* it will stop cec wake up func if EE domain still working */
        /* rx_set_cur_hpd(0); */
@@ -1816,6 +1815,7 @@ void hdcp_22_off(void)
                hdmirx_hdcp22_esm_rst();
        else
                hdcp22_kill_esm = 0;
+       hdcp22_clk_en(0);
        rx_pr("hdcp22 off\n");
 }
 
@@ -3048,8 +3048,8 @@ void rx_debug_load22key(void)
                extcon_set_state_sync(rx.rx_excton_rx22,
                        EXTCON_DISP_HDMI, 1);
                mdelay(100);
-               hdmirx_hw_config();
                hdmi_rx_top_edid_update();
+               hdmirx_hw_config();
                hpd_to_esm = 1;
                /* mdelay(900); */
                rx_set_cur_hpd(1);
@@ -3060,8 +3060,8 @@ void rx_debug_load22key(void)
 void rx_debug_loadkey(void)
 {
        rx_pr("load hdcp key\n");
-       hdmirx_hw_config();
        hdmi_rx_top_edid_update();
+       hdmirx_hw_config();
        pre_port = 0xfe;
 }
 
index 155d5ca8837f22788994fadfb70a7453d9d8434f..9e7e8da65bf7e3928aedc4c1aed0e638e5f093c0 100644 (file)
@@ -247,6 +247,7 @@ void rx_hdcp14_resume(void)
 void rx_set_repeater_support(bool enable)
 {
        downstream_repeat_support = enable;
+       rx_pr("****************=%d\n", downstream_repeat_support);
 }
 EXPORT_SYMBOL(rx_set_repeater_support);
 
index e22a36115965c01e2fc393aca23c59795bbd3b79..5ffad2f12896e5656c8f2249abaecf312234c8f6 100644 (file)
@@ -126,14 +126,22 @@ static int wait_no_sig_max = 600;
 
 /* to inform ESM whether the cable is connected or not */
 bool hpd_to_esm;
+MODULE_PARM_DESC(hpd_to_esm, "\n hpd_to_esm\n");
+module_param(hpd_to_esm, bool, 0664);
 
 bool hdcp22_kill_esm;
 MODULE_PARM_DESC(hdcp22_kill_esm, "\n hdcp22_kill_esm\n");
 module_param(hdcp22_kill_esm, bool, 0664);
 
+bool hdcp_mode_sel;
+MODULE_PARM_DESC(hdcp_mode_sel, "\n hdcp_mode_sel\n");
+module_param(hdcp_mode_sel, bool, 0664);
+
 static int hdcp22_capable_sts = 0xff;
 
 bool esm_auth_fail_en;
+MODULE_PARM_DESC(esm_auth_fail_en, "\n esm_auth_fail_en\n");
+module_param(esm_auth_fail_en, bool, 0664);
 
 /* to inform hdcp_rx22 whether there's any device connected */
 bool pwr_sts_to_esm;
@@ -142,17 +150,29 @@ static int hdcp22_auth_sts = 0xff;
 
 /*the esm reset flag for hdcp_rx22*/
 bool esm_reset_flag;
+MODULE_PARM_DESC(esm_reset_flag, "\n esm_reset_flag\n");
+module_param(esm_reset_flag, bool, 0664);
 
 /* to inform ESM whether the cable is connected or not */
 bool video_stable_to_esm;
+MODULE_PARM_DESC(video_stable_to_esm, "\n video_stable_to_esm\n");
+module_param(video_stable_to_esm, bool, 0664);
 
 bool enable_hdcp22_esm_log;
+MODULE_PARM_DESC(enable_hdcp22_esm_log, "\n enable_hdcp22_esm_log\n");
+module_param(enable_hdcp22_esm_log, bool, 0664);
 
 bool esm_error_flag;
+MODULE_PARM_DESC(esm_error_flag, "\n esm_error_flag\n");
+module_param(esm_error_flag, bool, 0664);
 
 bool hdcp22_esm_reset2;
+MODULE_PARM_DESC(hdcp22_esm_reset2, "\n hdcp22_esm_reset2\n");
+module_param(hdcp22_esm_reset2, bool, 0664);
 
 bool hdcp22_stop_auth;
+module_param(hdcp22_stop_auth, bool, 0664);
+MODULE_PARM_DESC(hdcp22_stop_auth, "hdcp22_stop_auth");
 
 int hdcp14_on;
 MODULE_PARM_DESC(hdcp14_on, "\n hdcp14_on\n");
@@ -160,6 +180,8 @@ module_param(hdcp14_on, int, 0664);
 
 /*esm recovery mode for changing resolution & hdmi2.0*/
 int esm_recovery_mode = ESM_REC_MODE_TMDS;
+module_param(esm_recovery_mode, int, 0664);
+MODULE_PARM_DESC(esm_recovery_mode, "esm_recovery_mode");
 
 int phy_retry_times = 1;
 /* No need to judge  frame rate while checking timing stable,as there are
@@ -1329,7 +1351,7 @@ void fsm_restart(void)
        /* hdmi_rx_top_edid_update(); */
        set_scdc_cfg(1, 0);
        vic_check_en = false;
-       dvi_check_en = true;
+       /* dvi_check_en = true; */
        rx.state = FSM_INIT;
        rx.phy.cable_clk = 0;
        rx.phy.pll_rate = 0;
@@ -1856,7 +1878,7 @@ void hdmirx_open_port(enum tvin_port_e port)
        //rx.no_signal = false;
        //rx.wait_no_sig_cnt = 0;
        vic_check_en = false;
-       dvi_check_en = true;
+       /* dvi_check_en = true; */
        if (hdmirx_repeat_support())
                rx.hdcp.repeat = repeat_plug;
        else
@@ -1880,9 +1902,9 @@ void hdmirx_open_port(enum tvin_port_e port)
                        rx.state = FSM_HPD_LOW;
                rx_set_cur_hpd(0);
                /* need reset the whole module when switch port */
-               hdmirx_hw_config();
                wait_ddc_idle();
                hdmi_rx_top_edid_update();
+               hdmirx_hw_config();
        } else {
                if (rx.state >= FSM_SIG_STABLE)
                        rx.state = FSM_SIG_STABLE;
@@ -2236,8 +2258,8 @@ void rx_main_state_machine(void)
                                 */
                                if (fmt_vic_abnormal()) {
                                        if (vic_check_en) {
-                                               hdmirx_hw_config();
                                                hdmi_rx_top_edid_update();
+                                               hdmirx_hw_config();
                                                rx.state = FSM_HPD_LOW;
                                        } else {
                                                rx.state = FSM_WAIT_CLK_STABLE;