rk: restore file mode
[firefly-linux-kernel-4.4.55.git] / Documentation / devicetree / bindings / mfd / rk808.txt
1 rk808 Power Management Integrated Circuit
2
3 Required properties:
4 - compatible: "rockchip,rk808" 
5 - reg: I2C slave address
6 - gpios: the interrupt pin or sleep pin
7   use gpio get IRQ number
8 - regulators: This is the list of child nodes that specify the regulator
9   initialization data for defined regulators. Not all regulators for the given
10   device need to be present. The definition for each of these nodes is defined
11   using the standard binding for regulators found at
12   Documentation/devicetree/bindings/regulator/regulator.txt.
13   The regulator is matched with the regulator-compatible.
14
15   The valid regulator-compatible values are:
16   rk808: rk_dcdc1, rk_dcdc2, rk_dcdc3, rk_dcdc4, rk_ldo1, rk_ldo2, rk_ldo3, rk_ldo4, rk_ldo5, rk_ldo6,
17             rk_ldo7, rk_ldo8
18
19 Optional properties:
20 - gpios: 
21         gpios 0 :irq pin gpio
22         gpios 1 :sleep pin gpio
23 - regulator-initial-mode: default mode to set on startup
24 - regulator-initial-state: suspend state to set at init
25 - regulator-state-mem, regulator-state-disk, regulator-state-standby:
26         defines regulator suspend to memory, suspend to disk (hibernate) and standby respectively.
27         have following sub-constarints:
28         - regulator-state-uv: suspend voltage
29         - regulator-state-mode: suspend regulator operating mode
30         - regulator-state-enabled: is regulator enabled in this suspend state
31         - regulator-state-disabled: is the regulator disbled in this suspend state
32 -regulator-initial-mode and regulator-state-mode is set as:
33         REGULATOR_MODE_FAST                     0x1
34         REGULATOR_MODE_NORMAL                   0x2
35         REGULATOR_MODE_IDLE                     0x4
36         REGULATOR_MODE_STANDBY                  0x8
37  
38 Example:
39
40         rk808: rk808@1b {
41                 reg = <0x1b>;
42                 status = "okay";
43         };
44
45         gpios =<&gpio0 GPIO_B3 GPIO_ACTIVE_HIGH>,<&gpio0 GPIO_A1 GPIO_ACTIVE_LOW>; 
46
47 &rk808 {
48         compatible = "rockchip,rk808";
49         
50         regulators {
51                 #address-cells = <1>;
52                 #size-cells = <0>;      
53
54                 rk808_dcdc1_reg: regulator@0 {
55                         reg = <0>;
56                         regulator-compatible = "rk_dcdc1";
57                         regulator-min-microvolt = <700000>;
58                         regulator-max-microvolt = <1500000>;
59                         regulator-initial-mode = <0x2>;
60                         regulator-initial-state = <3>;
61                         regulator-state-mem {
62                                 regulator-state-mode = <0x2>;     
63                                 regulator-state-enabled;         
64                                 regulator-state-uv = <900000>; 
65                         };              
66                 };
67
68                 rk808_dcdc2_reg: regulator@1 {
69                         reg = <1>;
70                         regulator-compatible = "rk_dcdc2";
71                         regulator-min-microvolt = <700000>;
72                         regulator-max-microvolt = <1500000>;    
73                         regulator-initial-mode = <0x2>;
74                         regulator-initial-state = <3>;
75                         regulator-state-mem {
76                                 regulator-state-mode = <0x2>;
77                                 regulator-state-enabled;
78                                 regulator-state-uv = <900000>;
79                         };              
80                 };
81
82                 rk808_dcdc3_reg: regulator@2 {
83                         reg = <2>;
84                         regulator-compatible = "rk_dcdc3";
85                         regulator-initial-mode = <0x2>;
86                         regulator-initial-state = <3>;
87                         regulator-state-mem {
88                                 regulator-state-mode = <0x2>;
89                                 regulator-state-enabled;
90                                 regulator-state-uv = <1200000>;
91                         };      
92                 };
93
94                 rk808_dcdc4_reg: regulator@3 {
95                         reg = <3>;
96                         regulator-compatible = "rk_dcdc4";
97                         regulator-initial-mode = <0x2>;
98                         regulator-initial-state = <3>;
99                         regulator-state-mem {
100                                 regulator-state-mode = <0x2>;
101                                 regulator-state-enabled;
102                                 regulator-state-uv = <2800000>;
103                         };              
104                 };
105
106                 rk808_ldo1_reg: regulator@4 {
107                         reg = <4>;
108                         regulator-compatible = "rk_ldo1";
109                         regulator-initial-state = <3>;
110                         regulator-state-mem {
111                                 regulator-state-enabled;
112                                 regulator-state-uv = <3300000>;
113                         };      
114                 };
115
116                 rk808_ldo2_reg: regulator@5 {
117                         reg = <5>;
118                         regulator-compatible = "rk_ldo2";
119                         regulator-initial-state = <3>;
120                         regulator-state-mem {
121                                 regulator-state-enabled;
122                                 regulator-state-uv = <3300000>;
123                         };      
124                 };
125
126                 rk808_ldo3_reg: regulator@6 {
127                         reg = <6>;
128                         regulator-compatible = "rk_ldo3";
129                         regulator-initial-state = <3>;
130                         regulator-state-mem {
131                                 regulator-state-enabled;
132                                 regulator-state-uv = <1000000>;
133                         };      
134                 };
135
136                 rk808_ldo4_reg: regulator@7{
137                         reg = <7>;
138                         regulator-compatible = "rk_ldo4";
139                         regulator-initial-state = <3>;
140                         regulator-state-mem {
141                                 regulator-state-enabled;
142                                 regulator-state-uv = <1800000>;
143                         };      
144                 };
145
146                 rk808_ldo5_reg: regulator@8{
147                         reg = <8>;
148                         regulator-compatible = "rk_ldo5";
149                         regulator-initial-state = <3>;
150                         regulator-state-mem {
151                                 regulator-state-enabled;
152                                 regulator-state-uv = <2800000>;
153                         };      
154                 };
155
156                 rk808_ldo6_reg: regulator@9{
157                         reg = <9>;
158                         regulator-compatible = "rk_ldo6";
159                         regulator-initial-state = <3>;
160                         regulator-state-mem {
161                                 regulator-state-enabled;
162                                 regulator-state-uv = <1200000>;
163                         };      
164                 };
165
166                 rk808_ldo7_reg: regulator@10 {
167                         reg = <10>;
168                         regulator-compatible = "rk_ldo7";
169                         regulator-initial-state = <3>;
170                         regulator-state-mem {
171                                 regulator-state-enabled;
172                                 regulator-state-uv = <1800000>;
173                         };      
174                 };
175
176                 rk808_ldo8_reg: regulator@11{
177                         reg = <11>;
178                         regulator-compatible = "rk_ldo8";
179                         regulator-initial-state = <3>;
180                         regulator-state-mem {
181                                 regulator-state-enabled;
182                                 regulator-state-uv = <1800000>;
183                         };      
184                 };
185
186         };
187 };
188