summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/iio/adc/ti,am3359-adc.yaml
blob: b32be24a9f980a43d9caaca5885d25718fea7676 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/ti,am3359-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: TI AM3359 ADC

maintainers:
  - Miquel Raynal <miquel.raynal@bootlin.com>

properties:
  compatible:
    oneOf:
      - enum:
          - ti,am3359-adc
          - ti,am4372-adc
      - items:
          - enum:
              - ti,am654-adc
          - const: ti,am3359-adc

  '#io-channel-cells':
    const: 1

  ti,adc-channels:
    description: List of analog inputs available for ADC. AIN0 = 0, AIN1 = 1 and
      so on until AIN7 = 7.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  ti,chan-step-opendelay:
    description: List of open delays for each channel of ADC in the order of
      ti,adc-channels. The value corresponds to the number of ADC clock cycles
      to wait after applying the step configuration registers and before sending
      the start of ADC conversion. Maximum value is 0x3FFFF.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  ti,chan-step-sampledelay:
    description: List of sample delays for each channel of ADC in the order of
      ti,adc-channels. The value corresponds to the number of ADC clock cycles
      to sample (to hold start of conversion high). Maximum value is 0xFF.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

  ti,chan-step-avg:
    description: Number of averages to be performed for each channel of ADC. If
      average is 16 (this is also the maximum) then input is sampled 16 times
      and averaged to get more accurate value. This increases the time taken by
      ADC to generate a sample. Maximum value is 16.
    $ref: /schemas/types.yaml#/definitions/uint32-array
    minItems: 1
    maxItems: 8

required:
  - compatible
  - '#io-channel-cells'
  - ti,adc-channels

additionalProperties: false

examples:
  - |
    adc {
        compatible = "ti,am3359-adc";
        #io-channel-cells = <1>;
        ti,adc-channels = <4 5 6 7>;
        ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
        ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
        ti,chan-step-avg = <16 2 4 8>;
    };