drivers: sensor: esp32s3 internal temperature sensor

Support for esp32s3 internal temperature sensor on Zephyr

Signed-off-by: Marcio Ribeiro <marcio.ribeiro@espressif.com>
This commit is contained in:
Marcio Ribeiro 2023-10-24 10:30:13 -03:00 committed by Henrik Brix Andersen
parent 47d9bad962
commit 76c4187bb0
2 changed files with 16 additions and 4 deletions

View file

@ -11,10 +11,10 @@ properties:
range: range:
type: int type: int
description: | description: |
The temperature sensor is available on the ESP32-S2, ESP32-C3. Note The temperature sensor is available on the ESP32-S2, ESP32-S3, ESP32-C3.
that it is unavailable on the ESP32 due to missing offset calibration. Note that it is unavailable on the ESP32 due to missing offset calibration.
Temperature range is defined by the temperature offset which is used Temperature range is defined by the temperature offset which is used during
during calculation of the output temperature from the measured value. calculation of the output temperature from the measured value.
default: 2 default: 2
enum: enum:
- 0 # measure range: 50°C ~ 125°C, error < 3°C - 0 # measure range: 50°C ~ 125°C, error < 3°C

View file

@ -13,6 +13,11 @@
#include <dt-bindings/pinctrl/esp32s3-pinctrl.h> #include <dt-bindings/pinctrl/esp32s3-pinctrl.h>
/ { / {
aliases {
die-temp0 = &coretemp;
};
chosen { chosen {
zephyr,canbus = &twai; zephyr,canbus = &twai;
zephyr,entropy = &trng0; zephyr,entropy = &trng0;
@ -237,6 +242,13 @@
status = "disabled"; status = "disabled";
}; };
coretemp: coretemp@60008800 {
compatible = "espressif,esp32-temp";
friendly-name = "coretemp";
reg = <0x60008800 0x4>;
status = "disabled";
};
adc0: adc@60040000 { adc0: adc@60040000 {
compatible = "espressif,esp32-adc"; compatible = "espressif,esp32-adc";
reg = <0x60040000 4>; reg = <0x60040000 4>;