From: Ciprian Regus <ciprian.regus@analog.com>
To: <jic23@kernel.org>, <krzysztof.kozlowski+dt@linaro.org>,
<robh+dt@kernel.org>, <andriy.shevchenko@linux.intel.com>,
<linux-kernel@vger.kernel.org>, <linux-iio@vger.kernel.org>,
<devicetree@vger.kernel.org>
Cc: Ciprian Regus <ciprian.regus@analog.com>
Subject: [PATCH 1/2] dt-bindings: iio: dac: add adi,ad5754.yaml
Date: Tue, 4 Oct 2022 10:18:24 +0300 [thread overview]
Message-ID: <20221004071825.791307-2-ciprian.regus@analog.com> (raw)
In-Reply-To: <20221004071825.791307-1-ciprian.regus@analog.com>
Add devicetree bindings documentation for the AD5754 DAC driver.
Signed-off-by: Ciprian Regus <ciprian.regus@analog.com>
---
.../bindings/iio/dac/adi,ad5754.yaml | 173 ++++++++++++++++++
1 file changed, 173 insertions(+)
create mode 100644 Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml
diff --git a/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml
new file mode 100644
index 000000000000..e96112bc15d0
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/dac/adi,ad5754.yaml
@@ -0,0 +1,173 @@
+# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/dac/adi,ad5754.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices AD5754 DAC device driver
+
+maintainers:
+ - Ciprian Regus <ciprian.regus@analog.com>
+
+description: |
+ Bindings for the AD5754 and other chip variants digital-to-analog
+ converters.
+
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD5724_5734_5754.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad5722_5732_5752.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/ad5724r_5734r_5754r.pdf
+ https://www.analog.com/media/en/technical-documentation/data-sheets/AD5722R_5732R_5752R.pdf
+
+properties:
+ compatible:
+ enum:
+ - adi,ad5722
+ - adi,ad5732
+ - adi,ad5752
+ - adi,ad5724
+ - adi,ad5734
+ - adi,ad5754
+ - adi,ad5722r
+ - adi,ad5732r
+ - adi,ad5752r
+ - adi,ad5724r
+ - adi,ad5734r
+ - adi,ad5754r
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 30000000
+
+ spi-cpol: true
+
+ vref-supply:
+ description:
+ The regulator to use as an external reference. If this is not provided,
+ the internal reference will be used for chips that have this feature.
+ The external reference must be 2.5V.
+
+ '#address-cells':
+ const: 1
+
+ '#size-cells':
+ const: 0
+
+patternProperties:
+ "^channel@([0-3])$":
+ type: object
+ description: Configurations for the DAC channels
+
+ properties:
+ reg:
+ description: Channel number
+ maxItems: 1
+
+ output-range-microvolt:
+ description: |
+ Voltage range of a channel as <minimum, maximum>.
+ oneOf:
+ - items:
+ - const: 0
+ - enum: [5000000, 10000000, 10800000]
+ - items:
+ - const: -5000000
+ - const: 5000000
+ - items:
+ - const: -10000000
+ - const: 10000000
+ - items:
+ - const: -10800000
+ - const: 10800000
+
+ required:
+ - reg
+ - output-range-microvolt
+
+allOf:
+ - $ref: /schemas/spi/spi-peripheral-props.yaml#
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad5722
+ - adi,ad5732
+ - adi,ad5752
+ - adi,ad5722r
+ - adi,ad5732r
+ - adi,ad5752r
+ then:
+ patternProperties:
+ "^channel@([0-3])$":
+ type: object
+ properties:
+ reg:
+ description: Channel number
+ enum: [0, 1]
+
+ - if:
+ properties:
+ compatible:
+ contains:
+ enum:
+ - adi,ad5724
+ - adi,ad5734
+ - adi,ad5754
+ - adi,ad5724r
+ - adi,ad5734r
+ - adi,ad5754r
+ then:
+ patternProperties:
+ "^channel@([0-3])$":
+ type: object
+ properties:
+ reg:
+ description: Channel number
+ enum: [0, 1, 2, 3]
+
+required:
+ - compatible
+ - reg
+ - spi-max-frequency
+ - spi-cpol
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ spi {
+ status = "okay";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ dac@0 {
+ compatible = "adi,ad5754r";
+ reg = <0>;
+ spi-max-frequency = <1000000>;
+ spi-cpol;
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ channel@0 {
+ reg = <0>;
+ output-range-microvolt = <0 5000000>;
+ };
+ channel@1 {
+ reg = <1>;
+ output-range-microvolt = <0 5000000>;
+ };
+ channel@2 {
+ reg = <2>;
+ output-range-microvolt = <0 5000000>;
+ };
+ channel@3 {
+ reg = <3>;
+ output-range-microvolt = <0 5000000>;
+ };
+ };
+ };
--
2.30.2
next prev parent reply other threads:[~2022-10-04 7:21 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-10-04 7:18 [PATCH 0/2] Add support for the AD5754 DAC Ciprian Regus
2022-10-04 7:18 ` Ciprian Regus [this message]
2022-10-04 11:26 ` [PATCH 1/2] dt-bindings: iio: dac: add adi,ad5754.yaml Krzysztof Kozlowski
2022-10-04 7:18 ` [PATCH 2/2] drivers: iio: dac: Add AD5754 DAC driver Ciprian Regus
2022-10-04 8:40 ` Marcus Folkesson
2022-10-04 8:50 ` Andy Shevchenko
2022-10-09 17:09 ` Jonathan Cameron
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20221004071825.791307-2-ciprian.regus@analog.com \
--to=ciprian.regus@analog.com \
--cc=andriy.shevchenko@linux.intel.com \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=robh+dt@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox