1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2%YAML 1.2 3--- 4$id: http://devicetree.org/schemas/iio/adc/ti,ads1015.yaml# 5$schema: http://devicetree.org/meta-schemas/core.yaml# 6 7title: TI ADS1015/ADS1115 4 channel I2C analog to digital converter 8 9maintainers: 10 - Daniel Baluta <daniel.baluta@nxp.com> 11 12description: | 13 Datasheet at: https://www.ti.com/lit/gpn/ads1015 14 Supports both single ended and differential channels. 15 16properties: 17 compatible: 18 enum: 19 - ti,ads1015 20 - ti,ads1115 21 - ti,tla2024 22 23 reg: 24 maxItems: 1 25 26 interrupts: 27 maxItems: 1 28 29 "#address-cells": 30 const: 1 31 32 "#size-cells": 33 const: 0 34 35 "#io-channel-cells": 36 const: 1 37 38required: 39 - compatible 40 - reg 41 - "#address-cells" 42 - "#size-cells" 43 44additionalProperties: false 45 46patternProperties: 47 "^channel@[0-7]+$": 48 type: object 49 additionalProperties: false 50 description: 51 Child nodes needed for each channel that the platform uses. 52 53 properties: 54 reg: 55 description: | 56 0: Voltage over AIN0 and AIN1. 57 1: Voltage over AIN0 and AIN3. 58 2: Voltage over AIN1 and AIN3. 59 3: Voltage over AIN2 and AIN3. 60 4: Voltage over AIN0 and GND. 61 5: Voltage over AIN1 and GND. 62 6: Voltage over AIN2 and GND. 63 7: Voltage over AIN3 and GND. 64 items: 65 - minimum: 0 66 maximum: 7 67 68 ti,gain: 69 $ref: /schemas/types.yaml#/definitions/uint32 70 minimum: 0 71 maximum: 5 72 description: | 73 pga is the programmable gain amplifier (values are full scale) 74 0: +/- 6.144 V 75 1: +/- 4.096 V 76 2: +/- 2.048 V (default) 77 3: +/- 1.024 V 78 4: +/- 0.512 V 79 5: +/- 0.256 V 80 81 ti,datarate: 82 $ref: /schemas/types.yaml#/definitions/uint32 83 minimum: 0 84 maximum: 7 85 description: | 86 Data acquisition rate in samples per second for ADS1015, TLA2024 87 0: 128 88 1: 250 89 2: 490 90 3: 920 91 4: 1600 (default) 92 5: 2400 93 6: 3300 94 7: 3300 95 96 Data acquisition rate in samples per second for ADS1115 97 0: 8 98 1: 16 99 2: 32 100 3: 64 101 4: 128 (default) 102 5: 250 103 6: 475 104 7: 860 105 106 required: 107 - reg 108 109examples: 110 - | 111 i2c { 112 #address-cells = <1>; 113 #size-cells = <0>; 114 115 adc@49 { 116 compatible = "ti,ads1015"; 117 reg = <0x49>; 118 #address-cells = <1>; 119 #size-cells = <0>; 120 channel@0 { 121 reg = <0>; 122 }; 123 channel@4 { 124 reg = <4>; 125 ti,gain = <3>; 126 ti,datarate = <5>; 127 }; 128 }; 129 }; 130... 131