1/*
2 * SPDX-License-Identifier: Apache-2.0
3 *
4 * Copyright (c) Benjamin Björnsson <benjamin.bjornsson@gmail.com>
5 */
6
7/ {
8	zephyr,user {
9		/* adjust channel number according to pinmux in board.dts */
10		io-channels = <&adc1 0>, <&adc1 3>;
11	};
12};
13
14&adc1 {
15	dmas = <&dma2 0 0 (STM32_DMA_PERIPH_RX | STM32_DMA_MEM_16BITS |
16		STM32_DMA_PERIPH_16BITS) STM32_DMA_FIFO_FULL>;
17	dma-names = "dma";
18
19	pinctrl-0 = <&adc1_in0_pa0 &adc1_in3_pa3>;
20	#address-cells = <1>;
21	#size-cells = <0>;
22
23	channel@0 {
24		reg = <0>;
25		zephyr,gain = "ADC_GAIN_1";
26		zephyr,reference = "ADC_REF_INTERNAL";
27		zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
28		zephyr,resolution = <12>;
29	};
30
31	channel@3 {
32		reg = <3>;
33		zephyr,gain = "ADC_GAIN_1";
34		zephyr,reference = "ADC_REF_INTERNAL";
35		zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
36		zephyr,resolution = <12>;
37	};
38};
39
40&dma2 {
41	status = "okay";
42};
43