diff --git a/boards/nxp/frdm_mcxa166/frdm_mcxa166.dts b/boards/nxp/frdm_mcxa166/frdm_mcxa166.dts index d926b02bcc3..dc85cf19747 100644 --- a/boards/nxp/frdm_mcxa166/frdm_mcxa166.dts +++ b/boards/nxp/frdm_mcxa166/frdm_mcxa166.dts @@ -21,6 +21,7 @@ sw0 = &user_button_2; sw1 = &user_button_3; watchdog0 = &wwdt0; + die-temp0 = &temp0; }; chosen { diff --git a/boards/nxp/frdm_mcxa276/frdm_mcxa276.dts b/boards/nxp/frdm_mcxa276/frdm_mcxa276.dts index 6bd2fc8c782..4981a9df60d 100644 --- a/boards/nxp/frdm_mcxa276/frdm_mcxa276.dts +++ b/boards/nxp/frdm_mcxa276/frdm_mcxa276.dts @@ -23,6 +23,7 @@ sw1 = &user_button_3; watchdog0 = &wwdt0; ambient-temp0 = &p3t1755; + die-temp0 = &temp0; }; chosen { diff --git a/dts/arm/nxp/nxp_mcxa166.dtsi b/dts/arm/nxp/nxp_mcxa166.dtsi index eb775c7ef2d..995f1a54e67 100644 --- a/dts/arm/nxp/nxp_mcxa166.dtsi +++ b/dts/arm/nxp/nxp_mcxa166.dtsi @@ -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>; diff --git a/dts/arm/nxp/nxp_mcxa276.dtsi b/dts/arm/nxp/nxp_mcxa276.dtsi index 3d7b4a7ca25..4903e129719 100644 --- a/dts/arm/nxp/nxp_mcxa276.dtsi +++ b/dts/arm/nxp/nxp_mcxa276.dtsi @@ -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>; diff --git a/samples/sensor/die_temp_polling/boards/frdm_mcxa166.overlay b/samples/sensor/die_temp_polling/boards/frdm_mcxa166.overlay new file mode 100644 index 00000000000..400fe2e5a74 --- /dev/null +++ b/samples/sensor/die_temp_polling/boards/frdm_mcxa166.overlay @@ -0,0 +1,26 @@ +/* + * Copyright 2025 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include +#include + +&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 = ; + zephyr,input-positive = ; + }; +}; + +&temp0 { + status = "okay"; + io-channels = <&lpadc0 0>; +}; diff --git a/samples/sensor/die_temp_polling/boards/frdm_mcxa276.overlay b/samples/sensor/die_temp_polling/boards/frdm_mcxa276.overlay new file mode 100644 index 00000000000..400fe2e5a74 --- /dev/null +++ b/samples/sensor/die_temp_polling/boards/frdm_mcxa276.overlay @@ -0,0 +1,26 @@ +/* + * Copyright 2025 NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ +#include +#include + +&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 = ; + zephyr,input-positive = ; + }; +}; + +&temp0 { + status = "okay"; + io-channels = <&lpadc0 0>; +};