Merge remote-tracking branches 'spi/fix/atmel', 'spi/fix/bcm2835', 'spi/fix/doc'...
[sfrench/cifs-2.6.git] / arch / arm / boot / dts / rk3066a-rayeager.dts
1 /*
2  * Copyright (c) 2014, 2015 FUKAUMI Naoki <naobsd@gmail.com>
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 /dts-v1/;
44 #include "rk3066a.dtsi"
45
46 / {
47         model = "Rayeager PX2";
48         compatible = "chipspark,rayeager-px2", "rockchip,rk3066a";
49
50         memory {
51                 device_type = "memory";
52                 reg = <0x60000000 0x40000000>;
53         };
54
55         ir: ir-receiver {
56                 compatible = "gpio-ir-receiver";
57                 gpios = <&gpio6 1 GPIO_ACTIVE_LOW>;
58                 pinctrl-names = "default";
59                 pinctrl-0 = <&ir_int>;
60         };
61
62         keys: gpio-keys {
63                 compatible = "gpio-keys";
64                 #address-cells = <1>;
65                 #size-cells = <0>;
66
67                 button@0 {
68                         gpio-key,wakeup = <1>;
69                         gpios = <&gpio6 2 GPIO_ACTIVE_LOW>;
70                         label = "GPIO Power";
71                         linux,code = <116>;
72                         pinctrl-names = "default";
73                         pinctrl-0 = <&pwr_key>;
74                 };
75         };
76
77         vsys: vsys-regulator {
78                 compatible = "regulator-fixed";
79                 regulator-name = "vsys";
80                 regulator-min-microvolt = <5000000>;
81                 regulator-max-microvolt = <5000000>;
82                 regulator-always-on;
83                 regulator-boot-on;
84         };
85
86         /* input for 5V_STDBY is VSYS or DC5V, selectable by jumper J4 */
87         vcc_stdby: 5v-stdby-regulator {
88                 compatible = "regulator-fixed";
89                 regulator-name = "5v_stdby";
90                 regulator-min-microvolt = <5000000>;
91                 regulator-max-microvolt = <5000000>;
92                 regulator-always-on;
93                 regulator-boot-on;
94         };
95
96         vcc_emmc: emmc-regulator {
97                 compatible = "regulator-fixed";
98                 regulator-name = "emmc_vccq";
99                 regulator-min-microvolt = <3000000>;
100                 regulator-max-microvolt = <3000000>;
101                 vin-supply = <&vsys>;
102         };
103
104         vcc_sata: sata-regulator {
105                 compatible = "regulator-fixed";
106                 enable-active-high;
107                 gpio = <&gpio4 22 GPIO_ACTIVE_HIGH>;
108                 pinctrl-names = "default";
109                 pinctrl-0 = <&sata_pwr>;
110                 regulator-name = "usb_5v";
111                 regulator-min-microvolt = <5000000>;
112                 regulator-max-microvolt = <5000000>;
113                 regulator-always-on;
114                 vin-supply = <&vcc_stdby>;
115         };
116
117         vcc_sd: sdmmc-regulator {
118                 compatible = "regulator-fixed";
119                 gpio = <&gpio3 7 GPIO_ACTIVE_LOW>;
120                 pinctrl-names = "default";
121                 pinctrl-0 = <&sdmmc_pwr>;
122                 regulator-name = "vcc_sd";
123                 regulator-min-microvolt = <3300000>;
124                 regulator-max-microvolt = <3300000>;
125                 startup-delay-us = <100000>;
126                 vin-supply = <&vcc_io>;
127         };
128
129         vcc_host: usb-host-regulator {
130                 compatible = "regulator-fixed";
131                 enable-active-high;
132                 gpio = <&gpio0 6 GPIO_ACTIVE_HIGH>;
133                 pinctrl-names = "default";
134                 pinctrl-0 = <&host_drv>;
135                 regulator-name = "host-pwr";
136                 regulator-min-microvolt = <5000000>;
137                 regulator-max-microvolt = <5000000>;
138                 regulator-always-on;
139                 vin-supply = <&vcc_stdby>;
140         };
141
142         vcc_otg: usb-otg-regulator {
143                 compatible = "regulator-fixed";
144                 enable-active-high;
145                 gpio = <&gpio0 5 GPIO_ACTIVE_HIGH>;
146                 pinctrl-names = "default";
147                 pinctrl-0 = <&otg_drv>;
148                 regulator-name = "vcc_otg";
149                 regulator-min-microvolt = <5000000>;
150                 regulator-max-microvolt = <5000000>;
151                 regulator-always-on;
152                 vin-supply = <&vcc_stdby>;
153         };
154 };
155
156 &cpu0 {
157         cpu0-supply = <&vdd_arm>;
158 };
159
160 &emac {
161         pinctrl-names = "default";
162         pinctrl-0 = <&emac_xfer>, <&emac_mdio>, <&rmii_rst>;
163         phy = <&phy0>;
164         phy-supply = <&vcc_rmii>;
165         status = "okay";
166
167         phy0: ethernet-phy@0 {
168                 reg = <0>;
169         };
170 };
171
172 &emmc {
173         broken-cd;
174         bus-width = <8>;
175         cap-mmc-highspeed;
176         disable-wp;
177         non-removable;
178         num-slots = <1>;
179         pinctrl-names = "default";
180         pinctrl-0 = <&emmc_clk>, <&emmc_cmd>, <&emmc_rst>;
181         vmmc-supply = <&vcc_emmc>;
182         vqmmc-supply = <&vcc_emmc>;
183         status = "okay";
184 };
185
186 &i2c0 {
187         clock-frequency = <400000>;
188         status = "okay";
189
190         ak8963: ak8963@0d {
191                 compatible = "asahi-kasei,ak8975";
192                 reg = <0x0d>;
193                 interrupt-parent = <&gpio4>;
194                 interrupts = <17 IRQ_TYPE_EDGE_RISING>;
195                 pinctrl-names = "default";
196                 pinctrl-0 = <&comp_int>;
197         };
198
199         mma8452: mma8452@1d {
200                 compatible = "fsl,mma8452";
201                 reg = <0x1d>;
202                 interrupt-parent = <&gpio4>;
203                 interrupts = <16 IRQ_TYPE_EDGE_RISING>;
204                 pinctrl-names = "default";
205                 pinctrl-0 = <&gsensor_int>;
206         };
207 };
208
209 &i2c1 {
210         clock-frequency = <400000>;
211         status = "okay";
212
213         tps: tps@2d {
214                 reg = <0x2d>;
215                 interrupt-parent = <&gpio6>;
216                 interrupts = <4 IRQ_TYPE_EDGE_RISING>;
217                 pinctrl-names = "default";
218                 pinctrl-0 = <&pmic_int>, <&pwr_hold>;
219
220                 vcc1-supply = <&vsys>;
221                 vcc2-supply = <&vsys>;
222                 vcc3-supply = <&vsys>;
223                 vcc4-supply = <&vsys>;
224                 vcc5-supply = <&vcc_io>;
225                 vcc6-supply = <&vcc_io>;
226                 vcc7-supply = <&vsys>;
227                 vccio-supply = <&vsys>;
228
229                 regulators {
230                         vcc_rtc: regulator@0 {
231                                 regulator-name = "vcc_rtc";
232                                 regulator-always-on;
233                         };
234
235                         vcc_io: regulator@1 {
236                                 regulator-name = "vcc_io";
237                                 regulator-min-microvolt = <3300000>;
238                                 regulator-max-microvolt = <3300000>;
239                                 regulator-always-on;
240                         };
241
242                         vdd_arm: regulator@2 {
243                                 regulator-name = "vdd_arm";
244                                 regulator-min-microvolt = <600000>;
245                                 regulator-max-microvolt = <1500000>;
246                                 regulator-always-on;
247                                 regulator-boot-on;
248                         };
249
250                         vcc_ddr: regulator@3 {
251                                 regulator-name = "vcc_ddr";
252                                 regulator-min-microvolt = <600000>;
253                                 regulator-max-microvolt = <1500000>;
254                                 regulator-always-on;
255                                 regulator-boot-on;
256                         };
257
258                         vcc18: regulator@5 {
259                                 regulator-name = "vcc18";
260                                 regulator-min-microvolt = <1800000>;
261                                 regulator-max-microvolt = <1800000>;
262                                 regulator-always-on;
263                         };
264
265                         vdd_11: regulator@6 {
266                                 regulator-name = "vdd_11";
267                                 regulator-min-microvolt = <1100000>;
268                                 regulator-max-microvolt = <1100000>;
269                                 regulator-always-on;
270                         };
271
272                         vcc_25: regulator@7 {
273                                 regulator-name = "vcc_25";
274                                 regulator-min-microvolt = <2500000>;
275                                 regulator-max-microvolt = <2500000>;
276                                 regulator-always-on;
277                         };
278
279                         vccio_wl: regulator@8 {
280                                 regulator-name = "vccio_wl";
281                                 regulator-min-microvolt = <1800000>;
282                                 regulator-max-microvolt = <1800000>;
283                         };
284
285                         vcc25_hdmi: regulator@9 {
286                                 regulator-name = "vcc25_hdmi";
287                                 regulator-min-microvolt = <2500000>;
288                                 regulator-max-microvolt = <2500000>;
289                         };
290
291                         vcca_33: regulator@10 {
292                                 regulator-name = "vcca_33";
293                                 regulator-min-microvolt = <3300000>;
294                                 regulator-max-microvolt = <3300000>;
295                         };
296
297                         vcc_rmii: regulator@11 {
298                                 regulator-name = "vcc_rmii";
299                                 regulator-min-microvolt = <3300000>;
300                                 regulator-max-microvolt = <3300000>;
301                         };
302
303                         vcc28_cif: regulator@12 {
304                                 regulator-name = "vcc28_cif";
305                                 regulator-min-microvolt = <2800000>;
306                                 regulator-max-microvolt = <2800000>;
307                         };
308                 };
309         };
310 };
311
312 #include "tps65910.dtsi"
313
314 &i2c2 {
315         status = "okay";
316 };
317
318 &i2c3 {
319         status = "okay";
320 };
321
322 &i2c4 {
323         status = "okay";
324 };
325
326 &mmc0 {
327         bus-width = <4>;
328         disable-wp;
329         num-slots = <1>;
330         pinctrl-names = "default";
331         pinctrl-0 = <&sd0_clk>, <&sd0_cmd>, <&sd0_cd>, <&sd0_bus4>;
332         vmmc-supply = <&vcc_sd>;
333         status = "okay";
334 };
335
336 &mmc1 {
337         broken-cd;
338         bus-width = <4>;
339         disable-wp;
340         non-removable;
341         num-slots = <1>;
342         pinctrl-names = "default";
343         pinctrl-0 = <&sd1_clk>, <&sd1_cmd>, <&sd1_bus4>;
344         vmmc-supply = <&vccio_wl>;
345         status = "okay";
346 };
347
348 &pinctrl {
349         pcfg_output_high: pcfg-output-high {
350                 output-high;
351         };
352
353         ak8963 {
354                 comp_int: comp-int {
355                         rockchip,pins = <4 17 RK_FUNC_GPIO &pcfg_pull_default>;
356                 };
357         };
358
359         emac {
360                 rmii_rst: rmii-rst {
361                         rockchip,pins = <1 30 RK_FUNC_GPIO &pcfg_output_high>;
362                 };
363         };
364
365         ir {
366                 ir_int: ir-int {
367                         rockchip,pins = <6 1 RK_FUNC_GPIO &pcfg_pull_default>;
368                 };
369         };
370
371         keys {
372                 pwr_key: pwr-key {
373                         rockchip,pins = <6 2 RK_FUNC_GPIO &pcfg_pull_default>;
374                 };
375         };
376
377         mma8452 {
378                 gsensor_int: gsensor-int {
379                         rockchip,pins = <4 16 RK_FUNC_GPIO &pcfg_pull_default>;
380                 };
381         };
382
383         mmc {
384                 sdmmc_pwr: sdmmc-pwr {
385                         rockchip,pins = <3 7 RK_FUNC_GPIO &pcfg_pull_default>;
386                 };
387         };
388
389         usb_host {
390                 host_drv: host-drv {
391                         rockchip,pins = <0 6 RK_FUNC_GPIO &pcfg_pull_default>;
392                 };
393
394                 hub_rst: hub-rst {
395                         rockchip,pins = <1 31 RK_FUNC_GPIO &pcfg_output_high>;
396                 };
397
398                 sata_pwr: sata-pwr {
399                         rockchip,pins = <4 22 RK_FUNC_GPIO &pcfg_pull_default>;
400                 };
401
402                 sata_reset: sata-reset {
403                         rockchip,pins = <0 13 RK_FUNC_GPIO &pcfg_output_high>;
404                 };
405         };
406
407         usb_otg {
408                 otg_drv: otg-drv {
409                         rockchip,pins = <0 5 RK_FUNC_GPIO &pcfg_pull_default>;
410                 };
411         };
412
413         tps {
414                 pmic_int: pmic-int {
415                         rockchip,pins = <6 4 RK_FUNC_GPIO &pcfg_pull_default>;
416                 };
417
418                 pwr_hold: pwr-hold {
419                         rockchip,pins = <6 8 RK_FUNC_GPIO &pcfg_output_high>;
420                 };
421         };
422 };
423
424 &pwm1 {
425         status = "okay";
426 };
427
428 &pwm2 {
429         status = "okay";
430 };
431
432 &saradc {
433         vref-supply = <&vcc_25>;
434         status = "okay";
435 };
436
437 &spi0 {
438         status = "okay";
439 };
440
441 &uart0 {
442         pinctrl-names = "default";
443         pinctrl-0 = <&uart0_xfer>, <&uart0_cts>, <&uart0_rts>;
444         status = "okay";
445 };
446
447 &uart2 {
448         status = "okay";
449 };
450
451 &uart3 {
452         pinctrl-names = "default";
453         pinctrl-0 = <&uart3_xfer>, <&uart3_cts>, <&uart3_rts>;
454         status = "okay";
455 };
456
457 &usb_host {
458         pinctrl-names = "default";
459         pinctrl-0 = <&hub_rst>, <&sata_reset>;
460         status = "okay";
461 };
462
463 &usbphy {
464         status = "okay";
465 };
466
467 &usb_otg {
468         status = "okay";
469 };
470
471 &wdt {
472         status = "okay";
473 };