brintos

brintos / linux-shallow public Read only

0
0
Text · 5.7 KiB · 6753192 Raw
206 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/iio/adc/microchip,mcp3564.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Microchip MCP346X and MCP356X ADC Family8 9maintainers:10  - Marius Cristea <marius.cristea@microchip.com>11 12description: |13  Bindings for the Microchip family of 153.6 ksps, Low-Noise 16/24-Bit14  Delta-Sigma ADCs with an SPI interface. Datasheet can be found here:15  Datasheet for MCP3561, MCP3562, MCP3564 can be found here:16    https://ww1.microchip.com/downloads/aemDocuments/documents/MSLD/ProductDocuments/DataSheets/MCP3561-2-4-Family-Data-Sheet-DS20006181C.pdf17  Datasheet for MCP3561R, MCP3562R, MCP3564R can be found here:18    https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3561_2_4R-Data-Sheet-DS200006391C.pdf19  Datasheet for MCP3461, MCP3462, MCP3464 can be found here:20    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.pdf21  Datasheet for MCP3461R, MCP3462R, MCP3464R can be found here:22    https://ww1.microchip.com/downloads/aemDocuments/documents/APID/ProductDocuments/DataSheets/MCP3461-2-4R-Family-Data-Sheet-DS20006404C.pdf23 24properties:25  compatible:26    enum:27      - microchip,mcp346128      - microchip,mcp346229      - microchip,mcp346430      - microchip,mcp3461r31      - microchip,mcp3462r32      - microchip,mcp3464r33      - microchip,mcp356134      - microchip,mcp356235      - microchip,mcp356436      - microchip,mcp3561r37      - microchip,mcp3562r38      - microchip,mcp3564r39 40  reg:41    maxItems: 142 43  spi-max-frequency:44    maximum: 2000000045 46  spi-cpha: true47 48  spi-cpol: true49 50  vdd-supply: true51 52  avdd-supply: true53 54  clocks:55    description:56      Phandle and clock identifier for external sampling clock.57      If not specified, the internal crystal oscillator will be used.58    maxItems: 159 60  interrupts:61    description: IRQ line of the ADC62    maxItems: 163 64  drive-open-drain:65    description:66      Whether to drive the IRQ signal as push-pull (default) or open-drain. Note67      that the device requires this pin to become "high", otherwise it will stop68      converting.69    type: boolean70 71  vref-supply:72    description:73      Some devices have a specific reference voltage supplied on a different74      pin to the other supplies. Needed to be able to establish channel scaling75      unless there is also an internal reference available (e.g. mcp3564r). In76      case of "r" devices (e. g. mcp3564r), if it does not exists the internal77      reference will be used.78 79  microchip,hw-device-address:80    $ref: /schemas/types.yaml#/definitions/uint3281    minimum: 082    maximum: 383    description:84      The address is set on a per-device basis by fuses in the factory,85      configured on request. If not requested, the fuses are set for 0x1.86      The device address is part of the device markings to avoid87      potential confusion. This address is coded on two bits, so four possible88      addresses are available when multiple devices are present on the same89      SPI bus with only one Chip Select line for all devices.90      Each device communication starts by a CS falling edge, followed by the91      clocking of the device address (BITS[7:6] - top two bits of COMMAND BYTE92      which is first one on the wire).93 94  "#io-channel-cells":95    const: 196 97  "#address-cells":98    const: 199 100  "#size-cells":101    const: 0102 103patternProperties:104  "^channel@([0-9]|([1-7][0-9]))$":105    $ref: adc.yaml106    type: object107    unevaluatedProperties: false108    description: Represents the external channels which are connected to the ADC.109 110    properties:111      reg:112        description: The channel number in single-ended and differential mode.113        minimum: 0114        maximum: 79115 116    required:117      - reg118 119dependencies:120  spi-cpol: [ spi-cpha ]121  spi-cpha: [ spi-cpol ]122 123required:124  - compatible125  - reg126  - microchip,hw-device-address127  - spi-max-frequency128 129allOf:130  - $ref: /schemas/spi/spi-peripheral-props.yaml#131  - # External vref, no internal reference132    if:133      properties:134        compatible:135          contains:136            enum:137              - microchip,mcp3461138              - microchip,mcp3462139              - microchip,mcp3464140              - microchip,mcp3561141              - microchip,mcp3562142              - microchip,mcp3564143    then:144      required:145        - vref-supply146 147unevaluatedProperties: false148 149examples:150  - |151    spi {152        #address-cells = <1>;153        #size-cells = <0>;154 155        adc@0 {156            compatible = "microchip,mcp3564r";157            reg = <0>;158            vref-supply = <&vref_reg>;159            spi-cpha;160            spi-cpol;161            spi-max-frequency = <10000000>;162            microchip,hw-device-address = <1>;163 164            #address-cells = <1>;165            #size-cells = <0>;166 167            channel@0 {168                /* CH0 to AGND */169                reg = <0>;170                label = "CH0";171            };172 173            channel@1 {174                /* CH1 to AGND */175                reg = <1>;176                label = "CH1";177            };178 179            /* diff-channels */180            channel@11 {181                reg = <11>;182 183                /* CN0, CN1 */184                diff-channels = <0 1>;185                label = "CH0_CH1";186            };187 188            channel@22 {189                reg = <0x22>;190 191                /* CN1, CN2 */192                diff-channels = <1 2>;193                label = "CH1_CH3";194            };195 196            channel@23 {197                reg = <0x23>;198 199                /* CN1, CN3 */200                diff-channels = <1 3>;201                label = "CH1_CH3";202            };203        };204    };205...206