/* SPDX-License-Identifier: GPL-2.0-only */
/*
 * Copyright (c) 2020 MediaTek Inc.
 *
 */


#ifndef _HDMI_CA_H_
#define _HDMI_CA_H_
#if (defined(CONFIG_MTK_IN_HOUSE_TEE_SUPPORT) || defined(CONFIG_OPTEE))

bool fgCaHDMICreate(void);
bool fgCaHDMIClose(void);
void vCaHDMIWriteReg(unsigned int u4addr, unsigned int u4data);
bool fgCaHDMIInstallHdcpKey(unsigned char *pdata, unsigned int u4Len);
bool fgCaHDMIGetAKsv(unsigned char *pdata);
bool fgCaHDMILoadHDCPKey(void);
bool fgCaHDMILoadROM(void);
void vCaHDMIWriteHdcpCtrl(unsigned int u4addr, unsigned int u4data);

bool fgCaHDMITestHDCPVersion(void);
extern int hdmi_audio_signal_state(unsigned int state);
extern unsigned int _Cmd_GCPU_KP_Set(unsigned int bIndex);
extern void vCaHDMIWriteHDCPRST(unsigned int u4addr, unsigned int u4data);
void fgCaHDMISetTzLogLevel(unsigned int loglevel);
extern bool fgCaHDMIGetTAStatus(unsigned char *pdata);
void fgCaHDMISetSecureRegEntry(unsigned int Tx_entry,
	unsigned int Rx_entry);
extern int hdmi_audio_signal_state(unsigned int state);
void vCaHDMISendGEN(enum HDMI_GEN_PACKET_HW_ENUM type,
	bool en, u8 *pkt);
#endif
#endif
