Skip to content

Commit 10fe3d3

Browse files
yangbolu1991kartben
authored andcommitted
soc: nxp: imx943: avoid systick stop for M33
The SLEEP_HOLD_EN is enabled by default, that will gate systick, clear it to fix. Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
1 parent e5f7cc2 commit 10fe3d3

File tree

2 files changed

+38
-0
lines changed

2 files changed

+38
-0
lines changed

soc/nxp/imx/imx9/imx943/m33/soc.c

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <zephyr/kernel.h>
1010
#include <zephyr/drivers/firmware/scmi/clk.h>
1111
#include <zephyr/drivers/firmware/scmi/power.h>
12+
#include <zephyr/drivers/firmware/scmi/nxp/cpu.h>
1213
#include <zephyr/dt-bindings/clock/imx943_clock.h>
1314
#include <zephyr/dt-bindings/power/imx943_power.h>
1415
#include <soc.h>
@@ -43,6 +44,9 @@ static int soc_netc_clock_init(int clk_id)
4344

4445
static int soc_init(void)
4546
{
47+
#if defined(CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS)
48+
struct scmi_cpu_sleep_mode_config cpu_cfg = {0};
49+
#endif /* CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS */
4650
int ret = 0;
4751

4852
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0)
@@ -101,6 +105,15 @@ static int soc_init(void)
101105
}
102106
#endif
103107

108+
#if defined(CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS)
109+
cpu_cfg.cpu_id = CPU_IDX_M33P_S;
110+
cpu_cfg.sleep_mode = CPU_SLEEP_MODE_RUN;
111+
112+
ret = scmi_cpu_sleep_mode_set(&cpu_cfg);
113+
if (ret) {
114+
return ret;
115+
}
116+
#endif /* CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS */
104117
return ret;
105118
}
106119

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#ifndef ZEPHYR_NXP_IMX943_SCMI_CPU_SOC_H_
8+
#define ZEPHYR_NXP_IMX943_SCMI_CPU_SOC_H_
9+
10+
#define CPU_IDX_M33P 0U
11+
#define CPU_IDX_M7P_0 1U
12+
#define CPU_IDX_A55C0 2U
13+
#define CPU_IDX_A55C1 3U
14+
#define CPU_IDX_A55C2 4U
15+
#define CPU_IDX_A55C3 5U
16+
#define CPU_IDX_A55P 6U
17+
#define CPU_IDX_M7P_1 7U
18+
#define CPU_IDX_M33P_S 8U
19+
20+
#define CPU_SLEEP_MODE_RUN 0U
21+
#define CPU_SLEEP_MODE_WAIT 1U
22+
#define CPU_SLEEP_MODE_STOP 2U
23+
#define CPU_SLEEP_MODE_SUSPEND 3U
24+
25+
#endif /* ZEPHYR_NXP_IMX943_SCMI_CPU_SOC_H_ */

0 commit comments

Comments
 (0)