hc
2023-11-06 9df731a176aab8e03b984b681b1bea01ccff6644
u-boot/arch/arm/include/asm/arch-rockchip/rockchip_smccc.h
....@@ -29,6 +29,7 @@
2929 #define SIP_LAST_LOG 0x8200000e
3030 #define SIP_AMP_CFG 0x82000022
3131 #define SIP_HDCP_CONFIG 0x82000025
32
+#define SIP_MCU_CFG 0x82000028
3233
3334 #define ROCKCHIP_SIP_CONFIG_DRAM_INIT 0x00
3435 #define ROCKCHIP_SIP_CONFIG_DRAM_SET_RATE 0x01
....@@ -46,6 +47,19 @@
4647 #define ROCKCHIP_SIP_CONFIG_DRAM_ECC 0x0d
4748 #define ROCKCHIP_SIP_CONFIG_DRAM_GET_FREQ_INFO 0x0e
4849 #define ROCKCHIP_SIP_CONFIG_DRAM_FSP_INIT 0x0f
50
+
51
+/* RK_SIP_MCU_CFG child configs, MCU ID */
52
+#define ROCKCHIP_SIP_CONFIG_BUSMCU_0_ID 0x00
53
+#define ROCKCHIP_SIP_CONFIG_BUSMCU_1_ID 0x01
54
+#define ROCKCHIP_SIP_CONFIG_PMUMCU_0_ID 0x10
55
+#define ROCKCHIP_SIP_CONFIG_DDRMCU_0_ID 0x20
56
+#define ROCKCHIP_SIP_CONFIG_NPUMCU_0_ID 0x30
57
+
58
+/* RK_SIP_MCU_CFG child configs */
59
+#define ROCKCHIP_SIP_CONFIG_MCU_CODE_START_ADDR 0x01
60
+#define ROCKCHIP_SIP_CONFIG_MCU_EXPERI_START_ADDR 0x02
61
+#define ROCKCHIP_SIP_CONFIG_MCU_SRAM_START_ADDR 0x03
62
+#define ROCKCHIP_SIP_CONFIG_MCU_EXSRAM_START_ADDR 0x04
4963
5064 /* Rockchip Sip version */
5165 #define SIP_IMPLEMENT_V1 (1)
....@@ -100,6 +114,8 @@
100114 int sip_smc_set_suspend_mode(unsigned long ctrl,
101115 unsigned long config1,
102116 unsigned long config2);
117
+
118
+int sip_smc_remotectl_config(unsigned long func, unsigned long data);
103119
104120 /*
105121 * sip_smc_amp_cfg() - config AMP
....@@ -172,6 +188,13 @@
172188 unsigned long arg1, unsigned long arg2);
173189
174190 /*
191
+ * sip_smc_mcu_config() - handle mcu.
192
+ *
193
+ * @return 0 on success, otherwise failed.
194
+ */
195
+int sip_smc_mcu_config(unsigned long mcu_id, unsigned long func, unsigned long arg2);
196
+
197
+/*
175198 * psci_cpu_on() - Standard ARM PSCI cpu on call.
176199 *
177200 * @cpuid: cpu id