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 = <&adc4 7>, <&adc4 8>;
11	};
12};
13
14&adc4 {
15	dmas = <&gpdma1 0 0 (STM32_DMA_PERIPH_RX | STM32_DMA_MEM_16BITS | STM32_DMA_PERIPH_16BITS)>;
16	dma-names = "gpdma";
17
18	pinctrl-0 = <&adc4_in7_pa2 &adc4_in8_pa1>;
19	#address-cells = <1>;
20	#size-cells = <0>;
21
22	channel@7 {
23		reg = <7>;
24		zephyr,gain = "ADC_GAIN_1";
25		zephyr,reference = "ADC_REF_INTERNAL";
26		zephyr,acquisition-time = <ADC_ACQ_TIME_MAX>;
27		zephyr,resolution = <12>;
28	};
29
30	channel@8 {
31		reg = <8>;
32		zephyr,gain = "ADC_GAIN_1";
33		zephyr,reference = "ADC_REF_INTERNAL";
34		/* Use a different acquisition time for test purposes */
35		zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 80)>;
36		zephyr,resolution = <12>;
37	};
38};
39
40&gpdma1 {
41	status = "okay";
42};
43