Merge tag 'soc-for-v3.18' of git://git.kernel.org/pub/scm/linux/kernel/git/tmlind...
[cascardo/linux.git] / arch / arm / boot / dts / r8a7791-koelsch.dts
1 /*
2  * Device Tree Source for the Koelsch board
3  *
4  * Copyright (C) 2013 Renesas Electronics Corporation
5  * Copyright (C) 2013-2014 Renesas Solutions Corp.
6  * Copyright (C) 2014 Cogent Embedded, Inc.
7  *
8  * This file is licensed under the terms of the GNU General Public License
9  * version 2.  This program is licensed "as is" without any warranty of any
10  * kind, whether express or implied.
11  */
12
13 /dts-v1/;
14 #include "r8a7791.dtsi"
15 #include <dt-bindings/gpio/gpio.h>
16 #include <dt-bindings/input/input.h>
17
18 / {
19         model = "Koelsch";
20         compatible = "renesas,koelsch", "renesas,r8a7791";
21
22         aliases {
23                 serial6 = &scif0;
24                 serial7 = &scif1;
25         };
26
27         chosen {
28                 bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp";
29         };
30
31         memory@40000000 {
32                 device_type = "memory";
33                 reg = <0 0x40000000 0 0x40000000>;
34         };
35
36         memory@200000000 {
37                 device_type = "memory";
38                 reg = <2 0x00000000 0 0x40000000>;
39         };
40
41         lbsc {
42                 #address-cells = <1>;
43                 #size-cells = <1>;
44         };
45
46         gpio-keys {
47                 compatible = "gpio-keys";
48
49                 key-1 {
50                         gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
51                         linux,code = <KEY_1>;
52                         label = "SW2-1";
53                         gpio-key,wakeup;
54                         debounce-interval = <20>;
55                 };
56                 key-2 {
57                         gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
58                         linux,code = <KEY_2>;
59                         label = "SW2-2";
60                         gpio-key,wakeup;
61                         debounce-interval = <20>;
62                 };
63                 key-3 {
64                         gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
65                         linux,code = <KEY_3>;
66                         label = "SW2-3";
67                         gpio-key,wakeup;
68                         debounce-interval = <20>;
69                 };
70                 key-4 {
71                         gpios = <&gpio5 3 GPIO_ACTIVE_LOW>;
72                         linux,code = <KEY_4>;
73                         label = "SW2-4";
74                         gpio-key,wakeup;
75                         debounce-interval = <20>;
76                 };
77                 key-a {
78                         gpios = <&gpio7 0 GPIO_ACTIVE_LOW>;
79                         linux,code = <KEY_A>;
80                         label = "SW30";
81                         gpio-key,wakeup;
82                         debounce-interval = <20>;
83                 };
84                 key-b {
85                         gpios = <&gpio7 1 GPIO_ACTIVE_LOW>;
86                         linux,code = <KEY_B>;
87                         label = "SW31";
88                         gpio-key,wakeup;
89                         debounce-interval = <20>;
90                 };
91                 key-c {
92                         gpios = <&gpio7 2 GPIO_ACTIVE_LOW>;
93                         linux,code = <KEY_C>;
94                         label = "SW32";
95                         gpio-key,wakeup;
96                         debounce-interval = <20>;
97                 };
98                 key-d {
99                         gpios = <&gpio7 3 GPIO_ACTIVE_LOW>;
100                         linux,code = <KEY_D>;
101                         label = "SW33";
102                         gpio-key,wakeup;
103                         debounce-interval = <20>;
104                 };
105                 key-e {
106                         gpios = <&gpio7 4 GPIO_ACTIVE_LOW>;
107                         linux,code = <KEY_E>;
108                         label = "SW34";
109                         gpio-key,wakeup;
110                         debounce-interval = <20>;
111                 };
112                 key-f {
113                         gpios = <&gpio7 5 GPIO_ACTIVE_LOW>;
114                         linux,code = <KEY_F>;
115                         label = "SW35";
116                         gpio-key,wakeup;
117                         debounce-interval = <20>;
118                 };
119                 key-g {
120                         gpios = <&gpio7 6 GPIO_ACTIVE_LOW>;
121                         linux,code = <KEY_G>;
122                         label = "SW36";
123                         gpio-key,wakeup;
124                         debounce-interval = <20>;
125                 };
126         };
127
128         leds {
129                 compatible = "gpio-leds";
130                 led6 {
131                         gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>;
132                 };
133                 led7 {
134                         gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>;
135                 };
136                 led8 {
137                         gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>;
138                 };
139         };
140
141         vcc_sdhi0: regulator@0 {
142                 compatible = "regulator-fixed";
143
144                 regulator-name = "SDHI0 Vcc";
145                 regulator-min-microvolt = <3300000>;
146                 regulator-max-microvolt = <3300000>;
147
148                 gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>;
149                 enable-active-high;
150         };
151
152         vccq_sdhi0: regulator@1 {
153                 compatible = "regulator-gpio";
154
155                 regulator-name = "SDHI0 VccQ";
156                 regulator-min-microvolt = <1800000>;
157                 regulator-max-microvolt = <3300000>;
158
159                 gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>;
160                 gpios-states = <1>;
161                 states = <3300000 1
162                           1800000 0>;
163         };
164
165         vcc_sdhi1: regulator@2 {
166                 compatible = "regulator-fixed";
167
168                 regulator-name = "SDHI1 Vcc";
169                 regulator-min-microvolt = <3300000>;
170                 regulator-max-microvolt = <3300000>;
171
172                 gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>;
173                 enable-active-high;
174         };
175
176         vccq_sdhi1: regulator@3 {
177                 compatible = "regulator-gpio";
178
179                 regulator-name = "SDHI1 VccQ";
180                 regulator-min-microvolt = <1800000>;
181                 regulator-max-microvolt = <3300000>;
182
183                 gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>;
184                 gpios-states = <1>;
185                 states = <3300000 1
186                           1800000 0>;
187         };
188
189         vcc_sdhi2: regulator@4 {
190                 compatible = "regulator-fixed";
191
192                 regulator-name = "SDHI2 Vcc";
193                 regulator-min-microvolt = <3300000>;
194                 regulator-max-microvolt = <3300000>;
195
196                 gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>;
197                 enable-active-high;
198         };
199
200         vccq_sdhi2: regulator@5 {
201                 compatible = "regulator-gpio";
202
203                 regulator-name = "SDHI2 VccQ";
204                 regulator-min-microvolt = <1800000>;
205                 regulator-max-microvolt = <3300000>;
206
207                 gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>;
208                 gpios-states = <1>;
209                 states = <3300000 1
210                           1800000 0>;
211         };
212 };
213
214 &extal_clk {
215         clock-frequency = <20000000>;
216 };
217
218 &pfc {
219         pinctrl-0 = <&du_pins>;
220         pinctrl-names = "default";
221
222         i2c2_pins: i2c2 {
223                 renesas,groups = "i2c2";
224                 renesas,function = "i2c2";
225         };
226
227         du_pins: du {
228                 renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0";
229                 renesas,function = "du";
230         };
231
232         scif0_pins: serial0 {
233                 renesas,groups = "scif0_data_d";
234                 renesas,function = "scif0";
235         };
236
237         scif1_pins: serial1 {
238                 renesas,groups = "scif1_data_d";
239                 renesas,function = "scif1";
240         };
241
242         ether_pins: ether {
243                 renesas,groups = "eth_link", "eth_mdio", "eth_rmii";
244                 renesas,function = "eth";
245         };
246
247         phy1_pins: phy1 {
248                 renesas,groups = "intc_irq0";
249                 renesas,function = "intc";
250         };
251
252         sdhi0_pins: sd0 {
253                 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
254                 renesas,function = "sdhi0";
255         };
256
257         sdhi1_pins: sd1 {
258                 renesas,groups = "sdhi1_data4", "sdhi1_ctrl";
259                 renesas,function = "sdhi1";
260         };
261
262         sdhi2_pins: sd2 {
263                 renesas,groups = "sdhi2_data4", "sdhi2_ctrl";
264                 renesas,function = "sdhi2";
265         };
266
267         qspi_pins: spi0 {
268                 renesas,groups = "qspi_ctrl", "qspi_data4";
269                 renesas,function = "qspi";
270         };
271
272         msiof0_pins: spi1 {
273                 renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx",
274                                  "msiof0_tx";
275                 renesas,function = "msiof0";
276         };
277
278         usb0_pins: usb0 {
279                 renesas,groups = "usb0";
280                 renesas,function = "usb0";
281         };
282
283         usb1_pins: usb1 {
284                 renesas,groups = "usb1";
285                 renesas,function = "usb1";
286         };
287 };
288
289 &ether {
290         pinctrl-0 = <&ether_pins &phy1_pins>;
291         pinctrl-names = "default";
292
293         phy-handle = <&phy1>;
294         renesas,ether-link-active-low;
295         status = "ok";
296
297         phy1: ethernet-phy@1 {
298                 reg = <1>;
299                 interrupt-parent = <&irqc0>;
300                 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
301                 micrel,led-mode = <1>;
302         };
303 };
304
305 &cmt0 {
306         status = "ok";
307 };
308
309 &sata0 {
310         status = "okay";
311 };
312
313 &scif0 {
314         pinctrl-0 = <&scif0_pins>;
315         pinctrl-names = "default";
316
317         status = "okay";
318 };
319
320 &scif1 {
321         pinctrl-0 = <&scif1_pins>;
322         pinctrl-names = "default";
323
324         status = "okay";
325 };
326
327 &sdhi0 {
328         pinctrl-0 = <&sdhi0_pins>;
329         pinctrl-names = "default";
330
331         vmmc-supply = <&vcc_sdhi0>;
332         vqmmc-supply = <&vccq_sdhi0>;
333         cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>;
334         wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>;
335         status = "okay";
336 };
337
338 &sdhi1 {
339         pinctrl-0 = <&sdhi1_pins>;
340         pinctrl-names = "default";
341
342         vmmc-supply = <&vcc_sdhi1>;
343         vqmmc-supply = <&vccq_sdhi1>;
344         cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>;
345         wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>;
346         status = "okay";
347 };
348
349 &sdhi2 {
350         pinctrl-0 = <&sdhi2_pins>;
351         pinctrl-names = "default";
352
353         vmmc-supply = <&vcc_sdhi2>;
354         vqmmc-supply = <&vccq_sdhi2>;
355         cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>;
356         status = "okay";
357 };
358
359 &qspi {
360         pinctrl-0 = <&qspi_pins>;
361         pinctrl-names = "default";
362
363         status = "okay";
364
365         flash: flash@0 {
366                 #address-cells = <1>;
367                 #size-cells = <1>;
368                 compatible = "spansion,s25fl512s";
369                 reg = <0>;
370                 spi-max-frequency = <30000000>;
371                 spi-tx-bus-width = <4>;
372                 spi-rx-bus-width = <4>;
373                 m25p,fast-read;
374
375                 partition@0 {
376                         label = "loader";
377                         reg = <0x00000000 0x00080000>;
378                         read-only;
379                 };
380                 partition@80000 {
381                         label = "bootenv";
382                         reg = <0x00080000 0x00080000>;
383                         read-only;
384                 };
385                 partition@100000 {
386                         label = "data";
387                         reg = <0x00100000 0x03f00000>;
388                 };
389         };
390 };
391
392 &msiof0 {
393         pinctrl-0 = <&msiof0_pins>;
394         pinctrl-names = "default";
395
396         status = "okay";
397
398         pmic: pmic@0 {
399                 compatible = "renesas,r2a11302ft";
400                 reg = <0>;
401                 spi-max-frequency = <6000000>;
402                 spi-cpol;
403                 spi-cpha;
404         };
405 };
406
407 &i2c2 {
408         pinctrl-0 = <&i2c2_pins>;
409         pinctrl-names = "default";
410
411         status = "okay";
412         clock-frequency = <400000>;
413
414         eeprom@50 {
415                 compatible = "renesas,24c02";
416                 reg = <0x50>;
417                 pagesize = <16>;
418         };
419 };
420
421 &i2c6 {
422         status = "okay";
423         clock-frequency = <100000>;
424
425         vdd_dvfs: regulator@68 {
426                 compatible = "diasemi,da9210";
427                 reg = <0x68>;
428
429                 regulator-min-microvolt = <1000000>;
430                 regulator-max-microvolt = <1000000>;
431                 regulator-boot-on;
432                 regulator-always-on;
433         };
434 };
435
436 &pci0 {
437         status = "okay";
438         pinctrl-0 = <&usb0_pins>;
439         pinctrl-names = "default";
440 };
441
442 &pci1 {
443         status = "okay";
444         pinctrl-0 = <&usb1_pins>;
445         pinctrl-names = "default";
446 };
447
448 &pcie_bus_clk {
449         status = "okay";
450 };
451
452 &pciec {
453         status = "okay";
454 };
455
456 &cpu0 {
457         cpu0-supply = <&vdd_dvfs>;
458 };