Path: blob/main/sys/contrib/device-tree/Bindings/iio/adc/adi,ad7124.yaml
48406 views
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)1# Copyright 2019 Analog Devices Inc.2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/adc/adi,ad7124.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#67title: Analog Devices AD7124 ADC device driver89maintainers:10- Stefan Popa <stefan.popa@analog.com>1112description: |13Bindings for the Analog Devices AD7124 ADC device. Datasheet can be14found here:15https://www.analog.com/media/en/technical-documentation/data-sheets/AD7124-8.pdf1617properties:18compatible:19enum:20- adi,ad7124-421- adi,ad7124-82223reg:24description: SPI chip select number for the device25maxItems: 12627clocks:28maxItems: 129description: phandle to the master clock (mclk)3031clock-names:32items:33- const: mclk3435interrupts:36description: IRQ line for the ADC37maxItems: 13839'#address-cells':40const: 14142'#size-cells':43const: 04445refin1-supply:46description: refin1 supply can be used as reference for conversion.4748refin2-supply:49description: refin2 supply can be used as reference for conversion.5051avdd-supply:52description: avdd supply can be used as reference for conversion.5354required:55- compatible56- reg57- clocks58- clock-names59- interrupts6061patternProperties:62"^channel@([0-9]|1[0-5])$":63$ref: adc.yaml64type: object65description: |66Represents the external channels which are connected to the ADC.6768properties:69reg:70description: |71The channel number. It can have up to 8 channels on ad7124-472and 16 channels on ad7124-8, numbered from 0 to 15.73items:74minimum: 075maximum: 157677adi,reference-select:78description: |79Select the reference source to use when converting on80the specific channel. Valid values are:810: REFIN1(+)/REFIN1(−).821: REFIN2(+)/REFIN2(−).833: AVDD84If this field is left empty, internal reference is selected.85$ref: /schemas/types.yaml#/definitions/uint3286enum: [0, 1, 3]8788diff-channels: true8990bipolar: true9192adi,buffered-positive:93description: Enable buffered mode for positive input.94type: boolean9596adi,buffered-negative:97description: Enable buffered mode for negative input.98type: boolean99100required:101- reg102- diff-channels103104additionalProperties: false105106allOf:107- $ref: /schemas/spi/spi-peripheral-props.yaml#108109unevaluatedProperties: false110111examples:112- |113spi {114#address-cells = <1>;115#size-cells = <0>;116117adc@0 {118compatible = "adi,ad7124-4";119reg = <0>;120spi-max-frequency = <5000000>;121interrupts = <25 2>;122interrupt-parent = <&gpio>;123refin1-supply = <&adc_vref>;124clocks = <&ad7124_mclk>;125clock-names = "mclk";126127#address-cells = <1>;128#size-cells = <0>;129130channel@0 {131reg = <0>;132diff-channels = <0 1>;133adi,reference-select = <0>;134adi,buffered-positive;135};136137channel@1 {138reg = <1>;139bipolar;140diff-channels = <2 3>;141adi,reference-select = <0>;142adi,buffered-positive;143adi,buffered-negative;144};145146channel@2 {147reg = <2>;148diff-channels = <4 5>;149};150151channel@3 {152reg = <3>;153diff-channels = <6 7>;154};155};156};157158159