From 7f23f8d01ca2cc3ec240df87d393e7609a712e77 Mon Sep 17 00:00:00 2001 From: Hang Cheng Date: Fri, 22 Mar 2019 15:58:50 +0800 Subject: [PATCH] cec: add change for sm1 [1/1] PD#SWPL-5419 Problem: cec change for sm1 Solution: add cec change for sm1 Verify: ac200 Change-Id: Ic808e4bd128358b7f10c7f0b21a629d72f1c71cc Signed-off-by: Hang Cheng Signed-off-by: Luan Yuan --- arch/arm/boot/dts/amlogic/mesonsm1.dtsi | 6 +++--- arch/arm64/boot/dts/amlogic/mesonsm1.dtsi | 6 +++--- drivers/amlogic/cec/hdmi_ao_cec.c | 11 +++++++++++ drivers/amlogic/cec/hdmi_ao_cec.h | 3 +-- 4 files changed, 18 insertions(+), 8 deletions(-) diff --git a/arch/arm/boot/dts/amlogic/mesonsm1.dtsi b/arch/arm/boot/dts/amlogic/mesonsm1.dtsi index 2d2be49d07cc..93f76586ee3a 100644 --- a/arch/arm/boot/dts/amlogic/mesonsm1.dtsi +++ b/arch/arm/boot/dts/amlogic/mesonsm1.dtsi @@ -1131,7 +1131,7 @@ >; }; aocec: aocec { - compatible = "amlogic, aocec-g12a"; + compatible = "amlogic, aocec-sm1"; device_name = "aocec"; status = "okay"; vendor_name = "Amlogic"; /* Max Chars: 8 */ @@ -1139,7 +1139,7 @@ * http://standards.ieee.org/develop/regauth/oui/oui.txt */ vendor_id = <0x000000>; - product_desc = "G12A"; /* Max Chars: 16 */ + product_desc = "SM1"; /* Max Chars: 16 */ cec_osd_string = "AML_MBOX"; /* Max Chars: 14 */ cec_version = <5>;/*5:1.4;6:2.0*/ port_num = <1>; @@ -1154,7 +1154,7 @@ pinctrl-2=<&eecec_b>; reg = <0xFF80023c 0x4 0xFF800000 0x400 - 0xFF634400 0x26>; + 0xFF634400 0x70>; reg-names = "ao_exit","ao","periphs"; }; diff --git a/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi b/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi index 6a16ae6d727c..3f3df5ce69a2 100644 --- a/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi +++ b/arch/arm64/boot/dts/amlogic/mesonsm1.dtsi @@ -1130,7 +1130,7 @@ >; }; aocec: aocec { - compatible = "amlogic, aocec-g12a"; + compatible = "amlogic, aocec-sm1"; device_name = "aocec"; status = "okay"; vendor_name = "Amlogic"; /* Max Chars: 8 */ @@ -1138,7 +1138,7 @@ * http://standards.ieee.org/develop/regauth/oui/oui.txt */ vendor_id = <0x000000>; - product_desc = "G12A"; /* Max Chars: 16 */ + product_desc = "SM1"; /* Max Chars: 16 */ cec_osd_string = "AML_MBOX"; /* Max Chars: 14 */ cec_version = <5>;/*5:1.4;6:2.0*/ port_num = <1>; @@ -1153,7 +1153,7 @@ pinctrl-2=<&eecec_b>; reg = <0x0 0xFF80023c 0x0 0x4 0x0 0xFF800000 0x0 0x400 - 0x0 0xFF634400 0x0 0x26>; + 0x0 0xFF634400 0x0 0x70>; reg-names = "ao_exit","ao","periphs"; }; diff --git a/drivers/amlogic/cec/hdmi_ao_cec.c b/drivers/amlogic/cec/hdmi_ao_cec.c index 132fec73c798..24d6fd2dc3ac 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.c +++ b/drivers/amlogic/cec/hdmi_ao_cec.c @@ -3085,6 +3085,13 @@ static const struct cec_platform_data_s cec_tl1_data = { .cecb_ver = CECB_VER_2, }; +static const struct cec_platform_data_s cec_sm1_data = { + .line_reg = 1, + .line_bit = 3, + .ee_to_ao = 1, + .ceca_sts_reg = 1, + .cecb_ver = CECB_VER_2, +}; static const struct of_device_id aml_cec_dt_match[] = { { @@ -3107,6 +3114,10 @@ static const struct of_device_id aml_cec_dt_match[] = { .compatible = "amlogic, aocec-tl1", .data = &cec_tl1_data, }, + { + .compatible = "amlogic, aocec-sm1", + .data = &cec_sm1_data, + }, {} }; #endif diff --git a/drivers/amlogic/cec/hdmi_ao_cec.h b/drivers/amlogic/cec/hdmi_ao_cec.h index 53c5407bebf1..a7357421e06a 100644 --- a/drivers/amlogic/cec/hdmi_ao_cec.h +++ b/drivers/amlogic/cec/hdmi_ao_cec.h @@ -19,8 +19,7 @@ #define __AO_CEC_H__ - -#define CEC_DRIVER_VERSION "Ver 2019/1/14\n" +#define CEC_DRIVER_VERSION "Ver 2019/3/23\n" #define CEC_FRAME_DELAY msecs_to_jiffies(400) #define CEC_DEV_NAME "cec"