From ba982a0f85eb381bcc58bae1aa9b411d28322053 Mon Sep 17 00:00:00 2001 From: Lucien Zhao Date: Wed, 12 Feb 2025 16:44:52 +0800 Subject: [PATCH] dts: arm: nxp: register ostimer for cm33_cpu0/1 register ostimer for cm33_cpu0/1 disable systick set ostimer per sec 1000000 times Signed-off-by: Lucien Zhao --- dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi | 15 +++++++++++++++ dts/arm/nxp/nxp_rt7xx_cm33_cpu1.dtsi | 15 +++++++++++++++ soc/nxp/imxrt/imxrt7xx/Kconfig.defconfig | 4 +++- 3 files changed, 33 insertions(+), 1 deletion(-) diff --git a/dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi b/dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi index 614c9466841..6413efbfda7 100644 --- a/dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi +++ b/dts/arm/nxp/nxp_rt7xx_cm33_cpu0.dtsi @@ -1011,6 +1011,21 @@ interrupts = <55 0>; clocks = <&clkctl4 MCUX_FLEXIO0_CLK>; }; + + os_timer_cpu0: timers@207000 { + compatible = "nxp,os-timer"; + reg = <0x207000 0x1000>; + interrupts = <34 0>; + status = "disabled"; + }; +}; + +&systick { + /* + * RT700 cm33_cpu0 relies by default on the OS Timer for system + * clock implementation, so the SysTick node is not to be enabled. + */ + status = "disabled"; }; &xspi0 { diff --git a/dts/arm/nxp/nxp_rt7xx_cm33_cpu1.dtsi b/dts/arm/nxp/nxp_rt7xx_cm33_cpu1.dtsi index 10885380993..23baca895d4 100644 --- a/dts/arm/nxp/nxp_rt7xx_cm33_cpu1.dtsi +++ b/dts/arm/nxp/nxp_rt7xx_cm33_cpu1.dtsi @@ -418,8 +418,23 @@ clocks = <&clkctl4 MCUX_LPI2C15_CLK>; status = "disabled"; }; + + os_timer_cpu1: timers@209000 { + compatible = "nxp,os-timer"; + reg = <0x209000 0x1000>; + interrupts = <30 0>; + status = "disabled"; + }; }; &nvic { arm,num-irq-priority-bits = <3>; }; + +&systick { + /* + * RT700 cm33_cpu1 relies by default on the OS Timer for system + * clock implementation, so the SysTick node is not to be enabled. + */ + status = "disabled"; +}; diff --git a/soc/nxp/imxrt/imxrt7xx/Kconfig.defconfig b/soc/nxp/imxrt/imxrt7xx/Kconfig.defconfig index c7b1d1d4b05..2b7904f630f 100644 --- a/soc/nxp/imxrt/imxrt7xx/Kconfig.defconfig +++ b/soc/nxp/imxrt/imxrt7xx/Kconfig.defconfig @@ -1,4 +1,4 @@ -# Copyright 2024 NXP +# Copyright 2024-2025 NXP # SPDX-License-Identifier: Apache-2.0 if SOC_MIMXRT798S_CM33_CPU0 @@ -11,6 +11,7 @@ config NUM_IRQS config SYS_CLOCK_HW_CYCLES_PER_SEC default 237500000 if CORTEX_M_SYSTICK + default 1000000 if MCUX_OS_TIMER choice CACHE_TYPE default EXTERNAL_CACHE @@ -25,6 +26,7 @@ config NUM_IRQS config SYS_CLOCK_HW_CYCLES_PER_SEC default 100000000 if CORTEX_M_SYSTICK + default 1000000 if MCUX_OS_TIMER endif # SOC_MIMXRT798S_CM33_CPU1