Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/ti,ads131e08.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Texas Instruments ADS131E0x 4-, 6- and 8-Channel ADCs
0008 
0009 maintainers:
0010   - Tomislav Denis <tomislav.denis@avl.com>
0011 
0012 description: |
0013   The ADS131E0x are a family of multichannel, simultaneous sampling,
0014   24-bit, delta-sigma, analog-to-digital converters (ADCs) with a
0015   built-in programmable gain amplifier (PGA), internal reference
0016   and an onboard oscillator.
0017   The communication with ADC chip is via the SPI bus (mode 1).
0018 
0019   https://www.ti.com/lit/ds/symlink/ads131e08.pdf
0020 
0021 properties:
0022   compatible:
0023     enum:
0024       - ti,ads131e04
0025       - ti,ads131e06
0026       - ti,ads131e08
0027 
0028   reg:
0029     maxItems: 1
0030 
0031   spi-max-frequency: true
0032 
0033   spi-cpha: true
0034 
0035   clocks:
0036     description: |
0037       Device tree identifier to the clock source (2.048 MHz).
0038       Note: clock source is selected using CLKSEL pin.
0039     maxItems: 1
0040 
0041   clock-names:
0042     items:
0043       - const: adc-clk
0044 
0045   interrupts:
0046     description: |
0047       IRQ line for the ADC data ready.
0048     maxItems: 1
0049 
0050   vref-supply:
0051     description: |
0052       Optional external voltage reference. If not supplied, internal voltage
0053       reference is used.
0054 
0055   ti,vref-internal:
0056     description: |
0057       Select the internal voltage reference value.
0058       0: 2.4V
0059       1: 4.0V
0060       If this field is left empty, 2.4V is selected.
0061       Note: internal voltage reference is used only if vref-supply is not supplied.
0062     $ref: /schemas/types.yaml#/definitions/uint32
0063     enum: [0, 1]
0064     default: 0
0065 
0066   '#address-cells':
0067     const: 1
0068 
0069   '#size-cells':
0070     const: 0
0071 
0072 required:
0073   - compatible
0074   - reg
0075   - spi-cpha
0076   - clocks
0077   - clock-names
0078   - interrupts
0079 
0080 patternProperties:
0081   "^channel@([0-7])$":
0082     $ref: "adc.yaml"
0083     type: object
0084     description: |
0085       Represents the external channels which are connected to the ADC.
0086 
0087     properties:
0088       reg:
0089         description: |
0090           The channel number.
0091           Up to 4 channels, numbered from 0 to 3 for ti,ads131e04.
0092           Up to 6 channels, numbered from 0 to 5 for ti,ads131e06.
0093           Up to 8 channels, numbered from 0 to 7 for ti,ads131e08.
0094         items:
0095           minimum: 0
0096           maximum: 7
0097 
0098       ti,gain:
0099         description: |
0100           The PGA gain value for the channel.
0101           If this field is left empty, PGA gain 1 is used.
0102         $ref: /schemas/types.yaml#/definitions/uint32
0103         enum: [1, 2, 4, 8, 12]
0104         default: 1
0105 
0106       ti,mux:
0107         description: |
0108           Channel input selection(muliplexer).
0109           0: Normal input.
0110           1: Input shorted to (VREFP + VREFN) / 2 (for offset or noise measurements).
0111           3: MVDD (for supply measurement)
0112           4: Temperature sensor
0113           If this field is left empty, normal input is selected.
0114         $ref: /schemas/types.yaml#/definitions/uint32
0115         enum: [0, 1, 3, 4]
0116         default: 0
0117 
0118     required:
0119       - reg
0120 
0121     additionalProperties: false
0122 
0123 additionalProperties: false
0124 
0125 examples:
0126   - |
0127     #include <dt-bindings/interrupt-controller/irq.h>
0128 
0129     spi {
0130       #address-cells = <1>;
0131       #size-cells = <0>;
0132 
0133       adc@0 {
0134         compatible = "ti,ads131e08";
0135         reg = <0>;
0136         spi-max-frequency = <1000000>;
0137         spi-cpha;
0138         clocks = <&clk2048k>;
0139         clock-names = "adc-clk";
0140         interrupt-parent = <&gpio5>;
0141         interrupts = <28 IRQ_TYPE_EDGE_FALLING>;
0142         vref-supply = <&adc_vref>;
0143 
0144         #address-cells = <1>;
0145         #size-cells = <0>;
0146 
0147         channel@0 {
0148           reg = <0>;
0149         };
0150 
0151         channel@1 {
0152           reg = <1>;
0153         };
0154 
0155         channel@2 {
0156           reg = <2>;
0157           ti,gain = <2>;
0158         };
0159 
0160         channel@3 {
0161           reg = <3>;
0162         };
0163 
0164         channel@4 {
0165           reg = <4>;
0166         };
0167 
0168         channel@5 {
0169           reg = <5>;
0170         };
0171 
0172         channel@6 {
0173           reg = <6>;
0174         };
0175 
0176         channel@7 {
0177           reg = <7>;
0178           ti,mux = <4>;
0179         };
0180       };
0181     };