Skip to content

Commit e45954c

Browse files
committed
modules: hal_nxp: Pull in SDK cmc, spc, vbat, wuu drivers
Add bindings for the power related modules. Use the bindings Kconfig to pull in SDK drivers for cmc, spc, vbat and wuu. Signed-off-by: Mahesh Mahadevan <[email protected]>
1 parent 264711e commit e45954c

File tree

6 files changed

+71
-4
lines changed

6 files changed

+71
-4
lines changed

dts/arm/nxp/nxp_mcxw7x_common.dtsi

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -140,6 +140,24 @@
140140
#address-cells = <1>;
141141
#size-cells = <1>;
142142

143+
cmc: system-modules@1000 {
144+
compatible = "nxp,cmc";
145+
reg = <0x1000 0x1000>;
146+
interrupts = <1 0>;
147+
};
148+
149+
spc: system-modules@16000 {
150+
compatible = "nxp,spc";
151+
reg = <0x16000 0x1000>;
152+
interrupts = <21 0>;
153+
};
154+
155+
wuu: system-modules@19000 {
156+
compatible = "nxp,wuu";
157+
reg = <0x19000 0x1000>;
158+
interrupts = <22 0>;
159+
};
160+
143161
scg: clock-controller@1e000 {
144162
compatible = "nxp,scg-k4";
145163
reg = <0x1e000 0x404>;
@@ -274,6 +292,7 @@
274292
};
275293

276294
vbat: vbat@2b000 {
295+
compatible = "nxp,vbat";
277296
reg = <0x2b000 0x33c>;
278297
interrupts = <74 0>;
279298
};

dts/bindings/power/nxp,cmc.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP Core Mode Controller (CMC)
5+
6+
compatible: "nxp,cmc"
7+
8+
include: base.yaml
9+
10+
properties:
11+
reg:
12+
required: true

dts/bindings/power/nxp,spc.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP System Power Control (SPC)
5+
6+
compatible: "nxp,spc"
7+
8+
include: base.yaml
9+
10+
properties:
11+
reg:
12+
required: true

dts/bindings/power/nxp,vbat.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP Smart Power Switch (VBAT)
5+
6+
compatible: "nxp,vbat"
7+
8+
include: base.yaml
9+
10+
properties:
11+
reg:
12+
required: true

dts/bindings/power/nxp,wuu.yaml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# Copyright 2025 NXP
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
description: NXP Wakeup Unit (WUU)
5+
6+
compatible: "nxp,wuu"
7+
8+
include: base.yaml
9+
10+
properties:
11+
reg:
12+
required: true

modules/hal_nxp/mcux/mcux-sdk-ng/drivers/drivers.cmake

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -108,6 +108,10 @@ set_variable_ifdef(CONFIG_UART_MCUX_IUART CONFIG_MCUX_COMPONENT_driver.iua
108108
set_variable_ifdef(CONFIG_ADC_MCUX_12B1MSPS_SAR CONFIG_MCUX_COMPONENT_driver.adc_12b1msps_sar)
109109
set_variable_ifdef(CONFIG_HWINFO_MCUX_MCX_CMC CONFIG_MCUX_COMPONENT_driver.mcx_cmc)
110110
set_variable_ifdef(CONFIG_HWINFO_MCUX_SRC CONFIG_MCUX_COMPONENT_driver.src)
111+
set_variable_ifdef(CONFIG_DT_HAS_NXP_SPC_ENABLED CONFIG_MCUX_COMPONENT_driver.spc)
112+
set_variable_ifdef(CONFIG_DT_HAS_NXP_CMC_ENABLED CONFIG_MCUX_COMPONENT_driver.cmc)
113+
set_variable_ifdef(CONFIG_DT_HAS_NXP_VBAT_ENABLED CONFIG_MCUX_COMPONENT_driver.vbat)
114+
set_variable_ifdef(CONFIG_DT_HAS_NXP_WUU_ENABLED CONFIG_MCUX_COMPONENT_driver.wuu)
111115
set_variable_ifdef(CONFIG_HWINFO_MCUX_SIM CONFIG_MCUX_COMPONENT_driver.sim)
112116
set_variable_ifdef(CONFIG_HWINFO_MCUX_RCM CONFIG_MCUX_COMPONENT_driver.rcm)
113117
set_variable_ifdef(CONFIG_IPM_MCUX CONFIG_MCUX_COMPONENT_driver.mailbox)
@@ -185,10 +189,6 @@ if(CONFIG_SOC_FAMILY_MCXN OR CONFIG_SOC_FAMILY_MCXA)
185189
set(CONFIG_MCUX_COMPONENT_driver.mcx_spc ON)
186190
endif()
187191

188-
if(CONFIG_BT_NXP AND CONFIG_SOC_FAMILY_MCXW OR CONFIG_IEEE802154_MCXW)
189-
set(CONFIG_MCUX_COMPONENT_driver.spc ON)
190-
endif()
191-
192192
if(((${MCUX_DEVICE} MATCHES "MIMXRT1[0-9][0-9][0-9]") AND (NOT (CONFIG_SOC_MIMXRT1166_CM4 OR CONFIG_SOC_MIMXRT1176_CM4 OR CONFIG_SOC_MIMXRT1189_CM33))) OR
193193
((${MCUX_DEVICE} MATCHES "MIMX9596") AND CONFIG_SOC_MIMX9596_M7))
194194
set_variable_ifdef(CONFIG_HAS_MCUX_CACHE CONFIG_MCUX_COMPONENT_driver.cache_armv7_m7)

0 commit comments

Comments
 (0)