Back to home page

OSCL-LXR

 
 

    


0001 # SPDX-License-Identifier: GPL-2.0
0002 %YAML 1.2
0003 ---
0004 $id: http://devicetree.org/schemas/iio/adc/adi,ad7768-1.yaml#
0005 $schema: http://devicetree.org/meta-schemas/core.yaml#
0006 
0007 title: Analog Devices AD7768-1 ADC device driver
0008 
0009 maintainers:
0010   - Michael Hennerich <michael.hennerich@analog.com>
0011 
0012 description: |
0013   Datasheet at:
0014     https://www.analog.com/media/en/technical-documentation/data-sheets/ad7768-1.pdf
0015 
0016 properties:
0017   compatible:
0018     const: adi,ad7768-1
0019 
0020   reg:
0021     maxItems: 1
0022 
0023   clocks:
0024     maxItems: 1
0025 
0026   clock-names:
0027     const: mclk
0028 
0029   interrupts:
0030     maxItems: 1
0031 
0032   '#address-cells':
0033     const: 1
0034 
0035   '#size-cells':
0036     const: 0
0037 
0038   vref-supply:
0039     description:
0040       ADC reference voltage supply
0041 
0042   adi,sync-in-gpios:
0043     maxItems: 1
0044     description:
0045       Enables synchronization of multiple devices that require simultaneous
0046       sampling. A pulse is always required if the configuration is changed
0047       in any way, for example if the filter decimation rate changes.
0048       As the line is active low, it should be marked GPIO_ACTIVE_LOW.
0049 
0050   reset-gpios:
0051     maxItems: 1
0052 
0053   spi-max-frequency: true
0054 
0055   spi-cpol: true
0056 
0057   spi-cpha: true
0058 
0059   "#io-channel-cells":
0060     const: 1
0061 
0062 required:
0063   - compatible
0064   - reg
0065   - clocks
0066   - clock-names
0067   - vref-supply
0068   - spi-cpol
0069   - spi-cpha
0070   - adi,sync-in-gpios
0071 
0072 patternProperties:
0073   "^channel@([0-9]|1[0-5])$":
0074     type: object
0075     description: |
0076       Represents the external channels which are connected to the device.
0077 
0078     properties:
0079       reg:
0080         maxItems: 1
0081         description: |
0082           The channel number.
0083 
0084       label:
0085         description: |
0086           Unique name to identify which channel this is.
0087     required:
0088       - reg
0089     additionalProperties: false
0090 
0091 additionalProperties: false
0092 
0093 examples:
0094   - |
0095     #include <dt-bindings/interrupt-controller/irq.h>
0096     #include <dt-bindings/gpio/gpio.h>
0097     spi {
0098         #address-cells = <1>;
0099         #size-cells = <0>;
0100 
0101         adc@0 {
0102             compatible = "adi,ad7768-1";
0103             reg = <0>;
0104             spi-max-frequency = <2000000>;
0105             spi-cpol;
0106             spi-cpha;
0107             vref-supply = <&adc_vref>;
0108             interrupts = <25 IRQ_TYPE_EDGE_RISING>;
0109             interrupt-parent = <&gpio>;
0110             adi,sync-in-gpios = <&gpio 22 GPIO_ACTIVE_LOW>;
0111             reset-gpios = <&gpio 27 GPIO_ACTIVE_LOW>;
0112             clocks = <&ad7768_mclk>;
0113             clock-names = "mclk";
0114 
0115             #address-cells = <1>;
0116             #size-cells = <0>;
0117 
0118             channel@0 {
0119                 reg = <0>;
0120                 label = "channel_0";
0121             };
0122         };
0123     };
0124 ...