soc: arm: nxp: switch imxrt boards to use systick timer unless CONFIG_PM=y
Switch all imxrt boards to use the systick timer by default, and only enable the GPT timer when using low power modes. This is desirable because the systick has a higher resolution, but the GPT can run while the core clock is gated, making it useful for low power modes. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
c1cc2c4a26
commit
4be1fb81ce
|
@ -104,9 +104,14 @@ zephyr_udc0: &usb1 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -131,9 +131,14 @@ zephyr_udc0: &usb1 {
|
|||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -207,9 +207,14 @@ zephyr_udc0: &usb1 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -165,13 +165,18 @@
|
|||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
zephyr_udc0: &usb1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -282,9 +282,14 @@ zephyr_udc0: &usb1 {
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -276,13 +276,18 @@ zephyr_udc0: &usb1 {
|
|||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&iomuxcgpr {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -337,13 +337,18 @@ zephyr_udc0: &usb1 {
|
|||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&itm {
|
||||
pinctrl-0 = <&pinmux_swo>;
|
||||
pinctrl-names = "default";
|
||||
|
|
|
@ -47,13 +47,18 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&edma_lpsr0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -60,13 +60,18 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&lpadc0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -47,13 +47,18 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&sai1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -135,13 +135,18 @@
|
|||
status = "okay";
|
||||
};
|
||||
|
||||
/* Enable GPT for use as a hardware timer. This disables Cortex Systick.
|
||||
* to use systick, change this node from "gpt_hw_timer" to "systick"
|
||||
/* GPT and Systick are enabled. If power management is enabled, the GPT
|
||||
* timer will be used instead of systick, as allows the core clock to
|
||||
* be gated.
|
||||
*/
|
||||
&gpt_hw_timer {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&systick {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&wdog1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
config MCUX_GPT_TIMER
|
||||
bool "MCUX GPT Event timer"
|
||||
default y
|
||||
depends on PM
|
||||
depends on DT_HAS_NXP_GPT_HW_TIMER_ENABLED
|
||||
select TICKLESS_CAPABLE
|
||||
help
|
||||
|
|
|
@ -14,4 +14,7 @@ config NUM_IRQS
|
|||
config GPIO
|
||||
default y
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 240000000 if CORTEX_M_SYSTICK
|
||||
|
||||
endif # SOC_MIMXRT1166_CM4
|
||||
|
|
|
@ -14,4 +14,7 @@ config NUM_IRQS
|
|||
config GPIO
|
||||
default y
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 600000000 if CORTEX_M_SYSTICK
|
||||
|
||||
endif # SOC_MIMXRT1166_CM7
|
||||
|
|
|
@ -47,6 +47,10 @@ config SYS_CLOCK_HW_CYCLES_PER_SEC
|
|||
default $(dt_node_int_prop_int,$(DT_SYSCLK_PATH),clock-frequency) if SOC_SERIES_IMX_RT10XX && CORTEX_M_SYSTICK
|
||||
default 32768 if MCUX_GPT_TIMER
|
||||
|
||||
# Disable systick if using MCUX_GPT_TIMER, as they will conflict
|
||||
config CORTEX_M_SYSTICK
|
||||
default n if MCUX_GPT_TIMER
|
||||
|
||||
config PM_MCUX_GPC
|
||||
default y if HAS_MCUX_GPC
|
||||
depends on SOC_SERIES_IMX_RT11XX && PM
|
||||
|
|
Loading…
Reference in a new issue