Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

regulator: dt-bindings: Convert Dialog DA9211 Regulators to DT schema

Convert the existing text-based DT bindings for Dialog Semiconductor DA9211
Voltage Regulators family to a DT schema. Examples are simplified, as these
are all equal.

Signed-off-by: Ariel D'Alessandro <ariel.dalessandro@collabora.com>
Reviewed-by: Rob Herring (Arm) <robh@kernel.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Link: https://patch.msgid.link/20251001183648.83379-1-ariel.dalessandro@collabora.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Ariel D'Alessandro and committed by
Mark Brown
6277a486 3a866087

+103 -205
-205
Documentation/devicetree/bindings/regulator/da9211.txt
··· 1 - * Dialog Semiconductor DA9211/DA9212/DA9213/DA9223/DA9214/DA9224/DA9215/DA9225 2 - Voltage Regulator 3 - 4 - Required properties: 5 - - compatible: "dlg,da9211" or "dlg,da9212" or "dlg,da9213" or "dlg,da9223" 6 - or "dlg,da9214" or "dlg,da9224" or "dlg,da9215" or "dlg,da9225" 7 - - reg: I2C slave address, usually 0x68. 8 - - interrupts: the interrupt outputs of the controller 9 - - regulators: A node that houses a sub-node for each regulator within the 10 - device. Each sub-node is identified using the node's name, with valid 11 - values listed below. The content of each sub-node is defined by the 12 - standard binding for regulators; see regulator.txt. 13 - BUCKA and BUCKB. 14 - 15 - Optional properties: 16 - - enable-gpios: platform gpio for control of BUCKA/BUCKB. 17 - - Any optional property defined in regulator.txt 18 - - regulator-initial-mode and regulator-allowed-modes may be specified using 19 - mode values from dt-bindings/regulator/dlg,da9211-regulator.h 20 - 21 - Example 1) DA9211 22 - pmic: da9211@68 { 23 - compatible = "dlg,da9211"; 24 - reg = <0x68>; 25 - interrupts = <3 27>; 26 - 27 - regulators { 28 - BUCKA { 29 - regulator-name = "VBUCKA"; 30 - regulator-min-microvolt = < 300000>; 31 - regulator-max-microvolt = <1570000>; 32 - regulator-min-microamp = <2000000>; 33 - regulator-max-microamp = <5000000>; 34 - enable-gpios = <&gpio 27 0>; 35 - regulator-allowed-modes = <DA9211_BUCK_MODE_SYNC 36 - DA9211_BUCK_MODE_AUTO>; 37 - }; 38 - }; 39 - }; 40 - 41 - Example 2) DA9212 42 - pmic: da9212@68 { 43 - compatible = "dlg,da9212"; 44 - reg = <0x68>; 45 - interrupts = <3 27>; 46 - 47 - regulators { 48 - BUCKA { 49 - regulator-name = "VBUCKA"; 50 - regulator-min-microvolt = < 300000>; 51 - regulator-max-microvolt = <1570000>; 52 - regulator-min-microamp = <2000000>; 53 - regulator-max-microamp = <5000000>; 54 - enable-gpios = <&gpio 27 0>; 55 - }; 56 - BUCKB { 57 - regulator-name = "VBUCKB"; 58 - regulator-min-microvolt = < 300000>; 59 - regulator-max-microvolt = <1570000>; 60 - regulator-min-microamp = <2000000>; 61 - regulator-max-microamp = <5000000>; 62 - enable-gpios = <&gpio 17 0>; 63 - }; 64 - }; 65 - }; 66 - 67 - Example 3) DA9213 68 - pmic: da9213@68 { 69 - compatible = "dlg,da9213"; 70 - reg = <0x68>; 71 - interrupts = <3 27>; 72 - 73 - regulators { 74 - BUCKA { 75 - regulator-name = "VBUCKA"; 76 - regulator-min-microvolt = < 300000>; 77 - regulator-max-microvolt = <1570000>; 78 - regulator-min-microamp = <3000000>; 79 - regulator-max-microamp = <6000000>; 80 - enable-gpios = <&gpio 27 0>; 81 - }; 82 - }; 83 - }; 84 - 85 - Example 4) DA9223 86 - pmic: da9223@68 { 87 - compatible = "dlg,da9223"; 88 - reg = <0x68>; 89 - interrupts = <3 27>; 90 - 91 - regulators { 92 - BUCKA { 93 - regulator-name = "VBUCKA"; 94 - regulator-min-microvolt = < 300000>; 95 - regulator-max-microvolt = <1570000>; 96 - regulator-min-microamp = <3000000>; 97 - regulator-max-microamp = <6000000>; 98 - enable-gpios = <&gpio 27 0>; 99 - }; 100 - }; 101 - }; 102 - 103 - Example 5) DA9214 104 - pmic: da9214@68 { 105 - compatible = "dlg,da9214"; 106 - reg = <0x68>; 107 - interrupts = <3 27>; 108 - 109 - regulators { 110 - BUCKA { 111 - regulator-name = "VBUCKA"; 112 - regulator-min-microvolt = < 300000>; 113 - regulator-max-microvolt = <1570000>; 114 - regulator-min-microamp = <3000000>; 115 - regulator-max-microamp = <6000000>; 116 - enable-gpios = <&gpio 27 0>; 117 - }; 118 - BUCKB { 119 - regulator-name = "VBUCKB"; 120 - regulator-min-microvolt = < 300000>; 121 - regulator-max-microvolt = <1570000>; 122 - regulator-min-microamp = <3000000>; 123 - regulator-max-microamp = <6000000>; 124 - enable-gpios = <&gpio 17 0>; 125 - }; 126 - }; 127 - }; 128 - 129 - Example 6) DA9224 130 - pmic: da9224@68 { 131 - compatible = "dlg,da9224"; 132 - reg = <0x68>; 133 - interrupts = <3 27>; 134 - 135 - regulators { 136 - BUCKA { 137 - regulator-name = "VBUCKA"; 138 - regulator-min-microvolt = < 300000>; 139 - regulator-max-microvolt = <1570000>; 140 - regulator-min-microamp = <3000000>; 141 - regulator-max-microamp = <6000000>; 142 - enable-gpios = <&gpio 27 0>; 143 - }; 144 - BUCKB { 145 - regulator-name = "VBUCKB"; 146 - regulator-min-microvolt = < 300000>; 147 - regulator-max-microvolt = <1570000>; 148 - regulator-min-microamp = <3000000>; 149 - regulator-max-microamp = <6000000>; 150 - enable-gpios = <&gpio 17 0>; 151 - }; 152 - }; 153 - }; 154 - 155 - Example 7) DA9215 156 - pmic: da9215@68 { 157 - compatible = "dlg,da9215"; 158 - reg = <0x68>; 159 - interrupts = <3 27>; 160 - 161 - regulators { 162 - BUCKA { 163 - regulator-name = "VBUCKA"; 164 - regulator-min-microvolt = < 300000>; 165 - regulator-max-microvolt = <1570000>; 166 - regulator-min-microamp = <4000000>; 167 - regulator-max-microamp = <7000000>; 168 - enable-gpios = <&gpio 27 0>; 169 - }; 170 - BUCKB { 171 - regulator-name = "VBUCKB"; 172 - regulator-min-microvolt = < 300000>; 173 - regulator-max-microvolt = <1570000>; 174 - regulator-min-microamp = <4000000>; 175 - regulator-max-microamp = <7000000>; 176 - enable-gpios = <&gpio 17 0>; 177 - }; 178 - }; 179 - }; 180 - 181 - Example 8) DA9225 182 - pmic: da9225@68 { 183 - compatible = "dlg,da9225"; 184 - reg = <0x68>; 185 - interrupts = <3 27>; 186 - 187 - regulators { 188 - BUCKA { 189 - regulator-name = "VBUCKA"; 190 - regulator-min-microvolt = < 300000>; 191 - regulator-max-microvolt = <1570000>; 192 - regulator-min-microamp = <4000000>; 193 - regulator-max-microamp = <7000000>; 194 - enable-gpios = <&gpio 27 0>; 195 - }; 196 - BUCKB { 197 - regulator-name = "VBUCKB"; 198 - regulator-min-microvolt = < 300000>; 199 - regulator-max-microvolt = <1570000>; 200 - regulator-min-microamp = <4000000>; 201 - regulator-max-microamp = <7000000>; 202 - enable-gpios = <&gpio 17 0>; 203 - }; 204 - }; 205 - };
+103
Documentation/devicetree/bindings/regulator/dlg,da9211.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/regulator/dlg,da9211.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: 8 + Dialog Semiconductor DA9211-9215, DA9223-9225 Voltage Regulators 9 + 10 + maintainers: 11 + - Ariel D'Alessandro <ariel.dalessandro@collabora.com> 12 + 13 + properties: 14 + compatible: 15 + enum: 16 + - dlg,da9211 17 + - dlg,da9212 18 + - dlg,da9213 19 + - dlg,da9214 20 + - dlg,da9215 21 + - dlg,da9223 22 + - dlg,da9224 23 + - dlg,da9225 24 + 25 + reg: 26 + maxItems: 1 27 + 28 + interrupts: 29 + maxItems: 1 30 + 31 + regulators: 32 + type: object 33 + additionalProperties: false 34 + description: 35 + List of regulators provided by the device 36 + 37 + patternProperties: 38 + "^BUCK([AB])$": 39 + type: object 40 + $ref: regulator.yaml# 41 + unevaluatedProperties: false 42 + description: 43 + Properties for a single BUCK regulator 44 + 45 + properties: 46 + regulator-initial-mode: 47 + items: 48 + enum: [ 1, 2, 3 ] 49 + description: 50 + Defined in include/dt-bindings/regulator/dlg,da9211-regulator.h 51 + 52 + regulator-allowed-modes: 53 + items: 54 + enum: [ 1, 2, 3 ] 55 + description: 56 + Defined in include/dt-bindings/regulator/dlg,da9211-regulator.h 57 + 58 + enable-gpios: 59 + maxItems: 1 60 + 61 + required: 62 + - compatible 63 + - reg 64 + - interrupts 65 + - regulators 66 + 67 + additionalProperties: false 68 + 69 + examples: 70 + - | 71 + #include <dt-bindings/regulator/dlg,da9211-regulator.h> 72 + 73 + i2c { 74 + #address-cells = <1>; 75 + #size-cells = <0>; 76 + 77 + regulator@68 { 78 + compatible = "dlg,da9212"; 79 + reg = <0x68>; 80 + interrupts = <3 27>; 81 + 82 + regulators { 83 + BUCKA { 84 + regulator-name = "VBUCKA"; 85 + regulator-min-microvolt = < 300000>; 86 + regulator-max-microvolt = <1570000>; 87 + regulator-min-microamp = <2000000>; 88 + regulator-max-microamp = <5000000>; 89 + enable-gpios = <&gpio 27 0>; 90 + }; 91 + BUCKB { 92 + regulator-name = "VBUCKB"; 93 + regulator-min-microvolt = < 300000>; 94 + regulator-max-microvolt = <1570000>; 95 + regulator-min-microamp = <2000000>; 96 + regulator-max-microamp = <5000000>; 97 + enable-gpios = <&gpio 17 0>; 98 + }; 99 + }; 100 + }; 101 + }; 102 + 103 + ...