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 1>, <&adc1 2>; 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_in1_pa0 &adc1_in2_pa1>; 20 #address-cells = <1>; 21 #size-cells = <0>; 22 23 channel@1 { 24 reg = <1>; 25 zephyr,gain = "ADC_GAIN_1"; 26 zephyr,reference = "ADC_REF_INTERNAL"; 27 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 28 zephyr,resolution = <12>; 29 }; 30 31 channel@2 { 32 reg = <2>; 33 zephyr,gain = "ADC_GAIN_1"; 34 zephyr,reference = "ADC_REF_INTERNAL"; 35 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 36 zephyr,resolution = <12>; 37 }; 38}; 39 40&dma1 { 41 status = "okay"; 42}; 43 44&dmamux1 { 45 status = "okay"; 46}; 47