0001 # SPDX-License-Identifier: GPL-2.0 OR BSD-2-Clause
0002 # Copyright 2019 Marcus Folkesson <marcus.folkesson@gmail.com>
0003 %YAML 1.2
0004 ---
0005 $id: "http://devicetree.org/schemas/iio/adc/microchip,mcp3911.yaml#"
0006 $schema: "http://devicetree.org/meta-schemas/core.yaml#"
0007
0008 title: Microchip MCP3911 Dual channel analog front end (ADC)
0009
0010 maintainers:
0011 - Marcus Folkesson <marcus.folkesson@gmail.com>
0012 - Kent Gustavsson <nedo80@gmail.com>
0013
0014 description: |
0015 Bindings for the Microchip MCP3911 Dual channel ADC device. Datasheet can be
0016 found here: https://ww1.microchip.com/downloads/en/DeviceDoc/20002286C.pdf
0017
0018 properties:
0019 compatible:
0020 enum:
0021 - microchip,mcp3911
0022
0023 reg:
0024 maxItems: 1
0025
0026 spi-max-frequency:
0027 maximum: 20000000
0028
0029 clocks:
0030 description: |
0031 Phandle and clock identifier for external sampling clock.
0032 If not specified, the internal crystal oscillator will be used.
0033 maxItems: 1
0034
0035 interrupts:
0036 description: IRQ line of the ADC
0037 maxItems: 1
0038
0039 microchip,device-addr:
0040 description: Device address when multiple MCP3911 chips are present on the same SPI bus.
0041 $ref: /schemas/types.yaml#/definitions/uint32
0042 enum: [0, 1, 2, 3]
0043 default: 0
0044
0045 vref-supply:
0046 description: |
0047 Phandle to the external reference voltage supply.
0048 If not specified, the internal voltage reference (1.2V) will be used.
0049
0050 required:
0051 - compatible
0052 - reg
0053
0054 additionalProperties: false
0055
0056 examples:
0057 - |
0058 spi {
0059 #address-cells = <1>;
0060 #size-cells = <0>;
0061
0062 adc@0 {
0063 compatible = "microchip,mcp3911";
0064 reg = <0>;
0065 interrupt-parent = <&gpio5>;
0066 interrupts = <15 2>;
0067 spi-max-frequency = <20000000>;
0068 microchip,device-addr = <0>;
0069 vref-supply = <&vref_reg>;
0070 clocks = <&xtal>;
0071 };
0072 };