18c2ecf20Sopenharmony_ciBinding for Samsung S2M family regulator block 28c2ecf20Sopenharmony_ci============================================== 38c2ecf20Sopenharmony_ci 48c2ecf20Sopenharmony_ciThis is a part of device tree bindings for S2M family multi-function devices. 58c2ecf20Sopenharmony_ciMore information can be found in bindings/mfd/sec-core.txt file. 68c2ecf20Sopenharmony_ci 78c2ecf20Sopenharmony_ciThe S2MPS11/13/14/15 and S2MPU02 devices provide buck and LDO regulators. 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ciTo register these with regulator framework instantiate under main device node 108c2ecf20Sopenharmony_cia sub-node named "regulators" with more sub-nodes for each regulator using the 118c2ecf20Sopenharmony_cicommon regulator binding documented in: 128c2ecf20Sopenharmony_ci - Documentation/devicetree/bindings/regulator/regulator.txt 138c2ecf20Sopenharmony_ci 148c2ecf20Sopenharmony_ci 158c2ecf20Sopenharmony_ciNames of regulators supported by different devices: 168c2ecf20Sopenharmony_ci - LDOn 178c2ecf20Sopenharmony_ci - valid values for n are: 188c2ecf20Sopenharmony_ci - S2MPS11: 1 to 38 198c2ecf20Sopenharmony_ci - S2MPS13: 1 to 40 208c2ecf20Sopenharmony_ci - S2MPS14: 1 to 25 218c2ecf20Sopenharmony_ci - S2MPS15: 1 to 27 228c2ecf20Sopenharmony_ci - S2MPU02: 1 to 28 238c2ecf20Sopenharmony_ci - Example: LDO1, LDO2, LDO28 248c2ecf20Sopenharmony_ci - BUCKn 258c2ecf20Sopenharmony_ci - valid values for n are: 268c2ecf20Sopenharmony_ci - S2MPS11: 1 to 10 278c2ecf20Sopenharmony_ci - S2MPS13: 1 to 10 288c2ecf20Sopenharmony_ci - S2MPS14: 1 to 5 298c2ecf20Sopenharmony_ci - S2MPS15: 1 to 10 308c2ecf20Sopenharmony_ci - S2MPU02: 1 to 7 318c2ecf20Sopenharmony_ci - Example: BUCK1, BUCK2, BUCK9 328c2ecf20Sopenharmony_ciNote: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 338c2ecf20Sopenharmony_cias per the datasheet of device. 348c2ecf20Sopenharmony_ci 358c2ecf20Sopenharmony_ci 368c2ecf20Sopenharmony_ciOptional properties of the nodes under "regulators" sub-node: 378c2ecf20Sopenharmony_ci - regulator-ramp-delay: ramp delay in uV/us. May be 6250, 12500, 388c2ecf20Sopenharmony_ci 25000 (default) or 50000. 398c2ecf20Sopenharmony_ci 408c2ecf20Sopenharmony_ci Additionally S2MPS11 supports disabling ramp delay for BUCK{2,3,4,6} 418c2ecf20Sopenharmony_ci by setting it to <0>. 428c2ecf20Sopenharmony_ci 438c2ecf20Sopenharmony_ci Note: On S2MPS11 some bucks share the ramp rate setting i.e. same ramp value 448c2ecf20Sopenharmony_ci will be set for a particular group of bucks so provide the same 458c2ecf20Sopenharmony_ci regulator-ramp-delay value for them. 468c2ecf20Sopenharmony_ci Groups sharing ramp rate: 478c2ecf20Sopenharmony_ci - buck{1,6}, 488c2ecf20Sopenharmony_ci - buck{3,4}, 498c2ecf20Sopenharmony_ci - buck{7,8,10}. 508c2ecf20Sopenharmony_ci 518c2ecf20Sopenharmony_ci - samsung,ext-control-gpios: On S2MPS14 the LDO10, LDO11 and LDO12 can be 528c2ecf20Sopenharmony_ci configured to external control over GPIO. To turn this feature on this 538c2ecf20Sopenharmony_ci property must be added to the regulator sub-node: 548c2ecf20Sopenharmony_ci - samsung,ext-control-gpios: GPIO specifier for one GPIO 558c2ecf20Sopenharmony_ci controlling this regulator (enable/disable) 568c2ecf20Sopenharmony_ci Example: 578c2ecf20Sopenharmony_ci LDO12 { 588c2ecf20Sopenharmony_ci regulator-name = "V_EMMC_2.8V"; 598c2ecf20Sopenharmony_ci regulator-min-microvolt = <2800000>; 608c2ecf20Sopenharmony_ci regulator-max-microvolt = <2800000>; 618c2ecf20Sopenharmony_ci samsung,ext-control-gpios = <&gpk0 2 0>; 628c2ecf20Sopenharmony_ci }; 638c2ecf20Sopenharmony_ci 648c2ecf20Sopenharmony_ci 658c2ecf20Sopenharmony_ciExample: 668c2ecf20Sopenharmony_ci 678c2ecf20Sopenharmony_ci s2mps11_pmic@66 { 688c2ecf20Sopenharmony_ci compatible = "samsung,s2mps11-pmic"; 698c2ecf20Sopenharmony_ci reg = <0x66>; 708c2ecf20Sopenharmony_ci 718c2ecf20Sopenharmony_ci regulators { 728c2ecf20Sopenharmony_ci ldo1_reg: LDO1 { 738c2ecf20Sopenharmony_ci regulator-name = "VDD_ABB_3.3V"; 748c2ecf20Sopenharmony_ci regulator-min-microvolt = <3300000>; 758c2ecf20Sopenharmony_ci regulator-max-microvolt = <3300000>; 768c2ecf20Sopenharmony_ci }; 778c2ecf20Sopenharmony_ci 788c2ecf20Sopenharmony_ci ldo2_reg: LDO2 { 798c2ecf20Sopenharmony_ci regulator-name = "VDD_ALIVE_1.1V"; 808c2ecf20Sopenharmony_ci regulator-min-microvolt = <1100000>; 818c2ecf20Sopenharmony_ci regulator-max-microvolt = <1100000>; 828c2ecf20Sopenharmony_ci regulator-always-on; 838c2ecf20Sopenharmony_ci }; 848c2ecf20Sopenharmony_ci 858c2ecf20Sopenharmony_ci buck1_reg: BUCK1 { 868c2ecf20Sopenharmony_ci regulator-name = "vdd_mif"; 878c2ecf20Sopenharmony_ci regulator-min-microvolt = <950000>; 888c2ecf20Sopenharmony_ci regulator-max-microvolt = <1350000>; 898c2ecf20Sopenharmony_ci regulator-always-on; 908c2ecf20Sopenharmony_ci regulator-boot-on; 918c2ecf20Sopenharmony_ci }; 928c2ecf20Sopenharmony_ci 938c2ecf20Sopenharmony_ci buck2_reg: BUCK2 { 948c2ecf20Sopenharmony_ci regulator-name = "vdd_arm"; 958c2ecf20Sopenharmony_ci regulator-min-microvolt = <950000>; 968c2ecf20Sopenharmony_ci regulator-max-microvolt = <1350000>; 978c2ecf20Sopenharmony_ci regulator-always-on; 988c2ecf20Sopenharmony_ci regulator-boot-on; 998c2ecf20Sopenharmony_ci regulator-ramp-delay = <50000>; 1008c2ecf20Sopenharmony_ci }; 1018c2ecf20Sopenharmony_ci }; 1028c2ecf20Sopenharmony_ci }; 103