soc: esp32s3: add ADC single-shot support
Add support for single-shot ADC readings. Signed-off-by: Eric Holmberg <eric.holmberg@northriversystems.co.nz>
This commit is contained in:
parent
38203f9cb0
commit
9452cbfe9d
|
@ -41,6 +41,11 @@ LOG_MODULE_REGISTER(adc_esp32, CONFIG_ADC_LOG_LEVEL);
|
|||
#define ADC_RESOLUTION_MIN SOC_ADC_DIGI_MAX_BITWIDTH
|
||||
#define ADC_RESOLUTION_MAX SOC_ADC_DIGI_MAX_BITWIDTH
|
||||
|
||||
#elif CONFIG_SOC_SERIES_ESP32S3
|
||||
#define ADC_CALI_SCHEME ESP_ADC_CAL_VAL_EFUSE_TP_FIT
|
||||
#define ADC_RESOLUTION_MIN SOC_ADC_DIGI_MIN_BITWIDTH
|
||||
#define ADC_RESOLUTION_MAX SOC_ADC_DIGI_MAX_BITWIDTH
|
||||
|
||||
#endif
|
||||
|
||||
/* Convert resolution in bits to esp32 enum values */
|
||||
|
|
|
@ -8,6 +8,7 @@ description: |
|
|||
- ESP32 < 9,10,11,12 >
|
||||
- ESP32-S2 < 12 >
|
||||
- ESP32-C3 < 12 >
|
||||
- ESP32-S3 < 12 >
|
||||
For chips with configurable resolution feature (ESP32),
|
||||
maximum resolution will be used if not set explicitly.
|
||||
|
||||
|
|
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
#include <mem.h>
|
||||
#include <xtensa/xtensa.dtsi>
|
||||
#include <zephyr/dt-bindings/adc/adc.h>
|
||||
#include <zephyr/dt-bindings/gpio/gpio.h>
|
||||
#include <zephyr/dt-bindings/i2c/i2c.h>
|
||||
#include <zephyr/dt-bindings/clock/esp32s3_clock.h>
|
||||
|
@ -216,6 +217,24 @@
|
|||
status = "disabled";
|
||||
};
|
||||
|
||||
adc0: adc@60040000 {
|
||||
compatible = "espressif,esp32-adc";
|
||||
reg = <0x60040000 4>;
|
||||
unit = <1>;
|
||||
channel-count = <10>;
|
||||
#io-channel-cells = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
adc1: adc@60040004 {
|
||||
compatible = "espressif,esp32-adc";
|
||||
reg = <0x60040004 4>;
|
||||
unit = <2>;
|
||||
channel-count = <10>;
|
||||
#io-channel-cells = <1>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
twai: can@6002b000 {
|
||||
compatible = "espressif,esp32-twai";
|
||||
reg = <0x6002b000 DT_SIZE_K(4)>;
|
||||
|
|
Loading…
Reference in a new issue