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