1/* 2 * Copyright 2023 The ChromiumOS Authors 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #include <zephyr/dt-bindings/adc/adc.h> 8 9/ { 10 sensor0: vd { 11 compatible = "voltage-divider"; 12 io-channels = <&adc0 0>; 13 output-ohms = <50>; 14 full-ohms = <100>; 15 }; 16 17 sensor1: css { 18 compatible = "current-sense-shunt"; 19 io-channels = <&adc0 1>; 20 shunt-resistor-micro-ohms = <500000>; 21 }; 22 23 sensor2: csa { 24 compatible = "current-sense-amplifier"; 25 io-channels = <&adc0 2>; 26 sense-resistor-micro-ohms = <5000>; 27 sense-gain-mult = <100>; 28 }; 29 30 adc0: adc { 31 compatible = "zephyr,adc-emul"; 32 nchannels = <3>; 33 ref-internal-mv = <3300>; 34 ref-external1-mv = <5000>; 35 #io-channel-cells = <1>; 36 status = "okay"; 37 }; 38}; 39 40&adc0 { 41 #address-cells = <1>; 42 #size-cells = <0>; 43 44 channel@0 { 45 reg = <0>; 46 zephyr,gain = "ADC_GAIN_1"; 47 zephyr,reference = "ADC_REF_INTERNAL"; 48 zephyr,vref-mv = <3300>; 49 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 50 zephyr,resolution = <12>; 51 }; 52 53 channel@1 { 54 reg = <1>; 55 zephyr,gain = "ADC_GAIN_1"; 56 zephyr,reference = "ADC_REF_INTERNAL"; 57 zephyr,vref-mv = <3300>; 58 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 59 zephyr,resolution = <12>; 60 }; 61 62 channel@2 { 63 reg = <2>; 64 zephyr,gain = "ADC_GAIN_1"; 65 zephyr,reference = "ADC_REF_INTERNAL"; 66 zephyr,vref-mv = <3300>; 67 zephyr,acquisition-time = <ADC_ACQ_TIME_DEFAULT>; 68 zephyr,resolution = <12>; 69 }; 70}; 71