1*6b626eeeSAnshul Dalal# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2*6b626eeeSAnshul Dalal%YAML 1.2 3*6b626eeeSAnshul Dalal--- 4*6b626eeeSAnshul Dalal$id: http://devicetree.org/schemas/iio/dac/microchip,mcp4821.yaml# 5*6b626eeeSAnshul Dalal$schema: http://devicetree.org/meta-schemas/core.yaml# 6*6b626eeeSAnshul Dalal 7*6b626eeeSAnshul Dalaltitle: Microchip MCP4821 and similar DACs 8*6b626eeeSAnshul Dalal 9*6b626eeeSAnshul Dalaldescription: | 10*6b626eeeSAnshul Dalal Supports MCP48x1 (single channel) and MCP48x2 (dual channel) series of DACs. 11*6b626eeeSAnshul Dalal Device supports simplex communication over SPI in Mode 0 and Mode 3. 12*6b626eeeSAnshul Dalal 13*6b626eeeSAnshul Dalal +---------+--------------+-------------+ 14*6b626eeeSAnshul Dalal | Device | Resolution | Channels | 15*6b626eeeSAnshul Dalal |---------|--------------|-------------| 16*6b626eeeSAnshul Dalal | MCP4801 | 8-bit | 1 | 17*6b626eeeSAnshul Dalal | MCP4802 | 8-bit | 2 | 18*6b626eeeSAnshul Dalal | MCP4811 | 10-bit | 1 | 19*6b626eeeSAnshul Dalal | MCP4812 | 10-bit | 2 | 20*6b626eeeSAnshul Dalal | MCP4821 | 12-bit | 1 | 21*6b626eeeSAnshul Dalal | MCP4822 | 12-bit | 2 | 22*6b626eeeSAnshul Dalal +---------+--------------+-------------+ 23*6b626eeeSAnshul Dalal 24*6b626eeeSAnshul Dalal Datasheet: 25*6b626eeeSAnshul Dalal MCP48x1: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf 26*6b626eeeSAnshul Dalal MCP48x2: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf 27*6b626eeeSAnshul Dalal 28*6b626eeeSAnshul Dalalmaintainers: 29*6b626eeeSAnshul Dalal - Anshul Dalal <anshulusr@gmail.com> 30*6b626eeeSAnshul Dalal 31*6b626eeeSAnshul DalalallOf: 32*6b626eeeSAnshul Dalal - $ref: /schemas/spi/spi-peripheral-props.yaml# 33*6b626eeeSAnshul Dalal 34*6b626eeeSAnshul Dalalproperties: 35*6b626eeeSAnshul Dalal compatible: 36*6b626eeeSAnshul Dalal enum: 37*6b626eeeSAnshul Dalal - microchip,mcp4801 38*6b626eeeSAnshul Dalal - microchip,mcp4802 39*6b626eeeSAnshul Dalal - microchip,mcp4811 40*6b626eeeSAnshul Dalal - microchip,mcp4812 41*6b626eeeSAnshul Dalal - microchip,mcp4821 42*6b626eeeSAnshul Dalal - microchip,mcp4822 43*6b626eeeSAnshul Dalal 44*6b626eeeSAnshul Dalal reg: 45*6b626eeeSAnshul Dalal maxItems: 1 46*6b626eeeSAnshul Dalal 47*6b626eeeSAnshul Dalal vdd-supply: true 48*6b626eeeSAnshul Dalal 49*6b626eeeSAnshul Dalal ldac-gpios: 50*6b626eeeSAnshul Dalal description: | 51*6b626eeeSAnshul Dalal Active Low LDAC (Latch DAC Input) pin used to update the DAC output. 52*6b626eeeSAnshul Dalal maxItems: 1 53*6b626eeeSAnshul Dalal 54*6b626eeeSAnshul Dalal powerdown-gpios: 55*6b626eeeSAnshul Dalal description: | 56*6b626eeeSAnshul Dalal Active Low SHDN pin used to enter the shutdown mode. 57*6b626eeeSAnshul Dalal maxItems: 1 58*6b626eeeSAnshul Dalal 59*6b626eeeSAnshul Dalal spi-cpha: true 60*6b626eeeSAnshul Dalal spi-cpol: true 61*6b626eeeSAnshul Dalal 62*6b626eeeSAnshul Dalalrequired: 63*6b626eeeSAnshul Dalal - compatible 64*6b626eeeSAnshul Dalal - reg 65*6b626eeeSAnshul Dalal - vdd-supply 66*6b626eeeSAnshul Dalal 67*6b626eeeSAnshul DalaladditionalProperties: false 68*6b626eeeSAnshul Dalal 69*6b626eeeSAnshul Dalalexamples: 70*6b626eeeSAnshul Dalal - | 71*6b626eeeSAnshul Dalal #include <dt-bindings/gpio/gpio.h> 72*6b626eeeSAnshul Dalal 73*6b626eeeSAnshul Dalal spi { 74*6b626eeeSAnshul Dalal #address-cells = <1>; 75*6b626eeeSAnshul Dalal #size-cells = <0>; 76*6b626eeeSAnshul Dalal 77*6b626eeeSAnshul Dalal dac@0 { 78*6b626eeeSAnshul Dalal compatible = "microchip,mcp4821"; 79*6b626eeeSAnshul Dalal reg = <0>; 80*6b626eeeSAnshul Dalal vdd-supply = <&vdd_regulator>; 81*6b626eeeSAnshul Dalal ldac-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>; 82*6b626eeeSAnshul Dalal powerdown-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>; 83*6b626eeeSAnshul Dalal spi-cpha; 84*6b626eeeSAnshul Dalal spi-cpol; 85*6b626eeeSAnshul Dalal }; 86*6b626eeeSAnshul Dalal }; 87