1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
2%YAML 1.2
3---
4$id: http://devicetree.org/schemas/iio/adc/microchip,mcp3201.yaml#
5$schema: http://devicetree.org/meta-schemas/core.yaml#
6
7title: Microchip mcp3201 and similar ADCs
8
9maintainers:
10  - Oskar Andero <oskar.andero@gmail.com>
11
12description: |
13   Family of simple ADCs with a SPI interface.
14
15properties:
16  compatible:
17    enum:
18      - microchip,mcp3001
19      - microchip,mcp3002
20      - microchip,mcp3004
21      - microchip,mcp3008
22      - microchip,mcp3201
23      - microchip,mcp3202
24      - microchip,mcp3204
25      - microchip,mcp3208
26      - microchip,mcp3301
27      - microchip,mcp3550-50
28      - microchip,mcp3550-60
29      - microchip,mcp3551
30      - microchip,mcp3553
31
32  reg:
33    maxItems: 1
34
35  spi-max-frequency: true
36  spi-cpha: true
37  spi-cpol: true
38
39  vref-supply:
40    description: External reference.
41
42  "#io-channel-cells":
43    const: 1
44
45dependencies:
46  spi-cpol: [ spi-cpha ]
47  spi-cpha: [ spi-cpol ]
48
49required:
50  - compatible
51  - reg
52  - vref-supply
53
54additionalProperties: false
55
56examples:
57  - |
58    spi {
59        #address-cells = <1>;
60        #size-cells = <0>;
61
62        adc@0 {
63            compatible = "microchip,mcp3002";
64            reg = <0>;
65            vref-supply = <&vref_reg>;
66            spi-cpha;
67            spi-cpol;
68            #io-channel-cells = <1>;
69        };
70        adc@1 {
71            compatible = "microchip,mcp3002";
72            reg = <1>;
73            vref-supply = <&vref_reg>;
74            spi-max-frequency = <1500000>;
75        };
76    };
77...
78