Tom Rini | 6b642ac | 2024-10-01 12:20:28 -0600 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/iio/adc/adi,ad7380.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Analog Devices Simultaneous Sampling Analog to Digital Converters |
| 8 | |
| 9 | maintainers: |
| 10 | - Michael Hennerich <Michael.Hennerich@analog.com> |
| 11 | - Nuno Sá <nuno.sa@analog.com> |
| 12 | |
| 13 | description: | |
| 14 | * https://www.analog.com/en/products/ad7380.html |
| 15 | * https://www.analog.com/en/products/ad7381.html |
| 16 | * https://www.analog.com/en/products/ad7383.html |
| 17 | * https://www.analog.com/en/products/ad7384.html |
| 18 | * https://www.analog.com/en/products/ad7380-4.html |
| 19 | * https://www.analog.com/en/products/ad7381-4.html |
| 20 | * https://www.analog.com/en/products/ad7383-4.html |
| 21 | * https://www.analog.com/en/products/ad7384-4.html |
| 22 | |
| 23 | $ref: /schemas/spi/spi-peripheral-props.yaml# |
| 24 | |
| 25 | properties: |
| 26 | compatible: |
| 27 | enum: |
| 28 | - adi,ad7380 |
| 29 | - adi,ad7381 |
| 30 | - adi,ad7383 |
| 31 | - adi,ad7384 |
| 32 | - adi,ad7380-4 |
| 33 | - adi,ad7381-4 |
| 34 | - adi,ad7383-4 |
| 35 | - adi,ad7384-4 |
| 36 | |
| 37 | reg: |
| 38 | maxItems: 1 |
| 39 | |
| 40 | spi-max-frequency: |
| 41 | maximum: 80000000 |
| 42 | spi-cpol: true |
| 43 | spi-cpha: true |
| 44 | |
| 45 | vcc-supply: |
| 46 | description: A 3V to 3.6V supply that powers the chip. |
| 47 | |
| 48 | vlogic-supply: |
| 49 | description: |
| 50 | A 1.65V to 3.6V supply for the logic pins. |
| 51 | |
| 52 | refio-supply: |
| 53 | description: |
| 54 | A 2.5V to 3.3V supply for the external reference voltage. When omitted, |
| 55 | the internal 2.5V reference is used. |
| 56 | |
| 57 | aina-supply: |
| 58 | description: |
| 59 | The common mode voltage supply for the AINA- pin on pseudo-differential |
| 60 | chips. |
| 61 | |
| 62 | ainb-supply: |
| 63 | description: |
| 64 | The common mode voltage supply for the AINB- pin on pseudo-differential |
| 65 | chips. |
| 66 | |
| 67 | ainc-supply: |
| 68 | description: |
| 69 | The common mode voltage supply for the AINC- pin on pseudo-differential |
| 70 | chips. |
| 71 | |
| 72 | aind-supply: |
| 73 | description: |
| 74 | The common mode voltage supply for the AIND- pin on pseudo-differential |
| 75 | chips. |
| 76 | |
| 77 | interrupts: |
| 78 | description: |
| 79 | When the device is using 1-wire mode, this property is used to optionally |
| 80 | specify the ALERT interrupt. |
| 81 | maxItems: 1 |
| 82 | |
| 83 | required: |
| 84 | - compatible |
| 85 | - reg |
| 86 | - vcc-supply |
| 87 | - vlogic-supply |
| 88 | |
| 89 | unevaluatedProperties: false |
| 90 | |
| 91 | allOf: |
| 92 | # pseudo-differential chips require common mode voltage supplies, |
| 93 | # true differential chips don't use them |
| 94 | - if: |
| 95 | properties: |
| 96 | compatible: |
| 97 | enum: |
| 98 | - adi,ad7383 |
| 99 | - adi,ad7384 |
| 100 | - adi,ad7383-4 |
| 101 | - adi,ad7384-4 |
| 102 | then: |
| 103 | required: |
| 104 | - aina-supply |
| 105 | - ainb-supply |
| 106 | else: |
| 107 | properties: |
| 108 | aina-supply: false |
| 109 | ainb-supply: false |
| 110 | - if: |
| 111 | properties: |
| 112 | compatible: |
| 113 | enum: |
| 114 | - adi,ad7383-4 |
| 115 | - adi,ad7384-4 |
| 116 | then: |
| 117 | required: |
| 118 | - ainc-supply |
| 119 | - aind-supply |
| 120 | else: |
| 121 | properties: |
| 122 | ainc-supply: false |
| 123 | aind-supply: false |
| 124 | |
| 125 | examples: |
| 126 | - | |
| 127 | #include <dt-bindings/interrupt-controller/irq.h> |
| 128 | |
| 129 | spi { |
| 130 | #address-cells = <1>; |
| 131 | #size-cells = <0>; |
| 132 | |
| 133 | adc@0 { |
| 134 | compatible = "adi,ad7380"; |
| 135 | reg = <0>; |
| 136 | |
| 137 | spi-cpol; |
| 138 | spi-cpha; |
| 139 | spi-max-frequency = <80000000>; |
| 140 | |
| 141 | interrupts = <27 IRQ_TYPE_EDGE_FALLING>; |
| 142 | interrupt-parent = <&gpio0>; |
| 143 | |
| 144 | vcc-supply = <&supply_3_3V>; |
| 145 | vlogic-supply = <&supply_3_3V>; |
| 146 | refio-supply = <&supply_2_5V>; |
| 147 | }; |
| 148 | }; |