xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/iio/adc/microchip,mcp3911.yaml (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun# SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
2*4882a593Smuzhiyun# Copyright 2019 Marcus Folkesson <marcus.folkesson@gmail.com>
3*4882a593Smuzhiyun%YAML 1.2
4*4882a593Smuzhiyun---
5*4882a593Smuzhiyun$id: "http://devicetree.org/schemas/iio/adc/microchip,mcp3911.yaml#"
6*4882a593Smuzhiyun$schema: "http://devicetree.org/meta-schemas/core.yaml#"
7*4882a593Smuzhiyun
8*4882a593Smuzhiyuntitle: Microchip MCP3911 Dual channel analog front end (ADC)
9*4882a593Smuzhiyun
10*4882a593Smuzhiyunmaintainers:
11*4882a593Smuzhiyun  - Marcus Folkesson <marcus.folkesson@gmail.com>
12*4882a593Smuzhiyun  - Kent Gustavsson <nedo80@gmail.com>
13*4882a593Smuzhiyun
14*4882a593Smuzhiyundescription: |
15*4882a593Smuzhiyun  Bindings for the Microchip MCP3911 Dual channel ADC device. Datasheet can be
16*4882a593Smuzhiyun  found here: https://ww1.microchip.com/downloads/en/DeviceDoc/20002286C.pdf
17*4882a593Smuzhiyun
18*4882a593Smuzhiyunproperties:
19*4882a593Smuzhiyun  compatible:
20*4882a593Smuzhiyun    enum:
21*4882a593Smuzhiyun      - microchip,mcp3911
22*4882a593Smuzhiyun
23*4882a593Smuzhiyun  reg:
24*4882a593Smuzhiyun    maxItems: 1
25*4882a593Smuzhiyun
26*4882a593Smuzhiyun  spi-max-frequency:
27*4882a593Smuzhiyun    maximum: 20000000
28*4882a593Smuzhiyun
29*4882a593Smuzhiyun  clocks:
30*4882a593Smuzhiyun    description: |
31*4882a593Smuzhiyun      Phandle and clock identifier for external sampling clock.
32*4882a593Smuzhiyun      If not specified, the internal crystal oscillator will be used.
33*4882a593Smuzhiyun    maxItems: 1
34*4882a593Smuzhiyun
35*4882a593Smuzhiyun  interrupts:
36*4882a593Smuzhiyun    description: IRQ line of the ADC
37*4882a593Smuzhiyun    maxItems: 1
38*4882a593Smuzhiyun
39*4882a593Smuzhiyun  microchip,device-addr:
40*4882a593Smuzhiyun    description: Device address when multiple MCP3911 chips are present on the same SPI bus.
41*4882a593Smuzhiyun    $ref: /schemas/types.yaml#/definitions/uint32
42*4882a593Smuzhiyun    enum: [0, 1, 2, 3]
43*4882a593Smuzhiyun    default: 0
44*4882a593Smuzhiyun
45*4882a593Smuzhiyun  vref-supply:
46*4882a593Smuzhiyun    description: |
47*4882a593Smuzhiyun      Phandle to the external reference voltage supply.
48*4882a593Smuzhiyun      If not specified, the internal voltage reference (1.2V) will be used.
49*4882a593Smuzhiyun
50*4882a593Smuzhiyunrequired:
51*4882a593Smuzhiyun  - compatible
52*4882a593Smuzhiyun  - reg
53*4882a593Smuzhiyun
54*4882a593SmuzhiyunadditionalProperties: false
55*4882a593Smuzhiyun
56*4882a593Smuzhiyunexamples:
57*4882a593Smuzhiyun  - |
58*4882a593Smuzhiyun    spi {
59*4882a593Smuzhiyun      #address-cells = <1>;
60*4882a593Smuzhiyun      #size-cells = <0>;
61*4882a593Smuzhiyun
62*4882a593Smuzhiyun      adc@0 {
63*4882a593Smuzhiyun        compatible = "microchip,mcp3911";
64*4882a593Smuzhiyun        reg = <0>;
65*4882a593Smuzhiyun        interrupt-parent = <&gpio5>;
66*4882a593Smuzhiyun        interrupts = <15 2>;
67*4882a593Smuzhiyun        spi-max-frequency = <20000000>;
68*4882a593Smuzhiyun        microchip,device-addr = <0>;
69*4882a593Smuzhiyun        vref-supply = <&vref_reg>;
70*4882a593Smuzhiyun        clocks = <&xtal>;
71*4882a593Smuzhiyun      };
72*4882a593Smuzhiyun    };
73