| /* |
| * SPDX-License-Identifier: Apache-2.0 |
| * |
| * Copyright 2022 NXP |
| */ |
| |
| #include <zephyr/dt-bindings/adc/adc.h> |
| |
| / { |
| zephyr,user { |
| /* adjust channel number according to pinmux in board.dts */ |
| io-channels = <&adc0 0>, <&adc0 8>; |
| }; |
| }; |
| |
| &adc0 { |
| #address-cells = <1>; |
| #size-cells = <0>; |
| |
| /* |
| * To use this sample: |
| * - Connect VREFN_TARGET to GND, and VREFP_TARGET to 3v3 |
| * (Resistors J8 and J9, should be populated by default) |
| * - Connect LPADC0 CH0A signal to voltage between 0~3.3V (P19 pin 4) |
| * - Connect LPADC0 CH0B signal to voltage between 0~3.3V (P19 pin 2) |
| */ |
| |
| channel@0 { |
| reg = <0>; |
| zephyr,gain = "ADC_GAIN_1"; |
| zephyr,reference = "ADC_REF_EXTERNAL0"; |
| zephyr,vref-mv = <3300>; |
| zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; |
| zephyr,resolution = <12>; |
| }; |
| |
| /* |
| * Channel 8 corresponds to ADC CH0B. |
| * Channel 9 corresponds to CH1B, etc |
| */ |
| channel@8 { |
| reg = <8>; |
| zephyr,gain = "ADC_GAIN_1"; |
| zephyr,reference = "ADC_REF_EXTERNAL0"; |
| zephyr,vref-mv = <3300>; |
| zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; |
| zephyr,resolution = <12>; |
| }; |
| }; |