Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 1 | # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 | # Copyright 2020 Analog Devices Inc. |
| 3 | %YAML 1.2 |
| 4 | --- |
Fabio Estevam | bc4be55 | 2020-03-27 10:18:25 -0300 | [diff] [blame] | 5 | $id: http://devicetree.org/schemas/iio/dac/adi,ad5770r.yaml# |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 6 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 7 | |
| 8 | title: Analog Devices AD5770R DAC device driver |
| 9 | |
| 10 | maintainers: |
| 11 | - Mircea Caprioru <mircea.caprioru@analog.com> |
| 12 | |
| 13 | description: | |
| 14 | Bindings for the Analog Devices AD5770R current DAC device. Datasheet can be |
| 15 | found here: |
| 16 | https://www.analog.com/media/en/technical-documentation/data-sheets/AD5770R.pdf |
| 17 | |
| 18 | properties: |
| 19 | compatible: |
| 20 | enum: |
| 21 | - adi,ad5770r |
| 22 | |
| 23 | reg: |
| 24 | maxItems: 1 |
| 25 | |
| 26 | avdd-supply: |
| 27 | description: |
| 28 | AVdd voltage supply. Represents two different supplies in the datasheet |
| 29 | that are in fact the same. |
| 30 | |
| 31 | iovdd-supply: |
| 32 | description: |
| 33 | Voltage supply for the chip interface. |
| 34 | |
| 35 | vref-supply: |
| 36 | description: Specify the voltage of the external reference used. |
| 37 | Available reference options are 1.25 V or 2.5 V. If no |
| 38 | external reference declared then the device will use the |
| 39 | internal reference of 1.25 V. |
| 40 | |
| 41 | adi,external-resistor: |
| 42 | description: Specify if an external 2.5k ohm resistor is used. If not |
| 43 | specified the device will use an internal 2.5k ohm resistor. |
| 44 | The precision resistor is used for reference current generation. |
| 45 | type: boolean |
| 46 | |
| 47 | reset-gpios: |
| 48 | description: GPIO spec for the RESET pin. If specified, it will be |
| 49 | asserted during driver probe. |
| 50 | maxItems: 1 |
| 51 | |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 52 | channel@0: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 53 | description: Represents an external channel which are |
| 54 | connected to the DAC. Channel 0 can act both as a current |
| 55 | source and sink. |
| 56 | type: object |
| 57 | |
| 58 | properties: |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 59 | reg: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 60 | description: This represents the channel number. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 61 | const: 0 |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 62 | |
| 63 | adi,range-microamp: |
| 64 | description: Output range of the channel. |
| 65 | oneOf: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 66 | - items: |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 67 | - const: 0 |
| 68 | - const: 300000 |
| 69 | - items: |
| 70 | - const: -60000 |
| 71 | - const: 0 |
| 72 | - items: |
| 73 | - const: -60000 |
| 74 | - const: 300000 |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 75 | |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 76 | channel@1: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 77 | description: Represents an external channel which are |
| 78 | connected to the DAC. |
| 79 | type: object |
| 80 | |
| 81 | properties: |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 82 | reg: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 83 | description: This represents the channel number. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 84 | const: 1 |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 85 | |
| 86 | adi,range-microamp: |
| 87 | description: Output range of the channel. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 88 | items: |
| 89 | - const: 0 |
| 90 | - enum: [ 140000, 250000 ] |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 91 | |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 92 | channel@2: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 93 | description: Represents an external channel which are |
| 94 | connected to the DAC. |
| 95 | type: object |
| 96 | |
| 97 | properties: |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 98 | reg: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 99 | description: This represents the channel number. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 100 | const: 2 |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 101 | |
| 102 | adi,range-microamp: |
| 103 | description: Output range of the channel. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 104 | items: |
| 105 | - const: 0 |
| 106 | - enum: [ 55000, 150000 ] |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 107 | |
| 108 | patternProperties: |
| 109 | "^channel@([3-5])$": |
| 110 | type: object |
| 111 | description: Represents the external channels which are connected to the DAC. |
| 112 | properties: |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 113 | reg: |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 114 | description: This represents the channel number. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 115 | minimum: 3 |
| 116 | maximum: 5 |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 117 | |
| 118 | adi,range-microamp: |
| 119 | description: Output range of the channel. |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 120 | items: |
| 121 | - const: 0 |
| 122 | - enum: [ 45000, 100000 ] |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 123 | |
| 124 | required: |
| 125 | - reg |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 126 | - channel@0 |
| 127 | - channel@1 |
| 128 | - channel@2 |
| 129 | - channel@3 |
| 130 | - channel@4 |
| 131 | - channel@5 |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 132 | |
| 133 | examples: |
| 134 | - | |
| 135 | spi { |
| 136 | #address-cells = <1>; |
| 137 | #size-cells = <0>; |
| 138 | |
| 139 | ad5770r@0 { |
Fabio Estevam | 7d6243a | 2020-03-27 10:18:23 -0300 | [diff] [blame] | 140 | compatible = "adi,ad5770r"; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 141 | reg = <0>; |
| 142 | spi-max-frequency = <1000000>; |
| 143 | vref-supply = <&vref>; |
| 144 | adi,external-resistor; |
| 145 | reset-gpios = <&gpio 22 0>; |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 146 | #address-cells = <1>; |
| 147 | #size-cells = <0>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 148 | |
| 149 | channel@0 { |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 150 | reg = <0>; |
| 151 | adi,range-microamp = <0 300000>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 152 | }; |
| 153 | |
| 154 | channel@1 { |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 155 | reg = <1>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 156 | adi,range-microamp = <0 140000>; |
| 157 | }; |
| 158 | |
| 159 | channel@2 { |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 160 | reg = <2>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 161 | adi,range-microamp = <0 55000>; |
| 162 | }; |
| 163 | |
| 164 | channel@3 { |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 165 | reg = <3>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 166 | adi,range-microamp = <0 45000>; |
| 167 | }; |
| 168 | |
| 169 | channel@4 { |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 170 | reg = <4>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 171 | adi,range-microamp = <0 45000>; |
| 172 | }; |
| 173 | |
| 174 | channel@5 { |
Alexandru Tachici | 2cf3818 | 2020-04-16 14:58:48 +0300 | [diff] [blame] | 175 | reg = <5>; |
Alexandru Tachici | ea52c21 | 2020-02-18 14:10:31 +0200 | [diff] [blame] | 176 | adi,range-microamp = <0 45000>; |
| 177 | }; |
| 178 | }; |
| 179 | }; |
| 180 | ... |