d01dc9f01b478f0ba2a8330d96956faf77161761
[firefly-linux-kernel-4.4.55.git] / arch / arm / boot / dts / rk3288-fennec.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 "rk3288.dtsi"
44
45 / {
46         model = "Rockchip RK3288 Fennec Board";
47         compatible = "rockchip,rk3288-fennec", "rockchip,rk3288";
48
49         memory {
50                 reg = <0x0 0x80000000>;
51                 device_type = "memory";
52         };
53
54         ext_gmac: external-gmac-clock {
55                 compatible = "fixed-clock";
56                 #clock-cells = <0>;
57                 clock-frequency = <125000000>;
58                 clock-output-names = "ext_gmac";
59         };
60
61         vcc_sys: vsys-regulator {
62                 compatible = "regulator-fixed";
63                 regulator-name = "vcc_sys";
64                 regulator-min-microvolt = <5000000>;
65                 regulator-max-microvolt = <5000000>;
66                 regulator-always-on;
67                 regulator-boot-on;
68         };
69 };
70
71 &cpu0 {
72         cpu0-supply = <&vdd_cpu>;
73 };
74
75 &emmc {
76         bus-width = <8>;
77         cap-mmc-highspeed;
78         disable-wp;
79         non-removable;
80         num-slots = <1>;
81         pinctrl-names = "default";
82         pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_pwr &emmc_bus8>;
83         status = "okay";
84 };
85
86 &sdmmc {
87         bus-width = <4>;
88         cap-mmc-highspeed;
89         cap-sd-highspeed;
90         card-detect-delay = <200>;
91         disable-wp;
92         num-slots = <1>;
93         pinctrl-names = "default";
94         pinctrl-0 = <&sdmmc_clk &sdmmc_cmd &sdmmc_cd &sdmmc_bus4>;
95         status = "okay";
96         supports-sd;
97         vmmc-supply = <&vcc_sd>;
98         vqmmc-supply = <&vccio_sd>;
99 };
100
101 &gmac {
102         assigned-clocks = <&cru SCLK_MAC>;
103         assigned-clock-parents = <&ext_gmac>;
104         clock_in_out = "input";
105         pinctrl-names = "default";
106         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
107         phy-supply = <&vcc_lan>;
108         phy-mode = "rgmii";
109         snps,reset-active-low;
110         snps,reset-delays-us = <0 10000 1000000>;
111         snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
112         tx_delay = <0x30>;
113         rx_delay = <0x10>;
114         status = "okay";
115 };
116
117 &gpu {
118         mali-supply = <&vdd_gpu>;
119         status = "okay";
120 };
121
122 &hdmi {
123         status = "okay";
124 };
125
126 &i2c0 {
127         status = "okay";
128         clock-frequency = <400000>;
129
130         rk808: pmic@1b {
131                 compatible = "rockchip,rk808";
132                 reg = <0x1b>;
133                 interrupt-parent = <&gpio0>;
134                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
135                 #clock-cells = <1>;
136                 clock-output-names = "xin32k", "rk808-clkout2";
137                 pinctrl-names = "default";
138                 pinctrl-0 = <&pmic_int &global_pwroff>;
139                 rockchip,system-power-controller;
140                 wakeup-source;
141
142                 vcc1-supply = <&vcc_sys>;
143                 vcc2-supply = <&vcc_sys>;
144                 vcc3-supply = <&vcc_sys>;
145                 vcc4-supply = <&vcc_sys>;
146                 vcc6-supply = <&vcc_sys>;
147                 vcc7-supply = <&vcc_sys>;
148                 vcc8-supply = <&vcc_io>;
149                 vcc9-supply = <&vcc_io>;
150                 vcc10-supply = <&vcc_io>;
151                 vcc11-supply = <&vcc_io>;
152                 vcc12-supply = <&vcc_io>;
153                 vddio-supply = <&vcc_io>;
154
155                 regulators {
156                         vdd_cpu: DCDC_REG1 {
157                                 regulator-always-on;
158                                 regulator-boot-on;
159                                 regulator-min-microvolt = <750000>;
160                                 regulator-max-microvolt = <1350000>;
161                                 regulator-name = "vdd_arm";
162                                 regulator-state-mem {
163                                         regulator-off-in-suspend;
164                                 };
165                         };
166
167                         vdd_gpu: DCDC_REG2 {
168                                 regulator-always-on;
169                                 regulator-boot-on;
170                                 regulator-min-microvolt = <850000>;
171                                 regulator-max-microvolt = <1250000>;
172                                 regulator-name = "vdd_gpu";
173                                 regulator-state-mem {
174                                         regulator-on-in-suspend;
175                                         regulator-suspend-microvolt = <1000000>;
176                                 };
177                         };
178
179                         vcc_ddr: DCDC_REG3 {
180                                 regulator-always-on;
181                                 regulator-boot-on;
182                                 regulator-name = "vcc_ddr";
183                                 regulator-state-mem {
184                                         regulator-on-in-suspend;
185                                 };
186                         };
187
188                         vcc_io: DCDC_REG4 {
189                                 regulator-always-on;
190                                 regulator-boot-on;
191                                 regulator-min-microvolt = <3300000>;
192                                 regulator-max-microvolt = <3300000>;
193                                 regulator-name = "vcc_io";
194                                 regulator-state-mem {
195                                         regulator-on-in-suspend;
196                                         regulator-suspend-microvolt = <3300000>;
197                                 };
198                         };
199
200                         vccio_pmu: LDO_REG1 {
201                                 regulator-always-on;
202                                 regulator-boot-on;
203                                 regulator-min-microvolt = <3300000>;
204                                 regulator-max-microvolt = <3300000>;
205                                 regulator-name = "vccio_pmu";
206                                 regulator-state-mem {
207                                         regulator-on-in-suspend;
208                                         regulator-suspend-microvolt = <3300000>;
209                                 };
210                         };
211
212                         vcca_33: LDO_REG2 {
213                                 regulator-always-on;
214                                 regulator-boot-on;
215                                 regulator-min-microvolt = <3300000>;
216                                 regulator-max-microvolt = <3300000>;
217                                 regulator-name = "vcca_33";
218                                 regulator-state-mem {
219                                         regulator-off-in-suspend;
220                                 };
221                         };
222
223                         vdd_10: LDO_REG3 {
224                                 regulator-always-on;
225                                 regulator-boot-on;
226                                 regulator-min-microvolt = <1000000>;
227                                 regulator-max-microvolt = <1000000>;
228                                 regulator-name = "vdd_10";
229                                 regulator-state-mem {
230                                         regulator-on-in-suspend;
231                                         regulator-suspend-microvolt = <1000000>;
232                                 };
233                         };
234
235                         vcc_wl: LDO_REG4 {
236                                 regulator-always-on;
237                                 regulator-boot-on;
238                                 regulator-min-microvolt = <1800000>;
239                                 regulator-max-microvolt = <1800000>;
240                                 regulator-name = "vcc_wl";
241                                 regulator-state-mem {
242                                         regulator-on-in-suspend;
243                                         regulator-suspend-microvolt = <1800000>;
244                                 };
245                         };
246
247                         vccio_sd: LDO_REG5 {
248                                 regulator-always-on;
249                                 regulator-boot-on;
250                                 regulator-min-microvolt = <1800000>;
251                                 regulator-max-microvolt = <3300000>;
252                                 regulator-name = "vccio_sd";
253                                 regulator-state-mem {
254                                         regulator-on-in-suspend;
255                                         regulator-suspend-microvolt = <3300000>;
256                                 };
257                         };
258
259                         vdd10_lcd: LDO_REG6 {
260                                 regulator-always-on;
261                                 regulator-boot-on;
262                                 regulator-min-microvolt = <1000000>;
263                                 regulator-max-microvolt = <1000000>;
264                                 regulator-name = "vdd10_lcd";
265                                 regulator-state-mem {
266                                         regulator-on-in-suspend;
267                                         regulator-suspend-microvolt = <1000000>;
268                                 };
269                         };
270
271                         vcc_18: LDO_REG7 {
272                                 regulator-always-on;
273                                 regulator-boot-on;
274                                 regulator-min-microvolt = <1800000>;
275                                 regulator-max-microvolt = <1800000>;
276                                 regulator-name = "vcc_18";
277                                 regulator-state-mem {
278                                         regulator-on-in-suspend;
279                                         regulator-suspend-microvolt = <1800000>;
280                                 };
281                         };
282
283                         vcc18_lcd: LDO_REG8 {
284                                 regulator-always-on;
285                                 regulator-boot-on;
286                                 regulator-min-microvolt = <1800000>;
287                                 regulator-max-microvolt = <1800000>;
288                                 regulator-name = "vcc18_lcd";
289                                 regulator-state-mem {
290                                         regulator-on-in-suspend;
291                                         regulator-suspend-microvolt = <1800000>;
292                                 };
293                         };
294
295                         vcc_sd: SWITCH_REG1 {
296                                 regulator-always-on;
297                                 regulator-boot-on;
298                                 regulator-name = "vcc_sd";
299                                 regulator-state-mem {
300                                         regulator-on-in-suspend;
301                                 };
302                         };
303
304                         vcc_lan: SWITCH_REG2 {
305                                 regulator-always-on;
306                                 regulator-boot-on;
307                                 regulator-name = "vcc_lan";
308                                 regulator-state-mem {
309                                         regulator-on-in-suspend;
310                                 };
311                         };
312                 };
313         };
314 };
315
316 &pinctrl {
317         pcfg_output_high: pcfg-output-high {
318                 output-high;
319         };
320
321         pcfg_output_low: pcfg-output-low {
322                 output-low;
323         };
324
325         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
326                 drive-strength = <8>;
327         };
328
329         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
330                 bias-pull-up;
331                 drive-strength = <8>;
332         };
333
334         gmac {
335                 phy_int: phy-int {
336                         rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
337                 };
338
339                 phy_pmeb: phy-pmeb {
340                         rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
341                 };
342
343                 phy_rst: phy-rst {
344                         rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
345                 };
346         };
347
348         pmic {
349                 pmic_int: pmic-int {
350                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
351                 };
352         };
353
354         sdmmc {
355                 sdmmc_bus4: sdmmc-bus4 {
356                         rockchip,pins = <6 16 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
357                                         <6 17 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
358                                         <6 18 RK_FUNC_1 &pcfg_pull_up_drv_8ma>,
359                                         <6 19 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
360                 };
361
362                 sdmmc_clk: sdmmc-clk {
363                         rockchip,pins = <6 20 RK_FUNC_1 &pcfg_pull_none_drv_8ma>;
364                 };
365
366                 sdmmc_cmd: sdmmc-cmd {
367                         rockchip,pins = <6 21 RK_FUNC_1 &pcfg_pull_up_drv_8ma>;
368                 };
369
370                 sdmmc_pwr: sdmmc-pwr {
371                         rockchip,pins = <7 11 RK_FUNC_GPIO &pcfg_pull_none>;
372                 };
373         };
374
375         usbphy {
376                 host_drv: host-drv {
377                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
378                 };
379         };
380 };
381
382 &uart2 {
383         status = "okay";
384 };
385
386 &usbphy {
387         pinctrl-names = "default";
388         pinctrl-0 = <&host_drv>;
389         vbus_drv-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
390         status = "okay";
391 };
392
393 &usb_host0_ehci {
394         status = "okay";
395 };
396
397 &usb_host1 {
398         status = "okay";
399 };
400
401 &usb_otg {
402         status = "okay";
403 };
404
405 &usb_hsic {
406         status = "okay";
407 };
408
409 &vopb {
410         status = "okay";
411 };
412
413 &vopb_mmu {
414         status = "okay";
415 };
416
417 &vopl {
418         status = "okay";
419 };
420
421 &vopl_mmu {
422         status = "okay";
423 };
424
425 &vpu {
426         status = "okay";
427 };