From: David Lechner <dlechner@baylibre.com>
To: linux-iio@vger.kernel.org
Cc: "David Lechner" <dlechner@baylibre.com>,
"Michael Hennerich" <Michael.Hennerich@analog.com>,
"Jonathan Cameron" <jic23@kernel.org>,
"Rob Herring" <robh+dt@kernel.org>,
"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
"Conor Dooley" <conor+dt@kernel.org>,
"Nuno Sá" <nuno.sa@analog.com>,
"Liam Girdwood" <lgirdwood@gmail.com>,
"Mark Brown" <broonie@kernel.org>,
devicetree@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: [PATCH 1/2] dt-bindings: iio: adc: add ad7944 ADCs
Date: Tue, 6 Feb 2024 11:25:59 -0600 [thread overview]
Message-ID: <20240206-ad7944-mainline-v1-1-bf115fa9474f@baylibre.com> (raw)
In-Reply-To: <20240206-ad7944-mainline-v1-0-bf115fa9474f@baylibre.com>
This adds a new binding for the Analog Devices, Inc. AD7944, AD7985, and
AD7986 ADCs.
Signed-off-by: David Lechner <dlechner@baylibre.com>
---
.../devicetree/bindings/iio/adc/adi,ad7944.yaml | 231 +++++++++++++++++++++
MAINTAINERS | 8 +
2 files changed, 239 insertions(+)
diff --git a/Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml b/Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml
new file mode 100644
index 000000000000..a023adbeba42
--- /dev/null
+++ b/Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml
@@ -0,0 +1,231 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/iio/adc/adi,ad7944.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Analog Devices PulSAR LFCSP Analog to Digital Converters
+
+maintainers:
+ - Michael Hennerich <Michael.Hennerich@analog.com>
+ - Nuno Sá <nuno.sa@analog.com>
+
+description: |
+ A family of pin-compatible single channel differential analog to digital
+ converters with SPI support in a LFCSP package.
+
+ * https://www.analog.com/en/products/ad7944.html
+ * https://www.analog.com/en/products/ad7985.html
+ * https://www.analog.com/en/products/ad7986.html
+
+$ref: /schemas/spi/spi-peripheral-props.yaml#
+
+properties:
+ compatible:
+ enum:
+ - adi,ad7944
+ - adi,ad7985
+ - adi,ad7986
+
+ reg:
+ maxItems: 1
+
+ spi-max-frequency:
+ maximum: 111111111
+
+ spi-cpha: true
+
+ adi,spi-mode:
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [ 3-wire, 4-wire, chain ]
+ default: 4-wire
+ description:
+ This chip can operate in a 3-wire mode where SDI is tied to VIO, a 4-wire
+ mode where SDI acts as the CS line, or a chain mode where SDI of one chip
+ is tied to the SDO of the next chip in the chain and the SDI of the last
+ chip in the chain is tied to GND.
+
+ avdd-supply:
+ description: A 2.5V supply that powers the analog circuitry.
+
+ dvdd-supply:
+ description: A 2.5V supply that powers the digital circuitry.
+
+ vio-supply:
+ description:
+ A 1.8V to 2.7V supply for the digital inputs and outputs.
+
+ bvdd-supply:
+ description:
+ A voltage supply for the buffered power. When using an external reference
+ without an internal buffer (PDREF high, REFIN low), this should be
+ connected to the same supply as ref-supply. Otherwise, when using an
+ internal reference or an external reference with an internal buffer, this
+ is connected to a 5V supply.
+
+ ref-supply:
+ description:
+ Voltage regulator for the reference voltage (REF). This property is
+ omitted when using an internal reference.
+
+ refin-supply:
+ description:
+ Voltage regulator for the reference buffer input (REFIN). When using an
+ external buffer with internal reference, this should be connected to a
+ 1.2V external reference voltage supply.
+
+ adi,reference:
+ $ref: /schemas/types.yaml#/definitions/string
+ enum: [ internal, internal-buffer, external ]
+ default: internal
+ description: |
+ This property is used to specify the reference voltage source.
+
+ * internal: PDREF is wired low. The internal 4.096V reference voltage is
+ used. The REF pin outputs 4.096V and REFIN outputs 1.2V.
+ * internal-buffer: PDREF is wired high. REFIN is supplied with 1.2V. The
+ buffered internal 4.096V reference voltage is used. The REF pin outputs
+ 4.096V.
+ * external: PDREF is wired high and REFIN is wired low. The supply
+ connnected the REF pin is used as the reference voltage.
+
+ cnv-gpios:
+ description:
+ The Convert Input (CNV). This input has multiple functions. It initiates
+ the conversions and selects the SPI mode of the device (chain or CS). In
+ 3-wire mode, this property is omitted if the CNV pin is connected to the
+ CS line of the SPI controller.
+ maxItems: 1
+
+ turbo-gpios:
+ description:
+ GPIO connected to the TURBO line. If omitted, it is assumed that the TURBO
+ line is hard-wired and the state is determined by the adi,always-turbo
+ property.
+ maxItems: 1
+
+ adi,always-turbo:
+ type: boolean
+ description:
+ When present, this property indicates that the TURBO line is hard-wired
+ and the state is always high. If neither this property nor turbo-gpios is
+ present, the TURBO line is assumed to be hard-wired and the state is
+ always low.
+
+ interrupts:
+ description:
+ The SDO pin can also function as a busy indicator. This node should be
+ connected to an interrupt that is triggered when the SDO line goes low
+ while the SDI line is high and the CNV line is low (3-wire mode) or the
+ SDI line is low and the CNV line is high (4-wire mode); or when the SDO
+ line goes high while the SDI and CNV lines are high (chain mode),
+ maxItems: 1
+
+required:
+ - compatible
+ - reg
+ - avdd-supply
+ - dvdd-supply
+ - vio-supply
+ - bvdd-supply
+
+allOf:
+ # ref-supply is only used for external reference voltage
+ - if:
+ not:
+ required:
+ - adi,reference
+ then:
+ properties:
+ ref-supply: false
+ else:
+ if:
+ properties:
+ adi,reference:
+ const: external
+ then:
+ required:
+ - ref-supply
+ else:
+ properties:
+ ref-supply: false
+ # refin-supply is only used for internal buffer reference voltage
+ - if:
+ not:
+ required:
+ - adi,reference
+ then:
+ properties:
+ refin-supply: false
+ else:
+ if:
+ properties:
+ adi,reference:
+ const: internal-buffer
+ then:
+ required:
+ - refin-supply
+ else:
+ properties:
+ refin-supply: false
+ # in 3-wire mode, cnv-gpios is optional, for other modes it is required
+ - if:
+ not:
+ required:
+ - adi,spi-mode
+ then:
+ required:
+ - cnv-gpios
+ else:
+ if:
+ properties:
+ adi,spi-mode:
+ enum: [ 4-wire, chain ]
+ then:
+ required:
+ - cnv-gpios
+ # chain mode doesn't work when TRUBO is enabled
+ - if:
+ properties:
+ adi,spi-mode:
+ const: chain
+ required:
+ - adi,spi-mode
+ then:
+ properties:
+ adi,always-turbo: false
+ # turbo-gpios and adi,always-turbo are mutually exclusive
+ - if:
+ required:
+ - turbo-gpios
+ then:
+ properties:
+ adi,always-turbo: false
+ - if:
+ required:
+ - adi,always-turbo
+ then:
+ properties:
+ turbo-gpios: false
+
+unevaluatedProperties: false
+
+examples:
+ - |
+ #include <dt-bindings/gpio/gpio.h>
+ spi {
+ #address-cells = <1>;
+ #size-cells = <0>;
+ adc@0 {
+ compatible = "adi,ad7944";
+ reg = <0>;
+ spi-cpha;
+ spi-max-frequency = <111111111>;
+ avdd-supply = <&supply_2_5V>;
+ dvdd-supply = <&supply_2_5V>;
+ vio-supply = <&supply_1_8V>;
+ bvdd-supply = <&supply_5V>;
+ cnv-gpios = <&gpio 0 GPIO_ACTIVE_HIGH>;
+ turbo-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
+ };
+ };
diff --git a/MAINTAINERS b/MAINTAINERS
index 00d354af10f5..4f1e658e1e0d 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -451,6 +451,14 @@ W: http://wiki.analog.com/AD7879
W: https://ez.analog.com/linux-software-drivers
F: drivers/input/touchscreen/ad7879.c
+AD7944 ADC DRIVER (AD7944/AD7985/AD7986)
+M: Michael Hennerich <michael.hennerich@analog.com>
+M: Nuno Sá <nuno.sa@analog.com>
+R: David Lechner <dlechner@baylibre.com>
+S: Supported
+W: https://ez.analog.com/linux-software-drivers
+F: Documentation/devicetree/bindings/iio/adc/adi,ad7944.yaml
+
ADAFRUIT MINI I2C GAMEPAD
M: Anshul Dalal <anshulusr@gmail.com>
L: linux-input@vger.kernel.org
--
2.43.0
next prev parent reply other threads:[~2024-02-06 17:26 UTC|newest]
Thread overview: 17+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-02-06 17:25 [PATCH 0/2] iio: adc: ad7944: new driver David Lechner
2024-02-06 17:25 ` David Lechner [this message]
2024-02-06 17:34 ` [PATCH 1/2] dt-bindings: iio: adc: add ad7944 ADCs David Lechner
2024-02-07 17:27 ` Conor Dooley
2024-02-15 13:23 ` Rob Herring
2024-02-15 21:49 ` David Lechner
2024-02-10 17:40 ` Jonathan Cameron
2024-02-11 17:49 ` David Lechner
2024-02-16 14:08 ` Jonathan Cameron
2024-02-06 17:26 ` [PATCH 2/2] iio: adc: ad7944: add driver for AD7944/AD7985/AD7986 David Lechner
2024-02-07 10:10 ` Nuno Sá
2024-02-07 14:19 ` David Lechner
2024-02-08 8:17 ` Nuno Sá
2024-02-10 17:42 ` Jonathan Cameron
2024-02-10 17:47 ` Jonathan Cameron
2024-02-11 17:03 ` David Lechner
2024-02-14 16:13 ` 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=20240206-ad7944-mainline-v1-1-bf115fa9474f@baylibre.com \
--to=dlechner@baylibre.com \
--cc=Michael.Hennerich@analog.com \
--cc=broonie@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=jic23@kernel.org \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=lgirdwood@gmail.com \
--cc=linux-iio@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=nuno.sa@analog.com \
--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