GNU Linux-libre 6.1.90-gnu
[releases.git] / Documentation / devicetree / bindings / iio / adc / microchip,mcp3911.yaml
1 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2 # Copyright 2019 Marcus Folkesson <marcus.folkesson@gmail.com>
3 %YAML 1.2
4 ---
5 $id: "http://devicetree.org/schemas/iio/adc/microchip,mcp3911.yaml#"
6 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
7
8 title: Microchip MCP3911 Dual channel analog front end (ADC)
9
10 maintainers:
11   - Marcus Folkesson <marcus.folkesson@gmail.com>
12   - Kent Gustavsson <nedo80@gmail.com>
13
14 description: |
15   Bindings for the Microchip MCP3911 Dual channel ADC device. Datasheet can be
16   found here: https://ww1.microchip.com/downloads/en/DeviceDoc/20002286C.pdf
17
18 properties:
19   compatible:
20     enum:
21       - microchip,mcp3911
22
23   reg:
24     maxItems: 1
25
26   spi-max-frequency:
27     maximum: 20000000
28
29   clocks:
30     description: |
31       Phandle and clock identifier for external sampling clock.
32       If not specified, the internal crystal oscillator will be used.
33     maxItems: 1
34
35   interrupts:
36     description: IRQ line of the ADC
37     maxItems: 1
38
39   microchip,data-ready-hiz:
40     description:
41       Data Ready Pin Inactive State Control
42       true = The DR pin state is high-impedance
43       false = The DR pin state is logic high
44     type: boolean
45
46   microchip,device-addr:
47     description: Device address when multiple MCP3911 chips are present on the same SPI bus.
48     $ref: /schemas/types.yaml#/definitions/uint32
49     enum: [0, 1, 2, 3]
50     default: 0
51
52   vref-supply:
53     description: |
54       Phandle to the external reference voltage supply.
55       If not specified, the internal voltage reference (1.2V) will be used.
56
57 required:
58   - compatible
59   - reg
60
61 allOf:
62   - $ref: /schemas/spi/spi-peripheral-props.yaml#
63
64 unevaluatedProperties: false
65
66 examples:
67   - |
68     spi {
69       #address-cells = <1>;
70       #size-cells = <0>;
71
72       adc@0 {
73         compatible = "microchip,mcp3911";
74         reg = <0>;
75         interrupt-parent = <&gpio5>;
76         interrupts = <15 2>;
77         spi-max-frequency = <20000000>;
78         microchip,device-addr = <0>;
79         vref-supply = <&vref_reg>;
80         clocks = <&xtal>;
81       };
82     };