Blame view

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