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,mcp3910 22 - microchip,mcp3911 23 - microchip,mcp3912 24 - microchip,mcp3913 25 - microchip,mcp3914 26 - microchip,mcp3918 27 - microchip,mcp3919 28 29 reg: 30 maxItems: 1 31 32 spi-max-frequency: 33 maximum: 20000000 34 35 reset-gpios: 36 maxItems: 1 37 38 clocks: 39 description: | 40 Phandle and clock identifier for external sampling clock. 41 If not specified, the internal crystal oscillator will be used. 42 maxItems: 1 43 44 interrupts: 45 description: IRQ line of the ADC 46 maxItems: 1 47 48 microchip,data-ready-hiz: 49 description: 50 Data Ready Pin Inactive State Control 51 true = The DR pin state is high-impedance 52 false = The DR pin state is logic high 53 type: boolean 54 55 microchip,device-addr: 56 description: Device address when multiple MCP3911 chips are present on the same SPI bus. 57 $ref: /schemas/types.yaml#/definitions/uint32 58 enum: [0, 1, 2, 3] 59 default: 0 60 61 vref-supply: 62 description: | 63 Phandle to the external reference voltage supply. 64 If not specified, the internal voltage reference (1.2V) will be used. 65 66required: 67 - compatible 68 - reg 69 70allOf: 71 - $ref: /schemas/spi/spi-peripheral-props.yaml# 72 73unevaluatedProperties: false 74 75examples: 76 - | 77 #include <dt-bindings/gpio/gpio.h> 78 spi { 79 #address-cells = <1>; 80 #size-cells = <0>; 81 82 adc@0 { 83 compatible = "microchip,mcp3911"; 84 reg = <0>; 85 interrupt-parent = <&gpio5>; 86 interrupts = <15 2>; 87 reset-gpios = <&gpio1 10 GPIO_ACTIVE_LOW>; 88 spi-max-frequency = <20000000>; 89 microchip,device-addr = <0>; 90 vref-supply = <&vref_reg>; 91 clocks = <&xtal>; 92 }; 93 }; 94