Commit cec6d682 authored by Peter Wang's avatar Peter Wang Committed by Daniel DeGrasse
Browse files

boards: frdm_mcxa166, frdm_mcxa276: add temperature sensor support



1. enable temperature sensor support
2. verified samples/sensor/die_temp_polling

Signed-off-by: default avatarPeter Wang <chaoyi.wang@nxp.com>
parent aa7618ba
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -21,6 +21,7 @@
		sw0 = &user_button_2;
		sw1 = &user_button_3;
		watchdog0 = &wwdt0;
		die-temp0 = &temp0;
	};

	chosen {
+1 −0
Original line number Diff line number Diff line
@@ -23,6 +23,7 @@
		sw1 = &user_button_3;
		watchdog0 = &wwdt0;
		ambient-temp0 = &p3t1755;
		die-temp0 = &temp0;
	};

	chosen {
+5 −0
Original line number Diff line number Diff line
@@ -308,6 +308,11 @@
			clocks = <&syscon MCUX_LPADC1_CLK>;
		};

		temp0: temp0 {
			compatible = "nxp,lpadc-temp40";
			status = "disabled";
		};

		lpadc1: lpadc@400b0000 {
			compatible = "nxp,lpc-lpadc";
			reg = <0x400b0000 0x1000>;
+5 −0
Original line number Diff line number Diff line
@@ -321,6 +321,11 @@
			clocks = <&syscon MCUX_LPADC1_CLK>;
		};

		temp0: temp0 {
			compatible = "nxp,lpadc-temp40";
			status = "disabled";
		};

		lpadc1: lpadc@400b0000 {
			compatible = "nxp,lpc-lpadc";
			reg = <0x400b0000 0x1000>;
+26 −0
Original line number Diff line number Diff line
/*
 * Copyright 2025 NXP
 *
 * SPDX-License-Identifier: Apache-2.0
 */
#include <zephyr/dt-bindings/adc/adc.h>
#include <zephyr/dt-bindings/adc/mcux-lpadc.h>

&lpadc0 {
	status = "okay";
	#address-cells = <1>;
	#size-cells = <0>;

	channel@0 {
		reg = <0>;
		zephyr,gain = "ADC_GAIN_1";
		zephyr,reference = "ADC_REF_EXTERNAL0";
		zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 131)>;
		zephyr,input-positive = <MCUX_LPADC_CH26A>;
	};
};

&temp0 {
	status = "okay";
	io-channels = <&lpadc0 0>;
};
Loading