Documentation / devicetree / bindings / mfd / maxim,max5970.yaml


Based on kernel version 6.8. Page generated on 2024-03-11 21:26 EST.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/mfd/maxim,max5970.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Regulator for MAX5970 Smart Switch from Maxim Integrated

maintainers:
  - Patrick Rudolph <patrick.rudolph@9elements.com>

description: |
  The smart switch provides no output regulation, but independent fault protection
  and voltage and current sensing.
  Programming is done through I2C bus.
 
  Datasheets:
    https://datasheets.maximintegrated.com/en/ds/MAX5970.pdf
    https://datasheets.maximintegrated.com/en/ds/MAX5978.pdf

properties:
  compatible:
    enum:
      - maxim,max5970
      - maxim,max5978

  reg:
    maxItems: 1

  interrupts:
    maxItems: 1

  leds:
    type: object
    description:
      Properties for four LEDS.

    properties:
      "#address-cells":
        const: 1
 
      "#size-cells":
        const: 0

    patternProperties:
      "^led@[0-3]$":
        $ref: /schemas/leds/common.yaml#
        unevaluatedProperties: false
        type: object

        properties:
          reg:
            maximum: 3

    additionalProperties: false

  vss1-supply:
    description: Supply of the first channel.

  vss2-supply:
    description: Supply of the second channel.

  regulators:
    type: object
    description:
      Properties for both hot swap control/switch.

    patternProperties:
      "^sw[0-1]$":
        $ref: /schemas/regulator/regulator.yaml#
        type: object
        properties:
          shunt-resistor-micro-ohms:
            description: |
              The value of current sense resistor in microohms.

        required:
          - shunt-resistor-micro-ohms

        unevaluatedProperties: false

    additionalProperties: false

required:
  - compatible
  - reg
  - regulators
  - vss1-supply

allOf:
  - if:
      properties:
        compatible:
          enum:
            - maxim,max5970
    then:
      required:
        - vss2-supply

additionalProperties: false

examples:
  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
        regulator@3a {
            compatible = "maxim,max5978";
            reg = <0x3a>;
            vss1-supply = <&p3v3>;
 
            regulators {
                sw0_ref_0: sw0 {
                    shunt-resistor-micro-ohms = <12000>;
                };
            };
 
            leds {
                #address-cells = <1>;
                #size-cells = <0>;
                led@0 {
                    reg = <0>;
                    label = "led0";
                    default-state = "on";
                };
                led@1 {
                    reg = <1>;
                    label = "led1";
                    default-state = "on";
                };
            };
        };
    };

  - |
    i2c {
        #address-cells = <1>;
        #size-cells = <0>;
 
        regulator@3a {
            compatible = "maxim,max5970";
            reg = <0x3a>;
            vss1-supply = <&p3v3>;
            vss2-supply = <&p5v>;
 
            regulators {
                sw0_ref_1: sw0 {
                    shunt-resistor-micro-ohms = <12000>;
                };
                sw1_ref_1: sw1 {
                    shunt-resistor-micro-ohms = <10000>;
                };
            };
        };
    };
...