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,am3359-adc.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006
0007 title: TI AM3359 ADC
0008
0009 maintainers:
0010 - Miquel Raynal <miquel.raynal@bootlin.com>
0011
0012 properties:
0013 compatible:
0014 enum:
0015 - ti,am3359-adc
0016 - ti,am4372-adc
0017
0018 '#io-channel-cells':
0019 const: 1
0020
0021 ti,adc-channels:
0022 description: List of analog inputs available for ADC. AIN0 = 0, AIN1 = 1 and
0023 so on until AIN7 = 7.
0024 $ref: /schemas/types.yaml#/definitions/uint32-array
0025 minItems: 1
0026 maxItems: 8
0027
0028 ti,chan-step-opendelay:
0029 description: List of open delays for each channel of ADC in the order of
0030 ti,adc-channels. The value corresponds to the number of ADC clock cycles
0031 to wait after applying the step configuration registers and before sending
0032 the start of ADC conversion. Maximum value is 0x3FFFF.
0033 $ref: /schemas/types.yaml#/definitions/uint32-array
0034 minItems: 1
0035 maxItems: 8
0036
0037 ti,chan-step-sampledelay:
0038 description: List of sample delays for each channel of ADC in the order of
0039 ti,adc-channels. The value corresponds to the number of ADC clock cycles
0040 to sample (to hold start of conversion high). Maximum value is 0xFF.
0041 $ref: /schemas/types.yaml#/definitions/uint32-array
0042 minItems: 1
0043 maxItems: 8
0044
0045 ti,chan-step-avg:
0046 description: Number of averages to be performed for each channel of ADC. If
0047 average is 16 (this is also the maximum) then input is sampled 16 times
0048 and averaged to get more accurate value. This increases the time taken by
0049 ADC to generate a sample. Maximum value is 16.
0050 $ref: /schemas/types.yaml#/definitions/uint32-array
0051 minItems: 1
0052 maxItems: 8
0053
0054 required:
0055 - compatible
0056 - '#io-channel-cells'
0057 - ti,adc-channels
0058
0059 additionalProperties: false
0060
0061 examples:
0062 - |
0063 adc {
0064 compatible = "ti,am3359-adc";
0065 #io-channel-cells = <1>;
0066 ti,adc-channels = <4 5 6 7>;
0067 ti,chan-step-opendelay = <0x098 0x3ffff 0x098 0x0>;
0068 ti,chan-step-sampledelay = <0xff 0x0 0xf 0x0>;
0069 ti,chan-step-avg = <16 2 4 8>;
0070 };