imx: update SCFW APIs
Update SCFW APIs to SCFW commit:
004247e14afc ("SCF-341 Fix bug in setting large slice clock divider")
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
(cherry picked from commit b6c41566e85ecb964522793d4005933695e6926b)
diff --git a/plat/imx/common/include/sci/sci_rpc.h b/plat/imx/common/include/sci/sci_rpc.h
index f218def..091edd5 100644
--- a/plat/imx/common/include/sci/sci_rpc.h
+++ b/plat/imx/common/include/sci/sci_rpc.h
@@ -20,6 +20,9 @@
/* Defines */
+#define SCFW_API_VERSION_MAJOR 1U
+#define SCFW_API_VERSION_MINOR 2U
+
#define SC_RPC_VERSION 1U
#define SC_RPC_MAX_MSG 8U
diff --git a/plat/imx/common/include/sci/sci_types.h b/plat/imx/common/include/sci/sci_types.h
index 96501d9..f983b73 100644
--- a/plat/imx/common/include/sci/sci_types.h
+++ b/plat/imx/common/include/sci/sci_types.h
@@ -19,6 +19,8 @@
/* Defines */
+#define SCFW_API_VERSION 100U
+
/*!
* @name Defines for common frequencies
*/
@@ -203,15 +205,15 @@
#define SC_R_DC_0_BLIT1 20U
#define SC_R_DC_0_BLIT2 21U
#define SC_R_DC_0_BLIT_OUT 22U
-#define SC_R_DC_0_CAPTURE0 23U
-#define SC_R_DC_0_CAPTURE1 24U
+#define SC_R_PERF 23U
+#define SC_R_UNUSED5 24U
#define SC_R_DC_0_WARP 25U
-#define SC_R_DC_0_INTEGRAL0 26U
-#define SC_R_DC_0_INTEGRAL1 27U
+#define SC_R_UNUSED7 26U
+#define SC_R_UNUSED8 27U
#define SC_R_DC_0_VIDEO0 28U
#define SC_R_DC_0_VIDEO1 29U
#define SC_R_DC_0_FRAC0 30U
-#define SC_R_DC_0_FRAC1 31U
+#define SC_R_UNUSED6 31U
#define SC_R_DC_0 32U
#define SC_R_GPU_2_PID0 33U
#define SC_R_DC_0_PLL_0 34U
@@ -220,17 +222,17 @@
#define SC_R_DC_1_BLIT1 37U
#define SC_R_DC_1_BLIT2 38U
#define SC_R_DC_1_BLIT_OUT 39U
-#define SC_R_DC_1_CAPTURE0 40U
-#define SC_R_DC_1_CAPTURE1 41U
+#define SC_R_UNUSED9 40U
+#define SC_R_UNUSED10 41U
#define SC_R_DC_1_WARP 42U
-#define SC_R_DC_1_INTEGRAL0 43U
-#define SC_R_DC_1_INTEGRAL1 44U
+#define SC_R_UNUSED11 43U
+#define SC_R_UNUSED12 44U
#define SC_R_DC_1_VIDEO0 45U
#define SC_R_DC_1_VIDEO1 46U
#define SC_R_DC_1_FRAC0 47U
-#define SC_R_DC_1_FRAC1 48U
+#define SC_R_UNUSED13 48U
#define SC_R_DC_1 49U
-#define SC_R_GPU_3_PID0 50U
+#define SC_R_UNUSED14 50U
#define SC_R_DC_1_PLL_0 51U
#define SC_R_DC_1_PLL_1 52U
#define SC_R_SPI_0 53U
@@ -470,8 +472,8 @@
#define SC_R_M4_0_UART 287U
#define SC_R_M4_0_I2C 288U
#define SC_R_M4_0_INTMUX 289U
-#define SC_R_M4_0_SIM 290U
-#define SC_R_M4_0_WDOG 291U
+#define SC_R_UNUSED15 290U
+#define SC_R_UNUSED16 291U
#define SC_R_M4_0_MU_0B 292U
#define SC_R_M4_0_MU_0A0 293U
#define SC_R_M4_0_MU_0A1 294U
@@ -490,8 +492,8 @@
#define SC_R_M4_1_UART 307U
#define SC_R_M4_1_I2C 308U
#define SC_R_M4_1_INTMUX 309U
-#define SC_R_M4_1_SIM 310U
-#define SC_R_M4_1_WDOG 311U
+#define SC_R_UNUSED17 310U
+#define SC_R_UNUSED18 311U
#define SC_R_M4_1_MU_0B 312U
#define SC_R_M4_1_MU_0A0 313U
#define SC_R_M4_1_MU_0A1 314U
@@ -726,8 +728,7 @@
#define SC_R_DMA_5_CH2 543U
#define SC_R_DMA_5_CH3 544U
#define SC_R_ATTESTATION 545U
-#define SC_R_PERF 546U
-#define SC_R_LAST 547U
+#define SC_R_LAST 546U
#define SC_R_ALL ((sc_rsrc_t) UINT16_MAX) /* All resources */
/*@}*/
diff --git a/plat/imx/common/include/sci/svc/irq/sci_irq_api.h b/plat/imx/common/include/sci/svc/irq/sci_irq_api.h
index 49c75e0..e087463 100644
--- a/plat/imx/common/include/sci/svc/irq/sci_irq_api.h
+++ b/plat/imx/common/include/sci/svc/irq/sci_irq_api.h
@@ -90,6 +90,7 @@
#define SC_IRQ_PAD (1U << 1U) /* Pad wakeup */
#define SC_IRQ_USR1 (1U << 2U) /* User defined 1 */
#define SC_IRQ_USR2 (1U << 3U) /* User defined 2 */
+#define SC_IRQ_BC_PAD (1U << 4U) /* Pad wakeup (broadcast to all partitions) */
/*@}*/
/*!
diff --git a/plat/imx/common/include/sci/svc/misc/sci_misc_api.h b/plat/imx/common/include/sci/svc/misc/sci_misc_api.h
index f4f7585..4976be7 100755
--- a/plat/imx/common/include/sci/svc/misc/sci_misc_api.h
+++ b/plat/imx/common/include/sci/svc/misc/sci_misc_api.h
@@ -319,6 +319,23 @@
uint32_t *commit);
/*!
+ * This function is used to return the SCFW API versions.
+ *
+ * @param[in] ipc IPC handle
+ * @param[out] cl_maj pointer to return major part of client version
+ * @param[out] cl_min pointer to return minor part of client version
+ * @param[out] sv_maj pointer to return major part of SCFW version
+ * @param[out] sv_min pointer to return minor part of SCFW version
+ *
+ * Client verion is the version of the API ported to and used by the caller.
+ * SCFW version is the version of the SCFW binary running on the CPU.
+ *
+ * Note a major version difference indicates a break in compatibility.
+ */
+void sc_misc_api_ver(sc_ipc_t ipc, uint16_t *cl_maj,
+ uint16_t *cl_min, uint16_t *sv_maj, uint16_t *sv_min);
+
+/*!
* This function is used to return the device's unique ID.
*
* @param[in] ipc IPC handle
diff --git a/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c b/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c
index 2f22ad3..ea3f46b 100644
--- a/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c
+++ b/plat/imx/common/sci/svc/misc/misc_rpc_clnt.c
@@ -432,6 +432,31 @@
return;
}
+void sc_misc_api_ver(sc_ipc_t ipc, uint16_t *cl_maj,
+ uint16_t *cl_min, uint16_t *sv_maj, uint16_t *sv_min)
+{
+ sc_rpc_msg_t msg;
+
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = U8(SC_RPC_SVC_MISC);
+ RPC_FUNC(&msg) = U8(MISC_FUNC_API_VER);
+ RPC_SIZE(&msg) = 1U;
+
+ sc_call_rpc(ipc, &msg, SC_FALSE);
+
+ if (cl_maj != NULL)
+ *cl_maj = SCFW_API_VERSION_MAJOR;
+
+ if (cl_min != NULL)
+ *cl_min = SCFW_API_VERSION_MINOR;
+
+ if (sv_maj != NULL)
+ *sv_maj = RPC_U16(&msg, 4U);
+
+ if (sv_min != NULL)
+ *sv_min = RPC_U16(&msg, 6U);
+}
+
void sc_misc_unique_id(sc_ipc_t ipc, uint32_t *id_l,
uint32_t *id_h)
{
diff --git a/plat/imx/common/sci/svc/misc/sci_misc_rpc.h b/plat/imx/common/sci/svc/misc/sci_misc_rpc.h
index 7288435..38a9e57 100644
--- a/plat/imx/common/sci/svc/misc/sci_misc_rpc.h
+++ b/plat/imx/common/sci/svc/misc/sci_misc_rpc.h
@@ -45,6 +45,7 @@
#define MISC_FUNC_DEBUG_OUT 10U /* Index for misc_debug_out() RPC call */
#define MISC_FUNC_WAVEFORM_CAPTURE 6U /* Index for misc_waveform_capture() RPC call */
#define MISC_FUNC_BUILD_INFO 15U /* Index for misc_build_info() RPC call */
+#define MISC_FUNC_API_VER 35U /* Index for misc_api_ver() RPC call */
#define MISC_FUNC_UNIQUE_ID 19U /* Index for misc_unique_id() RPC call */
#define MISC_FUNC_SET_ARI 3U /* Index for misc_set_ari() RPC call */
#define MISC_FUNC_BOOT_STATUS 7U /* Index for misc_boot_status() RPC call */