brintos

brintos / linux-shallow public Read only

0
0
Text · 3.6 KiB · 4cba856 Raw
140 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/maxim,max34408.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: Maxim MAX34408/MAX34409 current monitors with overcurrent control8 9maintainers:10  - Ivan Mikhaylov <fr0st61te@gmail.com>11 12description: |13  The MAX34408/MAX34409 are two- and four-channel current monitors that are14  configured and monitored with a standard I2C/SMBus serial interface. Each15  unidirectional current sensor offers precision high-side operation with a16  low full-scale sense voltage. The devices automatically sequence through17  two or four channels and collect the current-sense samples and average them18  to reduce the effect of impulse noise. The raw ADC samples are compared to19  user-programmable digital thresholds to indicate overcurrent conditions.20  Overcurrent conditions trigger a hardware output to provide an immediate21  indication to shut down any necessary external circuitry.22 23  Specifications about the devices can be found at:24  https://www.analog.com/media/en/technical-documentation/data-sheets/MAX34408-MAX34409.pdf25 26properties:27  compatible:28    enum:29      - maxim,max3440830      - maxim,max3440931 32  "#address-cells":33    const: 134 35  "#size-cells":36    const: 037 38  reg:39    maxItems: 140 41  interrupts:42    maxItems: 143 44  powerdown-gpios:45    description:46      Shutdown Output. Open-drain output. This output transitions to high impedance47      when any of the digital comparator thresholds are exceeded as long as the ENA48      pin is high.49    maxItems: 150 51  powerdown-status-gpios:52    description:53      SHTDN Enable Input. CMOS digital input. Connect to GND to clear the latch and54      unconditionally deassert (force low) the SHTDN output and reset the shutdown55      delay. Connect to VDD to enable normal latch operation of the SHTDN output.56    maxItems: 157 58  vdd-supply: true59 60patternProperties:61  "^channel@[0-3]$":62    $ref: adc.yaml63    type: object64    description:65      Represents the internal channels of the ADC.66 67    properties:68      reg:69        items:70          - minimum: 071            maximum: 372 73      maxim,rsense-val-micro-ohms:74        description:75          Adjust the Rsense value to monitor higher or lower current levels for76          input.77        enum: [250, 500, 1000, 5000, 10000, 50000, 100000, 200000, 500000]78        default: 100079 80    required:81      - reg82      - maxim,rsense-val-micro-ohms83 84    unevaluatedProperties: false85 86required:87  - compatible88  - reg89 90allOf:91  - if:92      properties:93        compatible:94          contains:95            const: maxim,max3440896    then:97      patternProperties:98        "^channel@[2-3]$": false99        "^channel@[0-1]$":100          properties:101            reg:102              maximum: 1103    else:104      patternProperties:105        "^channel@[0-3]$":106          properties:107            reg:108              maximum: 3109 110additionalProperties: false111 112examples:113  - |114    #include <dt-bindings/gpio/gpio.h>115 116    i2c {117        #address-cells = <1>;118        #size-cells = <0>;119 120        adc@1e {121              compatible = "maxim,max34409";122              reg = <0x1e>;123              powerdown-gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;124              powerdown-status-gpios = <&gpio0 2 GPIO_ACTIVE_HIGH>;125 126              #address-cells = <1>;127              #size-cells = <0>;128 129              channel@0 {130                  reg = <0x0>;131                  maxim,rsense-val-micro-ohms = <5000>;132              };133 134              channel@1 {135                  reg = <0x1>;136                  maxim,rsense-val-micro-ohms = <10000>;137             };138        };139    };140