From e40ad1c901bdf08fbf4957c48466a7d5dbe33f88 Mon Sep 17 00:00:00 2001 From: Emilio Benavente Date: Wed, 29 Jan 2025 16:40:21 -0600 Subject: [PATCH] dts: arm: nxp: Enable RTC Counter for MCXW7X Enabled the RTC Counter for the MCXW71 and MCXW72. Signed-off-by: Emilio Benavente --- boards/nxp/frdm_mcxw71/doc/index.rst | 2 ++ boards/nxp/frdm_mcxw71/frdm_mcxw71.dts | 4 ++++ boards/nxp/mcxw72_evk/mcxw72_evk_mcxw727c_cpu0.dts | 4 ++++ dts/arm/nxp/nxp_mcxw71.dtsi | 4 ++++ dts/arm/nxp/nxp_mcxw72.dtsi | 4 ++++ dts/arm/nxp/nxp_mcxw7x_common.dtsi | 9 +++++++++ 6 files changed, 27 insertions(+) diff --git a/boards/nxp/frdm_mcxw71/doc/index.rst b/boards/nxp/frdm_mcxw71/doc/index.rst index d7d979fbe40..0169c52eff7 100644 --- a/boards/nxp/frdm_mcxw71/doc/index.rst +++ b/boards/nxp/frdm_mcxw71/doc/index.rst @@ -60,6 +60,8 @@ The ``frdm_mcxw71`` board target in Zephyr currently supports the following feat +-----------+------------+-------------------------------------+ | LPTMR | on-chip | counter | +-----------+------------+-------------------------------------+ +| RTC | on-chip | counter | ++-----------+------------+-------------------------------------+ | BLE | on-chip | Bluetooth | +-----------+------------+-------------------------------------+ | FLEXCAN | on-chip | can | diff --git a/boards/nxp/frdm_mcxw71/frdm_mcxw71.dts b/boards/nxp/frdm_mcxw71/frdm_mcxw71.dts index 60a65f7a793..bfde56f8180 100644 --- a/boards/nxp/frdm_mcxw71/frdm_mcxw71.dts +++ b/boards/nxp/frdm_mcxw71/frdm_mcxw71.dts @@ -176,3 +176,7 @@ status = "okay"; wakeup-source; }; + +&rtc { + status = "okay"; +}; diff --git a/boards/nxp/mcxw72_evk/mcxw72_evk_mcxw727c_cpu0.dts b/boards/nxp/mcxw72_evk/mcxw72_evk_mcxw727c_cpu0.dts index 254b445818f..9ca8151c295 100644 --- a/boards/nxp/mcxw72_evk/mcxw72_evk_mcxw727c_cpu0.dts +++ b/boards/nxp/mcxw72_evk/mcxw72_evk_mcxw727c_cpu0.dts @@ -134,3 +134,7 @@ pinctrl-0 = <&pinmux_lpi2c1>; pinctrl-names = "default"; }; + +&rtc { + status = "okay"; +}; diff --git a/dts/arm/nxp/nxp_mcxw71.dtsi b/dts/arm/nxp/nxp_mcxw71.dtsi index 3b1c4f525ce..ba0d6e263b7 100644 --- a/dts/arm/nxp/nxp_mcxw71.dtsi +++ b/dts/arm/nxp/nxp_mcxw71.dtsi @@ -60,3 +60,7 @@ &smu2 { ranges = <0x0 0x1c0000 DT_SIZE_K(40)>; }; + +&rtc { + reg = <0x4002c000 0x50>; +}; diff --git a/dts/arm/nxp/nxp_mcxw72.dtsi b/dts/arm/nxp/nxp_mcxw72.dtsi index 94040fa2245..80c0fe13788 100644 --- a/dts/arm/nxp/nxp_mcxw72.dtsi +++ b/dts/arm/nxp/nxp_mcxw72.dtsi @@ -53,3 +53,7 @@ &smu2 { ranges = <0x0 0x1c0000 DT_SIZE_K(80)>; }; + +&rtc { + reg = <0x4002c000 0x60>; +}; diff --git a/dts/arm/nxp/nxp_mcxw7x_common.dtsi b/dts/arm/nxp/nxp_mcxw7x_common.dtsi index de6876a6657..dba26683e83 100644 --- a/dts/arm/nxp/nxp_mcxw7x_common.dtsi +++ b/dts/arm/nxp/nxp_mcxw7x_common.dtsi @@ -324,6 +324,15 @@ nxp,current-compensation-en; status = "disabled"; }; + + rtc: rtc@4002c000 { + compatible = "nxp,rtc"; + status = "disabled"; + interrupts = <32 0>, <33 0>; + interrupt-names = "alarm", "seconds"; + clock-frequency = <32768>; + prescaler = <32768>; + }; }; &fast_peripheral0 {