1/*
2 * SPDX-License-Identifier: Apache-2.0
3 *
4 * Copyright (c) 2023 Benjamin Björnsson <benjamin.bjornsson@gmail.com>
5 */
6
7#include <zephyr/dt-bindings/adc/mcux-lpadc.h>
8
9/ {
10	zephyr,user {
11		io-channels = <&adc0 0>, <&adc0 1>, <&adc0 2>;
12	};
13};
14
15&adc0 {
16	#address-cells = <1>;
17	#size-cells = <0>;
18
19	/*
20	 * Channel 0 is used in single ended mode, with 12 bit resolution
21	 * CH0A is routed to P19 pin 4
22	 */
23	channel@0 {
24		reg = <0>;
25		zephyr,gain = "ADC_GAIN_1";
26		zephyr,reference = "ADC_REF_EXTERNAL0";
27		zephyr,vref-mv = <3300>;
28		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
29		zephyr,resolution = <13>;
30		zephyr,input-positive = <MCUX_LPADC_CH0A>;
31	};
32
33	/*
34	 * Channel 1 is used in single ended mode, with 16 bit resolution
35	 * CH4A is routed to P17 pin 19
36	 */
37	channel@1 {
38		reg = <1>;
39		zephyr,gain = "ADC_GAIN_1";
40		zephyr,reference = "ADC_REF_EXTERNAL0";
41		zephyr,vref-mv = <3300>;
42		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
43		zephyr,resolution = <16>;
44		zephyr,input-positive = <MCUX_LPADC_CH4A>;
45	};
46
47	/*
48	 * Channel 2 is used in single ended mode, with 12 bit resolution
49	 * CH4B is routed to P18 pin 1
50	 */
51	channel@2 {
52		reg = <2>;
53		zephyr,gain = "ADC_GAIN_1";
54		zephyr,reference = "ADC_REF_EXTERNAL0";
55		zephyr,vref-mv = <3300>;
56		zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>;
57		zephyr,resolution = <12>;
58		zephyr,input-positive = <MCUX_LPADC_CH4B>;
59	};
60};
61