1# Copyright (c) 2022 Espressif Systems (Shanghai) Co., Ltd. 2# SPDX-License-Identifier: Apache-2.0 3 4description: | 5 Espressif Digital to Analog converter (DAC) control node 6 is part of the RTC low-power domain and belongs to the SENSE 7 peripherals set. RTC peripherals has GPIOs controlled by the 8 RTCIO mux, which is separated from the main IO mux. 9 10 Two GPIO pads can only be connected to the DAC peripheral. 11 12 ESP32 pads 13 - GPIO25 as DAC channel 1 14 - GPIO26 as DAC channel 2 15 16 ESP32-S2 pads 17 - GPIO17 as DAC channel 1 18 - GPIO18 as DAC channel 2 19 20 To enable the DAC peripheral it must be enabled in the board 21 dts, or in subsequent overlay file. 22 23 &dac { 24 status = "okay"; 25 }; 26 27 To specify the DAC channel to use, dts overlay must include 28 properties 'dac-channel-id', which uses zero based channel index. 29 Variable 'dac-resolution' must be also specified, although ESP32 30 only supported resolution is 8bits. 31 32 / { 33 zephyr,user { 34 dac = <&dac>; 35 dac-channel-id = <0>; 36 dac-resolution = <8>; 37 }; 38 }; 39 40 NOTE: The DAC peripheral outputs are fixed to gpio pads, therefore 41 it does not need to be controlled by the pinctrl node. 42 43compatible: "espressif,esp32-dac" 44 45include: [dac-controller.yaml] 46 47properties: 48 49 "#io-channel-cells": 50 const: 1 51 52io-channel-cells: 53 - output 54