cec: for support multi-logical address [1/1]

PD#SWPL-418

Problem:
cec: support multi-logical address

Solution:
if working on multi-logical address, enable two ip
1.enable cec_a, cec_b
2.enable two interrupt
3.enable two pinmux oa_7, ao_8
4.cec_a only send all msg
5.cec_b only receive all msg
6.discard ceca broadcast msg

Verify:
r311
r321
p321

Change-Id: I1dc93429876ede951657102bcd7d41a500946719
Signed-off-by: Yong Qin <yong.qin@amlogic.com>

Conflicts:
	drivers/amlogic/cec/hdmi_ao_cec.c
	drivers/amlogic/media/vin/tvin/hdmirx/hdmi_rx_drv.h
This commit is contained in:
Yong Qin
2018-11-06 09:31:51 +08:00
committed by Dongjin Kim
parent 472272230e
commit c0102386e4
8 changed files with 551 additions and 231 deletions

View File

@@ -994,6 +994,7 @@
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
port_num = <4>; /*all port number*/
/*ee_cec;*/
cec_sel = <2>;
output = <1>; /*output port number*/
/*arc support port:bit 0-3, according to portmap*/
arc_port_mask = <0x8>;
@@ -1001,9 +1002,9 @@
0 199 1>;
interrupt-names = "hdmi_aocecb","hdmi_aocec";
pinctrl-names = "default","hdmitx_aocecb","cec_pin_sleep";
pinctrl-0=<&hdmitx_aocec>;
pinctrl-1=<&hdmitx_aocecb>;
pinctrl-2=<&hdmitx_aocecb>;
pinctrl-0=<&hdmitx_aocec &hdmitx_aocecb1>;
pinctrl-1=<&hdmitx_aocec &hdmitx_aocecb1>;
pinctrl-2=<&hdmitx_aocec &hdmitx_aocecb1>;
reg = <0xFF80023c 0x4
0xFF800000 0x400>;
reg-names = "ao_exit","ao";

View File

@@ -992,15 +992,16 @@
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
port_num = <4>; /*all port number*/
/*ee_cec;*/
cec_sel = <2>;
output = <1>;
arc_port_mask = <0x8>;
interrupts = <0 205 1
0 199 1>;
interrupt-names = "hdmi_aocecb","hdmi_aocec";
pinctrl-names = "default","hdmitx_aocecb","cec_pin_sleep";
pinctrl-0=<&hdmitx_aocec>;
pinctrl-1=<&hdmitx_aocecb>;
pinctrl-2=<&hdmitx_aocecb>;
pinctrl-0=<&hdmitx_aocec &hdmitx_aocecb1>;
pinctrl-1=<&hdmitx_aocec &hdmitx_aocecb1>;
pinctrl-2=<&hdmitx_aocec &hdmitx_aocecb1>;
reg = <0x0 0xFF80023c 0x0 0x4
0x0 0xFF800000 0x0 0x400>;
reg-names = "ao_exit","ao";

View File

@@ -993,6 +993,7 @@
cec_osd_string = "AML_TV"; /* Max Chars: 14 */
port_num = <4>; /*all port number*/
/*ee_cec;*/
cec_sel = <2>;
output = <1>; /*output port number*/
/*arc support port:bit 0-3, according to portmap*/
arc_port_mask = <0x8>;
@@ -1000,9 +1001,9 @@
0 199 1>;
interrupt-names = "hdmi_aocecb","hdmi_aocec";
pinctrl-names = "default","hdmitx_aocecb","cec_pin_sleep";
pinctrl-0=<&hdmitx_aocec>;
pinctrl-1=<&hdmitx_aocecb>;
pinctrl-2=<&hdmitx_aocecb>;
pinctrl-0=<&hdmitx_aocec &hdmitx_aocecb1>;
pinctrl-1=<&hdmitx_aocec &hdmitx_aocecb1>;
pinctrl-2=<&hdmitx_aocec &hdmitx_aocecb1>;
reg = <0x0 0xFF80023c 0x0 0x4
0x0 0xFF800000 0x0 0x400>;
reg-names = "ao_exit","ao";

File diff suppressed because it is too large Load Diff

View File

@@ -56,6 +56,10 @@ enum cecbver {
#define L_1 1
#define L_2 2
#define L_3 3
#define CEC_A 0
#define CEC_B 1
/*
#define CEC_FUNC_MASK 0
#define ONE_TOUCH_PLAY_MASK 1
@@ -528,7 +532,7 @@ int __attribute__((weak))hdmirx_get_connect_info(void)
#ifdef CONFIG_AMLOGIC_AO_CEC
unsigned int aocec_rd_reg(unsigned long addr);
void aocec_wr_reg(unsigned long addr, unsigned long data);
void cecrx_irq_handle(void);
void cecb_irq_handle(void);
void cec_logicaddr_set(int l_add);
void cec_arbit_bit_time_set(unsigned int bit_set,
unsigned int time_set, unsigned int flag);
@@ -537,6 +541,9 @@ void aocec_irq_enable(bool enable);
extern void dump_reg(void);
#endif
extern void cec_dump_info(void);
extern void cec_hw_reset(void);
extern void cec_hw_reset(unsigned int cec_sel);
extern void cec_restore_logical_addr(unsigned int cec_sel,
unsigned int addr_en);
extern void cec_logicaddr_add(unsigned int cec_sel, unsigned int l_add);
extern void cec_clear_all_logical_addr(unsigned int cec_sel);
#endif /* __AO_CEC_H__ */

View File

@@ -34,7 +34,7 @@
#include "hdmi_rx_edid.h"
#define RX_VER0 "ver.2019-01-22"
#define RX_VER0 "ver.2018-11-8"
/*
*
*
@@ -472,7 +472,7 @@ extern void rx_send_hpd_pulse(void);
/* irq */
extern void rx_irq_en(bool enable);
extern irqreturn_t irq_handler(int irq, void *params);
extern void cecrx_irq_handle(void);
extern void cecb_irq_handle(void);
/* user interface */
extern int pc_mode_en;

View File

@@ -311,7 +311,7 @@ static int hdmi_rx_ctrl_irq_handler(void)
hdmirx_rd_dwc(DWC_AUD_CEC_ISTS) &
hdmirx_rd_dwc(DWC_AUD_CEC_IEN);
if (intr_aud_cec != 0) {
cecrx_irq_handle();
cecb_irq_handle();
hdmirx_wr_dwc(DWC_AUD_CEC_ICLR, intr_aud_cec);
}
}

View File

@@ -314,6 +314,7 @@ struct cec_global_info_t {
unsigned int cec_version;
unsigned char power_status;
unsigned char log_addr;
unsigned int addr_enable;
unsigned char menu_status;
unsigned char osd_name[16];
struct input_dev *remote_cec_dev; /* cec input device */