905e187da381fe1898a705e60298c6ab878fc969
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3036-kylin.dts
1 /*
2  * This file is dual-licensed: you can use it either under the terms
3  * of the GPL or the X11 license, at your option. Note that this dual
4  * licensing only applies to this file, and not this project as a
5  * whole.
6  *
7  *  a) This file is free software; you can redistribute it and/or
8  *     modify it under the terms of the GNU General Public License as
9  *     published by the Free Software Foundation; either version 2 of the
10  *     License, or (at your option) any later version.
11  *
12  *     This file is distributed in the hope that it will be useful,
13  *     but WITHOUT ANY WARRANTY; without even the implied warranty of
14  *     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
15  *     GNU General Public License for more details.
16  *
17  *  Or, alternatively,
18  *
19  *  b) Permission is hereby granted, free of charge, to any person
20  *     obtaining a copy of this software and associated documentation
21  *     files (the "Software"), to deal in the Software without
22  *     restriction, including without limitation the rights to use,
23  *     copy, modify, merge, publish, distribute, sublicense, and/or
24  *     sell copies of the Software, and to permit persons to whom the
25  *     Software is furnished to do so, subject to the following
26  *     conditions:
27  *
28  *     The above copyright notice and this permission notice shall be
29  *     included in all copies or substantial portions of the Software.
30  *
31  *     THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
32  *     EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
33  *     OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
34  *     NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
35  *     HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
36  *     WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
37  *     FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
38  *     OTHER DEALINGS IN THE SOFTWARE.
39  */
40
41 /dts-v1/;
42
43 #include "rk3036.dtsi"
44
45 / {
46         model = "Rockchip RK3036 KylinBoard";
47         compatible = "rockchip,rk3036-kylin", "rockchip,rk3036";
48
49         sound {
50                 compatible = "simple-audio-card";
51                 simple-audio-card,format = "i2s";
52                 simple-audio-card,name = "rockchip,rt5616-codec";
53                 simple-audio-card,mclk-fs = <256>;
54                 simple-audio-card,widgets =
55                         "Microphone", "Microphone Jack",
56                         "Headphone", "Headphone Jack";
57                 simple-audio-card,routing =
58                         "MIC1", "Microphone Jack",
59                         "MIC2", "Microphone Jack",
60                         "Microphone Jack", "micbias1",
61                         "Headphone Jack", "HPOL",
62                         "Headphone Jack", "HPOR";
63
64                 simple-audio-card,cpu {
65                         sound-dai = <&i2s>;
66                 };
67
68                 simple-audio-card,codec {
69                         sound-dai = <&rt5616>;
70                 };
71         };
72
73         vcc_sys: vsys-regulator {
74                 compatible = "regulator-fixed";
75                 regulator-name = "vcc_sys";
76                 regulator-min-microvolt = <5000000>;
77                 regulator-max-microvolt = <5000000>;
78                 regulator-always-on;
79                 regulator-boot-on;
80         };
81 };
82
83 &acodec {
84         status = "okay";
85 };
86
87 &emmc {
88         status = "okay";
89 };
90
91 &i2c1 {
92         clock-frequency = <400000>;
93
94         status = "okay";
95
96         rk808: pmic@1b {
97                 compatible = "rockchip,rk808";
98                 reg = <0x1b>;
99                 interrupt-parent = <&gpio2>;
100                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
101                 pinctrl-names = "default";
102                 pinctrl-0 = <&pmic_int &global_pwroff>;
103                 rockchip,system-power-controller;
104                 wakeup-source;
105                 #clock-cells = <1>;
106                 clock-output-names = "xin32k", "rk808-clkout2";
107
108                 vcc1-supply = <&vcc_sys>;
109                 vcc2-supply = <&vcc_sys>;
110                 vcc3-supply = <&vcc_sys>;
111                 vcc4-supply = <&vcc_sys>;
112                 vcc6-supply = <&vcc_sys>;
113                 vcc7-supply = <&vcc_sys>;
114                 vcc8-supply = <&vcc_18>;
115                 vcc9-supply = <&vcc_io>;
116                 vcc10-supply = <&vcc_io>;
117                 vcc11-supply = <&vcc_sys>;
118                 vcc12-supply = <&vcc_io>;
119                 vddio-supply = <&vccio_pmu>;
120
121                 regulators {
122                         vdd_cpu: DCDC_REG1 {
123                                 regulator-always-on;
124                                 regulator-boot-on;
125                                 regulator-min-microvolt = <750000>;
126                                 regulator-max-microvolt = <1350000>;
127                                 regulator-name = "vdd_arm";
128                                 regulator-state-mem {
129                                         regulator-off-in-suspend;
130                                 };
131                         };
132
133                         vdd_gpu: DCDC_REG2 {
134                                 regulator-always-on;
135                                 regulator-boot-on;
136                                 regulator-min-microvolt = <850000>;
137                                 regulator-max-microvolt = <1250000>;
138                                 regulator-name = "vdd_gpu";
139                                 regulator-state-mem {
140                                         regulator-on-in-suspend;
141                                         regulator-suspend-microvolt = <1000000>;
142                                 };
143                         };
144
145                         vcc_ddr: DCDC_REG3 {
146                                 regulator-always-on;
147                                 regulator-boot-on;
148                                 regulator-name = "vcc_ddr";
149                                 regulator-state-mem {
150                                         regulator-on-in-suspend;
151                                 };
152                         };
153
154                         vcc_io: DCDC_REG4 {
155                                 regulator-always-on;
156                                 regulator-boot-on;
157                                 regulator-min-microvolt = <3300000>;
158                                 regulator-max-microvolt = <3300000>;
159                                 regulator-name = "vcc_io";
160                                 regulator-state-mem {
161                                         regulator-on-in-suspend;
162                                         regulator-suspend-microvolt = <3300000>;
163                                 };
164                         };
165
166                         vccio_pmu: LDO_REG1 {
167                                 regulator-always-on;
168                                 regulator-boot-on;
169                                 regulator-min-microvolt = <3300000>;
170                                 regulator-max-microvolt = <3300000>;
171                                 regulator-name = "vccio_pmu";
172                                 regulator-state-mem {
173                                         regulator-on-in-suspend;
174                                         regulator-suspend-microvolt = <3300000>;
175                                 };
176                         };
177
178                         vcc_tp: LDO_REG2 {
179                                 regulator-always-on;
180                                 regulator-boot-on;
181                                 regulator-min-microvolt = <3300000>;
182                                 regulator-max-microvolt = <3300000>;
183                                 regulator-name = "vcc_tp";
184                                 regulator-state-mem {
185                                         regulator-off-in-suspend;
186                                 };
187                         };
188
189                         vdd_10: LDO_REG3 {
190                                 regulator-always-on;
191                                 regulator-boot-on;
192                                 regulator-min-microvolt = <1000000>;
193                                 regulator-max-microvolt = <1000000>;
194                                 regulator-name = "vdd_10";
195                                 regulator-state-mem {
196                                         regulator-on-in-suspend;
197                                         regulator-suspend-microvolt = <1000000>;
198                                 };
199                         };
200
201                         vcc18_lcd: LDO_REG4 {
202                                 regulator-always-on;
203                                 regulator-boot-on;
204                                 regulator-min-microvolt = <1800000>;
205                                 regulator-max-microvolt = <1800000>;
206                                 regulator-name = "vcc18_lcd";
207                                 regulator-state-mem {
208                                         regulator-on-in-suspend;
209                                         regulator-suspend-microvolt = <1800000>;
210                                 };
211                         };
212
213                         vccio_sd: LDO_REG5 {
214                                 regulator-always-on;
215                                 regulator-boot-on;
216                                 regulator-min-microvolt = <1800000>;
217                                 regulator-max-microvolt = <3300000>;
218                                 regulator-name = "vccio_sd";
219                                 regulator-state-mem {
220                                         regulator-on-in-suspend;
221                                         regulator-suspend-microvolt = <3300000>;
222                                 };
223                         };
224
225                         vout5: LDO_REG6 {
226                                 regulator-always-on;
227                                 regulator-boot-on;
228                                 regulator-min-microvolt = <1800000>;
229                                 regulator-max-microvolt = <2500000>;
230                                 regulator-name = "vout5";
231                                 regulator-state-mem {
232                                         regulator-on-in-suspend;
233                                         regulator-suspend-microvolt = <1800000>;
234                                 };
235                         };
236
237                         vcc_18: LDO_REG7 {
238                                 regulator-always-on;
239                                 regulator-boot-on;
240                                 regulator-min-microvolt = <1800000>;
241                                 regulator-max-microvolt = <1800000>;
242                                 regulator-name = "vcc_18";
243                                 regulator-state-mem {
244                                         regulator-on-in-suspend;
245                                         regulator-suspend-microvolt = <1800000>;
246                                 };
247                         };
248
249                         vcca_codec: LDO_REG8 {
250                                 regulator-always-on;
251                                 regulator-boot-on;
252                                 regulator-min-microvolt = <1800000>;
253                                 regulator-max-microvolt = <1800000>;
254                                 regulator-name = "vcca_codec";
255                                 regulator-state-mem {
256                                         regulator-on-in-suspend;
257                                         regulator-suspend-microvolt = <1800000>;
258                                 };
259                         };
260
261                         vcc_wl: SWITCH_REG1 {
262                                 regulator-always-on;
263                                 regulator-boot-on;
264                                 regulator-name = "vcc_wl";
265                                 regulator-state-mem {
266                                         regulator-on-in-suspend;
267                                 };
268                         };
269
270                         vcc_lcd: SWITCH_REG2 {
271                                 regulator-always-on;
272                                 regulator-boot-on;
273                                 regulator-name = "vcc_lcd";
274                                 regulator-state-mem {
275                                         regulator-on-in-suspend;
276                                 };
277                         };
278                 };
279         };
280 };
281
282 &i2c2 {
283         status = "okay";
284
285         rt5616: rt5616@1b {
286                 compatible = "rt5616";
287                 reg = <0x1b>;
288                 #sound-dai-cells = <0>;
289         };
290 };
291
292 &i2s {
293         #sound-dai-cells = <0>;
294         status = "okay";
295 };
296
297 &sdio {
298         status = "okay";
299
300         broken-cd;
301         bus-width = <4>;
302         cap-sd-highspeed;
303         cap-sdio-irq;
304         default-sample-phase = <90>;
305         keep-power-in-suspend;
306         non-removable;
307         num-slots = <1>;
308         pinctrl-names = "default";
309         pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
310         sd-uhs-sdr12;
311         sd-uhs-sdr25;
312         sd-uhs-sdr50;
313         sd-uhs-sdr104;
314 };
315
316 &uart0 {
317         status = "okay";
318 };
319
320 &uart2 {
321         status = "okay";
322 };
323
324 &usb_host {
325         status = "okay";
326 };
327
328 &usb_otg {
329         status = "okay";
330 };
331
332 &pinctrl {
333         pmic {
334                 pmic_int: pmic-int {
335                         rockchip,pins = <2 2 RK_FUNC_GPIO &pcfg_pull_default>;
336                 };
337         };
338
339         sleep {
340                 global_pwroff: global-pwroff {
341                         rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
342                 };
343         };
344 };