Microchip MCP346X and MCP356X ADC Family

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

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

Maintainers (maintainers): "Marius Cristea <marius.cristea@microchip.com>"

Bindings for the Microchip family of 153.6 ksps, Low-Noise 16/24-Bit
Delta-Sigma ADCs with an SPI interface. Datasheet can be found here:
Datasheet for MCP3561, MCP3562, MCP3564 can be found here:
  https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP3561-2-4-Family-Data-Sheet-DS20006181C.pdf
Datasheet for MCP3561R, MCP3562R, MCP3564R can be found here:
  https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3561_2_4R-Data-Sheet-DS200006391C.pdf
Datasheet for MCP3461, MCP3462, MCP3464 can be found here:
  https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4-Two-Four-Eight-Channel-153.6-ksps-Low-Noise-16-Bit-Delta-Sigma-ADC-Data-Sheet-20006180D.pdf
Datasheet for MCP3461R, MCP3462R, MCP3464R can be found here:
  https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4R-Family-Data-Sheet-DS20006404C.pdf

Properties and child nodes (properties) #

compatible — required here #

Allowed values (enum): "microchip,mcp3461", "microchip,mcp3462", "microchip,mcp3464", "microchip,mcp3461r", "microchip,mcp3462r", "microchip,mcp3464r", "microchip,mcp3561", "microchip,mcp3562", "microchip,mcp3564", "microchip,mcp3561r", "microchip,mcp3562r", "microchip,mcp3564r"

reg — required here #

Maximum number of items (maxItems): 1

spi-max-frequency — required here #

Maximum value (maximum): 20000000

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.

vdd-supply — not listed as required here #

true — No constraints added by this property rule.

avdd-supply — not listed as required here #

true — No constraints added by this property rule.

clocks — not listed as required here #

Phandle and clock identifier for external sampling clock. If not specified, the internal crystal oscillator will be used.

Maximum number of items (maxItems): 1

interrupts — not listed as required here #

IRQ line of the ADC

Maximum number of items (maxItems): 1

drive-open-drain — not listed as required here #

Whether to drive the IRQ signal as push-pull (default) or open-drain. Note that the device requires this pin to become "high", otherwise it will stop converting.

Value type (type): "boolean"

vref-supply — not listed as required here #

Some devices have a specific reference voltage supplied on a different pin to the other supplies. Needed to be able to establish channel scaling unless there is also an internal reference available (e.g. mcp3564r). In case of "r" devices (e. g. mcp3564r), if it does not exists the internal reference will be used.

microchip,hw-device-address — required here #

Shared schema rule ($ref): /schemas/types.yaml#/definitions/uint32

Minimum value (minimum): 0

Maximum value (maximum): 3

The address is set on a per-device basis by fuses in the factory, configured on request. If not requested, the fuses are set for 0x1. The device address is part of the device markings to avoid potential confusion. This address is coded on two bits, so four possible addresses are available when multiple devices are present on the same SPI bus with only one Chip Select line for all devices. Each device communication starts by a CS falling edge, followed by the clocking of the device address (BITS[7:6] - top two bits of COMMAND BYTE which is first one on the wire).

#io-channel-cells — not listed as required here #

Exact value (const): 1

#address-cells — not listed as required here #

Exact value (const): 1

#size-cells — not listed as required here #

Exact value (const): 0

Properties matching a name pattern (patternProperties) #

^channel@([0-9]|([1-7][0-9]))$ — name matches this regular expression #

Shared schema rule ($ref): adc.yaml

Value type (type): "object"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Represents the external channels which are connected to the ADC.

Properties and child nodes (properties) #

reg — required here

The channel number in single-ended and differential mode.

Minimum value (minimum): 0

Maximum value (maximum): 79

Required in this object (required): "reg"

Property dependencies (dependencies) #

spi-cpol — applies when this property is present #

Also requires: "spi-cpha"

spi-cpha — applies when this property is present #

Also requires: "spi-cpol"

Required in this object (required): "compatible", "reg", "microchip,hw-device-address", "spi-max-frequency"

All of these rules must match (allOf) #

Rule 1 #

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

Rule 2 #

Condition (if) #

Properties and child nodes (properties)

compatible — not listed as required here

Rule for matching array elements (contains)

Allowed values (enum): "microchip,mcp3461", "microchip,mcp3462", "microchip,mcp3464", "microchip,mcp3561", "microchip,mcp3562", "microchip,mcp3564"

When the condition matches (then) #

Required in this object (required): "vref-supply"

Properties not evaluated by applicable rules (unevaluatedProperties) #

false

Not allowed by this rule.

Examples (examples) #

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

    adc@0 {
        compatible = "microchip,mcp3564r";
        reg = <0>;
        vref-supply = <&vref_reg>;
        spi-cpha;
        spi-cpol;
        spi-max-frequency = <10000000>;
        microchip,hw-device-address = <1>;

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

        channel@0 {
            /* CH0 to AGND */
            reg = <0>;
            label = "CH0";
        };

        channel@1 {
            /* CH1 to AGND */
            reg = <1>;
            label = "CH1";
        };

        /* diff-channels */
        channel@11 {
            reg = <11>;

            /* CN0, CN1 */
            diff-channels = <0 1>;
            label = "CH0_CH1";
        };

        channel@22 {
            reg = <0x22>;

            /* CN1, CN2 */
            diff-channels = <1 2>;
            label = "CH1_CH3";
        };

        channel@23 {
            reg = <0x23>;

            /* CN1, CN3 */
            diff-channels = <1 3>;
            label = "CH1_CH3";
        };
    };
};

Source notes #

Annotations retained from the schema source

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

Line 131: External vref, no internal reference

Edit this page