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