Commit 8d71a5d8 authored by Guillaume Stols's avatar Guillaume Stols Committed by Jonathan Cameron

dt-bindings: iio: adc: adi,ad7606: add conditions

Since the driver supports several parts that present differences in
their layout and behaviour, it is necessary to describe the differences
from one chip to another.
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Signed-off-by: default avatarGuillaume Stols <gstols@baylibre.com>
Signed-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 746bb410
...@@ -52,10 +52,11 @@ properties: ...@@ -52,10 +52,11 @@ properties:
adi,conversion-start-gpios: adi,conversion-start-gpios:
description: description:
Must be the device tree identifier of the CONVST pin. This logic input is Must be the device tree identifier of the CONVST pin(s). This logic input
used to initiate conversions on the analog input channels. As the line is is used to initiate conversions on the analog input channels. As the line
active high, it should be marked GPIO_ACTIVE_HIGH. is active high, it should be marked GPIO_ACTIVE_HIGH.
maxItems: 1 minItems: 1
maxItems: 2
reset-gpios: reset-gpios:
description: description:
...@@ -88,8 +89,11 @@ properties: ...@@ -88,8 +89,11 @@ properties:
is tied to a logic high, the analog input range is ±10V for all channels. is tied to a logic high, the analog input range is ±10V for all channels.
On the AD760X, if this pin is tied to a logic low, the analog input range On the AD760X, if this pin is tied to a logic low, the analog input range
is ±5V for all channels. As the line is active high, it should be marked is ±5V for all channels. As the line is active high, it should be marked
GPIO_ACTIVE_HIGH. GPIO_ACTIVE_HIGH. On the AD7616, there are 2 pins, and if the 2 pins are
maxItems: 1 tied to a logic high, software mode is enabled, otherwise one of the 3
possible range values is selected.
minItems: 1
maxItems: 2
adi,oversampling-ratio-gpios: adi,oversampling-ratio-gpios:
description: description:
...@@ -122,6 +126,50 @@ required: ...@@ -122,6 +126,50 @@ required:
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml# - $ref: /schemas/spi/spi-peripheral-props.yaml#
- if:
properties:
compatible:
contains:
const: adi,ad7616
then:
properties:
adi,first-data-gpios: false
standby-gpios: false
adi,range-gpios:
maxItems: 2
else:
properties:
adi,range-gpios:
maxItems: 1
- if:
properties:
compatible:
contains:
enum:
- adi,ad7605-4
- adi,ad7616
then:
properties:
adi,oversampling-ratio-gpios: false
- if:
properties:
compatible:
contains:
enum:
- adi,ad7605-4
- adi,ad7606-4
- adi,ad7606-6
- adi,ad7606-8
then:
properties:
adi,sw-mode: false
else:
properties:
adi,conversion-start-gpios:
maxItems: 1
unevaluatedProperties: false unevaluatedProperties: false
examples: examples:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment