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