Documentation / devicetree / bindings / regulator / dlg,da9121.yaml


Based on kernel version 6.11. Page generated on 2024-09-24 08:21 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 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: http://devicetree.org/schemas/regulator/dlg,da9121.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Dialog Semiconductor DA9121 voltage regulator

maintainers:
  - Adam Ward <Adam.Ward.opensource@diasemi.com>

description: |
  Dialog Semiconductor DA9121 Single-channel 10A double-phase buck converter
  Dialog Semiconductor DA9122 Double-channel  5A single-phase buck converter
  Dialog Semiconductor DA9220 Double-channel  3A single-phase buck converter
  Dialog Semiconductor DA9217 Single-channel  6A double-phase buck converter
  Dialog Semiconductor DA9130 Single-channel 10A double-phase buck converter
  Dialog Semiconductor DA9131 Double-channel  5A single-phase buck converter
  Dialog Semiconductor DA9132 Double-channel  3A single-phase buck converter
  Dialog Semiconductor DA9141 Single-channel 40A   quad-phase buck converter
  Dialog Semiconductor DA9142 Single-channel 20A double-phase buck converter
 
  Device parameter ranges
 
  The current limits can be set to at/near double the rated current per channel
  to allow for transient peaks.
  Current limit changes when the output is enabled are not supported, as a
  precaution against undefined behaviour.
 
  |----------------------------------------------|
  |               | range & reset default value  |
  | Device        |------------------------------|
  |               | microvolt    | microamp      |
  |----------------------------------------------|
  | DA9121/DA9130 | Min:  300000 | Min:  7000000 |
  |               | Max: 1900000 | Max: 20000000 |
  |----------------------------------------------|
  | DA9121/DA9131 | Min:  300000 | Min:  3500000 |
  |               | Max: 1900000 | Max: 10000000 |
  |----------------------------------------------|
  | DA9121/DA9131 | Min:  300000 | Min:  3500000 |
  |               | Max: 1900000 | Max:  6000000 |
  |----------------------------------------------|
  | DA9217        | Min:  300000 | Min:  7000000 |
  |               | Max: 1900000 | Max: 12000000 |
  |----------------------------------------------|
  | DA9141        | Min:  300000 | Min: 26000000 |
  |               | Max: 1300000 | Max: 78000000 |
  |----------------------------------------------|
  | DA9142        | Min:  300000 | Min: 13000000 |
  |               | Max: 1300000 | Max: 39000000 |
  |----------------------------------------------|

properties:
  $nodename:
    pattern: "pmic@[0-9a-f]{1,2}"
  compatible:
    enum:
      - dlg,da9121
      - dlg,da9122
      - dlg,da9220
      - dlg,da9217
      - dlg,da9130
      - dlg,da9131
      - dlg,da9132
      - dlg,da9141
      - dlg,da9142

  reg:
    maxItems: 1
    description: Specifies the I2C slave address.

  interrupts:
    maxItems: 1
    description: IRQ line information.

  dlg,irq-polling-delay-passive-ms:
    minimum: 1000
    maximum: 10000
    description: |
      Specify the polling period, measured in milliseconds, between interrupt status
      update checks. Range 1000-10000 ms.

  regulators:
    type: object
    additionalProperties: false
    description: |
      List of regulators provided by the device

    patternProperties:
      "^buck([1-2])$":
        type: object
        $ref: regulator.yaml#
        description: |
          Properties for a single BUCK regulator

        properties:
          regulator-initial-mode:
            enum: [ 0, 1, 2, 3 ]
            description: Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h

          enable-gpios:
            maxItems: 1
            description: Specify a valid GPIO for platform control of the regulator

          dlg,ripple-cancel:
            $ref: /schemas/types.yaml#/definitions/uint32
            enum: [ 0, 1, 2, 3 ]
            description: |
              Defined in include/dt-bindings/regulator/dlg,da9121-regulator.h
              Only present on multi-channel devices (DA9122, DA9220, DA9131, DA9132)

        unevaluatedProperties: false

required:
  - compatible
  - reg
  - regulators

allOf:
  - if:
      properties:
        compatible:
          not:
            contains:
              enum:
                - dlg,da9122
                - dlg,da9131
                - dlg,da9132
                - dlg,da9220
    then:
      properties:
        regulators:
          properties:
            buck2: false

additionalProperties: false

examples:
  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      pmic@68 {
        compatible = "dlg,da9121";
        reg = <0x68>;
 
        interrupt-parent = <&gpio6>;
        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
 
        dlg,irq-polling-delay-passive-ms = <2000>;
 
        regulators {
          DA9121_BUCK1: buck1 {
            regulator-name = "BUCK1";
            regulator-min-microvolt = <300000>;
            regulator-max-microvolt = <1900000>;
            regulator-min-microamp = <7000000>;
            regulator-max-microamp = <20000000>;
            regulator-boot-on;
            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
            enable-gpios = <&gpio 1 GPIO_ACTIVE_HIGH>;
          };
        };
      };
    };

  - |
    #include <dt-bindings/gpio/gpio.h>
    #include <dt-bindings/interrupt-controller/irq.h>
    #include <dt-bindings/regulator/dlg,da9121-regulator.h>
    i2c {
      #address-cells = <1>;
      #size-cells = <0>;
      pmic@68 {
        compatible = "dlg,da9122";
        reg = <0x68>;
 
        interrupt-parent = <&gpio6>;
        interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
 
        dlg,irq-polling-delay-passive-ms = <2000>;
 
        regulators {
          DA9122_BUCK1: buck1 {
            regulator-name = "BUCK1";
            regulator-min-microvolt = <300000>;
            regulator-max-microvolt = <1900000>;
            regulator-min-microamp = <3500000>;
            regulator-max-microamp = <10000000>;
            regulator-boot-on;
            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
            enable-gpios = <&gpio6 1 GPIO_ACTIVE_HIGH>;
            dlg,ripple-cancel = <DA9121_BUCK_RIPPLE_CANCEL_NONE>;
          };
          DA9122_BUCK2: buck2 {
            regulator-name = "BUCK2";
            regulator-min-microvolt = <300000>;
            regulator-max-microvolt = <1900000>;
            regulator-min-microamp = <3500000>;
            regulator-max-microamp = <10000000>;
            regulator-boot-on;
            regulator-initial-mode = <DA9121_BUCK_MODE_AUTO>;
            enable-gpios = <&gpio6 2 GPIO_ACTIVE_HIGH>;
            dlg,ripple-cancel = <DA9121_BUCK_RIPPLE_CANCEL_NONE>;
          };
        };
      };
    };
...