Commit | Line | Data |
---|---|---|
3cc828fd MD |
1 | /* |
2 | * Device Tree Source for the Lager board | |
3 | * | |
da4ea951 SS |
4 | * Copyright (C) 2013-2014 Renesas Solutions Corp. |
5 | * Copyright (C) 2014 Cogent Embedded, Inc. | |
3cc828fd MD |
6 | * |
7 | * This file is licensed under the terms of the GNU General Public License | |
8 | * version 2. This program is licensed "as is" without any warranty of any | |
9 | * kind, whether express or implied. | |
10 | */ | |
11 | ||
8ea7a44a KM |
12 | /* |
13 | * SSI-AK4643 | |
14 | * | |
15 | * SW1: 1: AK4643 | |
16 | * 2: CN22 | |
17 | * 3: ADV7511 | |
18 | * | |
19 | * This command is required when Playback/Capture | |
20 | * | |
21 | * amixer set "LINEOUT Mixer DACL" on | |
e110c541 KM |
22 | * amixer set "DVC Out" 100% |
23 | * amixer set "DVC In" 100% | |
24 | * | |
25 | * You can use Mute | |
26 | * | |
27 | * amixer set "DVC Out Mute" on | |
28 | * amixer set "DVC In Mute" on | |
8ea7a44a KM |
29 | */ |
30 | ||
3cc828fd | 31 | /dts-v1/; |
31c46cbf | 32 | #include "r8a7790.dtsi" |
39fa511b | 33 | #include <dt-bindings/gpio/gpio.h> |
f7dcd382 | 34 | #include <dt-bindings/input/input.h> |
3cc828fd MD |
35 | |
36 | / { | |
37 | model = "Lager"; | |
38 | compatible = "renesas,lager", "renesas,r8a7790"; | |
39 | ||
4e9c4877 | 40 | aliases { |
7c055894 WS |
41 | serial6 = &scifa0; |
42 | serial7 = &scifa1; | |
4e9c4877 LP |
43 | }; |
44 | ||
3cc828fd | 45 | chosen { |
dcbbbaf2 | 46 | bootargs = "console=ttySC6,115200 ignore_loglevel rw root=/dev/nfs ip=dhcp"; |
cf855816 | 47 | stdout-path = &scifa0; |
3cc828fd MD |
48 | }; |
49 | ||
50 | memory@40000000 { | |
51 | device_type = "memory"; | |
7b16c61a | 52 | reg = <0 0x40000000 0 0x40000000>; |
3cc828fd MD |
53 | }; |
54 | ||
126f998e | 55 | memory@140000000 { |
62bc32a2 | 56 | device_type = "memory"; |
7b16c61a | 57 | reg = <1 0x40000000 0 0xc0000000>; |
62bc32a2 MD |
58 | }; |
59 | ||
3cc828fd MD |
60 | lbsc { |
61 | #address-cells = <1>; | |
62 | #size-cells = <1>; | |
63 | }; | |
39fa511b | 64 | |
f7dcd382 MD |
65 | gpio_keys { |
66 | compatible = "gpio-keys"; | |
67 | ||
68 | button@1 { | |
69 | linux,code = <KEY_1>; | |
70 | label = "SW2-1"; | |
71 | gpio-key,wakeup; | |
72 | debounce-interval = <20>; | |
73 | gpios = <&gpio1 14 GPIO_ACTIVE_LOW>; | |
74 | }; | |
75 | button@2 { | |
76 | linux,code = <KEY_2>; | |
77 | label = "SW2-2"; | |
78 | gpio-key,wakeup; | |
79 | debounce-interval = <20>; | |
80 | gpios = <&gpio1 24 GPIO_ACTIVE_LOW>; | |
81 | }; | |
82 | button@3 { | |
83 | linux,code = <KEY_3>; | |
84 | label = "SW2-3"; | |
85 | gpio-key,wakeup; | |
86 | debounce-interval = <20>; | |
87 | gpios = <&gpio1 26 GPIO_ACTIVE_LOW>; | |
88 | }; | |
89 | button@4 { | |
90 | linux,code = <KEY_4>; | |
91 | label = "SW2-4"; | |
92 | gpio-key,wakeup; | |
93 | debounce-interval = <20>; | |
94 | gpios = <&gpio1 28 GPIO_ACTIVE_LOW>; | |
95 | }; | |
96 | }; | |
97 | ||
39fa511b LP |
98 | leds { |
99 | compatible = "gpio-leds"; | |
100 | led6 { | |
101 | gpios = <&gpio4 22 GPIO_ACTIVE_HIGH>; | |
102 | }; | |
103 | led7 { | |
104 | gpios = <&gpio4 23 GPIO_ACTIVE_HIGH>; | |
105 | }; | |
106 | led8 { | |
107 | gpios = <&gpio5 17 GPIO_ACTIVE_HIGH>; | |
108 | }; | |
109 | }; | |
110 | ||
111 | fixedregulator3v3: fixedregulator@0 { | |
112 | compatible = "regulator-fixed"; | |
113 | regulator-name = "fixed-3.3V"; | |
114 | regulator-min-microvolt = <3300000>; | |
115 | regulator-max-microvolt = <3300000>; | |
116 | regulator-boot-on; | |
117 | regulator-always-on; | |
118 | }; | |
c6119944 KM |
119 | |
120 | vcc_sdhi0: regulator@1 { | |
121 | compatible = "regulator-fixed"; | |
122 | ||
123 | regulator-name = "SDHI0 Vcc"; | |
124 | regulator-min-microvolt = <3300000>; | |
125 | regulator-max-microvolt = <3300000>; | |
126 | ||
127 | gpio = <&gpio5 24 GPIO_ACTIVE_HIGH>; | |
128 | enable-active-high; | |
129 | }; | |
130 | ||
131 | vccq_sdhi0: regulator@2 { | |
132 | compatible = "regulator-gpio"; | |
133 | ||
134 | regulator-name = "SDHI0 VccQ"; | |
135 | regulator-min-microvolt = <1800000>; | |
136 | regulator-max-microvolt = <3300000>; | |
137 | ||
138 | gpios = <&gpio5 29 GPIO_ACTIVE_HIGH>; | |
139 | gpios-states = <1>; | |
140 | states = <3300000 1 | |
141 | 1800000 0>; | |
142 | }; | |
143 | ||
144 | vcc_sdhi2: regulator@3 { | |
145 | compatible = "regulator-fixed"; | |
146 | ||
147 | regulator-name = "SDHI2 Vcc"; | |
148 | regulator-min-microvolt = <3300000>; | |
149 | regulator-max-microvolt = <3300000>; | |
150 | ||
151 | gpio = <&gpio5 25 GPIO_ACTIVE_HIGH>; | |
152 | enable-active-high; | |
153 | }; | |
154 | ||
155 | vccq_sdhi2: regulator@4 { | |
156 | compatible = "regulator-gpio"; | |
157 | ||
158 | regulator-name = "SDHI2 VccQ"; | |
159 | regulator-min-microvolt = <1800000>; | |
160 | regulator-max-microvolt = <3300000>; | |
161 | ||
162 | gpios = <&gpio5 30 GPIO_ACTIVE_HIGH>; | |
163 | gpios-states = <1>; | |
164 | states = <3300000 1 | |
165 | 1800000 0>; | |
166 | }; | |
3edd18ff | 167 | |
8ea7a44a KM |
168 | sound { |
169 | compatible = "simple-audio-card"; | |
170 | ||
171 | simple-audio-card,format = "left_j"; | |
172 | simple-audio-card,bitclock-master = <&sndcodec>; | |
173 | simple-audio-card,frame-master = <&sndcodec>; | |
174 | ||
175 | sndcpu: simple-audio-card,cpu { | |
176 | sound-dai = <&rcar_sound>; | |
177 | }; | |
178 | ||
179 | sndcodec: simple-audio-card,codec { | |
180 | sound-dai = <&ak4643>; | |
181 | system-clock-frequency = <11289600>; | |
182 | }; | |
183 | }; | |
184 | ||
3edd18ff LP |
185 | vga-encoder { |
186 | compatible = "adi,adv7123"; | |
187 | ||
188 | ports { | |
189 | #address-cells = <1>; | |
190 | #size-cells = <0>; | |
191 | ||
192 | port@0 { | |
193 | reg = <0>; | |
194 | adv7123_in: endpoint { | |
195 | remote-endpoint = <&du_out_rgb>; | |
196 | }; | |
197 | }; | |
198 | port@1 { | |
199 | reg = <1>; | |
200 | adv7123_out: endpoint { | |
201 | remote-endpoint = <&vga_in>; | |
202 | }; | |
203 | }; | |
204 | }; | |
205 | }; | |
206 | ||
207 | vga { | |
208 | compatible = "vga-connector"; | |
209 | ||
210 | port { | |
211 | vga_in: endpoint { | |
212 | remote-endpoint = <&adv7123_out>; | |
213 | }; | |
214 | }; | |
215 | }; | |
216 | }; | |
217 | ||
218 | &du { | |
219 | pinctrl-0 = <&du_pins>; | |
220 | pinctrl-names = "default"; | |
221 | status = "okay"; | |
222 | ||
223 | ports { | |
224 | port@0 { | |
225 | endpoint { | |
226 | remote-endpoint = <&adv7123_in>; | |
227 | }; | |
228 | }; | |
229 | port@2 { | |
230 | lvds_connector: endpoint { | |
231 | }; | |
232 | }; | |
233 | }; | |
39fa511b LP |
234 | }; |
235 | ||
62e43056 LP |
236 | &extal_clk { |
237 | clock-frequency = <20000000>; | |
238 | }; | |
239 | ||
39fa511b | 240 | &pfc { |
3024f507 LP |
241 | du_pins: du { |
242 | renesas,groups = "du_rgb666", "du_sync_1", "du_clk_out_0"; | |
243 | renesas,function = "du"; | |
244 | }; | |
245 | ||
7c055894 WS |
246 | scifa0_pins: serial0 { |
247 | renesas,groups = "scifa0_data"; | |
248 | renesas,function = "scifa0"; | |
39fa511b LP |
249 | }; |
250 | ||
da4ea951 SS |
251 | ether_pins: ether { |
252 | renesas,groups = "eth_link", "eth_mdio", "eth_rmii"; | |
253 | renesas,function = "eth"; | |
254 | }; | |
255 | ||
256 | phy1_pins: phy1 { | |
257 | renesas,groups = "intc_irq0"; | |
258 | renesas,function = "intc"; | |
259 | }; | |
260 | ||
7c055894 WS |
261 | scifa1_pins: serial1 { |
262 | renesas,groups = "scifa1_data"; | |
263 | renesas,function = "scifa1"; | |
39fa511b LP |
264 | }; |
265 | ||
c6119944 | 266 | sdhi0_pins: sd0 { |
b08eed0c | 267 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; |
c6119944 KM |
268 | renesas,function = "sdhi0"; |
269 | }; | |
270 | ||
271 | sdhi2_pins: sd2 { | |
b08eed0c | 272 | renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; |
c6119944 KM |
273 | renesas,function = "sdhi2"; |
274 | }; | |
275 | ||
39fa511b LP |
276 | mmc1_pins: mmc1 { |
277 | renesas,groups = "mmc1_data8", "mmc1_ctrl"; | |
278 | renesas,function = "mmc1"; | |
279 | }; | |
9fe7c4f8 | 280 | |
fad6d45c | 281 | qspi_pins: spi0 { |
9fe7c4f8 GU |
282 | renesas,groups = "qspi_ctrl", "qspi_data4"; |
283 | renesas,function = "qspi"; | |
284 | }; | |
b0403b91 GU |
285 | |
286 | msiof1_pins: spi2 { | |
287 | renesas,groups = "msiof1_clk", "msiof1_sync", "msiof1_rx", | |
288 | "msiof1_tx"; | |
289 | renesas,function = "msiof1"; | |
290 | }; | |
05f72e03 | 291 | |
cb9a2b12 WS |
292 | iic1_pins: iic1 { |
293 | renesas,groups = "iic1"; | |
294 | renesas,function = "iic1"; | |
d90bf60c SH |
295 | }; |
296 | ||
cb9a2b12 WS |
297 | iic2_pins: iic2 { |
298 | renesas,groups = "iic2"; | |
299 | renesas,function = "iic2"; | |
d90bf60c SH |
300 | }; |
301 | ||
5179ffd0 KN |
302 | iic3_pins: iic3 { |
303 | renesas,groups = "iic3"; | |
304 | renesas,function = "iic3"; | |
05f72e03 | 305 | }; |
d8584660 | 306 | |
e03074a7 YS |
307 | hsusb_pins: hsusb { |
308 | renesas,groups = "usb0_ovc_vbus"; | |
309 | renesas,function = "usb0"; | |
310 | }; | |
311 | ||
d8584660 BD |
312 | usb0_pins: usb0 { |
313 | renesas,groups = "usb0"; | |
314 | renesas,function = "usb0"; | |
315 | }; | |
316 | ||
317 | usb1_pins: usb1 { | |
318 | renesas,groups = "usb1"; | |
319 | renesas,function = "usb1"; | |
320 | }; | |
321 | ||
322 | usb2_pins: usb2 { | |
323 | renesas,groups = "usb2"; | |
324 | renesas,function = "usb2"; | |
325 | }; | |
d594c977 BD |
326 | |
327 | vin1_pins: vin { | |
328 | renesas,groups = "vin1_data8", "vin1_clk"; | |
329 | renesas,function = "vin1"; | |
330 | }; | |
8ea7a44a KM |
331 | |
332 | sound_pins: sound { | |
333 | renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; | |
334 | renesas,function = "ssi"; | |
335 | }; | |
336 | ||
337 | sound_clk_pins: sound_clk { | |
338 | renesas,groups = "audio_clk_a"; | |
339 | renesas,function = "audio_clk"; | |
340 | }; | |
39fa511b LP |
341 | }; |
342 | ||
da4ea951 SS |
343 | ðer { |
344 | pinctrl-0 = <ðer_pins &phy1_pins>; | |
345 | pinctrl-names = "default"; | |
346 | ||
347 | phy-handle = <&phy1>; | |
348 | renesas,ether-link-active-low; | |
349 | status = "ok"; | |
350 | ||
351 | phy1: ethernet-phy@1 { | |
352 | reg = <1>; | |
353 | interrupt-parent = <&irqc0>; | |
354 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | |
1c47a6aa | 355 | micrel,led-mode = <1>; |
da4ea951 SS |
356 | }; |
357 | }; | |
358 | ||
247fd5ec LP |
359 | &cmt0 { |
360 | status = "ok"; | |
361 | }; | |
362 | ||
39fa511b LP |
363 | &mmcif1 { |
364 | pinctrl-0 = <&mmc1_pins>; | |
365 | pinctrl-names = "default"; | |
366 | ||
367 | vmmc-supply = <&fixedregulator3v3>; | |
368 | bus-width = <8>; | |
369 | non-removable; | |
370 | status = "okay"; | |
3cc828fd | 371 | }; |
c6181b9f VB |
372 | |
373 | &sata1 { | |
374 | status = "okay"; | |
375 | }; | |
9fe7c4f8 | 376 | |
fad6d45c | 377 | &qspi { |
9fe7c4f8 GU |
378 | pinctrl-0 = <&qspi_pins>; |
379 | pinctrl-names = "default"; | |
380 | ||
381 | status = "okay"; | |
382 | ||
383 | flash: flash@0 { | |
384 | #address-cells = <1>; | |
385 | #size-cells = <1>; | |
386 | compatible = "spansion,s25fl512s"; | |
387 | reg = <0>; | |
388 | spi-max-frequency = <30000000>; | |
9909d2cb GU |
389 | spi-tx-bus-width = <4>; |
390 | spi-rx-bus-width = <4>; | |
9fe7c4f8 GU |
391 | m25p,fast-read; |
392 | ||
393 | partition@0 { | |
394 | label = "loader"; | |
395 | reg = <0x00000000 0x00040000>; | |
396 | read-only; | |
397 | }; | |
398 | partition@40000 { | |
399 | label = "user"; | |
400 | reg = <0x00040000 0x00400000>; | |
401 | read-only; | |
402 | }; | |
403 | partition@440000 { | |
404 | label = "flash"; | |
405 | reg = <0x00440000 0x03bc0000>; | |
406 | }; | |
407 | }; | |
408 | }; | |
c6119944 | 409 | |
7c055894 WS |
410 | &scifa0 { |
411 | pinctrl-0 = <&scifa0_pins>; | |
4e9c4877 LP |
412 | pinctrl-names = "default"; |
413 | ||
414 | status = "okay"; | |
415 | }; | |
416 | ||
7c055894 WS |
417 | &scifa1 { |
418 | pinctrl-0 = <&scifa1_pins>; | |
4e9c4877 LP |
419 | pinctrl-names = "default"; |
420 | ||
421 | status = "okay"; | |
422 | }; | |
423 | ||
b0403b91 GU |
424 | &msiof1 { |
425 | pinctrl-0 = <&msiof1_pins>; | |
426 | pinctrl-names = "default"; | |
427 | ||
428 | status = "okay"; | |
429 | ||
430 | pmic: pmic@0 { | |
431 | compatible = "renesas,r2a11302ft"; | |
432 | reg = <0>; | |
433 | spi-max-frequency = <6000000>; | |
434 | spi-cpol; | |
435 | spi-cpha; | |
436 | }; | |
b0403b91 GU |
437 | }; |
438 | ||
c6119944 KM |
439 | &sdhi0 { |
440 | pinctrl-0 = <&sdhi0_pins>; | |
441 | pinctrl-names = "default"; | |
442 | ||
443 | vmmc-supply = <&vcc_sdhi0>; | |
444 | vqmmc-supply = <&vccq_sdhi0>; | |
445 | cd-gpios = <&gpio3 6 GPIO_ACTIVE_LOW>; | |
446 | status = "okay"; | |
447 | }; | |
448 | ||
449 | &sdhi2 { | |
450 | pinctrl-0 = <&sdhi2_pins>; | |
451 | pinctrl-names = "default"; | |
452 | ||
453 | vmmc-supply = <&vcc_sdhi2>; | |
454 | vqmmc-supply = <&vccq_sdhi2>; | |
455 | cd-gpios = <&gpio3 22 GPIO_ACTIVE_LOW>; | |
456 | status = "okay"; | |
457 | }; | |
05f72e03 | 458 | |
b989e138 BC |
459 | &cpu0 { |
460 | cpu0-supply = <&vdd_dvfs>; | |
461 | }; | |
e489c2a9 | 462 | |
cb9a2b12 | 463 | &iic0 { |
e489c2a9 BD |
464 | status = "ok"; |
465 | }; | |
466 | ||
cb9a2b12 | 467 | &iic1 { |
e489c2a9 | 468 | status = "ok"; |
cb9a2b12 | 469 | pinctrl-0 = <&iic1_pins>; |
e1a2c4eb | 470 | pinctrl-names = "default"; |
e489c2a9 BD |
471 | }; |
472 | ||
cb9a2b12 | 473 | &iic2 { |
e489c2a9 | 474 | status = "ok"; |
cb9a2b12 | 475 | pinctrl-0 = <&iic2_pins>; |
e1a2c4eb | 476 | pinctrl-names = "default"; |
d594c977 | 477 | |
177d8bea KM |
478 | clock-frequency = <100000>; |
479 | ||
8ea7a44a KM |
480 | ak4643: sound-codec@12 { |
481 | compatible = "asahi-kasei,ak4643"; | |
482 | #sound-dai-cells = <0>; | |
483 | reg = <0x12>; | |
484 | }; | |
485 | ||
d594c977 BD |
486 | composite-in@20 { |
487 | compatible = "adi,adv7180"; | |
488 | reg = <0x20>; | |
489 | remote = <&vin1>; | |
490 | ||
491 | port { | |
492 | adv7180: endpoint { | |
493 | bus-width = <8>; | |
494 | remote-endpoint = <&vin1ep0>; | |
495 | }; | |
496 | }; | |
497 | }; | |
e489c2a9 BD |
498 | }; |
499 | ||
5179ffd0 | 500 | &iic3 { |
aca4ec44 | 501 | pinctrl-names = "default"; |
5179ffd0 | 502 | pinctrl-0 = <&iic3_pins>; |
aca4ec44 SH |
503 | status = "okay"; |
504 | ||
505 | vdd_dvfs: regulator@68 { | |
bd597f47 | 506 | compatible = "dlg,da9210"; |
aca4ec44 SH |
507 | reg = <0x68>; |
508 | ||
509 | regulator-min-microvolt = <1000000>; | |
510 | regulator-max-microvolt = <1000000>; | |
511 | regulator-boot-on; | |
512 | regulator-always-on; | |
513 | }; | |
e489c2a9 | 514 | }; |
d8584660 BD |
515 | |
516 | &pci0 { | |
517 | status = "okay"; | |
518 | pinctrl-0 = <&usb0_pins>; | |
519 | pinctrl-names = "default"; | |
520 | }; | |
521 | ||
522 | &pci1 { | |
523 | status = "okay"; | |
524 | pinctrl-0 = <&usb1_pins>; | |
525 | pinctrl-names = "default"; | |
526 | }; | |
527 | ||
37f7c1b0 YS |
528 | &xhci { |
529 | status = "okay"; | |
530 | pinctrl-0 = <&usb2_pins>; | |
531 | pinctrl-names = "default"; | |
532 | }; | |
533 | ||
d8584660 BD |
534 | &pci2 { |
535 | status = "okay"; | |
536 | pinctrl-0 = <&usb2_pins>; | |
537 | pinctrl-names = "default"; | |
538 | }; | |
d594c977 | 539 | |
e03074a7 YS |
540 | &hsusb { |
541 | status = "okay"; | |
542 | pinctrl-0 = <&hsusb_pins>; | |
543 | pinctrl-names = "default"; | |
544 | renesas,enable-gpio = <&gpio5 18 GPIO_ACTIVE_HIGH>; | |
545 | }; | |
546 | ||
6742cafb SS |
547 | &usbphy { |
548 | status = "okay"; | |
549 | }; | |
550 | ||
d594c977 BD |
551 | /* composite video input */ |
552 | &vin1 { | |
553 | pinctrl-0 = <&vin1_pins>; | |
554 | pinctrl-names = "default"; | |
555 | ||
556 | status = "ok"; | |
557 | ||
558 | port { | |
559 | #address-cells = <1>; | |
560 | #size-cells = <0>; | |
561 | ||
562 | vin1ep0: endpoint { | |
563 | remote-endpoint = <&adv7180>; | |
564 | bus-width = <8>; | |
565 | }; | |
566 | }; | |
567 | }; | |
8ea7a44a KM |
568 | |
569 | &rcar_sound { | |
570 | pinctrl-0 = <&sound_pins &sound_clk_pins>; | |
571 | pinctrl-names = "default"; | |
572 | ||
573 | #sound-dai-cells = <0>; | |
574 | ||
575 | status = "okay"; | |
576 | ||
577 | rcar_sound,dai { | |
578 | dai0 { | |
e110c541 KM |
579 | playback = <&ssi0 &src2 &dvc0>; |
580 | capture = <&ssi1 &src3 &dvc1>; | |
8ea7a44a KM |
581 | }; |
582 | }; | |
583 | }; | |
584 | ||
8ea7a44a | 585 | &ssi1 { |
8ea7a44a KM |
586 | shared-pin; |
587 | }; |