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