xref: /linux/Documentation/devicetree/bindings/iio/adc/ti,am3359-adc.yaml (revision 4f2c0a4acffbec01079c28f839422e64ddeff004)
1e01152e3SMiquel Raynal# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e01152e3SMiquel Raynal%YAML 1.2
3e01152e3SMiquel Raynal---
4e01152e3SMiquel Raynal$id: http://devicetree.org/schemas/iio/adc/ti,am3359-adc.yaml#
5e01152e3SMiquel Raynal$schema: http://devicetree.org/meta-schemas/core.yaml#
6e01152e3SMiquel Raynal
7e01152e3SMiquel Raynaltitle: TI AM3359 ADC
8e01152e3SMiquel Raynal
9e01152e3SMiquel Raynalmaintainers:
10e01152e3SMiquel Raynal  - Miquel Raynal <miquel.raynal@bootlin.com>
11e01152e3SMiquel Raynal
12e01152e3SMiquel Raynalproperties:
13e01152e3SMiquel Raynal  compatible:
14*857f09f6SKrzysztof Kozlowski    oneOf:
15*857f09f6SKrzysztof Kozlowski      - enum:
16d9d604c7SMiquel Raynal          - ti,am3359-adc
17d9d604c7SMiquel Raynal          - ti,am4372-adc
18*857f09f6SKrzysztof Kozlowski      - items:
19*857f09f6SKrzysztof Kozlowski          - enum:
20*857f09f6SKrzysztof Kozlowski              - ti,am654-adc
21*857f09f6SKrzysztof Kozlowski          - const: ti,am3359-adc
22e01152e3SMiquel Raynal
23e01152e3SMiquel Raynal  '#io-channel-cells':
24e01152e3SMiquel Raynal    const: 1
25e01152e3SMiquel Raynal
26e01152e3SMiquel Raynal  ti,adc-channels:
27e01152e3SMiquel Raynal    description: List of analog inputs available for ADC. AIN0 = 0, AIN1 = 1 and
28e01152e3SMiquel Raynal      so on until AIN7 = 7.
29e01152e3SMiquel Raynal    $ref: /schemas/types.yaml#/definitions/uint32-array
30e01152e3SMiquel Raynal    minItems: 1
31e01152e3SMiquel Raynal    maxItems: 8
32e01152e3SMiquel Raynal
33e01152e3SMiquel Raynal  ti,chan-step-opendelay:
34e01152e3SMiquel Raynal    description: List of open delays for each channel of ADC in the order of
35e01152e3SMiquel Raynal      ti,adc-channels. The value corresponds to the number of ADC clock cycles
36e01152e3SMiquel Raynal      to wait after applying the step configuration registers and before sending
37e01152e3SMiquel Raynal      the start of ADC conversion. Maximum value is 0x3FFFF.
38e01152e3SMiquel Raynal    $ref: /schemas/types.yaml#/definitions/uint32-array
39e01152e3SMiquel Raynal    minItems: 1
40e01152e3SMiquel Raynal    maxItems: 8
41e01152e3SMiquel Raynal
42e01152e3SMiquel Raynal  ti,chan-step-sampledelay:
43e01152e3SMiquel Raynal    description: List of sample delays for each channel of ADC in the order of
44e01152e3SMiquel Raynal      ti,adc-channels. The value corresponds to the number of ADC clock cycles
45e01152e3SMiquel Raynal      to sample (to hold start of conversion high). Maximum value is 0xFF.
46e01152e3SMiquel Raynal    $ref: /schemas/types.yaml#/definitions/uint32-array
47e01152e3SMiquel Raynal    minItems: 1
48e01152e3SMiquel Raynal    maxItems: 8
49e01152e3SMiquel Raynal
50e01152e3SMiquel Raynal  ti,chan-step-avg:
51e01152e3SMiquel Raynal    description: Number of averages to be performed for each channel of ADC. If
52e01152e3SMiquel Raynal      average is 16 (this is also the maximum) then input is sampled 16 times
53e01152e3SMiquel Raynal      and averaged to get more accurate value. This increases the time taken by
54e01152e3SMiquel Raynal      ADC to generate a sample. Maximum value is 16.
55e01152e3SMiquel Raynal    $ref: /schemas/types.yaml#/definitions/uint32-array
56e01152e3SMiquel Raynal    minItems: 1
57e01152e3SMiquel Raynal    maxItems: 8
58e01152e3SMiquel Raynal
59e01152e3SMiquel Raynalrequired:
60e01152e3SMiquel Raynal  - compatible
61e01152e3SMiquel Raynal  - '#io-channel-cells'
62e01152e3SMiquel Raynal  - ti,adc-channels
63e01152e3SMiquel Raynal
64e01152e3SMiquel RaynaladditionalProperties: false
65e01152e3SMiquel Raynal
66e01152e3SMiquel Raynalexamples:
67e01152e3SMiquel Raynal  - |
68e01152e3SMiquel Raynal    adc {
69e01152e3SMiquel Raynal        compatible = "ti,am3359-adc";
70e01152e3SMiquel Raynal        #io-channel-cells = <1>;
71e01152e3SMiquel Raynal        ti,adc-channels = <4 5 6 7>;
72e01152e3SMiquel Raynal        ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
73e01152e3SMiquel Raynal        ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
74e01152e3SMiquel Raynal        ti,chan-step-avg = <16 2 4 8>;
75e01152e3SMiquel Raynal    };
76