1f3c52f01STomislav Denis# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2f3c52f01STomislav Denis%YAML 1.2 3f3c52f01STomislav Denis--- 4f3c52f01STomislav Denis$id: http://devicetree.org/schemas/iio/adc/ti,ads131e08.yaml# 5f3c52f01STomislav Denis$schema: http://devicetree.org/meta-schemas/core.yaml# 6f3c52f01STomislav Denis 7f3c52f01STomislav Denistitle: Texas Instruments ADS131E0x 4-, 6- and 8-Channel ADCs 8f3c52f01STomislav Denis 9f3c52f01STomislav Denismaintainers: 10f33abd2dSKrzysztof Kozlowski - Jonathan Cameron <jic23@kernel.org> 11f3c52f01STomislav Denis 12f3c52f01STomislav Denisdescription: | 13f3c52f01STomislav Denis The ADS131E0x are a family of multichannel, simultaneous sampling, 14f3c52f01STomislav Denis 24-bit, delta-sigma, analog-to-digital converters (ADCs) with a 15f3c52f01STomislav Denis built-in programmable gain amplifier (PGA), internal reference 16f3c52f01STomislav Denis and an onboard oscillator. 17f3c52f01STomislav Denis The communication with ADC chip is via the SPI bus (mode 1). 18f3c52f01STomislav Denis 19f3c52f01STomislav Denis https://www.ti.com/lit/ds/symlink/ads131e08.pdf 20f3c52f01STomislav Denis 21f3c52f01STomislav Denisproperties: 22f3c52f01STomislav Denis compatible: 23f3c52f01STomislav Denis enum: 24f3c52f01STomislav Denis - ti,ads131e04 25f3c52f01STomislav Denis - ti,ads131e06 26f3c52f01STomislav Denis - ti,ads131e08 27f3c52f01STomislav Denis 28f3c52f01STomislav Denis reg: 29f3c52f01STomislav Denis maxItems: 1 30f3c52f01STomislav Denis 31f3c52f01STomislav Denis spi-cpha: true 32f3c52f01STomislav Denis 33f3c52f01STomislav Denis clocks: 34f3c52f01STomislav Denis description: | 35f3c52f01STomislav Denis Device tree identifier to the clock source (2.048 MHz). 36f3c52f01STomislav Denis Note: clock source is selected using CLKSEL pin. 37f3c52f01STomislav Denis maxItems: 1 38f3c52f01STomislav Denis 39f3c52f01STomislav Denis clock-names: 40f3c52f01STomislav Denis items: 41f3c52f01STomislav Denis - const: adc-clk 42f3c52f01STomislav Denis 43f3c52f01STomislav Denis interrupts: 44f3c52f01STomislav Denis description: | 45f3c52f01STomislav Denis IRQ line for the ADC data ready. 46f3c52f01STomislav Denis maxItems: 1 47f3c52f01STomislav Denis 48f3c52f01STomislav Denis vref-supply: 49f3c52f01STomislav Denis description: | 50f3c52f01STomislav Denis Optional external voltage reference. If not supplied, internal voltage 51f3c52f01STomislav Denis reference is used. 52f3c52f01STomislav Denis 53f3c52f01STomislav Denis ti,vref-internal: 54f3c52f01STomislav Denis description: | 55f3c52f01STomislav Denis Select the internal voltage reference value. 56f3c52f01STomislav Denis 0: 2.4V 57f3c52f01STomislav Denis 1: 4.0V 58f3c52f01STomislav Denis If this field is left empty, 2.4V is selected. 59f3c52f01STomislav Denis Note: internal voltage reference is used only if vref-supply is not supplied. 60f3c52f01STomislav Denis $ref: /schemas/types.yaml#/definitions/uint32 61f3c52f01STomislav Denis enum: [0, 1] 62f3c52f01STomislav Denis default: 0 63f3c52f01STomislav Denis 64f3c52f01STomislav Denis '#address-cells': 65f3c52f01STomislav Denis const: 1 66f3c52f01STomislav Denis 67f3c52f01STomislav Denis '#size-cells': 68f3c52f01STomislav Denis const: 0 69f3c52f01STomislav Denis 70f3c52f01STomislav Denisrequired: 71f3c52f01STomislav Denis - compatible 72f3c52f01STomislav Denis - reg 73f3c52f01STomislav Denis - spi-cpha 74f3c52f01STomislav Denis - clocks 75f3c52f01STomislav Denis - clock-names 76f3c52f01STomislav Denis - interrupts 77f3c52f01STomislav Denis 78f3c52f01STomislav DenispatternProperties: 79f3c52f01STomislav Denis "^channel@([0-7])$": 80*34d1e754SKrzysztof Kozlowski $ref: adc.yaml 81f3c52f01STomislav Denis type: object 82f3c52f01STomislav Denis description: | 83f3c52f01STomislav Denis Represents the external channels which are connected to the ADC. 84f3c52f01STomislav Denis 85f3c52f01STomislav Denis properties: 86f3c52f01STomislav Denis reg: 87f3c52f01STomislav Denis description: | 88f3c52f01STomislav Denis The channel number. 89f3c52f01STomislav Denis Up to 4 channels, numbered from 0 to 3 for ti,ads131e04. 90f3c52f01STomislav Denis Up to 6 channels, numbered from 0 to 5 for ti,ads131e06. 91f3c52f01STomislav Denis Up to 8 channels, numbered from 0 to 7 for ti,ads131e08. 92f3c52f01STomislav Denis items: 93f3c52f01STomislav Denis minimum: 0 94f3c52f01STomislav Denis maximum: 7 95f3c52f01STomislav Denis 96f3c52f01STomislav Denis ti,gain: 97f3c52f01STomislav Denis description: | 98f3c52f01STomislav Denis The PGA gain value for the channel. 99f3c52f01STomislav Denis If this field is left empty, PGA gain 1 is used. 100f3c52f01STomislav Denis $ref: /schemas/types.yaml#/definitions/uint32 101f3c52f01STomislav Denis enum: [1, 2, 4, 8, 12] 102f3c52f01STomislav Denis default: 1 103f3c52f01STomislav Denis 104f3c52f01STomislav Denis ti,mux: 105f3c52f01STomislav Denis description: | 106f3c52f01STomislav Denis Channel input selection(muliplexer). 107f3c52f01STomislav Denis 0: Normal input. 108f3c52f01STomislav Denis 1: Input shorted to (VREFP + VREFN) / 2 (for offset or noise measurements). 109f3c52f01STomislav Denis 3: MVDD (for supply measurement) 110f3c52f01STomislav Denis 4: Temperature sensor 111f3c52f01STomislav Denis If this field is left empty, normal input is selected. 112f3c52f01STomislav Denis $ref: /schemas/types.yaml#/definitions/uint32 113f3c52f01STomislav Denis enum: [0, 1, 3, 4] 114f3c52f01STomislav Denis default: 0 115f3c52f01STomislav Denis 116f3c52f01STomislav Denis required: 117f3c52f01STomislav Denis - reg 118f3c52f01STomislav Denis 119f3c52f01STomislav Denis additionalProperties: false 120f3c52f01STomislav Denis 12180137388SKrzysztof KozlowskiallOf: 12280137388SKrzysztof Kozlowski - $ref: /schemas/spi/spi-peripheral-props.yaml# 12380137388SKrzysztof Kozlowski 12480137388SKrzysztof KozlowskiunevaluatedProperties: false 125f3c52f01STomislav Denis 126f3c52f01STomislav Denisexamples: 127f3c52f01STomislav Denis - | 128f3c52f01STomislav Denis #include <dt-bindings/interrupt-controller/irq.h> 129f3c52f01STomislav Denis 130f3c52f01STomislav Denis spi { 131f3c52f01STomislav Denis #address-cells = <1>; 132f3c52f01STomislav Denis #size-cells = <0>; 133f3c52f01STomislav Denis 134f3c52f01STomislav Denis adc@0 { 135f3c52f01STomislav Denis compatible = "ti,ads131e08"; 136f3c52f01STomislav Denis reg = <0>; 137f3c52f01STomislav Denis spi-max-frequency = <1000000>; 138f3c52f01STomislav Denis spi-cpha; 139f3c52f01STomislav Denis clocks = <&clk2048k>; 140f3c52f01STomislav Denis clock-names = "adc-clk"; 141f3c52f01STomislav Denis interrupt-parent = <&gpio5>; 142f3c52f01STomislav Denis interrupts = <28 IRQ_TYPE_EDGE_FALLING>; 143f3c52f01STomislav Denis vref-supply = <&adc_vref>; 144f3c52f01STomislav Denis 145f3c52f01STomislav Denis #address-cells = <1>; 146f3c52f01STomislav Denis #size-cells = <0>; 147f3c52f01STomislav Denis 148f3c52f01STomislav Denis channel@0 { 149f3c52f01STomislav Denis reg = <0>; 150f3c52f01STomislav Denis }; 151f3c52f01STomislav Denis 152f3c52f01STomislav Denis channel@1 { 153f3c52f01STomislav Denis reg = <1>; 154f3c52f01STomislav Denis }; 155f3c52f01STomislav Denis 156f3c52f01STomislav Denis channel@2 { 157f3c52f01STomislav Denis reg = <2>; 158f3c52f01STomislav Denis ti,gain = <2>; 159f3c52f01STomislav Denis }; 160f3c52f01STomislav Denis 161f3c52f01STomislav Denis channel@3 { 162f3c52f01STomislav Denis reg = <3>; 163f3c52f01STomislav Denis }; 164f3c52f01STomislav Denis 165f3c52f01STomislav Denis channel@4 { 166f3c52f01STomislav Denis reg = <4>; 167f3c52f01STomislav Denis }; 168f3c52f01STomislav Denis 169f3c52f01STomislav Denis channel@5 { 170f3c52f01STomislav Denis reg = <5>; 171f3c52f01STomislav Denis }; 172f3c52f01STomislav Denis 173f3c52f01STomislav Denis channel@6 { 174f3c52f01STomislav Denis reg = <6>; 175f3c52f01STomislav Denis }; 176f3c52f01STomislav Denis 177f3c52f01STomislav Denis channel@7 { 178f3c52f01STomislav Denis reg = <7>; 179f3c52f01STomislav Denis ti,mux = <4>; 180f3c52f01STomislav Denis }; 181f3c52f01STomislav Denis }; 182f3c52f01STomislav Denis }; 183