c06d812169697f69a13ce3aa09501130b3d9bfd1
[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 &gmac {
87         assigned-clocks = <&cru SCLK_MAC>;
88         assigned-clock-parents = <&ext_gmac>;
89         clock_in_out = "input";
90         pinctrl-names = "default";
91         pinctrl-0 = <&rgmii_pins>, <&phy_rst>, <&phy_pmeb>, <&phy_int>;
92         phy-supply = <&vcc_lan>;
93         phy-mode = "rgmii";
94         snps,reset-active-low;
95         snps,reset-delays-us = <0 10000 1000000>;
96         snps,reset-gpio = <&gpio4 8 GPIO_ACTIVE_LOW>;
97         tx_delay = <0x30>;
98         rx_delay = <0x10>;
99         status = "okay";
100 };
101
102 &gpu {
103         mali-supply = <&vdd_gpu>;
104         status = "okay";
105 };
106
107 &hdmi {
108         status = "okay";
109 };
110
111 &i2c0 {
112         status = "okay";
113         clock-frequency = <400000>;
114
115         rk808: pmic@1b {
116                 compatible = "rockchip,rk808";
117                 reg = <0x1b>;
118                 interrupt-parent = <&gpio0>;
119                 interrupts = <4 IRQ_TYPE_LEVEL_LOW>;
120                 #clock-cells = <1>;
121                 clock-output-names = "xin32k", "rk808-clkout2";
122                 pinctrl-names = "default";
123                 pinctrl-0 = <&pmic_int &global_pwroff>;
124                 rockchip,system-power-controller;
125                 wakeup-source;
126
127                 vcc1-supply = <&vcc_sys>;
128                 vcc2-supply = <&vcc_sys>;
129                 vcc3-supply = <&vcc_sys>;
130                 vcc4-supply = <&vcc_sys>;
131                 vcc6-supply = <&vcc_sys>;
132                 vcc7-supply = <&vcc_sys>;
133                 vcc8-supply = <&vcc_io>;
134                 vcc9-supply = <&vcc_io>;
135                 vcc10-supply = <&vcc_io>;
136                 vcc11-supply = <&vcc_io>;
137                 vcc12-supply = <&vcc_io>;
138                 vddio-supply = <&vcc_io>;
139
140                 regulators {
141                         vdd_cpu: DCDC_REG1 {
142                                 regulator-always-on;
143                                 regulator-boot-on;
144                                 regulator-min-microvolt = <750000>;
145                                 regulator-max-microvolt = <1350000>;
146                                 regulator-name = "vdd_arm";
147                                 regulator-state-mem {
148                                         regulator-off-in-suspend;
149                                 };
150                         };
151
152                         vdd_gpu: DCDC_REG2 {
153                                 regulator-always-on;
154                                 regulator-boot-on;
155                                 regulator-min-microvolt = <850000>;
156                                 regulator-max-microvolt = <1250000>;
157                                 regulator-name = "vdd_gpu";
158                                 regulator-state-mem {
159                                         regulator-on-in-suspend;
160                                         regulator-suspend-microvolt = <1000000>;
161                                 };
162                         };
163
164                         vcc_ddr: DCDC_REG3 {
165                                 regulator-always-on;
166                                 regulator-boot-on;
167                                 regulator-name = "vcc_ddr";
168                                 regulator-state-mem {
169                                         regulator-on-in-suspend;
170                                 };
171                         };
172
173                         vcc_io: DCDC_REG4 {
174                                 regulator-always-on;
175                                 regulator-boot-on;
176                                 regulator-min-microvolt = <3300000>;
177                                 regulator-max-microvolt = <3300000>;
178                                 regulator-name = "vcc_io";
179                                 regulator-state-mem {
180                                         regulator-on-in-suspend;
181                                         regulator-suspend-microvolt = <3300000>;
182                                 };
183                         };
184
185                         vccio_pmu: LDO_REG1 {
186                                 regulator-always-on;
187                                 regulator-boot-on;
188                                 regulator-min-microvolt = <3300000>;
189                                 regulator-max-microvolt = <3300000>;
190                                 regulator-name = "vccio_pmu";
191                                 regulator-state-mem {
192                                         regulator-on-in-suspend;
193                                         regulator-suspend-microvolt = <3300000>;
194                                 };
195                         };
196
197                         vcca_33: LDO_REG2 {
198                                 regulator-always-on;
199                                 regulator-boot-on;
200                                 regulator-min-microvolt = <3300000>;
201                                 regulator-max-microvolt = <3300000>;
202                                 regulator-name = "vcca_33";
203                                 regulator-state-mem {
204                                         regulator-off-in-suspend;
205                                 };
206                         };
207
208                         vdd_10: LDO_REG3 {
209                                 regulator-always-on;
210                                 regulator-boot-on;
211                                 regulator-min-microvolt = <1000000>;
212                                 regulator-max-microvolt = <1000000>;
213                                 regulator-name = "vdd_10";
214                                 regulator-state-mem {
215                                         regulator-on-in-suspend;
216                                         regulator-suspend-microvolt = <1000000>;
217                                 };
218                         };
219
220                         vcc_wl: LDO_REG4 {
221                                 regulator-always-on;
222                                 regulator-boot-on;
223                                 regulator-min-microvolt = <1800000>;
224                                 regulator-max-microvolt = <1800000>;
225                                 regulator-name = "vcc_wl";
226                                 regulator-state-mem {
227                                         regulator-on-in-suspend;
228                                         regulator-suspend-microvolt = <1800000>;
229                                 };
230                         };
231
232                         vccio_sd: LDO_REG5 {
233                                 regulator-always-on;
234                                 regulator-boot-on;
235                                 regulator-min-microvolt = <1800000>;
236                                 regulator-max-microvolt = <3300000>;
237                                 regulator-name = "vccio_sd";
238                                 regulator-state-mem {
239                                         regulator-on-in-suspend;
240                                         regulator-suspend-microvolt = <3300000>;
241                                 };
242                         };
243
244                         vdd10_lcd: LDO_REG6 {
245                                 regulator-always-on;
246                                 regulator-boot-on;
247                                 regulator-min-microvolt = <1000000>;
248                                 regulator-max-microvolt = <1000000>;
249                                 regulator-name = "vdd10_lcd";
250                                 regulator-state-mem {
251                                         regulator-on-in-suspend;
252                                         regulator-suspend-microvolt = <1000000>;
253                                 };
254                         };
255
256                         vcc_18: LDO_REG7 {
257                                 regulator-always-on;
258                                 regulator-boot-on;
259                                 regulator-min-microvolt = <1800000>;
260                                 regulator-max-microvolt = <1800000>;
261                                 regulator-name = "vcc_18";
262                                 regulator-state-mem {
263                                         regulator-on-in-suspend;
264                                         regulator-suspend-microvolt = <1800000>;
265                                 };
266                         };
267
268                         vcc18_lcd: LDO_REG8 {
269                                 regulator-always-on;
270                                 regulator-boot-on;
271                                 regulator-min-microvolt = <1800000>;
272                                 regulator-max-microvolt = <1800000>;
273                                 regulator-name = "vcc18_lcd";
274                                 regulator-state-mem {
275                                         regulator-on-in-suspend;
276                                         regulator-suspend-microvolt = <1800000>;
277                                 };
278                         };
279
280                         vcc_sd: SWITCH_REG1 {
281                                 regulator-always-on;
282                                 regulator-boot-on;
283                                 regulator-name = "vcc_sd";
284                                 regulator-state-mem {
285                                         regulator-on-in-suspend;
286                                 };
287                         };
288
289                         vcc_lan: SWITCH_REG2 {
290                                 regulator-always-on;
291                                 regulator-boot-on;
292                                 regulator-name = "vcc_lan";
293                                 regulator-state-mem {
294                                         regulator-on-in-suspend;
295                                 };
296                         };
297                 };
298         };
299 };
300
301 &pinctrl {
302         pcfg_output_high: pcfg-output-high {
303                 output-high;
304         };
305
306         pcfg_output_low: pcfg-output-low {
307                 output-low;
308         };
309
310         pcfg_pull_none_drv_8ma: pcfg-pull-none-drv-8ma {
311                 drive-strength = <8>;
312         };
313
314         pcfg_pull_up_drv_8ma: pcfg-pull-up-drv-8ma {
315                 bias-pull-up;
316                 drive-strength = <8>;
317         };
318
319         gmac {
320                 phy_int: phy-int {
321                         rockchip,pins = <0 9 RK_FUNC_GPIO &pcfg_pull_up>;
322                 };
323
324                 phy_pmeb: phy-pmeb {
325                         rockchip,pins = <0 8 RK_FUNC_GPIO &pcfg_pull_up>;
326                 };
327
328                 phy_rst: phy-rst {
329                         rockchip,pins = <4 8 RK_FUNC_GPIO &pcfg_output_high>;
330                 };
331         };
332
333         pmic {
334                 pmic_int: pmic-int {
335                         rockchip,pins = <RK_GPIO0 4 RK_FUNC_GPIO &pcfg_pull_up>;
336                 };
337         };
338
339         usbphy {
340                 host_drv: host-drv {
341                         rockchip,pins = <0 14 RK_FUNC_GPIO &pcfg_pull_none>;
342                 };
343         };
344 };
345
346 &uart2 {
347         status = "okay";
348 };
349
350 &usbphy {
351         pinctrl-names = "default";
352         pinctrl-0 = <&host_drv>;
353         vbus_drv-gpios = <&gpio0 14 GPIO_ACTIVE_HIGH>;
354         status = "okay";
355 };
356
357 &usb_host0_ehci {
358         status = "okay";
359 };
360
361 &usb_host1 {
362         status = "okay";
363 };
364
365 &usb_otg {
366         status = "okay";
367 };
368
369 &usb_hsic {
370         status = "okay";
371 };
372
373 &vopb {
374         status = "okay";
375 };
376
377 &vopb_mmu {
378         status = "okay";
379 };
380
381 &vopl {
382         status = "okay";
383 };
384
385 &vopl_mmu {
386         status = "okay";
387 };
388
389 &vpu {
390         status = "okay";
391 };