ESP32-S31 DAC support #698
Approved these changes.
Every other LP peripheral enables clock first and then reset. We should follow the pattern here.
those symbols seems they belong to soc_caps.h
Shouldn't those caps be synced with the HALs esp32s31/include/soc/Kconfig.soc_caps.in too?
should the offset be unsigned number?
offset parameter is now uint16_t offset
Those symbols were moved to soc_caps.h
Kconfig.soc_caps.in and soc_caps.h are now synced.
Done, thanks.
with SOC_DAC_SUPPORTED=1, adc_oneshot_hal.c now compiles s_disable_dac() for S31 and calls dac_ll_rtc_sync_by_adc(), but this LL only defines dac_ll_sync_by_adc, so every S31 build with CONFIG_ADC_ESP32 (e.g. tests/drivers/adc/adc_api on esp32s31_function_coreboard/hpcore) fails with an implicit declaration at adc_oneshot_hal.c:198. naming it dac_ll_rtc_sync_by_adc like the esp32/esp32s2 LLs in this hal fixes it, I checked that build
static inline void dac_ll_rtc_sync_by_adc(bool enable)
the new comment on dac_ll_pad_set_buffer_range() says false is the reduced swing, but buffered with false (what dac_esp32.c passes) measured 0.80 to 3.31 V on GPIO4 for codes 1024 to 4095, which is the wide swing the zephyr binding describes. anyone trusting the comment passes true for full scale and gets the other mode, so the previous wording (false = wider swing, codes 248..3848 linear) was the right one
* @param full_range true: input codes 0 to 4095 with reduced output swing;
* false: wider output swing, codes 248 to 3848 are linear.
dac_periph.c, dac_ll.h and dac_types_private.h are new files but use "Espressif Systems (Shanghai) CO LTD", so they don't carry the company's legal name. "Espressif Systems (Shanghai) Co., Ltd." in all three fixes it
- * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) CO LTD
+ * SPDX-FileCopyrightText: 2026 Espressif Systems (Shanghai) Co., Ltd.
Approved these changes.
raffarost
wmrsouza
This PR enables DAC support on ESP32-S31 by:
Depends on #657