[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20240228135532.30761-2-mitrutzceclan@gmail.com>
Date: Wed, 28 Feb 2024 15:54:56 +0200
From: Dumitru Ceclan <mitrutzceclan@...il.com>
To:
Cc: Jonathan Cameron <jic23@...nel.org>,
Rob Herring <robh+dt@...nel.org>,
Krzysztof Kozlowski <krzysztof.kozlowski+dt@...aro.org>,
Conor Dooley <conor+dt@...nel.org>,
David Lechner <dlechner@...libre.com>,
Ceclan Dumitru <dumitru.ceclan@...log.com>,
linux-iio@...r.kernel.org,
devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org,
Dumitru Ceclan <mitrutzceclan@...il.com>
Subject: [PATCH v2 1/2] 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: Dumitru Ceclan <mitrutzceclan@...il.com>
---
.../bindings/iio/adc/adi,ad7173.yaml | 39 +++++++++++++++++--
1 file changed, 36 insertions(+), 3 deletions(-)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
index 36f16a325bc5..7b5bb839fc3e 100644
--- a/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7173.yaml
@@ -21,17 +21,23 @@ description: |
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-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/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/AD7177-2.pdf
properties:
compatible:
enum:
- adi,ad7172-2
+ - adi,ad7172-4
- adi,ad7173-8
- adi,ad7175-2
+ - adi,ad7175-8
- adi,ad7176-2
+ - adi,ad7177-2
reg:
maxItems: 1
@@ -136,8 +142,10 @@ patternProperties:
refout-avss: REFOUT/AVSS (Internal reference)
avdd : AVDD /AVSS
- External reference ref2 only available on ad7173-8.
- If not specified, internal reference used.
+ External reference ref2 only available on ad7173-8 and ad7172-4.
+ Internal reference refout-avss not available on ad7172-4.
+
+ If not specified, internal reference used (if available).
$ref: /schemas/types.yaml#/definitions/string
enum:
- vref
@@ -157,12 +165,15 @@ required:
allOf:
- $ref: /schemas/spi/spi-peripheral-props.yaml#
+ # Only ad7172-4 and ad7173-8 support vref2
- if:
properties:
compatible:
not:
contains:
- const: adi,ad7173-8
+ anyOf:
+ - const: adi,ad7172-4
+ - const: adi,ad7173-8
then:
properties:
vref2-supply: false
@@ -177,6 +188,28 @@ allOf:
reg:
maximum: 3
+ # Model ad7172-4 does not support internal reference
+ # mandatory to have an external reference
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: adi,ad7172-4
+ then:
+ patternProperties:
+ "^channel@[0-9a-f]$":
+ properties:
+ adi,reference-select:
+ enum:
+ - vref
+ - vref2
+ - avdd
+ required:
+ - adi,reference-select
+ oneOf:
+ - required: [vref2-supply]
+ - required: [vref-supply]
+
- if:
anyOf:
- required: [clock-names]
--
2.43.0
Powered by blists - more mailing lists