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 3>, <&adc1 4>; 11 }; 12}; 13 14&adc1 { 15 dmas = <&dmamux1 0 5 (STM32_DMA_PERIPH_RX | STM32_DMA_MEM_16BITS | 16 STM32_DMA_PERIPH_16BITS)>; 17 dma-names = "dmamux"; 18 19 pinctrl-0 = <&adc1_in3_pc2 &adc1_in4_pc3>; 20 #address-cells = <1>; 21 #size-cells = <0>; 22 23 channel@3 { 24 reg = <3>; 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@4 { 32 reg = <4>; 33 zephyr,gain = "ADC_GAIN_1"; 34 zephyr,reference = "ADC_REF_INTERNAL"; 35 /* Use a different acquisition time for test purposes */ 36 zephyr,acquisition-time = <ADC_ACQ_TIME(ADC_ACQ_TIME_TICKS, 248)>; 37 zephyr,resolution = <12>; 38 }; 39}; 40 41&dma1 { 42 status = "okay"; 43}; 44 45&dmamux1 { 46 status = "okay"; 47}; 48