dt-bindings: iio: adc: adi,ad7816: add binding for AD7816/7/8
Subsystems (3)
PATCH v2 1/1 dt-bindings: iio: adc: adi,ad7816: add binding for AD7816/7/8
Add device tree binding documentation for Analog Devices AD7816, AD7817 and AD7818 10-bit ADC with on-chip temperature sensor.
The devices communicate over SPI and expose:
- up to 4 analog input channels (AD7817)
- on-chip temperature sensor
- a busy GPIO to signal ongoing conversion
--- .../bindings/iio/adc/adi,ad7816.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml
Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml new file +64 -0
@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7816.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7816/AD7817/AD7818 temperature sensor and ADC + +maintainers: + - Michael Hennerich <[email protected]> + +description: | + The AD7816/AD7817/AD7818 are 10-bit analog to digital converters + with an on-chip temperature sensor. They communicate over SPI bus + and are commonly used in robotics and industrial applications for + temperature monitoring and analog signal conversion. + + Specifications on the converters can be found at: + AD7816: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7816.pdf + AD7817: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7817.pdf + AD7818: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7818.pdf + +properties: + compatible: + enum: + - adi,ad7816 + - adi,ad7817 + - adi,ad7818 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 1000000 + + busy-gpios: + description: + GPIO connected to the busy pin of the AD7816/7/8. + The line is active high and indicates the chip is + performing a conversion. + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + spi { + #address-cells = <1>; + #size-cells = <0>; + adc@0 { + compatible = "adi,ad7816"; + reg = <0>; + spi-max-frequency = <1000000>; + busy-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + };
Signature · 1 line
2.53.0
Jonathan Cameron
maintainerQuoted 10 lines · On Tue, 21 Apr 2026 11:30:11 +0530 Sudharshan <[email protected]> wrote:
Add device tree binding documentation for Analog Devices AD7816, AD7817 and AD7818 10-bit ADC with on-chip temperature sensor.
The devices communicate over SPI and expose:
- up to 4 analog input channels (AD7817)
- on-chip temperature sensor
- a busy GPIO to signal ongoing conversionSigned-off-by Sudharshan <[email protected]>---
I'm a little confused on why this is v2 as I can't find v1 and there is no change log here.
There are various things missing. I'm not even sure you could make the chip work with the subset represented here. Note bindings should be as complete as possible even if the current driver doesn't use everything.
Quoted 39 lines
.../bindings/iio/adc/adi,ad7816.yaml | 64 +++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 Documentation/devicetree/bindings/iio/adc/adi,ad7816.yamlDocumentation/devicetree/bindings/iio/adc/adi,ad7816.yaml new file +29
-0@@ -0,0 +1,64 @@ +# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/iio/adc/adi,ad7816.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Analog Devices AD7816/AD7817/AD7818 temperature sensor and ADC + +maintainers: + - Michael Hennerich <[email protected]> + +description: | + The AD7816/AD7817/AD7818 are 10-bit analog to digital converters + with an on-chip temperature sensor. They communicate over SPI bus + and are commonly used in robotics and industrial applications for + temperature monitoring and analog signal conversion. + + Specifications on the converters can be found at: + AD7816: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7816.pdf + AD7817: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7817.pdf + AD7818: + https://www.analog.com/media/en/technical-documentation/data-sheets/AD7818.pdf + +properties: + compatible: + enum: + - adi,ad7816
Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml line 39
Quoted 10 lines
Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml new file +10
-0+ - adi,ad7817 + - adi,ad7818 + + reg: + maxItems: 1 + + spi-max-frequency: + maximum: 1000000 + + busy-gpios:
The data sheet calls out he most likely use of this which is not sensing when it is busy but:
"The signal can be used to interrupt a microcontroller when a conversion has finished." That is how it is used in the driver in staging which reinforces that view. So make this one an interrupt.
However, there are other pins... For instance the !CONVST signal which I think is best represented as a gpio. There also seems to be a rd/!wr pin which you don't have in this binding.
Hence this is far from complete and you should go take another look. Also included power supplies which should be 'required' in the binding if they are needed for the chip to work (at least some always are!) even if the driver currently doesn't turn them on and off.
Thanks,
Jonathan
Quoted 25 lines
Documentation/devicetree/bindings/iio/adc/adi,ad7816.yaml new file +25
-0+ description: + GPIO connected to the busy pin of the AD7816/7/8. + The line is active high and indicates the chip is + performing a conversion. + maxItems: 1 + +required: + - compatible + - reg + +additionalProperties: false + +examples: + - | + #include <dt-bindings/gpio/gpio.h> + spi { + #address-cells = <1>; + #size-cells = <0>; + adc@0 { + compatible = "adi,ad7816"; + reg = <0>; + spi-max-frequency = <1000000>; + busy-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>; + }; + };