Microchip MCP4821 and similar DACs

Schema identifier ($id): "http://devicetree.org/schemas/iio/dac/microchip,mcp4821.yaml#"

Schema dialect ($schema): "http://devicetree.org/meta-schemas/core.yaml#"

Supports MCP48x1 (single channel) and MCP48x2 (dual channel) series of DACs. Device supports simplex communication over SPI in Mode 0 and Mode 3.

+---------+--------------+-------------+ | Device | Resolution | Channels | |---------|--------------|-------------| | MCP4801 | 8-bit | 1 | | MCP4802 | 8-bit | 2 | | MCP4811 | 10-bit | 1 | | MCP4812 | 10-bit | 2 | | MCP4821 | 12-bit | 1 | | MCP4822 | 12-bit | 2 | +---------+--------------+-------------+

Datasheet:
  MCP48x1: https://ww1.microchip.com/downloads/en/DeviceDoc/22244B.pdf
  MCP48x2: https://ww1.microchip.com/downloads/en/DeviceDoc/20002249B.pdf

Maintainers (maintainers): "Anshul Dalal <anshulusr@gmail.com>"

All of these rules must match (allOf) #

Rule 1 #

Shared schema rule ($ref): /schemas/spi/spi-peripheral-props.yaml#

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "microchip,mcp4801", "microchip,mcp4802", "microchip,mcp4811", "microchip,mcp4812", "microchip,mcp4821", "microchip,mcp4822"

reg — required here #

Maximum number of items (maxItems): 1

vdd-supply — required here #

true — No constraints added by this property rule.

ldac-gpios — not listed as required here #

Active Low LDAC (Latch DAC Input) pin used to update the DAC output.

Maximum number of items (maxItems): 1

powerdown-gpios — not listed as required here #

Active Low SHDN pin used to enter the shutdown mode.

Maximum number of items (maxItems): 1

spi-cpha — not listed as required here #

true — No constraints added by this property rule.

spi-cpol — not listed as required here #

true — No constraints added by this property rule.

Required in this object (required): "compatible", "reg", "vdd-supply"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

#include <dt-bindings/gpio/gpio.h>

spi {
    #address-cells = <1>;
    #size-cells = <0>;

    dac@0 {
        compatible = "microchip,mcp4821";
        reg = <0>;
        vdd-supply = <&vdd_regulator>;
        ldac-gpios = <&gpio0 1 GPIO_ACTIVE_HIGH>;
        powerdown-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;
        spi-cpha;
        spi-cpol;
    };
};

Source notes #

Annotations retained from the schema source

Line 1: SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)

Edit this page