1*4882a593SmuzhiyunBinding for Samsung S5M8767 regulator block 2*4882a593Smuzhiyun=========================================== 3*4882a593Smuzhiyun 4*4882a593SmuzhiyunThis is a part of device tree bindings for S5M family multi-function devices. 5*4882a593SmuzhiyunMore information can be found in bindings/mfd/sec-core.txt file. 6*4882a593Smuzhiyun 7*4882a593SmuzhiyunThe S5M8767 device provide buck and LDO regulators. 8*4882a593Smuzhiyun 9*4882a593SmuzhiyunTo register these with regulator framework instantiate under main device node 10*4882a593Smuzhiyuna sub-node named "regulators" with more sub-nodes for each regulator using the 11*4882a593Smuzhiyuncommon regulator binding documented in: 12*4882a593Smuzhiyun - Documentation/devicetree/bindings/regulator/regulator.txt 13*4882a593Smuzhiyun 14*4882a593Smuzhiyun 15*4882a593SmuzhiyunRequired properties of the main device node (the parent!): 16*4882a593Smuzhiyun - s5m8767,pmic-buck-ds-gpios: GPIO specifiers for three host gpio's used 17*4882a593Smuzhiyun for selecting GPIO DVS lines. It is one-to-one mapped to dvs gpio lines. 18*4882a593Smuzhiyun 19*4882a593Smuzhiyun [1] If either of the 's5m8767,pmic-buck[2/3/4]-uses-gpio-dvs' optional 20*4882a593Smuzhiyun property is specified, then all the eight voltage values for the 21*4882a593Smuzhiyun 's5m8767,pmic-buck[2/3/4]-dvs-voltage' should be specified. 22*4882a593Smuzhiyun 23*4882a593SmuzhiyunOptional properties of the main device node (the parent!): 24*4882a593Smuzhiyun - s5m8767,pmic-buck2-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 25*4882a593Smuzhiyun units for buck2 when changing voltage using gpio dvs. Refer to [1] below 26*4882a593Smuzhiyun for additional information. 27*4882a593Smuzhiyun 28*4882a593Smuzhiyun - s5m8767,pmic-buck3-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 29*4882a593Smuzhiyun units for buck3 when changing voltage using gpio dvs. Refer to [1] below 30*4882a593Smuzhiyun for additional information. 31*4882a593Smuzhiyun 32*4882a593Smuzhiyun - s5m8767,pmic-buck4-dvs-voltage: A set of 8 voltage values in micro-volt (uV) 33*4882a593Smuzhiyun units for buck4 when changing voltage using gpio dvs. Refer to [1] below 34*4882a593Smuzhiyun for additional information. 35*4882a593Smuzhiyun 36*4882a593Smuzhiyun - s5m8767,pmic-buck2-uses-gpio-dvs: 'buck2' can be controlled by gpio dvs. 37*4882a593Smuzhiyun - s5m8767,pmic-buck3-uses-gpio-dvs: 'buck3' can be controlled by gpio dvs. 38*4882a593Smuzhiyun - s5m8767,pmic-buck4-uses-gpio-dvs: 'buck4' can be controlled by gpio dvs. 39*4882a593Smuzhiyun 40*4882a593SmuzhiyunAdditional properties required if either of the optional properties are used: 41*4882a593Smuzhiyun 42*4882a593Smuzhiyun - s5m8767,pmic-buck-default-dvs-idx: Default voltage setting selected from 43*4882a593Smuzhiyun the possible 8 options selectable by the dvs gpios. The value of this 44*4882a593Smuzhiyun property should be between 0 and 7. If not specified or if out of range, the 45*4882a593Smuzhiyun default value of this property is set to 0. 46*4882a593Smuzhiyun 47*4882a593Smuzhiyun - s5m8767,pmic-buck-dvs-gpios: GPIO specifiers for three host gpio's used 48*4882a593Smuzhiyun for dvs. The format of the gpio specifier depends in the gpio controller. 49*4882a593Smuzhiyun 50*4882a593Smuzhiyun 51*4882a593SmuzhiyunNames of regulators supported by S5M8767 device: 52*4882a593Smuzhiyun - LDOn 53*4882a593Smuzhiyun - valid values for n are 1 to 28 54*4882a593Smuzhiyun - Example: LDO1, LDO2, LDO28 55*4882a593Smuzhiyun - BUCKn 56*4882a593Smuzhiyun - valid values for n are 1 to 9. 57*4882a593Smuzhiyun - Example: BUCK1, BUCK2, BUCK9 58*4882a593SmuzhiyunNote: The 'n' in LDOn and BUCKn represents the LDO or BUCK number 59*4882a593Smuzhiyunas per the datasheet of device. 60*4882a593Smuzhiyun 61*4882a593Smuzhiyun 62*4882a593SmuzhiyunOptional properties of the nodes under "regulators" sub-node: 63*4882a593Smuzhiyun - op_mode: describes the different operating modes of the LDO's with 64*4882a593Smuzhiyun power mode change in SOC. The different possible values are, 65*4882a593Smuzhiyun 0 - always off mode 66*4882a593Smuzhiyun 1 - on in normal mode 67*4882a593Smuzhiyun 2 - low power mode 68*4882a593Smuzhiyun 3 - suspend mode 69*4882a593Smuzhiyun - s5m8767,pmic-ext-control-gpios: (optional) GPIO specifier for one 70*4882a593Smuzhiyun GPIO controlling this regulator 71*4882a593Smuzhiyun (enable/disable); This is valid only 72*4882a593Smuzhiyun for buck9. 73*4882a593Smuzhiyun 74*4882a593SmuzhiyunExample: 75*4882a593Smuzhiyun 76*4882a593Smuzhiyun s5m8767_pmic@66 { 77*4882a593Smuzhiyun compatible = "samsung,s5m8767-pmic"; 78*4882a593Smuzhiyun reg = <0x66>; 79*4882a593Smuzhiyun 80*4882a593Smuzhiyun s5m8767,pmic-buck2-uses-gpio-dvs; 81*4882a593Smuzhiyun s5m8767,pmic-buck3-uses-gpio-dvs; 82*4882a593Smuzhiyun s5m8767,pmic-buck4-uses-gpio-dvs; 83*4882a593Smuzhiyun 84*4882a593Smuzhiyun s5m8767,pmic-buck-default-dvs-idx = <0>; 85*4882a593Smuzhiyun 86*4882a593Smuzhiyun s5m8767,pmic-buck-dvs-gpios = <&gpx0 0 0>, /* DVS1 */ 87*4882a593Smuzhiyun <&gpx0 1 0>, /* DVS2 */ 88*4882a593Smuzhiyun <&gpx0 2 0>; /* DVS3 */ 89*4882a593Smuzhiyun 90*4882a593Smuzhiyun s5m8767,pmic-buck-ds-gpios = <&gpx2 3 0>, /* SET1 */ 91*4882a593Smuzhiyun <&gpx2 4 0>, /* SET2 */ 92*4882a593Smuzhiyun <&gpx2 5 0>; /* SET3 */ 93*4882a593Smuzhiyun 94*4882a593Smuzhiyun s5m8767,pmic-buck2-dvs-voltage = <1350000>, <1300000>, 95*4882a593Smuzhiyun <1250000>, <1200000>, 96*4882a593Smuzhiyun <1150000>, <1100000>, 97*4882a593Smuzhiyun <1000000>, <950000>; 98*4882a593Smuzhiyun 99*4882a593Smuzhiyun s5m8767,pmic-buck3-dvs-voltage = <1100000>, <1100000>, 100*4882a593Smuzhiyun <1100000>, <1100000>, 101*4882a593Smuzhiyun <1000000>, <1000000>, 102*4882a593Smuzhiyun <1000000>, <1000000>; 103*4882a593Smuzhiyun 104*4882a593Smuzhiyun s5m8767,pmic-buck4-dvs-voltage = <1200000>, <1200000>, 105*4882a593Smuzhiyun <1200000>, <1200000>, 106*4882a593Smuzhiyun <1200000>, <1200000>, 107*4882a593Smuzhiyun <1200000>, <1200000>; 108*4882a593Smuzhiyun 109*4882a593Smuzhiyun regulators { 110*4882a593Smuzhiyun ldo1_reg: LDO1 { 111*4882a593Smuzhiyun regulator-name = "VDD_ABB_3.3V"; 112*4882a593Smuzhiyun regulator-min-microvolt = <3300000>; 113*4882a593Smuzhiyun regulator-max-microvolt = <3300000>; 114*4882a593Smuzhiyun op_mode = <1>; /* Normal Mode */ 115*4882a593Smuzhiyun }; 116*4882a593Smuzhiyun 117*4882a593Smuzhiyun ldo2_reg: LDO2 { 118*4882a593Smuzhiyun regulator-name = "VDD_ALIVE_1.1V"; 119*4882a593Smuzhiyun regulator-min-microvolt = <1100000>; 120*4882a593Smuzhiyun regulator-max-microvolt = <1100000>; 121*4882a593Smuzhiyun regulator-always-on; 122*4882a593Smuzhiyun }; 123*4882a593Smuzhiyun 124*4882a593Smuzhiyun buck1_reg: BUCK1 { 125*4882a593Smuzhiyun regulator-name = "VDD_MIF_1.2V"; 126*4882a593Smuzhiyun regulator-min-microvolt = <950000>; 127*4882a593Smuzhiyun regulator-max-microvolt = <1350000>; 128*4882a593Smuzhiyun regulator-always-on; 129*4882a593Smuzhiyun regulator-boot-on; 130*4882a593Smuzhiyun }; 131*4882a593Smuzhiyun 132*4882a593Smuzhiyun vemmc_reg: BUCK9 { 133*4882a593Smuzhiyun regulator-name = "VMEM_VDD_2.8V"; 134*4882a593Smuzhiyun regulator-min-microvolt = <2800000>; 135*4882a593Smuzhiyun regulator-max-microvolt = <2800000>; 136*4882a593Smuzhiyun op_mode = <3>; /* Standby Mode */ 137*4882a593Smuzhiyun s5m8767,pmic-ext-control-gpios = <&gpk0 2 0>; 138*4882a593Smuzhiyun }; 139*4882a593Smuzhiyun }; 140*4882a593Smuzhiyun }; 141