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 8title: Microchip MCP3911 Dual channel analog front end (ADC) 9 10maintainers: 11 - Marcus Folkesson <marcus.folkesson@gmail.com> 12 - Kent Gustavsson <nedo80@gmail.com> 13 14description: | 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 18properties: 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,device-addr: 40 description: Device address when multiple MCP3911 chips are present on the same SPI bus. 41 allOf: 42 - $ref: /schemas/types.yaml#/definitions/uint32 43 - enum: [0, 1, 2, 3] 44 - default: 0 45 46 vref-supply: 47 description: | 48 Phandle to the external reference voltage supply. 49 If not specified, the internal voltage reference (1.2V) will be used. 50 51required: 52 - compatible 53 - reg 54 55additionalProperties: false 56 57examples: 58 - | 59 spi { 60 #address-cells = <1>; 61 #size-cells = <0>; 62 63 adc@0 { 64 compatible = "microchip,mcp3911"; 65 reg = <0>; 66 interrupt-parent = <&gpio5>; 67 interrupts = <15 2>; 68 spi-max-frequency = <20000000>; 69 microchip,device-addr = <0>; 70 vref-supply = <&vref_reg>; 71 clocks = <&xtal>; 72 }; 73 }; 74