Skip to content

Commit 893f2e0

Browse files
ZhaoQiang-b45475kartben
authored andcommitted
soc: nxp: imx95: fix systick issue for M7
The SLEEP_HOLD_EN is enabled by default, that will gate systick, clear it to fix Signed-off-by: Qiang Zhao <[email protected]>
1 parent 4b61d4d commit 893f2e0

File tree

1 file changed

+18
-2
lines changed
  • soc/nxp/imx/imx9/imx95/m7

1 file changed

+18
-2
lines changed

soc/nxp/imx/imx9/imx95/m7/soc.c

Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
#include <zephyr/init.h>
1010
#include <zephyr/kernel.h>
1111
#include <zephyr/drivers/firmware/scmi/clk.h>
12+
#include <zephyr/drivers/firmware/scmi/nxp/cpu.h>
1213
#include <zephyr/drivers/firmware/scmi/power.h>
1314
#include <zephyr/dt-bindings/clock/imx95_clock.h>
1415
#include <zephyr/dt-bindings/power/imx95_power.h>
@@ -28,14 +29,18 @@ void soc_late_init_hook(void)
2829

2930
static int soc_init(void)
3031
{
32+
int ret = 0;
33+
#if defined(CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS)
34+
struct scmi_cpu_sleep_mode_config cpu_cfg = {0};
35+
#endif /* CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS */
36+
3137
#if defined(CONFIG_ETH_NXP_IMX_NETC) && (DT_CHILD_NUM_STATUS_OKAY(DT_NODELABEL(netc)) != 0)
3238
const struct device *clk_dev = DEVICE_DT_GET(DT_NODELABEL(scmi_clk));
3339
struct scmi_protocol *proto = clk_dev->data;
3440
struct scmi_clock_rate_config clk_cfg = {0};
3541
struct scmi_power_state_config pwr_cfg = {0};
3642
uint32_t power_state = POWER_DOMAIN_STATE_OFF;
3743
uint64_t enetref_clk = 250000000; /* 250 MHz*/
38-
int ret;
3944

4045
/* Power up NETCMIX */
4146
pwr_cfg.domain_id = IMX95_PD_NETC;
@@ -69,7 +74,18 @@ static int soc_init(void)
6974
return ret;
7075
}
7176
#endif
72-
return 0;
77+
78+
#if defined(CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS)
79+
cpu_cfg.cpu_id = CPU_IDX_M7P;
80+
cpu_cfg.sleep_mode = CPU_SLEEP_MODE_RUN;
81+
82+
ret = scmi_cpu_sleep_mode_set(&cpu_cfg);
83+
if (ret) {
84+
return ret;
85+
}
86+
#endif /* CONFIG_NXP_SCMI_CPU_DOMAIN_HELPERS */
87+
88+
return ret;
7389
}
7490

7591
/*

0 commit comments

Comments
 (0)