Skip to content

Commit ab3d2dc

Browse files
NeilChen93kartben
authored andcommitted
boards: frdm_mcxa153,frdm_mcxa156: add hwinfo support
1. enable hwinfo support - device_id_get - get_reset_cause - get_supported_reset_cause - clear_reset_cause 2. verified tests/drivers/hwinfo Signed-off-by: Neil Chen <cheng.chen_1@nxp.com>
1 parent d4648a6 commit ab3d2dc

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

drivers/hwinfo/hwinfo_mcux_mcx_cmc.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,12 @@ LOG_MODULE_REGISTER(hwinfo_cmc, CONFIG_HWINFO_LOG_LEVEL);
2727
#define CMC_RESET_MASK_WATCHDOG CMC_SRS_WWDT0_MASK
2828
#endif
2929

30+
#ifdef CMC_SRS_CDOG1_MASK
31+
#define CMC_RESET_MASK_CDOG (CMC_SRS_CDOG0_MASK | CMC_SRS_CDOG1_MASK)
32+
#else
33+
#define CMC_RESET_MASK_CDOG CMC_SRS_CDOG0_MASK
34+
#endif
35+
3036
/**
3137
* @brief Translate from CMC reset source mask to Zephyr hwinfo sources mask.
3238
*
@@ -77,7 +83,7 @@ static uint32_t hwinfo_mcux_cmc_xlate_reset_sources(uint32_t sources)
7783
mask |= RESET_CPU_LOCKUP;
7884
}
7985

80-
if (sources & (CMC_SRS_CDOG0_MASK | CMC_SRS_CDOG1_MASK)) {
86+
if (sources & CMC_RESET_MASK_CDOG) {
8187
mask |= RESET_WATCHDOG;
8288
}
8389

dts/arm/nxp/nxp_mcxa153.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -132,6 +132,11 @@
132132
erase-block-size = <8192>;
133133
write-block-size = <128>;
134134
};
135+
136+
uuid: uuid@1100800 {
137+
compatible = "nxp,lpc-uid";
138+
reg = <0x1100800 0x10>;
139+
};
135140
};
136141

137142
gpio0: gpio@40102000 {

dts/arm/nxp/nxp_mcxa156.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -163,6 +163,11 @@
163163
erase-block-size = <8192>;
164164
write-block-size = <128>;
165165
};
166+
167+
uuid: uuid@1100800 {
168+
compatible = "nxp,lpc-uid";
169+
reg = <0x1100800 0x10>;
170+
};
166171
};
167172

168173
ctimer0: ctimer@40004000 {

soc/nxp/mcx/mcxa/Kconfig

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,12 +13,14 @@ config SOC_SERIES_MCXA
1313
config SOC_MCXA153
1414
select CPU_CORTEX_M33
1515
select HAS_MCUX_CACHE
16+
select HAS_MCUX_MCX_CMC
1617

1718
config SOC_MCXA156
1819
select CPU_CORTEX_M33
1920
select CPU_HAS_FPU
2021
select ARMV8_M_DSP
2122
select HAS_MCUX_CACHE
23+
select HAS_MCUX_MCX_CMC
2224

2325
config SOC_MCXA166
2426
select CPU_CORTEX_M33

0 commit comments

Comments
 (0)