ARM64: dts: rockchip: add pmic node for RK3399
[firefly-linux-kernel-4.4.55.git] / arch / arm64 / boot / dts / rockchip / rk3399-tb.dtsi
1 /*
2  * Copyright (c) 2016 Fuzhou Rockchip Electronics Co., Ltd
3  *
4  * This file is dual-licensed: you can use it either under the terms
5  * of the GPL or the X11 license, at your option. Note that this dual
6  * licensing only applies to this file, and not this project as a
7  * whole.
8  *
9  *  a) This file is free software; you can redistribute it and/or
10  *     modify it under the terms of the GNU General Public License as
11  *     published by the Free Software Foundation; either version 2 of the
12  *     License, or (at your option) any later version.
13  *
14  *     This file is distributed in the hope that it will be useful,
15  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *     GNU General Public License for more details.
18  *
19  * Or, alternatively,
20  *
21  *  b) Permission is hereby granted, free of charge, to any person
22  *     obtaining a copy of this software and associated documentation
23  *     files (the "Software"), to deal in the Software without
24  *     restriction, including without limitation the rights to use,
25  *     copy, modify, merge, publish, distribute, sublicense, and/or
26  *     sell copies of the Software, and to permit persons to whom the
27  *     Software is furnished to do so, subject to the following
28  *     conditions:
29  *
30  *     The above copyright notice and this permission notice shall be
31  *     included in all copies or substantial portions of the Software.
32  *
33  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
34  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
35  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
36  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
37  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
38  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
39  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
40  *     OTHER DEALINGS IN THE SOFTWARE.
41  */
42
43 #include "rk3399.dtsi"
44
45 / {
46         compatible = "rockchip,tb", "rockchip,rk3399";
47
48         vdd_log: vdd-log {
49                 compatible = "pwm-regulator";
50                 pwms = <&pwm2 0 1000>;
51                 regulator-name = "vdd_log";
52                 regulator-min-microvolt = <800000>;
53                 regulator-max-microvolt = <1400000>;
54                 regulator-always-on;
55                 status = "okay";
56         };
57
58         vdd_center: vdd-center {
59                 compatible = "pwm-regulator";
60                 pwms = <&pwm3 0 1000>;
61                 regulator-name = "vdd_center";
62                 regulator-min-microvolt = <800000>;
63                 regulator-max-microvolt = <1400000>;
64                 regulator-always-on;
65                 status = "okay";
66         };
67
68         vcc3v3_sys: vcc3v3-sys {
69                 compatible = "regulator-fixed";
70                 regulator-name = "vcc3v3_sys";
71                 regulator-always-on;
72                 regulator-boot-on;
73                 regulator-min-microvolt = <3300000>;
74                 regulator-max-microvolt = <3300000>;
75         };
76 };
77
78 &i2s0 {
79         status = "okay";
80 };
81
82 &i2c0 {
83         status = "okay";
84
85         rk808: pmic@1b {
86                 compatible = "rockchip,rk808";
87                 reg = <0x1b>;
88                 interrupt-parent = <&gpio1>;
89                 interrupts = <21 IRQ_TYPE_LEVEL_LOW>;
90                 pinctrl-names = "default";
91                 pinctrl-0 = <&pmic_int_l>;
92                 rockchip,system-power-controller;
93                 wakeup-source;
94                 #clock-cells = <1>;
95                 clock-output-names = "xin32k", "rk808-clkout2";
96
97                 vcc1-supply = <&vcc3v3_sys>;
98                 vcc2-supply = <&vcc3v3_sys>;
99                 vcc3-supply = <&vcc3v3_sys>;
100                 vcc4-supply = <&vcc3v3_sys>;
101                 vcc6-supply = <&vcc3v3_sys>;
102                 vcc7-supply = <&vcc3v3_sys>;
103                 vcc8-supply = <&vcc3v3_sys>;
104                 vcc9-supply = <&vcc3v3_sys>;
105                 vcc10-supply = <&vcc3v3_sys>;
106                 vcc11-supply = <&vcc3v3_sys>;
107                 vcc12-supply = <&vcc3v3_sys>;
108                 vddio-supply = <&vcc1v8_pmu>;
109
110                 regulators {
111                         vdd_cpu_b: DCDC_REG1 {
112                                 regulator-always-on;
113                                 regulator-boot-on;
114                                 regulator-min-microvolt = <750000>;
115                                 regulator-max-microvolt = <1350000>;
116                                 regulator-name = "vdd_cpu_b";
117                                 regulator-state-mem {
118                                         regulator-off-in-suspend;
119                                 };
120                         };
121
122                         vdd_cpu_l: DCDC_REG2 {
123                                 regulator-always-on;
124                                 regulator-boot-on;
125                                 regulator-min-microvolt = <750000>;
126                                 regulator-max-microvolt = <1350000>;
127                                 regulator-name = "vdd_cpu_l";
128                                 regulator-state-mem {
129                                         regulator-off-in-suspend;
130                                 };
131                         };
132
133                         vcc_ddr: DCDC_REG3 {
134                                 regulator-always-on;
135                                 regulator-boot-on;
136                                 regulator-name = "vcc_ddr";
137                                 regulator-state-mem {
138                                         regulator-on-in-suspend;
139                                 };
140                         };
141
142                         vcc_1v8: DCDC_REG4 {
143                                 regulator-always-on;
144                                 regulator-boot-on;
145                                 regulator-min-microvolt = <1800000>;
146                                 regulator-max-microvolt = <1800000>;
147                                 regulator-name = "vcc_1v8";
148                                 regulator-state-mem {
149                                         regulator-on-in-suspend;
150                                         regulator-suspend-microvolt = <1800000>;
151                                 };
152                         };
153
154                         vcc1v8_dvp: LDO_REG1 {
155                                 regulator-always-on;
156                                 regulator-boot-on;
157                                 regulator-min-microvolt = <1800000>;
158                                 regulator-max-microvolt = <1800000>;
159                                 regulator-name = "vcc1v8_dvp";
160                                 regulator-state-mem {
161                                         regulator-on-in-suspend;
162                                         regulator-suspend-microvolt = <1800000>;
163                                 };
164                         };
165
166                         vcc3v0_tp: LDO_REG2 {
167                                 regulator-always-on;
168                                 regulator-boot-on;
169                                 regulator-min-microvolt = <3000000>;
170                                 regulator-max-microvolt = <3000000>;
171                                 regulator-name = "vcc3v0_tp";
172                                 regulator-state-mem {
173                                         regulator-off-in-suspend;
174                                 };
175                         };
176
177                         vcc1v8_pmu: LDO_REG3 {
178                                 regulator-always-on;
179                                 regulator-boot-on;
180                                 regulator-min-microvolt = <1800000>;
181                                 regulator-max-microvolt = <1800000>;
182                                 regulator-name = "vcc1v8_pmu";
183                                 regulator-state-mem {
184                                         regulator-on-in-suspend;
185                                         regulator-suspend-microvolt = <1800000>;
186                                 };
187                         };
188
189                         vcc_sd: LDO_REG4 {
190                                 regulator-always-on;
191                                 regulator-boot-on;
192                                 regulator-min-microvolt = <1800000>;
193                                 regulator-max-microvolt = <3300000>;
194                                 regulator-name = "vcc_sd";
195                                 regulator-state-mem {
196                                         regulator-on-in-suspend;
197                                         regulator-suspend-microvolt = <3300000>;
198                                 };
199                         };
200
201                         vcca3v0_codec: LDO_REG5 {
202                                 regulator-always-on;
203                                 regulator-boot-on;
204                                 regulator-min-microvolt = <3000000>;
205                                 regulator-max-microvolt = <3000000>;
206                                 regulator-name = "vcca3v0_codec";
207                                 regulator-state-mem {
208                                         regulator-on-in-suspend;
209                                         regulator-suspend-microvolt = <3000000>;
210                                 };
211                         };
212
213                         vcc_1v5: LDO_REG6 {
214                                 regulator-always-on;
215                                 regulator-boot-on;
216                                 regulator-min-microvolt = <1500000>;
217                                 regulator-max-microvolt = <1500000>;
218                                 regulator-name = "vcc_1v5";
219                                 regulator-state-mem {
220                                         regulator-on-in-suspend;
221                                         regulator-suspend-microvolt = <1500000>;
222                                 };
223                         };
224
225                         vcca1v8_codec: LDO_REG7 {
226                                 regulator-always-on;
227                                 regulator-boot-on;
228                                 regulator-min-microvolt = <1800000>;
229                                 regulator-max-microvolt = <1800000>;
230                                 regulator-name = "vcca1v8_codec";
231                                 regulator-state-mem {
232                                         regulator-on-in-suspend;
233                                         regulator-suspend-microvolt = <1800000>;
234                                 };
235                         };
236
237                         vcc_3v0: LDO_REG8 {
238                                 regulator-always-on;
239                                 regulator-boot-on;
240                                 regulator-min-microvolt = <3000000>;
241                                 regulator-max-microvolt = <3000000>;
242                                 regulator-name = "vcc_3v0";
243                                 regulator-state-mem {
244                                         regulator-on-in-suspend;
245                                         regulator-suspend-microvolt = <3000000>;
246                                 };
247                         };
248
249                         vcc3v3_s3: SWITCH_REG1 {
250                                 regulator-always-on;
251                                 regulator-boot-on;
252                                 regulator-name = "vcc3v3_s3";
253                                 regulator-state-mem {
254                                         regulator-on-in-suspend;
255                                 };
256                         };
257
258                         vcc3v3_s0: SWITCH_REG2 {
259                                 regulator-always-on;
260                                 regulator-boot-on;
261                                 regulator-name = "vcc3v3_s0";
262                                 regulator-state-mem {
263                                         regulator-on-in-suspend;
264                                 };
265                         };
266                 };
267         };
268 };
269
270 &pwm2 {
271         status = "okay";
272 };
273
274 &pwm3 {
275         status = "okay";
276 };
277
278 &tsadc {
279         rockchip,hw-tshut-mode = <1>; /* tshut mode 0:CRU 1:GPIO */
280         rockchip,hw-tshut-polarity = <0>; /* tshut polarity 0:LOW 1:HIGH */
281         status = "okay";
282 };
283
284 &uart2 {
285         status = "okay";
286 };
287
288 &usb_host0_echi {
289         status = "okay";
290 };
291
292 &usb_host0_ohci {
293         status = "okay";
294 };
295
296 &usb_host1_echi {
297         status = "okay";
298 };
299
300 &usb_host1_ohci {
301         status = "okay";
302 };