]> git.karo-electronics.de Git - karo-tx-linux.git/blob - arch/arm/boot/dts/rk3036-kylin.dts
Merge remote-tracking branch 'usb-chipidea-next/ci-for-usb-next'
[karo-tx-linux.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         leds: gpio-leds {
50                 compatible = "gpio-leds";
51
52                 work {
53                         gpios = <&gpio2 30 GPIO_ACTIVE_HIGH>;
54                         label = "kylin:red:led";
55                         pinctrl-names = "default";
56                         pinctrl-0 = <&led_ctl>;
57                 };
58         };
59
60         sdio_pwrseq: sdio-pwrseq {
61                 compatible = "mmc-pwrseq-simple";
62                 pinctrl-names = "default";
63                 pinctrl-0 = <&bt_wake_h>;
64
65                 /*
66                  * On the module itself this is one of these (depending
67                  * on the actual card populated):
68                  * - SDIO_RESET_L_WL_REG_ON
69                  * - SDIO_RESET_L_WL_RST
70                  * - SDIO_RESET_L_BT_EN
71                  */
72                 reset-gpios = <&gpio0 26 GPIO_ACTIVE_LOW>, /* WL_REG_ON */
73                               <&gpio0 27 GPIO_ACTIVE_LOW>, /* WL_RST */
74                               <&gpio2 9  GPIO_ACTIVE_LOW>; /* BT_EN */
75         };
76
77         sound {
78                 compatible = "simple-audio-card";
79                 simple-audio-card,format = "i2s";
80                 simple-audio-card,name = "rockchip,rt5616-codec";
81                 simple-audio-card,mclk-fs = <512>;
82                 simple-audio-card,widgets =
83                         "Microphone", "Microphone Jack",
84                         "Headphone", "Headphone Jack";
85                 simple-audio-card,routing =
86                         "MIC1", "Microphone Jack",
87                         "MIC2", "Microphone Jack",
88                         "Microphone Jack", "micbias1",
89                         "Headphone Jack", "HPOL",
90                         "Headphone Jack", "HPOR";
91
92                 simple-audio-card,cpu {
93                         sound-dai = <&i2s>;
94                 };
95
96                 simple-audio-card,codec {
97                         sound-dai = <&rt5616>;
98                 };
99         };
100
101         vcc_sys: vsys-regulator {
102                 compatible = "regulator-fixed";
103                 regulator-name = "vcc_sys";
104                 regulator-min-microvolt = <5000000>;
105                 regulator-max-microvolt = <5000000>;
106                 regulator-always-on;
107                 regulator-boot-on;
108         };
109 };
110
111 &acodec {
112         status = "okay";
113 };
114
115 &emmc {
116         status = "okay";
117 };
118
119 &i2c1 {
120         clock-frequency = <400000>;
121
122         status = "okay";
123
124         rk808: pmic@1b {
125                 compatible = "rockchip,rk808";
126                 reg = <0x1b>;
127                 interrupt-parent = <&gpio2>;
128                 interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
129                 pinctrl-names = "default";
130                 pinctrl-0 = <&pmic_int &global_pwroff>;
131                 rockchip,system-power-controller;
132                 wakeup-source;
133                 #clock-cells = <1>;
134                 clock-output-names = "xin32k", "rk808-clkout2";
135
136                 vcc1-supply = <&vcc_sys>;
137                 vcc2-supply = <&vcc_sys>;
138                 vcc3-supply = <&vcc_sys>;
139                 vcc4-supply = <&vcc_sys>;
140                 vcc6-supply = <&vcc_sys>;
141                 vcc7-supply = <&vcc_sys>;
142                 vcc8-supply = <&vcc_18>;
143                 vcc9-supply = <&vcc_io>;
144                 vcc10-supply = <&vcc_io>;
145                 vcc11-supply = <&vcc_sys>;
146                 vcc12-supply = <&vcc_io>;
147                 vddio-supply = <&vccio_pmu>;
148
149                 regulators {
150                         vdd_cpu: DCDC_REG1 {
151                                 regulator-always-on;
152                                 regulator-boot-on;
153                                 regulator-min-microvolt = <750000>;
154                                 regulator-max-microvolt = <1350000>;
155                                 regulator-name = "vdd_arm";
156                                 regulator-state-mem {
157                                         regulator-off-in-suspend;
158                                 };
159                         };
160
161                         vdd_gpu: DCDC_REG2 {
162                                 regulator-always-on;
163                                 regulator-boot-on;
164                                 regulator-min-microvolt = <850000>;
165                                 regulator-max-microvolt = <1250000>;
166                                 regulator-name = "vdd_gpu";
167                                 regulator-state-mem {
168                                         regulator-on-in-suspend;
169                                         regulator-suspend-microvolt = <1000000>;
170                                 };
171                         };
172
173                         vcc_ddr: DCDC_REG3 {
174                                 regulator-always-on;
175                                 regulator-boot-on;
176                                 regulator-name = "vcc_ddr";
177                                 regulator-state-mem {
178                                         regulator-on-in-suspend;
179                                 };
180                         };
181
182                         vcc_io: DCDC_REG4 {
183                                 regulator-always-on;
184                                 regulator-boot-on;
185                                 regulator-min-microvolt = <3300000>;
186                                 regulator-max-microvolt = <3300000>;
187                                 regulator-name = "vcc_io";
188                                 regulator-state-mem {
189                                         regulator-on-in-suspend;
190                                         regulator-suspend-microvolt = <3300000>;
191                                 };
192                         };
193
194                         vccio_pmu: LDO_REG1 {
195                                 regulator-always-on;
196                                 regulator-boot-on;
197                                 regulator-min-microvolt = <3300000>;
198                                 regulator-max-microvolt = <3300000>;
199                                 regulator-name = "vccio_pmu";
200                                 regulator-state-mem {
201                                         regulator-on-in-suspend;
202                                         regulator-suspend-microvolt = <3300000>;
203                                 };
204                         };
205
206                         vcc_tp: LDO_REG2 {
207                                 regulator-always-on;
208                                 regulator-boot-on;
209                                 regulator-min-microvolt = <3300000>;
210                                 regulator-max-microvolt = <3300000>;
211                                 regulator-name = "vcc_tp";
212                                 regulator-state-mem {
213                                         regulator-off-in-suspend;
214                                 };
215                         };
216
217                         vdd_10: LDO_REG3 {
218                                 regulator-always-on;
219                                 regulator-boot-on;
220                                 regulator-min-microvolt = <1000000>;
221                                 regulator-max-microvolt = <1000000>;
222                                 regulator-name = "vdd_10";
223                                 regulator-state-mem {
224                                         regulator-on-in-suspend;
225                                         regulator-suspend-microvolt = <1000000>;
226                                 };
227                         };
228
229                         vcc18_lcd: LDO_REG4 {
230                                 regulator-always-on;
231                                 regulator-boot-on;
232                                 regulator-min-microvolt = <1800000>;
233                                 regulator-max-microvolt = <1800000>;
234                                 regulator-name = "vcc18_lcd";
235                                 regulator-state-mem {
236                                         regulator-on-in-suspend;
237                                         regulator-suspend-microvolt = <1800000>;
238                                 };
239                         };
240
241                         vccio_sd: LDO_REG5 {
242                                 regulator-always-on;
243                                 regulator-boot-on;
244                                 regulator-min-microvolt = <1800000>;
245                                 regulator-max-microvolt = <3300000>;
246                                 regulator-name = "vccio_sd";
247                                 regulator-state-mem {
248                                         regulator-on-in-suspend;
249                                         regulator-suspend-microvolt = <3300000>;
250                                 };
251                         };
252
253                         vout5: LDO_REG6 {
254                                 regulator-always-on;
255                                 regulator-boot-on;
256                                 regulator-min-microvolt = <1800000>;
257                                 regulator-max-microvolt = <2500000>;
258                                 regulator-name = "vout5";
259                                 regulator-state-mem {
260                                         regulator-on-in-suspend;
261                                         regulator-suspend-microvolt = <1800000>;
262                                 };
263                         };
264
265                         vcc_18: LDO_REG7 {
266                                 regulator-always-on;
267                                 regulator-boot-on;
268                                 regulator-min-microvolt = <1800000>;
269                                 regulator-max-microvolt = <1800000>;
270                                 regulator-name = "vcc_18";
271                                 regulator-state-mem {
272                                         regulator-on-in-suspend;
273                                         regulator-suspend-microvolt = <1800000>;
274                                 };
275                         };
276
277                         vcca_codec: LDO_REG8 {
278                                 regulator-always-on;
279                                 regulator-boot-on;
280                                 regulator-min-microvolt = <1800000>;
281                                 regulator-max-microvolt = <1800000>;
282                                 regulator-name = "vcca_codec";
283                                 regulator-state-mem {
284                                         regulator-on-in-suspend;
285                                         regulator-suspend-microvolt = <1800000>;
286                                 };
287                         };
288
289                         vcc_wl: SWITCH_REG1 {
290                                 regulator-always-on;
291                                 regulator-boot-on;
292                                 regulator-name = "vcc_wl";
293                                 regulator-state-mem {
294                                         regulator-on-in-suspend;
295                                 };
296                         };
297
298                         vcc_lcd: SWITCH_REG2 {
299                                 regulator-always-on;
300                                 regulator-boot-on;
301                                 regulator-name = "vcc_lcd";
302                                 regulator-state-mem {
303                                         regulator-on-in-suspend;
304                                 };
305                         };
306                 };
307         };
308 };
309
310 &i2c2 {
311         status = "okay";
312
313         rt5616: rt5616@1b {
314                 compatible = "rt5616";
315                 reg = <0x1b>;
316                 clocks = <&cru SCLK_I2S_OUT>;
317                 clock-names = "mclk";
318                 #sound-dai-cells = <0>;
319         };
320 };
321
322 &i2s {
323         #sound-dai-cells = <0>;
324         status = "okay";
325 };
326
327 &sdio {
328         status = "okay";
329
330         broken-cd;
331         bus-width = <4>;
332         cap-sd-highspeed;
333         cap-sdio-irq;
334         default-sample-phase = <90>;
335         keep-power-in-suspend;
336         mmc-pwrseq = <&sdio_pwrseq>;
337         non-removable;
338         num-slots = <1>;
339         pinctrl-names = "default";
340         pinctrl-0 = <&sdio_clk &sdio_cmd &sdio_bus4>;
341         sd-uhs-sdr12;
342         sd-uhs-sdr25;
343         sd-uhs-sdr50;
344         sd-uhs-sdr104;
345 };
346
347 &sdmmc {
348         bus-width = <4>;
349         cap-mmc-highspeed;
350         cap-sd-highspeed;
351         card-detect-delay = <200>;
352         disable-wp;
353         num-slots = <1>;
354         pinctrl-names = "default";
355         pinctrl-0 = <&sdmmc_clk>, <&sdmmc_cmd>, <&sdmmc_cd>, <&sdmmc_bus4>;
356 };
357
358 &uart0 {
359         status = "okay";
360 };
361
362 &uart2 {
363         status = "okay";
364 };
365
366 &usb_host {
367         status = "okay";
368 };
369
370 &usb_otg {
371         status = "okay";
372 };
373
374 &pinctrl {
375         leds {
376                 led_ctl: led-ctl {
377                         rockchip,pins = <2 30 RK_FUNC_GPIO &pcfg_pull_none>;
378                 };
379         };
380
381         pmic {
382                 pmic_int: pmic-int {
383                         rockchip,pins = <2 2 RK_FUNC_GPIO &pcfg_pull_default>;
384                 };
385         };
386
387         sdio {
388                 bt_wake_h: bt-wake-h {
389                         rockchip,pins = <2 8 RK_FUNC_GPIO &pcfg_pull_default>;
390                 };
391         };
392
393         sdmmc {
394                 sdmmc_pwr: sdmmc-pwr {
395                         rockchip,pins = <2 28 RK_FUNC_GPIO &pcfg_pull_none>;
396                 };
397         };
398
399         sleep {
400                 global_pwroff: global-pwroff {
401                         rockchip,pins = <2 7 RK_FUNC_1 &pcfg_pull_none>;
402                 };
403         };
404 };