Merge tag 'for-linus-20151106' of git://git.infradead.org/linux-mtd
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / mfd / s2mps11.txt
1
2 * Samsung S2MPS11/13/14/15 and S2MPU02 Voltage and Current Regulator
3
4 The Samsung S2MPS11 is a multi-function device which includes voltage and
5 current regulators, RTC, charger controller and other sub-blocks. It is
6 interfaced to the host controller using an I2C interface. Each sub-block is
7 addressed by the host system using different I2C slave addresses.
8
9 Required properties:
10 - compatible: Should be one of the following
11         - "samsung,s2mps11-pmic"
12         - "samsung,s2mps13-pmic"
13         - "samsung,s2mps14-pmic"
14         - "samsung,s2mps15-pmic"
15         - "samsung,s2mpu02-pmic".
16 - reg: Specifies the I2C slave address of the pmic block. It should be 0x66.
17
18 Optional properties:
19 - interrupt-parent: Specifies the phandle of the interrupt controller to which
20   the interrupts from s2mps11 are delivered to.
21 - interrupts: Interrupt specifiers for interrupt sources.
22 - samsung,s2mps11-wrstbi-ground: Indicates that WRSTBI pin of PMIC is pulled
23   down. When the system is suspended it will always go down thus triggerring
24   unwanted buck warm reset (setting buck voltages to default values).
25
26 Optional nodes:
27 - clocks: s2mps11, s2mps13, s2mps15 and s5m8767 provide three(AP/CP/BT) buffered 32.768
28   KHz outputs, so to register these as clocks with common clock framework
29   instantiate a sub-node named "clocks". It uses the common clock binding
30   documented in :
31   [Documentation/devicetree/bindings/clock/clock-bindings.txt]
32   The s2mps14 provides two (AP/BT) buffered 32.768 KHz outputs.
33   - #clock-cells: should be 1.
34
35   - The following is the list of clocks generated by the controller. Each clock
36     is assigned an identifier and client nodes use this identifier to specify
37     the clock which they consume.
38     Clock               ID           Devices
39     ----------------------------------------------------------
40     32KhzAP             0            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
41     32KhzCP             1            S2MPS11, S2MPS13, S2MPS15, S5M8767
42     32KhzBT             2            S2MPS11, S2MPS13, S2MPS14, S2MPS15, S5M8767
43
44   - compatible: Should be one of: "samsung,s2mps11-clk", "samsung,s2mps13-clk",
45                 "samsung,s2mps14-clk", "samsung,s5m8767-clk"
46     The s2msp15 uses the same compatible as s2mps13, as both provides similar clocks.
47
48 - regulators: The regulators of s2mps11 that have to be instantiated should be
49 included in a sub-node named 'regulators'. Regulator nodes included in this
50 sub-node should be of the format as listed below.
51
52         regulator_name {
53                 [standard regulator constraints....];
54         };
55
56  regulator-ramp-delay for BUCKs = [6250/12500/25000(default)/50000] uV/us
57
58  BUCK[2/3/4/6] supports disabling ramp delay on hardware, so explicitly
59  regulator-ramp-delay = <0> can be used for them to disable ramp delay.
60  In the absence of the regulator-ramp-delay property, the default ramp
61  delay will be used.
62
63 NOTE: Some BUCKs share the ramp rate setting i.e. same ramp value will be set
64 for a particular group of BUCKs. So provide same regulator-ramp-delay<value>.
65 Grouping of BUCKs sharing ramp rate setting is as follow : BUCK[1, 6],
66 BUCK[3, 4], and BUCK[7, 8, 10]
67
68 On S2MPS14 the LDO10, LDO11 and LDO12 can be configured to external control
69 over GPIO. To turn this feature on this property must be added to the regulator
70 sub-node:
71         - samsung,ext-control-gpios: GPIO specifier for one GPIO
72                 controlling this regulator (enable/disable);
73 Example:
74         LDO12 {
75                 regulator-name = "V_EMMC_2.8V";
76                 regulator-min-microvolt = <2800000>;
77                 regulator-max-microvolt = <2800000>;
78                 samsung,ext-control-gpios = <&gpk0 2 0>;
79         };
80
81
82 The regulator constraints inside the regulator nodes use the standard regulator
83 bindings which are documented elsewhere.
84
85 The following are the names of the regulators that the s2mps11 pmic block
86 supports. Note: The 'n' in LDOn and BUCKn represents the LDO or BUCK number
87 as per the datasheet of s2mps11.
88
89         - LDOn
90                   - valid values for n are:
91                         - S2MPS11: 1 to 38
92                         - S2MPS13: 1 to 40
93                         - S2MPS14: 1 to 25
94                         - S2MPS15: 1 to 27
95                         - S2MPU02: 1 to 28
96                   - Example: LDO1, LDO2, LDO28
97         - BUCKn
98                   - valid values for n are:
99                         - S2MPS11: 1 to 10
100                         - S2MPS13: 1 to 10
101                         - S2MPS14: 1 to 5
102                         - S2MPS15: 1 to 10
103                         - S2MPU02: 1 to 7
104                   - Example: BUCK1, BUCK2, BUCK9
105
106 Example:
107
108         s2mps11_pmic@66 {
109                 compatible = "samsung,s2mps11-pmic";
110                 reg = <0x66>;
111
112                 s2m_osc: clocks {
113                         compatible = "samsung,s2mps11-clk";
114                         #clock-cells = <1>;
115                         clock-output-names = "xx", "yy", "zz";
116                 };
117
118                 regulators {
119                         ldo1_reg: LDO1 {
120                                 regulator-name = "VDD_ABB_3.3V";
121                                 regulator-min-microvolt = <3300000>;
122                                 regulator-max-microvolt = <3300000>;
123                         };
124
125                         ldo2_reg: LDO2 {
126                                 regulator-name = "VDD_ALIVE_1.1V";
127                                 regulator-min-microvolt = <1100000>;
128                                 regulator-max-microvolt = <1100000>;
129                                 regulator-always-on;
130                         };
131
132                         buck1_reg: BUCK1 {
133                                 regulator-name = "vdd_mif";
134                                 regulator-min-microvolt = <950000>;
135                                 regulator-max-microvolt = <1350000>;
136                                 regulator-always-on;
137                                 regulator-boot-on;
138                         };
139
140                         buck2_reg: BUCK2 {
141                                 regulator-name = "vdd_arm";
142                                 regulator-min-microvolt = <950000>;
143                                 regulator-max-microvolt = <1350000>;
144                                 regulator-always-on;
145                                 regulator-boot-on;
146                                 regulator-ramp-delay = <50000>;
147                         };
148                 };
149         };