Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0 |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Analog Devices AD7768-1 ADC device driver |
| 8 | |
| 9 | maintainers: |
| 10 | - Michael Hennerich <michael.hennerich@analog.com> |
| 11 | |
| 12 | description: | |
| 13 | Datasheet at: |
| 14 | https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf |
| 15 | |
| 16 | properties: |
| 17 | compatible: |
| 18 | const: adi,ad7768-1 |
| 19 | |
| 20 | reg: |
| 21 | maxItems: 1 |
| 22 | |
| 23 | clocks: |
| 24 | maxItems: 1 |
| 25 | |
| 26 | clock-names: |
| 27 | const: mclk |
| 28 | |
| 29 | interrupts: |
| 30 | maxItems: 1 |
| 31 | |
| 32 | '#address-cells': |
| 33 | const: 1 |
| 34 | |
| 35 | '#size-cells': |
| 36 | const: 0 |
| 37 | |
| 38 | vref-supply: |
| 39 | description: |
| 40 | ADC reference voltage supply |
| 41 | |
| 42 | adi,sync-in-gpios: |
| 43 | maxItems: 1 |
| 44 | description: |
| 45 | Enables synchronization of multiple devices that require simultaneous |
| 46 | sampling. A pulse is always required if the configuration is changed |
| 47 | in any way, for example if the filter decimation rate changes. |
| 48 | As the line is active low, it should be marked GPIO_ACTIVE_LOW. |
| 49 | |
| 50 | reset-gpios: |
| 51 | maxItems: 1 |
| 52 | |
| 53 | spi-cpol: true |
| 54 | |
| 55 | spi-cpha: true |
| 56 | |
| 57 | "#io-channel-cells": |
| 58 | const: 1 |
| 59 | |
| 60 | required: |
| 61 | - compatible |
| 62 | - reg |
| 63 | - clocks |
| 64 | - clock-names |
| 65 | - vref-supply |
| 66 | - spi-cpol |
| 67 | - spi-cpha |
| 68 | - adi,sync-in-gpios |
| 69 | |
| 70 | patternProperties: |
| 71 | "^channel@([0-9]|1[0-5])$": |
| 72 | type: object |
| 73 | description: | |
| 74 | Represents the external channels which are connected to the device. |
| 75 | |
| 76 | properties: |
| 77 | reg: |
| 78 | maxItems: 1 |
| 79 | description: | |
| 80 | The channel number. |
| 81 | |
| 82 | label: |
| 83 | description: | |
| 84 | Unique name to identify which channel this is. |
| 85 | required: |
| 86 | - reg |
| 87 | additionalProperties: false |
| 88 | |
| 89 | allOf: |
| 90 | - $ref: /schemas/spi/spi-peripheral-props.yaml# |
| 91 | |
| 92 | unevaluatedProperties: false |
| 93 | |
| 94 | examples: |
| 95 | - | |
| 96 | #include <dt-bindings/interrupt-controller/irq.h> |
| 97 | #include <dt-bindings/gpio/gpio.h> |
| 98 | spi { |
| 99 | #address-cells = <1>; |
| 100 | #size-cells = <0>; |
| 101 | |
| 102 | adc@0 { |
| 103 | compatible = "adi,ad7768-1"; |
| 104 | reg = <0>; |
| 105 | spi-max-frequency = <2000000>; |
| 106 | spi-cpol; |
| 107 | spi-cpha; |
| 108 | vref-supply = <&adc_vref>; |
| 109 | interrupts = <25 IRQ_TYPE_EDGE_RISING>; |
| 110 | interrupt-parent = <&gpio>; |
| 111 | adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>; |
| 112 | reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>; |
| 113 | clocks = <&ad7768_mclk>; |
| 114 | clock-names = "mclk"; |
| 115 | |
| 116 | #address-cells = <1>; |
| 117 | #size-cells = <0>; |
| 118 | |
| 119 | channel@0 { |
| 120 | reg = <0>; |
| 121 | label = "channel_0"; |
| 122 | }; |
| 123 | }; |
| 124 | }; |
| 125 | ... |