Tom Rini | 53633a8 | 2024-02-29 12:33:36 -0500 | [diff] [blame] | 1 | # SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause |
| 2 | %YAML 1.2 |
| 3 | --- |
| 4 | $id: http://devicetree.org/schemas/mfd/samsung,s5m8767.yaml# |
| 5 | $schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 | |
| 7 | title: Samsung S5M8767 Power Management IC |
| 8 | |
| 9 | maintainers: |
| 10 | - Krzysztof Kozlowski <krzk@kernel.org> |
| 11 | |
| 12 | description: | |
| 13 | This is a part of device tree bindings for S2M and S5M family of Power |
| 14 | Management IC (PMIC). |
| 15 | |
| 16 | The Samsung S5M8767 is a Power Management IC which includes voltage |
| 17 | and current regulators, RTC, clock outputs and other sub-blocks. |
| 18 | |
| 19 | properties: |
| 20 | compatible: |
| 21 | const: samsung,s5m8767-pmic |
| 22 | |
| 23 | clocks: |
| 24 | $ref: ../clock/samsung,s2mps11.yaml |
| 25 | description: |
| 26 | Child node describing clock provider. |
| 27 | |
| 28 | interrupts: |
| 29 | maxItems: 1 |
| 30 | |
| 31 | reg: |
| 32 | maxItems: 1 |
| 33 | |
| 34 | regulators: |
| 35 | $ref: ../regulator/samsung,s5m8767.yaml |
| 36 | description: |
| 37 | List of child nodes that specify the regulators. |
| 38 | |
| 39 | s5m8767,pmic-buck2-dvs-voltage: |
| 40 | $ref: /schemas/types.yaml#/definitions/uint32-array |
| 41 | minItems: 8 |
| 42 | maxItems: 8 |
| 43 | description: | |
| 44 | A set of 8 voltage values in micro-volt (uV) units for buck2 when |
| 45 | changing voltage using gpio dvs. |
| 46 | |
| 47 | s5m8767,pmic-buck3-dvs-voltage: |
| 48 | $ref: /schemas/types.yaml#/definitions/uint32-array |
| 49 | minItems: 8 |
| 50 | maxItems: 8 |
| 51 | description: | |
| 52 | A set of 8 voltage values in micro-volt (uV) units for buck3 when |
| 53 | changing voltage using gpio dvs. |
| 54 | |
| 55 | s5m8767,pmic-buck4-dvs-voltage: |
| 56 | $ref: /schemas/types.yaml#/definitions/uint32-array |
| 57 | minItems: 8 |
| 58 | maxItems: 8 |
| 59 | description: | |
| 60 | A set of 8 voltage values in micro-volt (uV) units for buck4 when |
| 61 | changing voltage using gpio dvs. |
| 62 | |
| 63 | s5m8767,pmic-buck-ds-gpios: |
| 64 | minItems: 3 |
| 65 | maxItems: 3 |
| 66 | description: | |
| 67 | GPIO specifiers for three host gpio's used for selecting GPIO DVS lines. |
| 68 | It is one-to-one mapped to dvs gpio lines. |
| 69 | |
| 70 | s5m8767,pmic-buck2-uses-gpio-dvs: |
| 71 | type: boolean |
| 72 | description: buck2 can be controlled by gpio dvs. |
| 73 | |
| 74 | s5m8767,pmic-buck3-uses-gpio-dvs: |
| 75 | type: boolean |
| 76 | description: buck3 can be controlled by gpio dvs. |
| 77 | |
| 78 | s5m8767,pmic-buck4-uses-gpio-dvs: |
| 79 | type: boolean |
| 80 | description: buck4 can be controlled by gpio dvs. |
| 81 | |
| 82 | s5m8767,pmic-buck-default-dvs-idx: |
| 83 | $ref: /schemas/types.yaml#/definitions/uint32-array |
| 84 | minimum: 0 |
| 85 | maximum: 7 |
| 86 | default: 0 |
| 87 | description: | |
| 88 | Default voltage setting selected from the possible 8 options selectable |
| 89 | by the dvs gpios. The value of this property should be between 0 and 7. |
| 90 | If not specified or if out of range, the default value of this property |
| 91 | is set to 0. |
| 92 | |
| 93 | s5m8767,pmic-buck-dvs-gpios: |
| 94 | minItems: 3 |
| 95 | maxItems: 3 |
| 96 | description: | |
| 97 | GPIO specifiers for three host gpio's used for dvs. |
| 98 | |
| 99 | vinb1-supply: |
| 100 | description: Power supply for buck1 |
| 101 | vinb2-supply: |
| 102 | description: Power supply for buck2 |
| 103 | vinb3-supply: |
| 104 | description: Power supply for buck3 |
| 105 | vinb4-supply: |
| 106 | description: Power supply for buck4 |
| 107 | vinb5-supply: |
| 108 | description: Power supply for buck5 |
| 109 | vinb6-supply: |
| 110 | description: Power supply for buck6 |
| 111 | vinb7-supply: |
| 112 | description: Power supply for buck7 |
| 113 | vinb8-supply: |
| 114 | description: Power supply for buck8 |
| 115 | vinb9-supply: |
| 116 | description: Power supply for buck9 |
| 117 | |
| 118 | vinl1-supply: |
| 119 | description: Power supply for LDO3, LDO10, LDO26, LDO27 |
| 120 | vinl2-supply: |
| 121 | description: Power supply for LDO13, LDO16, LDO25, LDO28 |
| 122 | vinl3-supply: |
| 123 | description: Power supply for LDO11, LDO14 |
| 124 | vinl4-supply: |
| 125 | description: Power supply for LDO4, LDO9 |
| 126 | vinl5-supply: |
| 127 | description: Power supply for LDO12, LDO17, LDO19, LDO23 |
| 128 | vinl6-supply: |
| 129 | description: Power supply for LDO18, LDO20, LDO21, LDO24 |
| 130 | vinl7-supply: |
| 131 | description: Power supply for LDO5, LDO22 |
| 132 | vinl8-supply: |
| 133 | description: Power supply for LDO1, LDO6, LDO7, LDO8, LDO15 |
| 134 | vinl9-supply: |
| 135 | description: Power supply for LDO2 |
| 136 | |
| 137 | wakeup-source: true |
| 138 | |
| 139 | required: |
| 140 | - compatible |
| 141 | - reg |
| 142 | - regulators |
| 143 | - s5m8767,pmic-buck-ds-gpios |
| 144 | |
| 145 | dependencies: |
| 146 | s5m8767,pmic-buck2-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] |
| 147 | s5m8767,pmic-buck3-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] |
| 148 | s5m8767,pmic-buck4-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] |
| 149 | s5m8767,pmic-buck2-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck2-dvs-voltage' ] |
| 150 | s5m8767,pmic-buck3-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck3-dvs-voltage' ] |
| 151 | s5m8767,pmic-buck4-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck4-dvs-voltage' ] |
| 152 | |
| 153 | additionalProperties: false |
| 154 | |
| 155 | allOf: |
| 156 | - not: |
| 157 | required: |
| 158 | - s5m8767,pmic-buck2-uses-gpio-dvs |
| 159 | - s5m8767,pmic-buck3-uses-gpio-dvs |
| 160 | - not: |
| 161 | required: |
| 162 | - s5m8767,pmic-buck2-uses-gpio-dvs |
| 163 | - s5m8767,pmic-buck4-uses-gpio-dvs |
| 164 | - not: |
| 165 | required: |
| 166 | - s5m8767,pmic-buck3-uses-gpio-dvs |
| 167 | - s5m8767,pmic-buck4-uses-gpio-dvs |
| 168 | |
| 169 | examples: |
| 170 | - | |
| 171 | #include <dt-bindings/gpio/gpio.h> |
| 172 | #include <dt-bindings/interrupt-controller/irq.h> |
| 173 | |
| 174 | i2c { |
| 175 | #address-cells = <1>; |
| 176 | #size-cells = <0>; |
| 177 | |
| 178 | pmic@66 { |
| 179 | compatible = "samsung,s5m8767-pmic"; |
| 180 | reg = <0x66>; |
| 181 | |
| 182 | interrupt-parent = <&gpx3>; |
| 183 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; |
| 184 | pinctrl-names = "default"; |
| 185 | pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; |
| 186 | wakeup-source; |
| 187 | |
| 188 | s5m8767,pmic-buck-default-dvs-idx = <3>; |
| 189 | s5m8767,pmic-buck2-uses-gpio-dvs; |
| 190 | |
| 191 | s5m8767,pmic-buck-dvs-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>, |
| 192 | <&gpd1 1 GPIO_ACTIVE_LOW>, |
| 193 | <&gpd1 2 GPIO_ACTIVE_LOW>; |
| 194 | |
| 195 | s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>, |
| 196 | <&gpx2 4 GPIO_ACTIVE_LOW>, |
| 197 | <&gpx2 5 GPIO_ACTIVE_LOW>; |
| 198 | |
| 199 | s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, |
| 200 | <1250000>, <1200000>, |
| 201 | <1150000>, <1100000>, |
| 202 | <1000000>, <950000>; |
| 203 | |
| 204 | s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>, |
| 205 | <1100000>, <1100000>, |
| 206 | <1000000>, <1000000>, |
| 207 | <1000000>, <1000000>; |
| 208 | |
| 209 | s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>, |
| 210 | <1200000>, <1200000>, |
| 211 | <1200000>, <1200000>, |
| 212 | <1200000>, <1200000>; |
| 213 | |
| 214 | clocks { |
| 215 | compatible = "samsung,s5m8767-clk"; |
| 216 | #clock-cells = <1>; |
| 217 | clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt"; |
| 218 | }; |
| 219 | |
| 220 | regulators { |
| 221 | LDO1 { |
| 222 | regulator-name = "VDD_ALIVE"; |
| 223 | regulator-min-microvolt = <1100000>; |
| 224 | regulator-max-microvolt = <1100000>; |
| 225 | regulator-always-on; |
| 226 | regulator-boot-on; |
| 227 | op_mode = <1>; /* Normal Mode */ |
| 228 | }; |
| 229 | |
| 230 | // ... |
| 231 | |
| 232 | BUCK1 { |
| 233 | regulator-name = "VDD_MIF"; |
| 234 | regulator-min-microvolt = <950000>; |
| 235 | regulator-max-microvolt = <1100000>; |
| 236 | regulator-always-on; |
| 237 | regulator-boot-on; |
| 238 | op_mode = <1>; /* Normal Mode */ |
| 239 | }; |
| 240 | |
| 241 | BUCK2 { |
| 242 | regulator-name = "VDD_ARM"; |
| 243 | regulator-min-microvolt = <900000>; |
| 244 | regulator-max-microvolt = <1350000>; |
| 245 | regulator-always-on; |
| 246 | regulator-boot-on; |
| 247 | op_mode = <1>; /* Normal Mode */ |
| 248 | }; |
| 249 | |
| 250 | // ... |
| 251 | }; |
| 252 | }; |
| 253 | }; |
| 254 | |
| 255 | - | |
| 256 | #include <dt-bindings/gpio/gpio.h> |
| 257 | #include <dt-bindings/interrupt-controller/irq.h> |
| 258 | |
| 259 | i2c { |
| 260 | #address-cells = <1>; |
| 261 | #size-cells = <0>; |
| 262 | |
| 263 | pmic@66 { |
| 264 | compatible = "samsung,s5m8767-pmic"; |
| 265 | reg = <0x66>; |
| 266 | |
| 267 | interrupt-parent = <&gpx3>; |
| 268 | interrupts = <2 IRQ_TYPE_LEVEL_LOW>; |
| 269 | pinctrl-names = "default"; |
| 270 | pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; |
| 271 | wakeup-source; |
| 272 | |
| 273 | s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>, |
| 274 | <&gpx2 4 GPIO_ACTIVE_LOW>, |
| 275 | <&gpx2 5 GPIO_ACTIVE_LOW>; |
| 276 | |
| 277 | clocks { |
| 278 | compatible = "samsung,s5m8767-clk"; |
| 279 | #clock-cells = <1>; |
| 280 | clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt"; |
| 281 | }; |
| 282 | |
| 283 | regulators { |
| 284 | LDO1 { |
| 285 | regulator-name = "VDD_ALIVE"; |
| 286 | regulator-min-microvolt = <1100000>; |
| 287 | regulator-max-microvolt = <1100000>; |
| 288 | regulator-always-on; |
| 289 | regulator-boot-on; |
| 290 | op_mode = <1>; /* Normal Mode */ |
| 291 | }; |
| 292 | |
| 293 | // ... |
| 294 | }; |
| 295 | }; |
| 296 | }; |