AD7476 and similar simple SPI ADCs from multiple manufacturers.
Schema identifier ($id): "http://devicetree.org/schemas/iio/adc/adi,ad7476.yaml#"
Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"
Maintainers (maintainers): "Michael Hennerich <michael.hennerich@analog.com>"
A lot of simple SPI ADCs have very straight forward interfaces. They typically don't provide a MOSI pin, simply reading out data on MISO when the clock toggles.
Properties and child nodes (properties) #
compatible — required here #
Exactly one of these rules must match (oneOf) #
Rule 1
Array item rules (
items)Item 1
Allowed values (
enum):"adi,ad7091","adi,ad7091r","adi,ad7273","adi,ad7274","adi,ad7276","adi,ad7277","adi,ad7278","adi,ad7466","adi,ad7467","adi,ad7468","adi,ad7475","adi,ad7476","adi,ad7476a","adi,ad7477","adi,ad7477a","adi,ad7478","adi,ad7478a","adi,ad7495","adi,ad7910","adi,ad7920","adi,ad7940","rohm,bd79105","ti,adc081s","ti,adc101s","ti,adc121s","ti,ads7866","ti,ads7867","ti,ads7868","lltc,ltc2314-14"
Rule 2
Array item rules (
items)Item 1
Exact value (
const):"rohm,bu79100g"Item 2
Exact value (
const):"ti,ads7866"
reg — required here #
Maximum number of items (maxItems): 1
interrupts — not listed as required here #
The data-ready interrupt. Provided via DOUT pin.
Maximum number of items (maxItems): 1
vcc-supply — not listed as required here #
Main powersupply voltage for the chips, sometimes referred to as VDD on datasheets. If there is no separate vref-supply, then this is needed to establish channel scaling.
vdrive-supply — not listed as required here #
Some devices have separate supply for their digital control side.
vref-supply — not listed as required here #
Some devices have a specific reference voltage supplied on a different pin to the other supplies. Needed to be able to establish channel scaling unless there is also an internal reference available (e.g. ad7091r)
adi,conversion-start-gpios — not listed as required here #
A GPIO used to trigger the start of a conversion
Maximum number of items (maxItems): 1
rdy-gpios — not listed as required here #
A GPIO for detecting the data-ready.
Maximum number of items (maxItems): 1
Required in this object (required): "compatible", "reg"
All of these rules must match (allOf) #
Rule 1 #
Shared schema rule (
$ref):/schemas/spi/spi-peripheral-props.yaml#
Rule 2 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Properties and child nodes (
properties)
interrupts— not listed as required here
true— No constraints added by this property rule.When the condition does not match (
else) #Properties and child nodes (
properties)
interrupts— not listed as required here
false— Not permitted by this property rule.
Rule 3 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"adi,ad7091","adi,ad7276","adi,ad7277","adi,ad7278","adi,ad7466","adi,ad7467","adi,ad7468","adi,ad7940","ti,adc081s","ti,adc101s","ti,adc121s","ti,ads7866","ti,ads7868"When the condition matches (
then) #
Rule 4 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"adi,ad7091r","adi,ad7273","adi,ad7274","adi,ad7475","lltc,ltc2314-14","rohm,bd79105"When the condition matches (
then) #Properties and child nodes (
properties)
vref-supply— not listed as required here
false— Not permitted by this property rule.
Rule 5 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"adi,ad7273","adi,ad7274","adi,ad7475","lltc,ltc2314-14","rohm,bd79105"When the condition matches (
then) #
Rule 6 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"adi,ad7475","adi,ad7495","rohm,bd79105"When the condition matches (
then) #Properties and child nodes (
properties)
vdrive-supply— not listed as required here
false— Not permitted by this property rule.
Rule 7 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Properties and child nodes (
properties)
rdy-gpios— not listed as required here
false— Not permitted by this property rule.
Rule 8 #
Condition (
if) #This rule must not match (
not)Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)Allowed values (
enum):"adi,ad7091","adi,ad7091r","rohm,bd79105"When the condition matches (
then) #Properties and child nodes (
properties)
adi,conversion-start-gpios— not listed as required here
false— Not permitted by this property rule.
Rule 9 #
Condition (
if) #Properties and child nodes (
properties)
compatible— not listed as required hereRule for matching array elements (
contains)When the condition matches (
then) #Required in this object (
required):"adi,conversion-start-gpios"
Properties not evaluated by applicable rules (unevaluatedProperties) #
false
Not allowed by this rule.
Examples (examples) #
spi {
#address-cells = <1>;
#size-cells = <0>;
adc@0 {
compatible = "adi,ad7091r";
reg = <0>;
spi-max-frequency = <5000000>;
vcc-supply = <&adc_vcc>;
vref-supply = <&adc_vref>;
};
};
Source notes #
Annotations retained from the schema source
Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
Line 2: Copyright 2019 Analog Devices Inc.
Line 95: Devices with an IRQ
Line 109: Devices where reference is vcc
Line 131: Devices with a vref
Line 147: Devices with a vref where it is not optional
Line 174: Devices which support polling the data-ready via GPIO
Line 199: Devices with a convstart GPIO where it is not optional