|
| 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 <krzysztof.kozlowski@canonical.com> |
| 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 | + wakeup-source: true |
| 100 | + |
| 101 | +required: |
| 102 | + - compatible |
| 103 | + - reg |
| 104 | + - regulators |
| 105 | + - s5m8767,pmic-buck-ds-gpios |
| 106 | + |
| 107 | +dependencies: |
| 108 | + s5m8767,pmic-buck2-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] |
| 109 | + s5m8767,pmic-buck3-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] |
| 110 | + s5m8767,pmic-buck4-dvs-voltage: [ 's5m8767,pmic-buck-dvs-gpios' ] |
| 111 | + s5m8767,pmic-buck2-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck2-dvs-voltage' ] |
| 112 | + s5m8767,pmic-buck3-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck3-dvs-voltage' ] |
| 113 | + s5m8767,pmic-buck4-uses-gpio-dvs: [ 's5m8767,pmic-buck-dvs-gpios', 's5m8767,pmic-buck4-dvs-voltage' ] |
| 114 | + |
| 115 | +additionalProperties: false |
| 116 | + |
| 117 | +allOf: |
| 118 | + - if: |
| 119 | + required: |
| 120 | + - s5m8767,pmic-buck2-uses-gpio-dvs |
| 121 | + then: |
| 122 | + properties: |
| 123 | + s5m8767,pmic-buck3-uses-gpio-dvs: false |
| 124 | + s5m8767,pmic-buck4-uses-gpio-dvs: false |
| 125 | + |
| 126 | + - if: |
| 127 | + required: |
| 128 | + - s5m8767,pmic-buck3-uses-gpio-dvs |
| 129 | + then: |
| 130 | + properties: |
| 131 | + s5m8767,pmic-buck2-uses-gpio-dvs: false |
| 132 | + s5m8767,pmic-buck4-uses-gpio-dvs: false |
| 133 | + |
| 134 | + - if: |
| 135 | + required: |
| 136 | + - s5m8767,pmic-buck4-uses-gpio-dvs |
| 137 | + then: |
| 138 | + properties: |
| 139 | + s5m8767,pmic-buck2-uses-gpio-dvs: false |
| 140 | + s5m8767,pmic-buck3-uses-gpio-dvs: false |
| 141 | + |
| 142 | +examples: |
| 143 | + - | |
| 144 | + #include <dt-bindings/gpio/gpio.h> |
| 145 | + #include <dt-bindings/interrupt-controller/irq.h> |
| 146 | +
|
| 147 | + i2c { |
| 148 | + #address-cells = <1>; |
| 149 | + #size-cells = <0>; |
| 150 | +
|
| 151 | + pmic@66 { |
| 152 | + compatible = "samsung,s5m8767-pmic"; |
| 153 | + reg = <0x66>; |
| 154 | +
|
| 155 | + interrupt-parent = <&gpx3>; |
| 156 | + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; |
| 157 | + pinctrl-names = "default"; |
| 158 | + pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; |
| 159 | + wakeup-source; |
| 160 | +
|
| 161 | + s5m8767,pmic-buck-default-dvs-idx = <3>; |
| 162 | + s5m8767,pmic-buck2-uses-gpio-dvs; |
| 163 | +
|
| 164 | + s5m8767,pmic-buck-dvs-gpios = <&gpd1 0 GPIO_ACTIVE_LOW>, |
| 165 | + <&gpd1 1 GPIO_ACTIVE_LOW>, |
| 166 | + <&gpd1 2 GPIO_ACTIVE_LOW>; |
| 167 | +
|
| 168 | + s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>, |
| 169 | + <&gpx2 4 GPIO_ACTIVE_LOW>, |
| 170 | + <&gpx2 5 GPIO_ACTIVE_LOW>; |
| 171 | +
|
| 172 | + s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, |
| 173 | + <1250000>, <1200000>, |
| 174 | + <1150000>, <1100000>, |
| 175 | + <1000000>, <950000>; |
| 176 | +
|
| 177 | + s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>, |
| 178 | + <1100000>, <1100000>, |
| 179 | + <1000000>, <1000000>, |
| 180 | + <1000000>, <1000000>; |
| 181 | +
|
| 182 | + s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>, |
| 183 | + <1200000>, <1200000>, |
| 184 | + <1200000>, <1200000>, |
| 185 | + <1200000>, <1200000>; |
| 186 | +
|
| 187 | + clocks { |
| 188 | + compatible = "samsung,s5m8767-clk"; |
| 189 | + #clock-cells = <1>; |
| 190 | + clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt"; |
| 191 | + }; |
| 192 | +
|
| 193 | + regulators { |
| 194 | + LDO1 { |
| 195 | + regulator-name = "VDD_ALIVE"; |
| 196 | + regulator-min-microvolt = <1100000>; |
| 197 | + regulator-max-microvolt = <1100000>; |
| 198 | + regulator-always-on; |
| 199 | + regulator-boot-on; |
| 200 | + op_mode = <1>; /* Normal Mode */ |
| 201 | + }; |
| 202 | +
|
| 203 | + // ... |
| 204 | +
|
| 205 | + BUCK1 { |
| 206 | + regulator-name = "VDD_MIF"; |
| 207 | + regulator-min-microvolt = <950000>; |
| 208 | + regulator-max-microvolt = <1100000>; |
| 209 | + regulator-always-on; |
| 210 | + regulator-boot-on; |
| 211 | + op_mode = <1>; /* Normal Mode */ |
| 212 | + }; |
| 213 | +
|
| 214 | + BUCK2 { |
| 215 | + regulator-name = "VDD_ARM"; |
| 216 | + regulator-min-microvolt = <900000>; |
| 217 | + regulator-max-microvolt = <1350000>; |
| 218 | + regulator-always-on; |
| 219 | + regulator-boot-on; |
| 220 | + op_mode = <1>; /* Normal Mode */ |
| 221 | + }; |
| 222 | +
|
| 223 | + // ... |
| 224 | + }; |
| 225 | + }; |
| 226 | + }; |
| 227 | +
|
| 228 | + - | |
| 229 | + #include <dt-bindings/gpio/gpio.h> |
| 230 | + #include <dt-bindings/interrupt-controller/irq.h> |
| 231 | +
|
| 232 | + i2c { |
| 233 | + #address-cells = <1>; |
| 234 | + #size-cells = <0>; |
| 235 | +
|
| 236 | + pmic@66 { |
| 237 | + compatible = "samsung,s5m8767-pmic"; |
| 238 | + reg = <0x66>; |
| 239 | +
|
| 240 | + interrupt-parent = <&gpx3>; |
| 241 | + interrupts = <2 IRQ_TYPE_LEVEL_LOW>; |
| 242 | + pinctrl-names = "default"; |
| 243 | + pinctrl-0 = <&s5m8767_irq &s5m8767_dvs &s5m8767_ds>; |
| 244 | + wakeup-source; |
| 245 | +
|
| 246 | + s5m8767,pmic-buck-ds-gpios = <&gpx2 3 GPIO_ACTIVE_LOW>, |
| 247 | + <&gpx2 4 GPIO_ACTIVE_LOW>, |
| 248 | + <&gpx2 5 GPIO_ACTIVE_LOW>; |
| 249 | +
|
| 250 | + clocks { |
| 251 | + compatible = "samsung,s5m8767-clk"; |
| 252 | + #clock-cells = <1>; |
| 253 | + clock-output-names = "en32khz_ap", "en32khz_cp", "en32khz_bt"; |
| 254 | + }; |
| 255 | +
|
| 256 | + regulators { |
| 257 | + LDO1 { |
| 258 | + regulator-name = "VDD_ALIVE"; |
| 259 | + regulator-min-microvolt = <1100000>; |
| 260 | + regulator-max-microvolt = <1100000>; |
| 261 | + regulator-always-on; |
| 262 | + regulator-boot-on; |
| 263 | + op_mode = <1>; /* Normal Mode */ |
| 264 | + }; |
| 265 | +
|
| 266 | + // ... |
| 267 | + }; |
| 268 | + }; |
| 269 | + }; |
0 commit comments