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