Skip to content

Commit db1abaa

Browse files
NeilChen93fabiobaltieri
authored andcommitted
boards: frdm_mcxa153: add temperature sensor support
1. enable temperature sensor support 2. verified samples/sensor/die_temp_polling Signed-off-by: Neil Chen <[email protected]>
1 parent 48bbe11 commit db1abaa

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

boards/nxp/frdm_mcxa153/frdm_mcxa153.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@
2424
pwm-0 = &flexpwm0_pwm0;
2525
watchdog0 = &wwdt0;
2626
ambient-temp0 = &p3t1755;
27+
die-temp0 = &temp0;
2728
};
2829

2930
chosen {

dts/arm/nxp/nxp_mcxa153.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -348,6 +348,11 @@
348348
};
349349
};
350350

351+
temp0: temp0 {
352+
compatible = "nxp,lpadc-temp40";
353+
status = "disabled";
354+
};
355+
351356
usb: usbd@400a4000 {
352357
compatible = "nxp,kinetis-usbd";
353358
reg = <0x400a4000 0x1000>;
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#include <zephyr/dt-bindings/adc/adc.h>
7+
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
8+
9+
&lpadc0 {
10+
status = "okay";
11+
#address-cells = <1>;
12+
#size-cells = <0>;
13+
14+
channel@0 {
15+
reg = <0>;
16+
zephyr,gain = "ADC_GAIN_1";
17+
zephyr,reference = "ADC_REF_EXTERNAL0";
18+
zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 131)>;
19+
zephyr,input-positive = <MCUX_LPADC_CH26A>;
20+
};
21+
};
22+
23+
&temp0 {
24+
status = "okay";
25+
io-channels = <&lpadc0 0>;
26+
};

0 commit comments

Comments
 (0)