Commit | Line | Data |
---|---|---|
1f52c659 HN |
1 | /* |
2 | * Device Tree Source for the Koelsch board | |
3 | * | |
4 | * Copyright (C) 2013 Renesas Electronics Corporation | |
08e8f0f3 SS |
5 | * Copyright (C) 2013-2014 Renesas Solutions Corp. |
6 | * Copyright (C) 2014 Cogent Embedded, Inc. | |
1f52c659 HN |
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 | ||
b160f615 KM |
13 | /* |
14 | * SSI-AK4643 | |
15 | * | |
16 | * SW1: 1: AK4643 | |
17 | * 2: CN22 | |
18 | * 3: ADV7511 | |
19 | * | |
20 | * This command is required when Playback/Capture | |
21 | * | |
22 | * amixer set "LINEOUT Mixer DACL" on | |
23 | */ | |
24 | ||
1f52c659 | 25 | /dts-v1/; |
31c46cbf | 26 | #include "r8a7791.dtsi" |
f8e2535d | 27 | #include <dt-bindings/gpio/gpio.h> |
7f168b1e | 28 | #include <dt-bindings/input/input.h> |
1f52c659 HN |
29 | |
30 | / { | |
31 | model = "Koelsch"; | |
32 | compatible = "renesas,koelsch", "renesas,r8a7791"; | |
33 | ||
5ba55fa8 LP |
34 | aliases { |
35 | serial6 = &scif0; | |
36 | serial7 = &scif1; | |
37 | }; | |
38 | ||
1f52c659 HN |
39 | chosen { |
40 | bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; | |
17323b36 | 41 | stdout-path = &scif0; |
1f52c659 HN |
42 | }; |
43 | ||
44 | memory@40000000 { | |
45 | device_type = "memory"; | |
4cd1bad4 TY |
46 | reg = <0 0x40000000 0 0x40000000>; |
47 | }; | |
48 | ||
49 | memory@200000000 { | |
50 | device_type = "memory"; | |
51 | reg = <2 0x00000000 0 0x40000000>; | |
1f52c659 HN |
52 | }; |
53 | ||
54 | lbsc { | |
55 | #address-cells = <1>; | |
56 | #size-cells = <1>; | |
57 | }; | |
f8e2535d | 58 | |
aff5274f LP |
59 | gpio-keys { |
60 | compatible = "gpio-keys"; | |
61 | ||
7f168b1e MD |
62 | key-1 { |
63 | gpios = <&gpio5 0 GPIO_ACTIVE_LOW>; | |
64 | linux,code = <KEY_1>; | |
65 | label = "SW2-1"; | |
66 | gpio-key,wakeup; | |
67 | debounce-interval = <20>; | |
68 | }; | |
69 | key-2 { | |
70 | gpios = <&gpio5 1 GPIO_ACTIVE_LOW>; | |
71 | linux,code = <KEY_2>; | |
72 | label = "SW2-2"; | |
73 | gpio-key,wakeup; | |
74 | debounce-interval = <20>; | |
75 | }; | |
76 | key-3 { | |
77 | gpios = <&gpio5 2 GPIO_ACTIVE_LOW>; | |
78 | linux,code = <KEY_3>; | |
79 | label = "SW2-3"; | |
80 | gpio-key,wakeup; | |
81 | debounce-interval = <20>; | |
82 | }; | |
83 | key-4 { | |
84 | gpios = <&gpio5 3 GPIO_ACTIVE_LOW>; | |
85 | linux,code = <KEY_4>; | |
86 | label = "SW2-4"; | |
87 | gpio-key,wakeup; | |
88 | debounce-interval = <20>; | |
89 | }; | |
aff5274f LP |
90 | key-a { |
91 | gpios = <&gpio7 0 GPIO_ACTIVE_LOW>; | |
7f168b1e | 92 | linux,code = <KEY_A>; |
aff5274f LP |
93 | label = "SW30"; |
94 | gpio-key,wakeup; | |
95 | debounce-interval = <20>; | |
96 | }; | |
97 | key-b { | |
98 | gpios = <&gpio7 1 GPIO_ACTIVE_LOW>; | |
7f168b1e | 99 | linux,code = <KEY_B>; |
aff5274f LP |
100 | label = "SW31"; |
101 | gpio-key,wakeup; | |
102 | debounce-interval = <20>; | |
103 | }; | |
104 | key-c { | |
105 | gpios = <&gpio7 2 GPIO_ACTIVE_LOW>; | |
7f168b1e | 106 | linux,code = <KEY_C>; |
aff5274f LP |
107 | label = "SW32"; |
108 | gpio-key,wakeup; | |
109 | debounce-interval = <20>; | |
110 | }; | |
111 | key-d { | |
112 | gpios = <&gpio7 3 GPIO_ACTIVE_LOW>; | |
7f168b1e | 113 | linux,code = <KEY_D>; |
aff5274f LP |
114 | label = "SW33"; |
115 | gpio-key,wakeup; | |
116 | debounce-interval = <20>; | |
117 | }; | |
118 | key-e { | |
119 | gpios = <&gpio7 4 GPIO_ACTIVE_LOW>; | |
7f168b1e | 120 | linux,code = <KEY_E>; |
aff5274f LP |
121 | label = "SW34"; |
122 | gpio-key,wakeup; | |
123 | debounce-interval = <20>; | |
124 | }; | |
125 | key-f { | |
126 | gpios = <&gpio7 5 GPIO_ACTIVE_LOW>; | |
7f168b1e | 127 | linux,code = <KEY_F>; |
aff5274f LP |
128 | label = "SW35"; |
129 | gpio-key,wakeup; | |
130 | debounce-interval = <20>; | |
131 | }; | |
132 | key-g { | |
133 | gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; | |
7f168b1e | 134 | linux,code = <KEY_G>; |
aff5274f LP |
135 | label = "SW36"; |
136 | gpio-key,wakeup; | |
137 | debounce-interval = <20>; | |
138 | }; | |
139 | }; | |
140 | ||
f8e2535d LP |
141 | leds { |
142 | compatible = "gpio-leds"; | |
143 | led6 { | |
144 | gpios = <&gpio2 19 GPIO_ACTIVE_HIGH>; | |
145 | }; | |
146 | led7 { | |
147 | gpios = <&gpio2 20 GPIO_ACTIVE_HIGH>; | |
148 | }; | |
149 | led8 { | |
150 | gpios = <&gpio2 21 GPIO_ACTIVE_HIGH>; | |
151 | }; | |
152 | }; | |
2c60a7df MD |
153 | |
154 | vcc_sdhi0: regulator@0 { | |
155 | compatible = "regulator-fixed"; | |
156 | ||
157 | regulator-name = "SDHI0 Vcc"; | |
158 | regulator-min-microvolt = <3300000>; | |
159 | regulator-max-microvolt = <3300000>; | |
160 | ||
161 | gpio = <&gpio7 17 GPIO_ACTIVE_HIGH>; | |
162 | enable-active-high; | |
163 | }; | |
164 | ||
165 | vccq_sdhi0: regulator@1 { | |
166 | compatible = "regulator-gpio"; | |
167 | ||
168 | regulator-name = "SDHI0 VccQ"; | |
169 | regulator-min-microvolt = <1800000>; | |
170 | regulator-max-microvolt = <3300000>; | |
171 | ||
172 | gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; | |
173 | gpios-states = <1>; | |
174 | states = <3300000 1 | |
175 | 1800000 0>; | |
176 | }; | |
177 | ||
178 | vcc_sdhi1: regulator@2 { | |
179 | compatible = "regulator-fixed"; | |
180 | ||
181 | regulator-name = "SDHI1 Vcc"; | |
182 | regulator-min-microvolt = <3300000>; | |
183 | regulator-max-microvolt = <3300000>; | |
184 | ||
185 | gpio = <&gpio7 18 GPIO_ACTIVE_HIGH>; | |
186 | enable-active-high; | |
187 | }; | |
188 | ||
189 | vccq_sdhi1: regulator@3 { | |
190 | compatible = "regulator-gpio"; | |
191 | ||
192 | regulator-name = "SDHI1 VccQ"; | |
193 | regulator-min-microvolt = <1800000>; | |
194 | regulator-max-microvolt = <3300000>; | |
195 | ||
196 | gpios = <&gpio2 13 GPIO_ACTIVE_HIGH>; | |
197 | gpios-states = <1>; | |
198 | states = <3300000 1 | |
199 | 1800000 0>; | |
200 | }; | |
201 | ||
202 | vcc_sdhi2: regulator@4 { | |
203 | compatible = "regulator-fixed"; | |
204 | ||
205 | regulator-name = "SDHI2 Vcc"; | |
206 | regulator-min-microvolt = <3300000>; | |
207 | regulator-max-microvolt = <3300000>; | |
208 | ||
209 | gpio = <&gpio7 19 GPIO_ACTIVE_HIGH>; | |
210 | enable-active-high; | |
211 | }; | |
212 | ||
213 | vccq_sdhi2: regulator@5 { | |
214 | compatible = "regulator-gpio"; | |
215 | ||
216 | regulator-name = "SDHI2 VccQ"; | |
217 | regulator-min-microvolt = <1800000>; | |
218 | regulator-max-microvolt = <3300000>; | |
219 | ||
220 | gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; | |
221 | gpios-states = <1>; | |
222 | states = <3300000 1 | |
223 | 1800000 0>; | |
224 | }; | |
b160f615 KM |
225 | |
226 | sound { | |
227 | compatible = "simple-audio-card"; | |
228 | ||
229 | simple-audio-card,format = "left_j"; | |
230 | simple-audio-card,bitclock-master = <&sndcodec>; | |
231 | simple-audio-card,frame-master = <&sndcodec>; | |
232 | ||
233 | sndcpu: simple-audio-card,cpu { | |
234 | sound-dai = <&rcar_sound>; | |
235 | }; | |
236 | ||
237 | sndcodec: simple-audio-card,codec { | |
238 | sound-dai = <&ak4643>; | |
239 | system-clock-frequency = <11289600>; | |
240 | }; | |
241 | }; | |
f8e2535d LP |
242 | }; |
243 | ||
0ee56d40 LP |
244 | &du { |
245 | pinctrl-0 = <&du_pins>; | |
246 | pinctrl-names = "default"; | |
247 | status = "okay"; | |
248 | ||
249 | ports { | |
250 | port@1 { | |
251 | lvds_connector: endpoint { | |
252 | }; | |
253 | }; | |
254 | }; | |
255 | }; | |
256 | ||
fcf0c725 LP |
257 | &extal_clk { |
258 | clock-frequency = <20000000>; | |
259 | }; | |
260 | ||
f8e2535d | 261 | &pfc { |
e6a4c001 | 262 | i2c2_pins: i2c2 { |
38c53516 WS |
263 | renesas,groups = "i2c2"; |
264 | renesas,function = "i2c2"; | |
265 | }; | |
266 | ||
afba941c LP |
267 | du_pins: du { |
268 | renesas,groups = "du_rgb666", "du_sync", "du_clk_out_0"; | |
269 | renesas,function = "du"; | |
270 | }; | |
271 | ||
f8e2535d LP |
272 | scif0_pins: serial0 { |
273 | renesas,groups = "scif0_data_d"; | |
274 | renesas,function = "scif0"; | |
275 | }; | |
276 | ||
277 | scif1_pins: serial1 { | |
278 | renesas,groups = "scif1_data_d"; | |
279 | renesas,function = "scif1"; | |
280 | }; | |
e02ee513 | 281 | |
08e8f0f3 SS |
282 | ether_pins: ether { |
283 | renesas,groups = "eth_link", "eth_mdio", "eth_rmii"; | |
284 | renesas,function = "eth"; | |
285 | }; | |
286 | ||
287 | phy1_pins: phy1 { | |
288 | renesas,groups = "intc_irq0"; | |
289 | renesas,function = "intc"; | |
290 | }; | |
291 | ||
2c60a7df | 292 | sdhi0_pins: sd0 { |
d5dda038 | 293 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; |
2c60a7df MD |
294 | renesas,function = "sdhi0"; |
295 | }; | |
296 | ||
297 | sdhi1_pins: sd1 { | |
d5dda038 | 298 | renesas,groups = "sdhi1_data4", "sdhi1_ctrl"; |
2c60a7df MD |
299 | renesas,function = "sdhi1"; |
300 | }; | |
301 | ||
302 | sdhi2_pins: sd2 { | |
d5dda038 | 303 | renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; |
2c60a7df MD |
304 | renesas,function = "sdhi2"; |
305 | }; | |
306 | ||
6f3e4ee3 | 307 | qspi_pins: spi0 { |
e02ee513 GU |
308 | renesas,groups = "qspi_ctrl", "qspi_data4"; |
309 | renesas,function = "qspi"; | |
310 | }; | |
b16f05ab GU |
311 | |
312 | msiof0_pins: spi1 { | |
313 | renesas,groups = "msiof0_clk", "msiof0_sync", "msiof0_rx", | |
314 | "msiof0_tx"; | |
315 | renesas,function = "msiof0"; | |
316 | }; | |
1d41f36a | 317 | |
7540aeb0 SS |
318 | usb0_pins: usb0 { |
319 | renesas,groups = "usb0"; | |
320 | renesas,function = "usb0"; | |
321 | }; | |
322 | ||
323 | usb1_pins: usb1 { | |
324 | renesas,groups = "usb1"; | |
325 | renesas,function = "usb1"; | |
326 | }; | |
2cf08810 | 327 | |
328 | vin1_pins: vin1 { | |
329 | renesas,groups = "vin1_data8", "vin1_clk"; | |
330 | renesas,function = "vin1"; | |
331 | }; | |
b160f615 KM |
332 | |
333 | sound_pins: sound { | |
334 | renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; | |
335 | renesas,function = "ssi"; | |
336 | }; | |
337 | ||
338 | sound_clk_pins: sound_clk { | |
339 | renesas,groups = "audio_clk_a"; | |
340 | renesas,function = "audio_clk"; | |
341 | }; | |
1f52c659 | 342 | }; |
760c277b | 343 | |
08e8f0f3 SS |
344 | ðer { |
345 | pinctrl-0 = <ðer_pins &phy1_pins>; | |
346 | pinctrl-names = "default"; | |
347 | ||
348 | phy-handle = <&phy1>; | |
349 | renesas,ether-link-active-low; | |
350 | status = "ok"; | |
351 | ||
352 | phy1: ethernet-phy@1 { | |
353 | reg = <1>; | |
354 | interrupt-parent = <&irqc0>; | |
355 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | |
19f647cb | 356 | micrel,led-mode = <1>; |
08e8f0f3 SS |
357 | }; |
358 | }; | |
359 | ||
6a1d9460 LP |
360 | &cmt0 { |
361 | status = "ok"; | |
362 | }; | |
363 | ||
760c277b VB |
364 | &sata0 { |
365 | status = "okay"; | |
366 | }; | |
e02ee513 | 367 | |
5ba55fa8 LP |
368 | &scif0 { |
369 | pinctrl-0 = <&scif0_pins>; | |
370 | pinctrl-names = "default"; | |
371 | ||
372 | status = "okay"; | |
373 | }; | |
374 | ||
375 | &scif1 { | |
376 | pinctrl-0 = <&scif1_pins>; | |
377 | pinctrl-names = "default"; | |
378 | ||
379 | status = "okay"; | |
380 | }; | |
381 | ||
2c60a7df MD |
382 | &sdhi0 { |
383 | pinctrl-0 = <&sdhi0_pins>; | |
384 | pinctrl-names = "default"; | |
385 | ||
386 | vmmc-supply = <&vcc_sdhi0>; | |
387 | vqmmc-supply = <&vccq_sdhi0>; | |
388 | cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>; | |
389 | wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; | |
390 | status = "okay"; | |
391 | }; | |
392 | ||
393 | &sdhi1 { | |
394 | pinctrl-0 = <&sdhi1_pins>; | |
395 | pinctrl-names = "default"; | |
396 | ||
397 | vmmc-supply = <&vcc_sdhi1>; | |
398 | vqmmc-supply = <&vccq_sdhi1>; | |
399 | cd-gpios = <&gpio6 14 GPIO_ACTIVE_LOW>; | |
400 | wp-gpios = <&gpio6 15 GPIO_ACTIVE_HIGH>; | |
401 | status = "okay"; | |
402 | }; | |
403 | ||
404 | &sdhi2 { | |
405 | pinctrl-0 = <&sdhi2_pins>; | |
406 | pinctrl-names = "default"; | |
407 | ||
408 | vmmc-supply = <&vcc_sdhi2>; | |
409 | vqmmc-supply = <&vccq_sdhi2>; | |
410 | cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; | |
411 | status = "okay"; | |
412 | }; | |
413 | ||
6f3e4ee3 | 414 | &qspi { |
e02ee513 GU |
415 | pinctrl-0 = <&qspi_pins>; |
416 | pinctrl-names = "default"; | |
417 | ||
418 | status = "okay"; | |
419 | ||
420 | flash: flash@0 { | |
421 | #address-cells = <1>; | |
422 | #size-cells = <1>; | |
423 | compatible = "spansion,s25fl512s"; | |
424 | reg = <0>; | |
425 | spi-max-frequency = <30000000>; | |
ed56083a GU |
426 | spi-tx-bus-width = <4>; |
427 | spi-rx-bus-width = <4>; | |
e02ee513 GU |
428 | m25p,fast-read; |
429 | ||
430 | partition@0 { | |
431 | label = "loader"; | |
432 | reg = <0x00000000 0x00080000>; | |
433 | read-only; | |
434 | }; | |
435 | partition@80000 { | |
436 | label = "bootenv"; | |
437 | reg = <0x00080000 0x00080000>; | |
438 | read-only; | |
439 | }; | |
440 | partition@100000 { | |
441 | label = "data"; | |
442 | reg = <0x00100000 0x03f00000>; | |
443 | }; | |
444 | }; | |
445 | }; | |
b16f05ab GU |
446 | |
447 | &msiof0 { | |
448 | pinctrl-0 = <&msiof0_pins>; | |
449 | pinctrl-names = "default"; | |
450 | ||
451 | status = "okay"; | |
452 | ||
453 | pmic: pmic@0 { | |
454 | compatible = "renesas,r2a11302ft"; | |
455 | reg = <0>; | |
456 | spi-max-frequency = <6000000>; | |
457 | spi-cpol; | |
458 | spi-cpha; | |
459 | }; | |
460 | }; | |
1d41f36a | 461 | |
897dfdbc SH |
462 | &i2c2 { |
463 | pinctrl-0 = <&i2c2_pins>; | |
464 | pinctrl-names = "default"; | |
465 | ||
466 | status = "okay"; | |
a8d943ed | 467 | clock-frequency = <100000>; |
897dfdbc | 468 | |
b160f615 KM |
469 | ak4643: sound-codec@12 { |
470 | compatible = "asahi-kasei,ak4643"; | |
471 | #sound-dai-cells = <0>; | |
472 | reg = <0x12>; | |
473 | }; | |
474 | ||
2cf08810 | 475 | composite-in@20 { |
476 | compatible = "adi,adv7180"; | |
477 | reg = <0x20>; | |
478 | remote = <&vin1>; | |
479 | ||
480 | port { | |
481 | adv7180: endpoint { | |
482 | bus-width = <8>; | |
483 | remote-endpoint = <&vin1ep>; | |
484 | }; | |
485 | }; | |
486 | }; | |
487 | ||
897dfdbc SH |
488 | eeprom@50 { |
489 | compatible = "renesas,24c02"; | |
490 | reg = <0x50>; | |
491 | pagesize = <16>; | |
492 | }; | |
493 | }; | |
494 | ||
1d41f36a | 495 | &i2c6 { |
1d41f36a | 496 | status = "okay"; |
897dfdbc | 497 | clock-frequency = <100000>; |
1d41f36a GI |
498 | |
499 | vdd_dvfs: regulator@68 { | |
bd597f47 | 500 | compatible = "dlg,da9210"; |
1d41f36a GI |
501 | reg = <0x68>; |
502 | ||
503 | regulator-min-microvolt = <1000000>; | |
504 | regulator-max-microvolt = <1000000>; | |
505 | regulator-boot-on; | |
506 | regulator-always-on; | |
507 | }; | |
508 | }; | |
a57004ec | 509 | |
7540aeb0 SS |
510 | &pci0 { |
511 | status = "okay"; | |
512 | pinctrl-0 = <&usb0_pins>; | |
513 | pinctrl-names = "default"; | |
514 | }; | |
515 | ||
516 | &pci1 { | |
517 | status = "okay"; | |
518 | pinctrl-0 = <&usb1_pins>; | |
519 | pinctrl-names = "default"; | |
520 | }; | |
521 | ||
fc4a00b7 YS |
522 | &hsusb { |
523 | status = "okay"; | |
524 | pinctrl-0 = <&usb0_pins>; | |
525 | pinctrl-names = "default"; | |
526 | renesas,enable-gpio = <&gpio5 31 GPIO_ACTIVE_HIGH>; | |
527 | }; | |
528 | ||
dc80d8bc SS |
529 | &usbphy { |
530 | status = "okay"; | |
531 | }; | |
532 | ||
998d7d64 PE |
533 | &pcie_bus_clk { |
534 | status = "okay"; | |
535 | }; | |
536 | ||
537 | &pciec { | |
538 | status = "okay"; | |
539 | }; | |
540 | ||
a57004ec GI |
541 | &cpu0 { |
542 | cpu0-supply = <&vdd_dvfs>; | |
543 | }; | |
2cf08810 | 544 | |
545 | /* composite video input */ | |
546 | &vin1 { | |
547 | status = "ok"; | |
548 | pinctrl-0 = <&vin1_pins>; | |
549 | pinctrl-names = "default"; | |
550 | ||
551 | port { | |
552 | #address-cells = <1>; | |
553 | #size-cells = <0>; | |
554 | ||
555 | vin1ep: endpoint { | |
556 | remote-endpoint = <&adv7180>; | |
557 | bus-width = <8>; | |
558 | }; | |
559 | }; | |
560 | }; | |
b160f615 KM |
561 | |
562 | &rcar_sound { | |
563 | pinctrl-0 = <&sound_pins &sound_clk_pins>; | |
564 | pinctrl-names = "default"; | |
565 | ||
566 | #sound-dai-cells = <0>; | |
567 | ||
568 | status = "okay"; | |
569 | ||
570 | rcar_sound,dai { | |
571 | dai0 { | |
664de6fe KM |
572 | playback = <&ssi0 &src2>; |
573 | capture = <&ssi1 &src3>; | |
b160f615 KM |
574 | }; |
575 | }; | |
576 | }; | |
577 | ||
b160f615 | 578 | &ssi1 { |
b160f615 KM |
579 | shared-pin; |
580 | }; |