mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
cec: cec bringup for tm2 [1/1]
PD#SWPL-6945 Problem: bringup for tm2 Solution: add chip support and modify dts Verify: tm2 Change-Id: I718c3b81912a3555e19866f96d392bfb09d27384 Signed-off-by: Yong Qin <yong.qin@amlogic.com>
This commit is contained in:
@@ -615,7 +615,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -623,10 +623,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -883,7 +883,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -891,10 +891,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -863,7 +863,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -871,10 +871,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -883,7 +883,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -891,11 +891,13 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
arc_port_mask = <0x2>;
|
||||
output = <1>; /*output port number*/
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
interrupt-names = "hdmi_aocecb","hdmi_aocec";
|
||||
|
||||
@@ -864,7 +864,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -872,11 +872,13 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
arc_port_mask = <0x2>;
|
||||
output = <1>; /*output port number*/
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
interrupt-names = "hdmi_aocecb","hdmi_aocec";
|
||||
|
||||
@@ -614,7 +614,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -622,10 +622,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -876,7 +876,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -884,10 +884,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -862,7 +862,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -870,10 +870,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -879,7 +879,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -887,10 +887,12 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
output = <1>; /*output port number*/
|
||||
arc_port_mask = <0x2>;
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
|
||||
@@ -863,7 +863,7 @@
|
||||
};
|
||||
|
||||
aocec: aocec {
|
||||
compatible = "amlogic, aocec-tl1";
|
||||
compatible = "amlogic, aocec-tm2";
|
||||
/*device_name = "aocec";*/
|
||||
status = "okay";
|
||||
vendor_name = "Amlogic"; /* Max Chars: 8 */
|
||||
@@ -871,11 +871,13 @@
|
||||
* http://standards.ieee.org/develop/regauth/oui/oui.txt
|
||||
*/
|
||||
vendor_id = <0x000000>;
|
||||
product_desc = "TL1"; /* Max Chars: 16 */
|
||||
product_desc = "TM2"; /* Max Chars: 16 */
|
||||
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
|
||||
port_num = <3>;
|
||||
ee_cec;
|
||||
/*cec_sel = <2>;*/
|
||||
arc_port_mask = <0x2>;
|
||||
output = <1>; /*output port number*/
|
||||
interrupts = <0 205 1
|
||||
0 199 1>;
|
||||
interrupt-names = "hdmi_aocecb","hdmi_aocec";
|
||||
|
||||
@@ -82,6 +82,7 @@ struct cec_platform_data_s {
|
||||
bool ee_to_ao;/*ee cec hw module mv to ao;ao cec delete*/
|
||||
bool ceca_sts_reg;/*add new internal status register*/
|
||||
enum cecbver cecb_ver;/* detail discription ref enum cecbver */
|
||||
enum cecaver ceca_ver;
|
||||
};
|
||||
|
||||
|
||||
@@ -1179,6 +1180,13 @@ void cec_enable_arc_pin(bool enable)
|
||||
{
|
||||
unsigned int data;
|
||||
|
||||
if (is_meson_sm1_cpu() ||
|
||||
cpu_after_eq(MESON_CPU_MAJOR_ID_TM2)) {
|
||||
/*sm1 and tm2 later, audio module handle this*/
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
if (cec_dev->plat_data->cecb_ver >= CECB_VER_2) {
|
||||
data = rd_reg_hhi(HHI_HDMIRX_ARC_CNTL);
|
||||
/* enable bit 1:1 bit 0: 0*/
|
||||
@@ -3108,6 +3116,7 @@ static const struct cec_platform_data_s cec_g12a_data = {
|
||||
.line_bit = 3,
|
||||
.ee_to_ao = 1,
|
||||
.ceca_sts_reg = 0,
|
||||
.ceca_ver = CECA_VER_0,
|
||||
.cecb_ver = CECB_VER_1,
|
||||
};
|
||||
|
||||
@@ -3116,6 +3125,7 @@ static const struct cec_platform_data_s cec_txl_data = {
|
||||
.line_bit = 7,
|
||||
.ee_to_ao = 0,
|
||||
.ceca_sts_reg = 0,
|
||||
.ceca_ver = CECA_VER_0,
|
||||
.cecb_ver = CECB_VER_0,
|
||||
};
|
||||
|
||||
@@ -3124,6 +3134,7 @@ static const struct cec_platform_data_s cec_tl1_data = {
|
||||
.line_bit = 10,
|
||||
.ee_to_ao = 1,
|
||||
.ceca_sts_reg = 1,
|
||||
.ceca_ver = CECA_VER_0,
|
||||
.cecb_ver = CECB_VER_2,
|
||||
};
|
||||
|
||||
@@ -3132,6 +3143,16 @@ static const struct cec_platform_data_s cec_sm1_data = {
|
||||
.line_bit = 3,
|
||||
.ee_to_ao = 1,
|
||||
.ceca_sts_reg = 1,
|
||||
.ceca_ver = CECA_VER_1,
|
||||
.cecb_ver = CECB_VER_2,
|
||||
};
|
||||
|
||||
static const struct cec_platform_data_s cec_tm2_data = {
|
||||
.line_reg = 0,
|
||||
.line_bit = 3,
|
||||
.ee_to_ao = 1,
|
||||
.ceca_sts_reg = 1,
|
||||
.ceca_ver = CECA_VER_1,
|
||||
.cecb_ver = CECB_VER_2,
|
||||
};
|
||||
|
||||
@@ -3160,6 +3181,10 @@ static const struct of_device_id aml_cec_dt_match[] = {
|
||||
.compatible = "amlogic, aocec-sm1",
|
||||
.data = &cec_sm1_data,
|
||||
},
|
||||
{
|
||||
.compatible = "amlogic, aocec-tm2",
|
||||
.data = &cec_tm2_data,
|
||||
},
|
||||
{}
|
||||
};
|
||||
#endif
|
||||
|
||||
@@ -30,6 +30,14 @@
|
||||
#define CEC_PHY_PORT_NUM 4
|
||||
#define HR_DELAY(n) (ktime_set(0, n * 1000 * 1000))
|
||||
|
||||
enum cecaver {
|
||||
/*first version*/
|
||||
CECA_VER_0 = 0,
|
||||
|
||||
/*support multi logical address*/
|
||||
CECA_VER_1 = 1,
|
||||
};
|
||||
|
||||
enum cecbver {
|
||||
/*first version*/
|
||||
CECB_VER_0 = 0,
|
||||
|
||||
Reference in New Issue
Block a user