0001 # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/ti,ads1015.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: TI ADS1015/ADS1115 4 channel I2C analog to digital converter
0008
0009 maintainers:
0010 - Daniel Baluta <daniel.baluta@nxp.com>
0011
0012 description: |
0013 Datasheet at: https://www.ti.com/lit/gpn/ads1015
0014 Supports both single ended and differential channels.
0015
0016 properties:
0017 compatible:
0018 enum:
0019 - ti,ads1015
0020 - ti,ads1115
0021 - ti,tla2024
0022
0023 reg:
0024 maxItems: 1
0025
0026 "#address-cells":
0027 const: 1
0028
0029 "#size-cells":
0030 const: 0
0031
0032 "#io-channel-cells":
0033 const: 1
0034
0035 required:
0036 - compatible
0037 - reg
0038 - "#address-cells"
0039 - "#size-cells"
0040
0041 additionalProperties: false
0042
0043 patternProperties:
0044 "^channel@[0-7]+$":
0045 type: object
0046 description:
0047 Child nodes needed for each channel that the platform uses.
0048
0049 properties:
0050 reg:
0051 description: |
0052 0: Voltage over AIN0 and AIN1.
0053 1: Voltage over AIN0 and AIN3.
0054 2: Voltage over AIN1 and AIN3.
0055 3: Voltage over AIN2 and AIN3.
0056 4: Voltage over AIN0 and GND.
0057 5: Voltage over AIN1 and GND.
0058 6: Voltage over AIN2 and GND.
0059 7: Voltage over AIN3 and GND.
0060 items:
0061 - minimum: 0
0062 maximum: 7
0063
0064 ti,gain:
0065 $ref: /schemas/types.yaml#/definitions/uint32
0066 minimum: 0
0067 maximum: 5
0068 description: |
0069 pga is the programmable gain amplifier (values are full scale)
0070 0: +/- 6.144 V
0071 1: +/- 4.096 V
0072 2: +/- 2.048 V (default)
0073 3: +/- 1.024 V
0074 4: +/- 0.512 V
0075 5: +/- 0.256 V
0076
0077 ti,datarate:
0078 $ref: /schemas/types.yaml#/definitions/uint32
0079 minimum: 0
0080 maximum: 6
0081 description: |
0082 Data acquisition rate in samples per second
0083 0: 128
0084 1: 250
0085 2: 490
0086 3: 920
0087 4: 1600 (default)
0088 5: 2400
0089 6: 3300
0090
0091 required:
0092 - reg
0093
0094 examples:
0095 - |
0096 i2c {
0097 #address-cells = <1>;
0098 #size-cells = <0>;
0099
0100 adc@49 {
0101 compatible = "ti,ads1015";
0102 reg = <0x49>;
0103 #address-cells = <1>;
0104 #size-cells = <0>;
0105 channel@0 {
0106 reg = <0>;
0107 };
0108 channel@4 {
0109 reg = <4>;
0110 ti,gain = <3>;
0111 ti,datarate = <5>;
0112 };
0113 };
0114 };
0115 ...