| 1 |
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) |
| 2 |
%YAML 1.2 |
| 3 |
--- |
| 4 |
$id: http://devicetree.org/schemas/regulator/mediatek,mt6358-regulator.yaml# |
| 5 |
$schema: http://devicetree.org/meta-schemas/core.yaml# |
| 6 |
|
| 7 |
title: MediaTek MT6358 Regulator |
| 8 |
|
| 9 |
maintainers: |
| 10 |
- Zhiyong Tao <[email protected]> |
| 11 |
|
| 12 |
description: |
| 13 |
Regulator node of the PMIC. This node should under the PMIC's device node. |
| 14 |
All voltage regulators provided by the PMIC are described as sub-nodes of |
| 15 |
this node. |
| 16 |
|
| 17 |
properties: |
| 18 |
compatible: |
| 19 |
oneOf: |
| 20 |
- const: mediatek,mt6358-regulator |
| 21 |
- items: |
| 22 |
- const: mediatek,mt6366-regulator |
| 23 |
- const: mediatek,mt6358-regulator |
| 24 |
|
| 25 |
vsys-ldo1-supply: |
| 26 |
description: Supply for LDOs vfe28, vxo22, vcn28, vaux18, vaud28, vsim1, vusb, vbif28 |
| 27 |
vsys-ldo2-supply: |
| 28 |
description: Supply for LDOs vldo28 (MT6358 only), vio28, vmc, vmch, vsim2 |
| 29 |
vsys-ldo3-supply: |
| 30 |
description: Supply for LDOs vcn33, vcama[12] (MT6358 only), vemc, vibr |
| 31 |
vsys-vcore-supply: |
| 32 |
description: Supply for buck regulator vcore |
| 33 |
vsys-vdram1-supply: |
| 34 |
description: Supply for buck regulator vdram1 |
| 35 |
vsys-vgpu-supply: |
| 36 |
description: Supply for buck regulator vgpu |
| 37 |
vsys-vmodem-supply: |
| 38 |
description: Supply for buck regulator vmodem |
| 39 |
vsys-vpa-supply: |
| 40 |
description: Supply for buck regulator vpa |
| 41 |
vsys-vproc11-supply: |
| 42 |
description: Supply for buck regulator vproc11 |
| 43 |
vsys-vproc12-supply: |
| 44 |
description: Supply for buck regulator vproc12 |
| 45 |
vsys-vs1-supply: |
| 46 |
description: Supply for buck regulator vs1 |
| 47 |
vsys-vs2-supply: |
| 48 |
description: Supply for buck regulator vs2 |
| 49 |
vs1-ldo1-supply: |
| 50 |
description: |
| 51 |
Supply for LDOs vrf18, vefuse, vcn18, vcamio (MT6358 only), vio18, vm18 (MT6366 only) |
| 52 |
vs2-ldo1-supply: |
| 53 |
description: Supply for LDOs vdram2, vmddr (MT6366 only) |
| 54 |
vs2-ldo2-supply: |
| 55 |
description: Supply for LDOs vrf12, va12 |
| 56 |
vs2-ldo3-supply: |
| 57 |
description: |
| 58 |
Supply for LDOs vsram-core (MT6366 only), vsram-gpu, vsram-others, vsram-proc11, vsram-proc12 |
| 59 |
vs2-ldo4-supply: |
| 60 |
description: Supply for LDO vcamd |
| 61 |
|
| 62 |
patternProperties: |
| 63 |
"^(buck_)?v(core|dram1|gpu|modem|pa|proc1[12]|s[12])$": |
| 64 |
description: Buck regulators |
| 65 |
type: object |
| 66 |
$ref: regulator.yaml# |
| 67 |
properties: |
| 68 |
regulator-allowed-modes: |
| 69 |
description: | |
| 70 |
Buck regulatpr operating modes allowed. Valid values below. |
| 71 |
Users should use the macros from dt-bindings/regulator/mediatek,mt6397-regulator.h |
| 72 |
0 (MT6397_BUCK_MODE_AUTO): Auto PFM/PWM mode |
| 73 |
1 (MT6397_BUCK_MODE_FORCE_PWM): Forced PWM mode |
| 74 |
items: |
| 75 |
enum: [0, 1] |
| 76 |
unevaluatedProperties: false |
| 77 |
|
| 78 |
"^(ldo_)?v(a|rf)12$": |
| 79 |
description: LDOs with fixed 1.2V output and 0~100/10mV tuning |
| 80 |
type: object |
| 81 |
$ref: regulator.yaml# |
| 82 |
properties: |
| 83 |
regulator-allowed-modes: false |
| 84 |
unevaluatedProperties: false |
| 85 |
|
| 86 |
"^(ldo_)?v((aux|cn|io|rf)18|camio)$": |
| 87 |
description: |
| 88 |
LDOs with fixed 1.8V output and 0~100/10mV tuning (vcn18 on MT6366 has variable output) |
| 89 |
type: object |
| 90 |
$ref: regulator.yaml# |
| 91 |
properties: |
| 92 |
regulator-allowed-modes: false |
| 93 |
unevaluatedProperties: false |
| 94 |
|
| 95 |
"^(ldo_)?vxo22$": |
| 96 |
description: LDOs with fixed 2.2V output and 0~100/10mV tuning |
| 97 |
type: object |
| 98 |
$ref: regulator.yaml# |
| 99 |
properties: |
| 100 |
regulator-allowed-modes: false |
| 101 |
unevaluatedProperties: false |
| 102 |
|
| 103 |
"^(ldo_)?v(aud|bif|cn|fe|io)28$": |
| 104 |
description: LDOs with fixed 2.8V output and 0~100/10mV tuning |
| 105 |
type: object |
| 106 |
$ref: regulator.yaml# |
| 107 |
properties: |
| 108 |
regulator-allowed-modes: false |
| 109 |
unevaluatedProperties: false |
| 110 |
|
| 111 |
"^(ldo_)?vusb$": |
| 112 |
description: LDOs with fixed 3.0V output and 0~100/10mV tuning |
| 113 |
type: object |
| 114 |
$ref: regulator.yaml# |
| 115 |
properties: |
| 116 |
regulator-allowed-modes: false |
| 117 |
unevaluatedProperties: false |
| 118 |
|
| 119 |
"^(ldo_)?vsram[_-](core|gpu|others|proc1[12])$": |
| 120 |
description: LDOs with variable output |
| 121 |
type: object |
| 122 |
$ref: regulator.yaml# |
| 123 |
properties: |
| 124 |
regulator-allowed-modes: false |
| 125 |
unevaluatedProperties: false |
| 126 |
|
| 127 |
"^(ldo_)?v(cama[12]|camd|cn33|dram2|efuse|emc|ibr|ldo28|m18|mc|mch|mddr|sim[12])$": |
| 128 |
description: LDOs with variable output and 0~100/10mV tuning |
| 129 |
type: object |
| 130 |
$ref: regulator.yaml# |
| 131 |
properties: |
| 132 |
regulator-allowed-modes: false |
| 133 |
unevaluatedProperties: false |
| 134 |
|
| 135 |
required: |
| 136 |
- compatible |
| 137 |
|
| 138 |
additionalProperties: false |
| 139 |
|
| 140 |
allOf: |
| 141 |
- if: |
| 142 |
properties: |
| 143 |
compatible: |
| 144 |
const: mediatek,mt6358-regulator |
| 145 |
then: |
| 146 |
patternProperties: |
| 147 |
# Old regulator node name scheme (with prefix and underscores) only |
| 148 |
# ([^y-] is used to avoid matching -supply |
| 149 |
"^(?<!buck_)(?<!ldo_)v.*[^y-](?!-supply)$": false |
| 150 |
"^ldo_vsram-": false |
| 151 |
# vsram_core regulator doesn't exist on MT6358 |
| 152 |
"^ldo_vsram[-_]core$": false |
| 153 |
|
| 154 |
properties: |
| 155 |
# vm18 and vmddr regulators don't exist on MT6358 |
| 156 |
ldo_vm18: false |
| 157 |
ldo_vmddr: false |
| 158 |
|
| 159 |
- if: |
| 160 |
properties: |
| 161 |
compatible: |
| 162 |
contains: |
| 163 |
const: mediatek,mt6366-regulator |
| 164 |
then: |
| 165 |
patternProperties: |
| 166 |
# Prefer cleaned up regulator node names |
| 167 |
"^(buck|ldo)_": false |
| 168 |
# Don't allow underscores |
| 169 |
"^vsram_": false |
| 170 |
# vcam* regulators don't exist on MT6366 |
| 171 |
"^vcam": false |
| 172 |
|
| 173 |
properties: |
| 174 |
# vldo28 regulator doesn't exist on MT6366 |
| 175 |
vldo28: false |
| 176 |
# vs2_ldo4 supply pin doesn't exist on MT6366 |
| 177 |
vs2-ldo4-supply: false |
| 178 |
|
| 179 |
examples: |
| 180 |
- | |
| 181 |
#include <dt-bindings/regulator/mediatek,mt6397-regulator.h> |
| 182 |
|
| 183 |
regulator { |
| 184 |
compatible = "mediatek,mt6358-regulator"; |
| 185 |
|
| 186 |
buck_vgpu { |
| 187 |
regulator-name = "vgpu"; |
| 188 |
regulator-min-microvolt = <625000>; |
| 189 |
regulator-max-microvolt = <900000>; |
| 190 |
regulator-ramp-delay = <6250>; |
| 191 |
regulator-enable-ramp-delay = <200>; |
| 192 |
regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO |
| 193 |
MT6397_BUCK_MODE_FORCE_PWM>; |
| 194 |
}; |
| 195 |
|
| 196 |
ldo_vsram_gpu { |
| 197 |
regulator-name = "vsram_gpu"; |
| 198 |
regulator-min-microvolt = <850000>; |
| 199 |
regulator-max-microvolt = <1000000>; |
| 200 |
regulator-ramp-delay = <6250>; |
| 201 |
regulator-enable-ramp-delay = <240>; |
| 202 |
}; |
| 203 |
}; |
| 204 |
|
| 205 |
- | |
| 206 |
#include <dt-bindings/regulator/mediatek,mt6397-regulator.h> |
| 207 |
|
| 208 |
regulator { |
| 209 |
compatible = "mediatek,mt6366-regulator", "mediatek,mt6358-regulator"; |
| 210 |
|
| 211 |
vdram1 { |
| 212 |
regulator-name = "pp1125_emi_vdd2"; |
| 213 |
regulator-min-microvolt = <1125000>; |
| 214 |
regulator-max-microvolt = <1125000>; |
| 215 |
regulator-ramp-delay = <12500>; |
| 216 |
regulator-enable-ramp-delay = <0>; |
| 217 |
regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO |
| 218 |
MT6397_BUCK_MODE_FORCE_PWM>; |
| 219 |
regulator-always-on; |
| 220 |
}; |
| 221 |
|
| 222 |
vproc11 { |
| 223 |
regulator-name = "ppvar_dvdd_proc_bc_mt6366"; |
| 224 |
regulator-min-microvolt = <600000>; |
| 225 |
regulator-max-microvolt = <1200000>; |
| 226 |
regulator-ramp-delay = <6250>; |
| 227 |
regulator-enable-ramp-delay = <200>; |
| 228 |
regulator-allowed-modes = <MT6397_BUCK_MODE_AUTO |
| 229 |
MT6397_BUCK_MODE_FORCE_PWM>; |
| 230 |
regulator-always-on; |
| 231 |
}; |
| 232 |
|
| 233 |
vmddr { |
| 234 |
regulator-name = "pm0750_emi_vmddr"; |
| 235 |
regulator-min-microvolt = <700000>; |
| 236 |
regulator-max-microvolt = <750000>; |
| 237 |
regulator-enable-ramp-delay = <325>; |
| 238 |
regulator-always-on; |
| 239 |
}; |
| 240 |
|
| 241 |
vsram-proc11 { |
| 242 |
regulator-name = "pp0900_dvdd_sram_bc"; |
| 243 |
regulator-min-microvolt = <850000>; |
| 244 |
regulator-max-microvolt = <1120000>; |
| 245 |
regulator-ramp-delay = <6250>; |
| 246 |
regulator-enable-ramp-delay = <240>; |
| 247 |
regulator-always-on; |
| 248 |
}; |
| 249 |
}; |
| 250 |
... |