1*089ec09fSIbrahim Tilki# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*089ec09fSIbrahim Tilki# Copyright 2022 Analog Devices Inc. 3*089ec09fSIbrahim Tilki%YAML 1.2 4*089ec09fSIbrahim Tilki--- 5*089ec09fSIbrahim Tilki$id: http://devicetree.org/schemas/iio/adc/adi,max11410.yaml# 6*089ec09fSIbrahim Tilki$schema: http://devicetree.org/meta-schemas/core.yaml# 7*089ec09fSIbrahim Tilki 8*089ec09fSIbrahim Tilkititle: Analog Devices MAX11410 ADC device driver 9*089ec09fSIbrahim Tilki 10*089ec09fSIbrahim Tilkimaintainers: 11*089ec09fSIbrahim Tilki - Ibrahim Tilki <Ibrahim.Tilki@analog.com> 12*089ec09fSIbrahim Tilki 13*089ec09fSIbrahim Tilkidescription: | 14*089ec09fSIbrahim Tilki Bindings for the Analog Devices MAX11410 ADC device. Datasheet can be 15*089ec09fSIbrahim Tilki found here: 16*089ec09fSIbrahim Tilki https://datasheets.maximintegrated.com/en/ds/MAX11410.pdf 17*089ec09fSIbrahim Tilki 18*089ec09fSIbrahim Tilkiproperties: 19*089ec09fSIbrahim Tilki compatible: 20*089ec09fSIbrahim Tilki enum: 21*089ec09fSIbrahim Tilki - adi,max11410 22*089ec09fSIbrahim Tilki 23*089ec09fSIbrahim Tilki reg: 24*089ec09fSIbrahim Tilki maxItems: 1 25*089ec09fSIbrahim Tilki 26*089ec09fSIbrahim Tilki interrupts: 27*089ec09fSIbrahim Tilki minItems: 1 28*089ec09fSIbrahim Tilki maxItems: 2 29*089ec09fSIbrahim Tilki 30*089ec09fSIbrahim Tilki interrupt-names: 31*089ec09fSIbrahim Tilki description: Name of the gpio pin of max11410 used for IRQ 32*089ec09fSIbrahim Tilki minItems: 1 33*089ec09fSIbrahim Tilki items: 34*089ec09fSIbrahim Tilki - enum: [gpio0, gpio1] 35*089ec09fSIbrahim Tilki - const: gpio1 36*089ec09fSIbrahim Tilki 37*089ec09fSIbrahim Tilki '#address-cells': 38*089ec09fSIbrahim Tilki const: 1 39*089ec09fSIbrahim Tilki 40*089ec09fSIbrahim Tilki '#size-cells': 41*089ec09fSIbrahim Tilki const: 0 42*089ec09fSIbrahim Tilki 43*089ec09fSIbrahim Tilki avdd-supply: 44*089ec09fSIbrahim Tilki description: Optional avdd supply. Used as reference when no explicit reference supplied. 45*089ec09fSIbrahim Tilki 46*089ec09fSIbrahim Tilki vref0p-supply: 47*089ec09fSIbrahim Tilki description: vref0p supply can be used as reference for conversion. 48*089ec09fSIbrahim Tilki 49*089ec09fSIbrahim Tilki vref1p-supply: 50*089ec09fSIbrahim Tilki description: vref1p supply can be used as reference for conversion. 51*089ec09fSIbrahim Tilki 52*089ec09fSIbrahim Tilki vref2p-supply: 53*089ec09fSIbrahim Tilki description: vref2p supply can be used as reference for conversion. 54*089ec09fSIbrahim Tilki 55*089ec09fSIbrahim Tilki vref0n-supply: 56*089ec09fSIbrahim Tilki description: vref0n supply can be used as reference for conversion. 57*089ec09fSIbrahim Tilki 58*089ec09fSIbrahim Tilki vref1n-supply: 59*089ec09fSIbrahim Tilki description: vref1n supply can be used as reference for conversion. 60*089ec09fSIbrahim Tilki 61*089ec09fSIbrahim Tilki vref2n-supply: 62*089ec09fSIbrahim Tilki description: vref2n supply can be used as reference for conversion. 63*089ec09fSIbrahim Tilki 64*089ec09fSIbrahim Tilki spi-max-frequency: 65*089ec09fSIbrahim Tilki maximum: 8000000 66*089ec09fSIbrahim Tilki 67*089ec09fSIbrahim TilkipatternProperties: 68*089ec09fSIbrahim Tilki "^channel(@[0-9])?$": 69*089ec09fSIbrahim Tilki $ref: adc.yaml 70*089ec09fSIbrahim Tilki type: object 71*089ec09fSIbrahim Tilki description: Represents the external channels which are connected to the ADC. 72*089ec09fSIbrahim Tilki 73*089ec09fSIbrahim Tilki properties: 74*089ec09fSIbrahim Tilki reg: 75*089ec09fSIbrahim Tilki description: The channel number in single-ended mode. 76*089ec09fSIbrahim Tilki minimum: 0 77*089ec09fSIbrahim Tilki maximum: 9 78*089ec09fSIbrahim Tilki 79*089ec09fSIbrahim Tilki adi,reference: 80*089ec09fSIbrahim Tilki description: | 81*089ec09fSIbrahim Tilki Select the reference source to use when converting on 82*089ec09fSIbrahim Tilki the specific channel. Valid values are: 83*089ec09fSIbrahim Tilki 0: VREF0P/VREF0N 84*089ec09fSIbrahim Tilki 1: VREF1P/VREF1N 85*089ec09fSIbrahim Tilki 2: VREF2P/VREF2N 86*089ec09fSIbrahim Tilki 3: AVDD/AGND 87*089ec09fSIbrahim Tilki 4: VREF0P/AGND 88*089ec09fSIbrahim Tilki 5: VREF1P/AGND 89*089ec09fSIbrahim Tilki 6: VREF2P/AGND 90*089ec09fSIbrahim Tilki If this field is left empty, AVDD/AGND is selected. 91*089ec09fSIbrahim Tilki $ref: /schemas/types.yaml#/definitions/uint32 92*089ec09fSIbrahim Tilki enum: [0, 1, 2, 3, 4, 5, 6] 93*089ec09fSIbrahim Tilki default: 3 94*089ec09fSIbrahim Tilki 95*089ec09fSIbrahim Tilki adi,input-mode: 96*089ec09fSIbrahim Tilki description: | 97*089ec09fSIbrahim Tilki Select signal path of input channels. Valid values are: 98*089ec09fSIbrahim Tilki 0: Buffered, low-power, unity-gain path (default) 99*089ec09fSIbrahim Tilki 1: Bypass path 100*089ec09fSIbrahim Tilki 2: PGA path 101*089ec09fSIbrahim Tilki $ref: /schemas/types.yaml#/definitions/uint32 102*089ec09fSIbrahim Tilki enum: [0, 1, 2] 103*089ec09fSIbrahim Tilki default: 0 104*089ec09fSIbrahim Tilki 105*089ec09fSIbrahim Tilki diff-channels: true 106*089ec09fSIbrahim Tilki 107*089ec09fSIbrahim Tilki bipolar: true 108*089ec09fSIbrahim Tilki 109*089ec09fSIbrahim Tilki settling-time-us: true 110*089ec09fSIbrahim Tilki 111*089ec09fSIbrahim Tilki adi,buffered-vrefp: 112*089ec09fSIbrahim Tilki description: Enable buffered mode for positive reference. 113*089ec09fSIbrahim Tilki type: boolean 114*089ec09fSIbrahim Tilki 115*089ec09fSIbrahim Tilki adi,buffered-vrefn: 116*089ec09fSIbrahim Tilki description: Enable buffered mode for negative reference. 117*089ec09fSIbrahim Tilki type: boolean 118*089ec09fSIbrahim Tilki 119*089ec09fSIbrahim Tilki required: 120*089ec09fSIbrahim Tilki - reg 121*089ec09fSIbrahim Tilki 122*089ec09fSIbrahim Tilki additionalProperties: false 123*089ec09fSIbrahim Tilki 124*089ec09fSIbrahim Tilkirequired: 125*089ec09fSIbrahim Tilki - compatible 126*089ec09fSIbrahim Tilki - reg 127*089ec09fSIbrahim Tilki 128*089ec09fSIbrahim TilkiallOf: 129*089ec09fSIbrahim Tilki - $ref: /schemas/spi/spi-peripheral-props.yaml# 130*089ec09fSIbrahim Tilki 131*089ec09fSIbrahim TilkiunevaluatedProperties: false 132*089ec09fSIbrahim Tilki 133*089ec09fSIbrahim Tilkiexamples: 134*089ec09fSIbrahim Tilki - | 135*089ec09fSIbrahim Tilki #include <dt-bindings/interrupt-controller/irq.h> 136*089ec09fSIbrahim Tilki spi { 137*089ec09fSIbrahim Tilki #address-cells = <1>; 138*089ec09fSIbrahim Tilki #size-cells = <0>; 139*089ec09fSIbrahim Tilki 140*089ec09fSIbrahim Tilki adc@0 { 141*089ec09fSIbrahim Tilki reg = <0>; 142*089ec09fSIbrahim Tilki compatible = "adi,max11410"; 143*089ec09fSIbrahim Tilki spi-max-frequency = <8000000>; 144*089ec09fSIbrahim Tilki 145*089ec09fSIbrahim Tilki interrupt-parent = <&gpio>; 146*089ec09fSIbrahim Tilki interrupts = <25 IRQ_TYPE_EDGE_FALLING>; 147*089ec09fSIbrahim Tilki interrupt-names = "gpio1"; 148*089ec09fSIbrahim Tilki 149*089ec09fSIbrahim Tilki avdd-supply = <&adc_avdd>; 150*089ec09fSIbrahim Tilki 151*089ec09fSIbrahim Tilki vref1p-supply = <&adc_vref1p>; 152*089ec09fSIbrahim Tilki vref1n-supply = <&adc_vref1n>; 153*089ec09fSIbrahim Tilki 154*089ec09fSIbrahim Tilki #address-cells = <1>; 155*089ec09fSIbrahim Tilki #size-cells = <0>; 156*089ec09fSIbrahim Tilki 157*089ec09fSIbrahim Tilki channel@0 { 158*089ec09fSIbrahim Tilki reg = <0>; 159*089ec09fSIbrahim Tilki }; 160*089ec09fSIbrahim Tilki 161*089ec09fSIbrahim Tilki channel@1 { 162*089ec09fSIbrahim Tilki reg = <1>; 163*089ec09fSIbrahim Tilki diff-channels = <2 3>; 164*089ec09fSIbrahim Tilki adi,reference = <1>; 165*089ec09fSIbrahim Tilki bipolar; 166*089ec09fSIbrahim Tilki settling-time-us = <100000>; 167*089ec09fSIbrahim Tilki }; 168*089ec09fSIbrahim Tilki 169*089ec09fSIbrahim Tilki channel@2 { 170*089ec09fSIbrahim Tilki reg = <2>; 171*089ec09fSIbrahim Tilki diff-channels = <7 9>; 172*089ec09fSIbrahim Tilki adi,reference = <5>; 173*089ec09fSIbrahim Tilki adi,input-mode = <2>; 174*089ec09fSIbrahim Tilki settling-time-us = <50000>; 175*089ec09fSIbrahim Tilki }; 176*089ec09fSIbrahim Tilki }; 177*089ec09fSIbrahim Tilki }; 178