251 lines · yaml
1# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)2%YAML 1.23---4$id: http://devicetree.org/schemas/regulator/mediatek,mt6358-regulator.yaml#5$schema: http://devicetree.org/meta-schemas/core.yaml#6 7title: MediaTek MT6358 Regulator8 9maintainers:10 - Zhiyong Tao <zhiyong.tao@mediatek.com>11 12description: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 of15 this node.16 17properties:18 compatible:19 oneOf:20 - const: mediatek,mt6358-regulator21 - items:22 - const: mediatek,mt6366-regulator23 - const: mediatek,mt6358-regulator24 25 vsys-ldo1-supply:26 description: Supply for LDOs vfe28, vxo22, vcn28, vaux18, vaud28, vsim1, vusb, vbif2827 vsys-ldo2-supply:28 description: Supply for LDOs vldo28 (MT6358 only), vio28, vmc, vmch, vsim229 vsys-ldo3-supply:30 description: Supply for LDOs vcn33, vcama[12] (MT6358 only), vemc, vibr31 vsys-vcore-supply:32 description: Supply for buck regulator vcore33 vsys-vdram1-supply:34 description: Supply for buck regulator vdram135 vsys-vgpu-supply:36 description: Supply for buck regulator vgpu37 vsys-vmodem-supply:38 description: Supply for buck regulator vmodem39 vsys-vpa-supply:40 description: Supply for buck regulator vpa41 vsys-vproc11-supply:42 description: Supply for buck regulator vproc1143 vsys-vproc12-supply:44 description: Supply for buck regulator vproc1245 vsys-vs1-supply:46 description: Supply for buck regulator vs147 vsys-vs2-supply:48 description: Supply for buck regulator vs249 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, va1256 vs2-ldo3-supply:57 description:58 Supply for LDOs vsram-core (MT6366 only), vsram-gpu, vsram-others, vsram-proc11, vsram-proc1259 vs2-ldo4-supply:60 description: Supply for LDO vcamd61 62patternProperties:63 "^(buck_)?v(core|dram1|gpu|modem|pa|proc1[12]|s[12])$":64 description: Buck regulators65 type: object66 $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.h72 0 (MT6397_BUCK_MODE_AUTO): Auto PFM/PWM mode73 1 (MT6397_BUCK_MODE_FORCE_PWM): Forced PWM mode74 items:75 enum: [0, 1]76 unevaluatedProperties: false77 78 "^(ldo_)?v(a|rf)12$":79 description: LDOs with fixed 1.2V output and 0~100/10mV tuning80 type: object81 $ref: regulator.yaml#82 properties:83 regulator-allowed-modes: false84 unevaluatedProperties: false85 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: object90 $ref: regulator.yaml#91 properties:92 regulator-allowed-modes: false93 unevaluatedProperties: false94 95 "^(ldo_)?vxo22$":96 description: LDOs with fixed 2.2V output and 0~100/10mV tuning97 type: object98 $ref: regulator.yaml#99 properties:100 regulator-allowed-modes: false101 unevaluatedProperties: false102 103 "^(ldo_)?v(aud|bif|cn|fe|io)28$":104 description: LDOs with fixed 2.8V output and 0~100/10mV tuning105 type: object106 $ref: regulator.yaml#107 properties:108 regulator-allowed-modes: false109 unevaluatedProperties: false110 111 "^(ldo_)?vusb$":112 description: LDOs with fixed 3.0V output and 0~100/10mV tuning113 type: object114 $ref: regulator.yaml#115 properties:116 regulator-allowed-modes: false117 unevaluatedProperties: false118 119 "^(ldo_)?vsram[_-](core|gpu|others|proc1[12])$":120 description: LDOs with variable output121 type: object122 $ref: regulator.yaml#123 properties:124 regulator-allowed-modes: false125 unevaluatedProperties: false126 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 tuning129 type: object130 $ref: regulator.yaml#131 properties:132 regulator-allowed-modes: false133 unevaluatedProperties: false134 135required:136 - compatible137 138additionalProperties: false139 140allOf:141 - if:142 properties:143 compatible:144 const: mediatek,mt6358-regulator145 then:146 patternProperties:147 # Old regulator node name scheme (with prefix and underscores) only148 # ([^y-] is used to avoid matching -supply149 "^(?<!buck_)(?<!ldo_)v.*[^y-](?!-supply)$": false150 "^ldo_vsram-": false151 # vsram_core regulator doesn't exist on MT6358152 "^ldo_vsram[-_]core$": false153 154 properties:155 # vm18 and vmddr regulators don't exist on MT6358156 ldo_vm18: false157 ldo_vmddr: false158 159 - if:160 properties:161 compatible:162 contains:163 const: mediatek,mt6366-regulator164 then:165 patternProperties:166 # Prefer cleaned up regulator node names167 "^(buck|ldo)_": false168 # Don't allow underscores169 "^vsram_": false170 # vcam* regulators don't exist on MT6366171 "^vcam": false172 173 properties:174 # vldo28 regulator doesn't exist on MT6366175 vldo28: false176 # vs2_ldo4 supply pin doesn't exist on MT6366177 vs2-ldo4-supply: false178 179examples: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_AUTO193 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_AUTO218 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_AUTO229 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...251