Commit 88a1ffc6 authored by Dumitru Ceclan's avatar Dumitru Ceclan Committed by Jonathan Cameron

dt-bindings: adc: ad7173: add support for additional models

Add support for: AD7172-2, AD7175-8, AD7177-2.
AD7172-4 does not feature an internal reference, check for external
 reference presence.
Signed-off-by: default avatarDumitru Ceclan <mitrutzceclan@gmail.com>
Reviewed-by: default avatarConor Dooley <conor.dooley@microchip.com>
Link: https://lore.kernel.org/r/20240306110956.13167-2-mitrutzceclan@gmail.comSigned-off-by: default avatarJonathan Cameron <Jonathan.Cameron@huawei.com>
parent 620d1e6c
...@@ -21,17 +21,23 @@ description: | ...@@ -21,17 +21,23 @@ description: |
Datasheets for supported chips: Datasheets for supported chips:
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-2.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7172-4.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7173-8.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-2.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-2.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7175-8.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf https://www.analog.com/media/en/technical-documentation/data-sheets/AD7176-2.pdf
https://www.analog.com/media/en/technical-documentation/data-sheets/AD7177-2.pdf
properties: properties:
compatible: compatible:
enum: enum:
- adi,ad7172-2 - adi,ad7172-2
- adi,ad7172-4
- adi,ad7173-8 - adi,ad7173-8
- adi,ad7175-2 - adi,ad7175-2
- adi,ad7175-8
- adi,ad7176-2 - adi,ad7176-2
- adi,ad7177-2
reg: reg:
maxItems: 1 maxItems: 1
...@@ -136,8 +142,10 @@ patternProperties: ...@@ -136,8 +142,10 @@ patternProperties:
refout-avss: REFOUT/AVSS (Internal reference) refout-avss: REFOUT/AVSS (Internal reference)
avdd : AVDD /AVSS avdd : AVDD /AVSS
External reference ref2 only available on ad7173-8. External reference ref2 only available on ad7173-8 and ad7172-4.
If not specified, internal reference used. Internal reference refout-avss not available on ad7172-4.
If not specified, internal reference used (if available).
$ref: /schemas/types.yaml#/definitions/string $ref: /schemas/types.yaml#/definitions/string
enum: enum:
- vref - vref
...@@ -157,12 +165,17 @@ required: ...@@ -157,12 +165,17 @@ required:
allOf: allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml# - $ref: /schemas/spi/spi-peripheral-props.yaml#
# Only ad7172-4, ad7173-8 and ad7175-8 support vref2
# Other models have [0-3] channel registers
- if: - if:
properties: properties:
compatible: compatible:
not: not:
contains: contains:
const: adi,ad7173-8 enum:
- adi,ad7172-4
- adi,ad7173-8
- adi,ad7175-8
then: then:
properties: properties:
vref2-supply: false vref2-supply: false
...@@ -177,6 +190,26 @@ allOf: ...@@ -177,6 +190,26 @@ allOf:
reg: reg:
maximum: 3 maximum: 3
# Model ad7172-4 does not support internal reference
- if:
properties:
compatible:
contains:
const: adi,ad7172-4
then:
patternProperties:
"^channel@[0-9a-f]$":
properties:
reg:
maximum: 7
adi,reference-select:
enum:
- vref
- vref2
- avdd
required:
- adi,reference-select
- if: - if:
anyOf: anyOf:
- required: [clock-names] - required: [clock-names]
......
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