summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDongjin Kim <tobetter@gmail.com>2020-05-08 20:33:00 +0300
committerGerrit Code Review <gerrit@almond.hardkernel.com>2020-05-08 20:33:00 +0300
commit6a7ea605aa26936327a9f77dc3f4be71bc71035b (patch)
treeadc91d2bc63949008d1587958e165e1e32dba4da
parentf6f0b0f60d806cc8b6066d2c3ba9ca2433697290 (diff)
parent37f52506c6c104ac560ebcf37164e8d0c8abcd2b (diff)
downloadu-boot-6a7ea605aa26936327a9f77dc3f4be71bc71035b.tar.xz
Merge changes Ia89bfb29,Ia00c6fd0,Ib4937aa2 into odroidg12-v2015.01g12_9.0.0_64_20200520
* changes: BACKPORT: Change cec flag for active source change BACKPORT: cec: wake up on CEC_OC_ROUTING_INFORMATION BACKPORT: g12a/b: CEC_OC_ACTIVE_SOURCE: ignore phy address if broadcast
-rw-r--r--arch/arm/cpu/armv8/g12a/firmware/scp_task/hdmi_cec_arc.c4
-rw-r--r--arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c31
2 files changed, 29 insertions, 6 deletions
diff --git a/arch/arm/cpu/armv8/g12a/firmware/scp_task/hdmi_cec_arc.c b/arch/arm/cpu/armv8/g12a/firmware/scp_task/hdmi_cec_arc.c
index 498436a717..d3c7ba52aa 100644
--- a/arch/arm/cpu/armv8/g12a/firmware/scp_task/hdmi_cec_arc.c
+++ b/arch/arm/cpu/armv8/g12a/firmware/scp_task/hdmi_cec_arc.c
@@ -614,7 +614,7 @@ static unsigned int cec_handle_message(void)
dest = cec_msg.buf[cec_msg.rx_read_pos].msg[0] & 0xf;
if (((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) &&
((hdmi_cec_func_config >> AUTO_POWER_ON_MASK) & 0x1) &&
- (dest == CEC_TV_ADDR)) {
+ (source == CEC_TV_ADDR)) {
/* request active source needed */
phy_addr = 0xffff;
cec_msg.cec_power = 0x1;
@@ -630,7 +630,7 @@ static unsigned int cec_handle_message(void)
(cec_msg.buf[cec_msg.rx_read_pos].msg[3] << 0);
if (((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) &&
((hdmi_cec_func_config >> AUTO_POWER_ON_MASK) & 0x1) &&
- (dest == CEC_TV_ADDR && check_addr(phy_addr))) {
+ (source == CEC_TV_ADDR && (dest == CEC_BROADCAST_ADDR || check_addr(phy_addr)))) {
cec_msg.cec_power = 0x1;
wake = (phy_addr << 0) |
(source << 16);
diff --git a/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c b/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
index 498436a717..ba79656dc6 100644
--- a/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
+++ b/arch/arm/cpu/armv8/g12b/firmware/scp_task/hdmi_cec_arc.c
@@ -451,7 +451,7 @@ void cec_routing_change(void)
{
unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff;
unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff;
- cec_dbg_print(", phy_addr_ab:0x", phy_addr_ab);
+ cec_dbg_print("0x80, phy_addr_ab:0x", phy_addr_ab);
cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd);
cec_dbg_print(", msg[4]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[4]);
cec_dbg_print(", msg[5]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[5]);
@@ -467,6 +467,26 @@ void cec_routing_change(void)
}
}
+static void cec_routing_information(void)
+{
+ unsigned char phy_addr_ab = (readl(P_AO_DEBUG_REG1) >> 8) & 0xff;
+ unsigned char phy_addr_cd = readl(P_AO_DEBUG_REG1) & 0xff;
+ cec_dbg_print("0x81, phy_addr_ab:0x", phy_addr_ab);
+ cec_dbg_print(", phy_addr_cd:0x", phy_addr_cd);
+ cec_dbg_print(", msg[2]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[2]);
+ cec_dbg_print(", msg[3]:0x", cec_msg.buf[cec_msg.rx_read_pos].msg[3]);
+ cec_dbg_prints("\n");
+
+ if ((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) {
+ if ((hdmi_cec_func_config >> STREAMPATH_POWER_ON_MASK) & 0x1) {
+ /* wake up if routing destination is self */
+ if ((phy_addr_ab == cec_msg.buf[cec_msg.rx_read_pos].msg[2]) &&
+ (phy_addr_cd == cec_msg.buf[cec_msg.rx_read_pos].msg[3]))
+ cec_msg.cec_power = 0x1;
+ }
+ }
+}
+
static void cec_device_vendor_id(void)
{
unsigned char msg[5];
@@ -591,6 +611,9 @@ static unsigned int cec_handle_message(void)
case CEC_OC_ROUTING_CHANGE:
cec_routing_change();
break;
+ case CEC_OC_ROUTING_INFORMATION:
+ cec_routing_information();
+ break;
case CEC_OC_GIVE_DEVICE_POWER_STATUS:
cec_report_device_power_status(source);
break;
@@ -614,7 +637,7 @@ static unsigned int cec_handle_message(void)
dest = cec_msg.buf[cec_msg.rx_read_pos].msg[0] & 0xf;
if (((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) &&
((hdmi_cec_func_config >> AUTO_POWER_ON_MASK) & 0x1) &&
- (dest == CEC_TV_ADDR)) {
+ (source == CEC_TV_ADDR)) {
/* request active source needed */
phy_addr = 0xffff;
cec_msg.cec_power = 0x1;
@@ -629,8 +652,8 @@ static unsigned int cec_handle_message(void)
phy_addr = (cec_msg.buf[cec_msg.rx_read_pos].msg[2] << 8) |
(cec_msg.buf[cec_msg.rx_read_pos].msg[3] << 0);
if (((hdmi_cec_func_config >> CEC_FUNC_MASK) & 0x1) &&
- ((hdmi_cec_func_config >> AUTO_POWER_ON_MASK) & 0x1) &&
- (dest == CEC_TV_ADDR && check_addr(phy_addr))) {
+ ((hdmi_cec_func_config >> ACTIVE_SOURCE_MASK) & 0x1) &&
+ (source == CEC_TV_ADDR && (dest == CEC_BROADCAST_ADDR || check_addr(phy_addr)))) {
cec_msg.cec_power = 0x1;
wake = (phy_addr << 0) |
(source << 16);