diff --git a/boards/nxp/frdm_mcxn236/frdm_mcxn236.dts b/boards/nxp/frdm_mcxn236/frdm_mcxn236.dts index 68559f54126..d7c0496d6a7 100644 --- a/boards/nxp/frdm_mcxn236/frdm_mcxn236.dts +++ b/boards/nxp/frdm_mcxn236/frdm_mcxn236.dts @@ -28,6 +28,7 @@ watchdog0 = &wwdt0; pwm-0 = &flexpwm1_pwm0; rtc = &rtc; + die-temp0 = &temp0; }; arduino_header: arduino-connector { diff --git a/dts/arm/nxp/nxp_mcxn23x_common.dtsi b/dts/arm/nxp/nxp_mcxn23x_common.dtsi index ddd512249d7..cf272c14914 100644 --- a/dts/arm/nxp/nxp_mcxn23x_common.dtsi +++ b/dts/arm/nxp/nxp_mcxn23x_common.dtsi @@ -729,6 +729,11 @@ nxp,references = <&vref 1800>; }; + temp0: temp0 { + compatible = "nxp,lpadc-temp40"; + status = "disabled"; + }; + lpadc1: lpadc@10e000 { compatible = "nxp,lpc-lpadc"; reg = <0x10e000 0x1000>; diff --git a/samples/sensor/die_temp_polling/boards/frdm_mcxn236.overlay b/samples/sensor/die_temp_polling/boards/frdm_mcxn236.overlay new file mode 100644 index 00000000000..400fe2e5a74 --- /dev/null +++ b/samples/sensor/die_temp_polling/boards/frdm_mcxn236.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>; +};