firmware: rockchip_sip: support gpio_config

Signed-off-by: XiaoDong Huang <derrick.huang@rock-chips.com>
Change-Id: Icebff7235e875c8b8f3dcde22af5be2b04cff274
This commit is contained in:
XiaoDong Huang
2025-02-14 17:03:14 +08:00
committed by Tao Huang
parent 8668d80571
commit 12dd7eabc2
2 changed files with 31 additions and 0 deletions

View File

@@ -358,6 +358,19 @@ struct arm_smccc_res sip_hdcp_config(u32 arg0, u32 arg1, u32 arg2)
}
EXPORT_SYMBOL_GPL(sip_hdcp_config);
struct arm_smccc_res sip_smc_gpio_config(u32 sub_func_id, u32 arg1, u32 arg2,
u32 arg3)
{
struct arm_smccc_res res;
/*
* res.a0: error code(0: success, !0: error).
*/
arm_smccc_smc(SIP_GPIO_CFG, sub_func_id, arg1, arg2, arg3, 0, 0, 0, &res);
return res;
}
EXPORT_SYMBOL_GPL(sip_smc_gpio_config);
/************************** fiq debugger **************************************/
/*
* AArch32 is not allowed to call SMC64(ATF framework does not support), so we

View File

@@ -59,6 +59,7 @@
#define SIP_HDMIRX_CFG 0x82000027
#define SIP_MCU_CFG 0x82000028
#define SIP_PVTPLL_CFG 0x82000029
#define SIP_GPIO_CFG 0x8200002c
#define TRUSTED_OS_HDCPKEY_INIT 0xB7000003
@@ -249,6 +250,13 @@ enum {
PVTPLL_VOLT_SEL = 3,
};
/* SIP_GPIO_CFG child configs */
enum {
GPIO_GET_GROUP_INFO = 0,
GPIO_SET_GROUP_INFO = 1,
GPIO_GET_VIRT_EN = 2,
};
struct pt_regs;
typedef void (*sip_fiq_debugger_uart_irq_tf_cb_t)(struct pt_regs *_pt_regs, unsigned long cpu);
@@ -286,6 +294,8 @@ struct arm_smccc_res sip_smc_pvtpll_config(u32 sub_func_id, u32 arg1, u32 arg2,
void __iomem *sip_hdcp_request_share_memory(int id);
struct arm_smccc_res sip_hdcp_config(u32 arg0, u32 arg1, u32 arg2);
struct arm_smccc_res sip_smc_gpio_config(u32 sub_func_id, u32 arg1, u32 arg2,
u32 arg3);
ulong sip_cpu_logical_map_mpidr(u32 cpu);
/***************************fiq debugger **************************************/
void sip_fiq_debugger_enable_fiq(bool enable, uint32_t tgt_cpu);
@@ -429,6 +439,14 @@ static inline struct arm_smccc_res sip_hdcp_config(u32 arg0, u32 arg1, u32 arg2)
return tmp;
}
static inline struct arm_smccc_res sip_smc_gpio_config(u32 sub_func_id, u32 arg1,
u32 arg2, u32 arg3)
{
struct arm_smccc_res tmp = { .a0 = SIP_RET_NOT_SUPPORTED, };
return tmp;
}
static inline ulong sip_cpu_logical_map_mpidr(u32 cpu) { return 0; }
/***************************fiq debugger **************************************/