summaryrefslogtreecommitdiff
path: root/Documentation/devicetree/bindings/iio/adc/adi,axi-adc.yaml
blob: cf74f84d6103f26604727107802d14a04fb3054e (plain)
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/iio/adc/adi,axi-adc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Analog Devices AXI ADC IP core

maintainers:
  - Michael Hennerich <michael.hennerich@analog.com>

description: |
  Analog Devices Generic AXI ADC IP core for interfacing an ADC device
  with a high speed serial (JESD204B/C) or source synchronous parallel
  interface (LVDS/CMOS).
  Usually, some other interface type (i.e SPI) is used as a control
  interface for the actual ADC, while this IP core will interface
  to the data-lines of the ADC and handle the streaming of data into
  memory via DMA.
  In some cases, the AXI ADC interface is used to perform specialized
  operation to a particular ADC, e.g access the physical bus through
  specific registers to write ADC registers.
  In this case, we use a different compatible which indicates the target
  IP core's name.
  The following IP is currently supported:
    - AXI AD7606x: specialized version of the IP core for all the chips from
      the ad7606 family.

  https://wiki.analog.com/resources/fpga/docs/axi_adc_ip
  https://analogdevicesinc.github.io/hdl/library/axi_ad485x/index.html
  http://analogdevicesinc.github.io/hdl/library/axi_ad7606x/index.html

properties:
  compatible:
    enum:
      - adi,axi-adc-10.0.a
      - adi,axi-ad7606x
      - adi,axi-ad485x

  reg:
    maxItems: 1

  clocks:
    maxItems: 1

  dmas:
    maxItems: 1

  dma-names:
    items:
      - const: rx

  adi,adc-dev:
    $ref: /schemas/types.yaml#/definitions/phandle
    description:
      A reference to a the actual ADC to which this FPGA ADC interfaces to.
    deprecated: true

  '#io-backend-cells':
    const: 0

  '#address-cells':
    const: 1

  '#size-cells':
    const: 0

patternProperties:
  "^adc@[0-9a-f]+$":
    type: object
    properties:
      reg:
        maxItems: 1
    additionalProperties: true
    required:
      - compatible
      - reg

required:
  - compatible
  - dmas
  - reg
  - clocks

allOf:
  - if:
      properties:
        compatible:
          not:
            contains:
              const: adi,axi-ad7606x
    then:
      properties:
        '#address-cells': false
        '#size-cells': false
      patternProperties:
        "^adc@[0-9a-f]+$": false

additionalProperties: false

examples:
  - |
    adc@44a00000 {
        compatible = "adi,axi-adc-10.0.a";
        reg = <0x44a00000 0x10000>;
        dmas = <&rx_dma 0>;
        dma-names = "rx";
        clocks = <&axi_clk>;
        #io-backend-cells = <0>;
    };
  - |
    #include <dt-bindings/gpio/gpio.h>
    parallel_bus_controller@44a00000 {
        compatible = "adi,axi-ad7606x";
        reg = <0x44a00000 0x10000>;
        dmas = <&rx_dma 0>;
        dma-names = "rx";
        clocks = <&ext_clk>;
        #address-cells = <1>;
        #size-cells = <0>;

        adc@0 {
            compatible = "adi,ad7606b";
            reg = <0>;
            pwms = <&axi_pwm_gen 0 0>;
            pwm-names = "convst1";
            avcc-supply = <&adc_vref>;
            vdrive-supply = <&vdd_supply>;
            reset-gpios = <&gpio0 91 GPIO_ACTIVE_HIGH>;
            standby-gpios = <&gpio0 90 GPIO_ACTIVE_LOW>;
            adi,range-gpios = <&gpio0 89 GPIO_ACTIVE_HIGH>;
            adi,oversampling-ratio-gpios = <&gpio0 88 GPIO_ACTIVE_HIGH
                            &gpio0 87 GPIO_ACTIVE_HIGH
                            &gpio0 86 GPIO_ACTIVE_HIGH>;
            io-backends = <&parallel_bus_controller>;
        };
    };
...