Skip to content

Commit a128f55

Browse files
NeilChen93fabiobaltieri
authored andcommitted
boards: frdm_mcxa156: 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 db1abaa commit a128f55

File tree

3 files changed

+32
-0
lines changed

3 files changed

+32
-0
lines changed

boards/nxp/frdm_mcxa156/frdm_mcxa156.dts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@
2525
mcuboot-button0 = &user_button_2;
2626
watchdog0 = &wwdt0;
2727
ambient-temp0 = &p3t1755;
28+
die-temp0 = &temp0;
2829
};
2930

3031
chosen {

dts/arm/nxp/nxp_mcxa156.dtsi

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -493,6 +493,11 @@
493493
status = "disabled";
494494
};
495495

496+
temp0: temp0 {
497+
compatible = "nxp,lpadc-temp40";
498+
status = "disabled";
499+
};
500+
496501
usb: usbd@400a4000 {
497502
compatible = "nxp,kinetis-usbd";
498503
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)