summaryrefslogtreecommitdiff
path: root/drivers/misc/imx8/scu_api.c
diff options
context:
space:
mode:
authorTom Rini <trini@konsulko.com>2024-11-26 10:49:44 -0600
committerTom Rini <trini@konsulko.com>2024-11-26 10:49:44 -0600
commitff7bf50b30eb2749023620616d53a28c2b6246ff (patch)
tree178241108efef072c015026d56534426505baa1d /drivers/misc/imx8/scu_api.c
parent48380f9b2a12e3fc6339d6af5a154bded769d911 (diff)
parenta488d9f26e37bcb5776bc8a2dadb708f1ac9cfdc (diff)
Merge tag 'u-boot-imx-next-20241126' of https://gitlab.denx.de/u-boot/custodians/u-boot-imx into next
CI: https://source.denx.de/u-boot/custodians/u-boot-imx/-/pipelines/23563 - Make Siemens i.MX8 Capricorn board to boot U-Boot mainline again. - Add support for phycore-imx93 2GB LPDDR4X variant. - Add phycore-imx8mm EEPROM detection initialisation.
Diffstat (limited to 'drivers/misc/imx8/scu_api.c')
-rw-r--r--drivers/misc/imx8/scu_api.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/drivers/misc/imx8/scu_api.c b/drivers/misc/imx8/scu_api.c
index 591d71b096a..a40c8badf9a 100644
--- a/drivers/misc/imx8/scu_api.c
+++ b/drivers/misc/imx8/scu_api.c
@@ -951,6 +951,26 @@ int sc_timer_set_wdog_window(sc_ipc_t ipc, sc_timer_wdog_time_t window)
return ret;
}
+int sc_timer_control_siemens_pmic_wdog(sc_ipc_t ipc, u8 cmd)
+{
+ struct udevice *dev = gd->arch.scu_dev;
+ struct sc_rpc_msg_s msg;
+ int size = sizeof(struct sc_rpc_msg_s);
+ int ret;
+
+ RPC_VER(&msg) = SC_RPC_VERSION;
+ RPC_SVC(&msg) = (u8)SC_RPC_SVC_TIMER;
+ RPC_FUNC(&msg) = (u8)TIMER_FUNC_CTRL_SIEMENS_PMIC_WDOG;
+ RPC_U8(&msg, 0U) = (u8)cmd;
+ RPC_SIZE(&msg) = 2U;
+
+ ret = misc_call(dev, SC_FALSE, &msg, size, &msg, size);
+ if (ret)
+ printf("%s: res:%d\n", __func__, RPC_R8(&msg));
+
+ return ret;
+}
+
int sc_seco_authenticate(sc_ipc_t ipc, sc_seco_auth_cmd_t cmd,
sc_faddr_t addr)
{