178 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2# Copyright 2022 Analog Devices Inc.3%YAML 1.24---5$id: http://devicetree.org/schemas/iio/adc/adi,max11410.yaml#6$schema: http://devicetree.org/meta-schemas/core.yaml#7 8title: Analog Devices MAX11410 ADC device driver9 10maintainers:11 - Ibrahim Tilki <Ibrahim.Tilki@analog.com>12 13description: |14 Bindings for the Analog Devices MAX11410 ADC device. Datasheet can be15 found here:16 https://datasheets.maximintegrated.com/en/ds/MAX11410.pdf17 18properties:19 compatible:20 enum:21 - adi,max1141022 23 reg:24 maxItems: 125 26 interrupts:27 minItems: 128 maxItems: 229 30 interrupt-names:31 description: Name of the gpio pin of max11410 used for IRQ32 minItems: 133 items:34 - enum: [gpio0, gpio1]35 - const: gpio136 37 '#address-cells':38 const: 139 40 '#size-cells':41 const: 042 43 avdd-supply:44 description: Optional avdd supply. Used as reference when no explicit reference supplied.45 46 vref0p-supply:47 description: vref0p supply can be used as reference for conversion.48 49 vref1p-supply:50 description: vref1p supply can be used as reference for conversion.51 52 vref2p-supply:53 description: vref2p supply can be used as reference for conversion.54 55 vref0n-supply:56 description: vref0n supply can be used as reference for conversion.57 58 vref1n-supply:59 description: vref1n supply can be used as reference for conversion.60 61 vref2n-supply:62 description: vref2n supply can be used as reference for conversion.63 64 spi-max-frequency:65 maximum: 800000066 67patternProperties:68 "^channel(@[0-9])?$":69 $ref: adc.yaml70 type: object71 description: Represents the external channels which are connected to the ADC.72 73 properties:74 reg:75 description: The channel number in single-ended mode.76 minimum: 077 maximum: 978 79 adi,reference:80 description: |81 Select the reference source to use when converting on82 the specific channel. Valid values are:83 0: VREF0P/VREF0N84 1: VREF1P/VREF1N85 2: VREF2P/VREF2N86 3: AVDD/AGND87 4: VREF0P/AGND88 5: VREF1P/AGND89 6: VREF2P/AGND90 If this field is left empty, AVDD/AGND is selected.91 $ref: /schemas/types.yaml#/definitions/uint3292 enum: [0, 1, 2, 3, 4, 5, 6]93 default: 394 95 adi,input-mode:96 description: |97 Select signal path of input channels. Valid values are:98 0: Buffered, low-power, unity-gain path (default)99 1: Bypass path100 2: PGA path101 $ref: /schemas/types.yaml#/definitions/uint32102 enum: [0, 1, 2]103 default: 0104 105 diff-channels: true106 107 bipolar: true108 109 settling-time-us: true110 111 adi,buffered-vrefp:112 description: Enable buffered mode for positive reference.113 type: boolean114 115 adi,buffered-vrefn:116 description: Enable buffered mode for negative reference.117 type: boolean118 119 required:120 - reg121 122 additionalProperties: false123 124required:125 - compatible126 - reg127 128allOf:129 - $ref: /schemas/spi/spi-peripheral-props.yaml#130 131unevaluatedProperties: false132 133examples:134 - |135 #include <dt-bindings/interrupt-controller/irq.h>136 spi {137 #address-cells = <1>;138 #size-cells = <0>;139 140 adc@0 {141 reg = <0>;142 compatible = "adi,max11410";143 spi-max-frequency = <8000000>;144 145 interrupt-parent = <&gpio>;146 interrupts = <25 IRQ_TYPE_EDGE_FALLING>;147 interrupt-names = "gpio1";148 149 avdd-supply = <&adc_avdd>;150 151 vref1p-supply = <&adc_vref1p>;152 vref1n-supply = <&adc_vref1n>;153 154 #address-cells = <1>;155 #size-cells = <0>;156 157 channel@0 {158 reg = <0>;159 };160 161 channel@1 {162 reg = <1>;163 diff-channels = <2 3>;164 adi,reference = <1>;165 bipolar;166 settling-time-us = <100000>;167 };168 169 channel@2 {170 reg = <2>;171 diff-channels = <7 9>;172 adi,reference = <5>;173 adi,input-mode = <2>;174 settling-time-us = <50000>;175 };176 };177 };178