.. | .. |
---|
56 | 56 | #define SIP_HDCP_CONFIG 0x82000025 |
---|
57 | 57 | #define SIP_WDT_CFG 0x82000026 |
---|
58 | 58 | #define SIP_HDMIRX_CFG 0x82000027 |
---|
| 59 | +#define SIP_MCU_CFG 0x82000028 |
---|
| 60 | +#define SIP_PVTPLL_CFG 0x82000029 |
---|
59 | 61 | |
---|
60 | 62 | #define TRUSTED_OS_HDCPKEY_INIT 0xB7000003 |
---|
61 | 63 | |
---|
.. | .. |
---|
118 | 120 | /* wakeup state */ |
---|
119 | 121 | #define REMOTECTL_PWRKEY_WAKEUP 0xdeadbeaf |
---|
120 | 122 | |
---|
| 123 | +/* SIP_MCU_CFG child configs, MCU ID */ |
---|
| 124 | +enum { |
---|
| 125 | + RK_BUS_MCU, |
---|
| 126 | + RK_PMU_MCU, |
---|
| 127 | + RK_DDR_MCU, |
---|
| 128 | + RK_NPU_MCU, |
---|
| 129 | +}; |
---|
| 130 | + |
---|
| 131 | +#define RK_SIP_MCU_ID(type, id) ((type) << 8 | id) |
---|
| 132 | + |
---|
| 133 | +#define RK_SIP_CFG_BUSMCU_0_ID RK_SIP_MCU_ID(RK_BUS_MCU, 0) |
---|
| 134 | +#define RK_SIP_CFG_BUSMCU_1_ID RK_SIP_MCU_ID(RK_BUS_MCU, 1) |
---|
| 135 | +#define RK_SIP_CFG_PMUMCU_0_ID RK_SIP_MCU_ID(RK_PMU_MCU, 0) |
---|
| 136 | +#define RK_SIP_CFG_DDRMCU_0_ID RK_SIP_MCU_ID(RK_DDR_MCU, 0) |
---|
| 137 | +#define RK_SIP_CFG_NPUMCU_0_ID RK_SIP_MCU_ID(RK_NPU_MCU, 0) |
---|
| 138 | + |
---|
| 139 | +/* SIP_MCU_CFG child configs */ |
---|
| 140 | +#define CONFIG_MCU_CODE_START_ADDR 0x01 |
---|
| 141 | +#define CONFIG_MCU_EXPERI_START_ADDR 0x02 |
---|
| 142 | +#define CONFIG_MCU_SRAM_START_ADDR 0x03 |
---|
| 143 | +#define CONFIG_MCU_EXSRAM_START_ADDR 0x04 |
---|
| 144 | + |
---|
121 | 145 | struct dram_addrmap_info { |
---|
122 | 146 | u64 ch_mask[2]; |
---|
123 | 147 | u64 bk_mask[4]; |
---|
.. | .. |
---|
159 | 183 | SHARE_PAGE_TYPE_DDR_ADDRMAP, |
---|
160 | 184 | SHARE_PAGE_TYPE_LAST_LOG, |
---|
161 | 185 | SHARE_PAGE_TYPE_HDCP, |
---|
| 186 | + SHARE_PAGE_TYPE_SLEEP, |
---|
162 | 187 | SHARE_PAGE_TYPE_MAX, |
---|
163 | 188 | } share_page_type_t; |
---|
164 | 189 | |
---|
.. | .. |
---|
202 | 227 | HDMIRX_INFO_NOTIFY = 2, |
---|
203 | 228 | }; |
---|
204 | 229 | |
---|
| 230 | +/* SIP_PVTPLL_CFG child configs */ |
---|
| 231 | +enum { |
---|
| 232 | + PVTPLL_GET_INFO = 0, |
---|
| 233 | + PVTPLL_ADJUST_TABLE = 1, |
---|
| 234 | + PVTPLL_LOW_TEMP = 2, |
---|
| 235 | +}; |
---|
| 236 | + |
---|
205 | 237 | struct pt_regs; |
---|
206 | 238 | typedef void (*sip_fiq_debugger_uart_irq_tf_cb_t)(struct pt_regs *_pt_regs, unsigned long cpu); |
---|
207 | 239 | |
---|
.. | .. |
---|
232 | 264 | struct dram_addrmap_info *sip_smc_get_dram_map(void); |
---|
233 | 265 | int sip_smc_amp_config(u32 sub_func_id, u32 arg1, u32 arg2, u32 arg3); |
---|
234 | 266 | struct arm_smccc_res sip_smc_get_amp_info(u32 sub_func_id, u32 arg1); |
---|
| 267 | +struct arm_smccc_res sip_smc_get_pvtpll_info(u32 sub_func_id, u32 arg1); |
---|
| 268 | +struct arm_smccc_res sip_smc_pvtpll_config(u32 sub_func_id, u32 arg1, u32 arg2, |
---|
| 269 | + u32 arg3, u32 arg4, u32 arg5, u32 arg6); |
---|
235 | 270 | |
---|
236 | 271 | void __iomem *sip_hdcp_request_share_memory(int id); |
---|
237 | 272 | struct arm_smccc_res sip_hdcp_config(u32 arg0, u32 arg1, u32 arg2); |
---|
.. | .. |
---|
251 | 286 | int sip_wdt_config(u32 sub_func, u32 arg1, u32 arg2, u32 arg3); |
---|
252 | 287 | int sip_hdmirx_config(u32 sub_func, u32 arg1, u32 arg2, u32 arg3); |
---|
253 | 288 | int sip_hdcpkey_init(u32 hdcp_id); |
---|
| 289 | +int sip_smc_mcu_config(unsigned long mcu_id, unsigned long func, unsigned long arg2); |
---|
254 | 290 | #else |
---|
255 | 291 | static inline struct arm_smccc_res sip_smc_get_atf_version(void) |
---|
256 | 292 | { |
---|
.. | .. |
---|
340 | 376 | return tmp; |
---|
341 | 377 | } |
---|
342 | 378 | |
---|
| 379 | +static inline struct arm_smccc_res sip_smc_get_pvtpll_info(u32 sub_func_id, |
---|
| 380 | + u32 arg1) |
---|
| 381 | +{ |
---|
| 382 | + struct arm_smccc_res tmp = { .a0 = SIP_RET_NOT_SUPPORTED, }; |
---|
| 383 | + |
---|
| 384 | + return tmp; |
---|
| 385 | +} |
---|
| 386 | + |
---|
| 387 | +static inline struct arm_smccc_res sip_smc_pvtpll_config(u32 sub_func_id, |
---|
| 388 | + u32 arg1, u32 arg2, |
---|
| 389 | + u32 arg3, u32 arg4, |
---|
| 390 | + u32 arg5, u32 arg6) |
---|
| 391 | +{ |
---|
| 392 | + struct arm_smccc_res tmp = { .a0 = SIP_RET_NOT_SUPPORTED, }; |
---|
| 393 | + |
---|
| 394 | + return tmp; |
---|
| 395 | +} |
---|
| 396 | + |
---|
343 | 397 | static inline void __iomem *sip_hdcp_request_share_memory(int id) |
---|
344 | 398 | { |
---|
345 | 399 | return NULL; |
---|
.. | .. |
---|
407 | 461 | { |
---|
408 | 462 | return 0; |
---|
409 | 463 | } |
---|
| 464 | + |
---|
| 465 | +static inline int sip_smc_mcu_config(unsigned long mcu_id, |
---|
| 466 | + unsigned long func, |
---|
| 467 | + unsigned long arg2) |
---|
| 468 | +{ |
---|
| 469 | + return SIP_RET_NOT_SUPPORTED; |
---|
| 470 | +} |
---|
410 | 471 | #endif |
---|
411 | 472 | |
---|
412 | 473 | /* 32-bit OP-TEE context, never change order of members! */ |
---|