Commit | Line | Data |
---|---|---|
d25e8ff0 GU |
1 | /* |
2 | * Device Tree Source for the Salvator-X board | |
3 | * | |
4 | * Copyright (C) 2015-2016 Renesas Electronics Corp. | |
5 | * | |
6 | * This file is licensed under the terms of the GNU General Public License | |
7 | * version 2. This program is licensed "as is" without any warranty of any | |
8 | * kind, whether express or implied. | |
9 | */ | |
10 | ||
11 | /* | |
12 | * SSI-AK4613 | |
13 | * | |
14 | * This command is required when Playback/Capture | |
15 | * | |
16 | * amixer set "DVC Out" 100% | |
17 | * amixer set "DVC In" 100% | |
18 | * | |
19 | * You can use Mute | |
20 | * | |
21 | * amixer set "DVC Out Mute" on | |
22 | * amixer set "DVC In Mute" on | |
23 | * | |
24 | * You can use Volume Ramp | |
25 | * | |
26 | * amixer set "DVC Out Ramp Up Rate" "0.125 dB/64 steps" | |
27 | * amixer set "DVC Out Ramp Down Rate" "0.125 dB/512 steps" | |
28 | * amixer set "DVC Out Ramp" on | |
29 | * aplay xxx.wav & | |
30 | * amixer set "DVC Out" 80% // Volume Down | |
31 | * amixer set "DVC Out" 100% // Volume Up | |
32 | */ | |
33 | ||
34 | #include <dt-bindings/gpio/gpio.h> | |
35 | ||
36 | / { | |
37 | model = "Renesas Salvator-X board"; | |
38 | compatible = "renesas,salvator-x"; | |
39 | ||
40 | aliases { | |
41 | serial0 = &scif2; | |
42 | serial1 = &scif1; | |
43 | ethernet0 = &avb; | |
44 | }; | |
45 | ||
46 | chosen { | |
47 | bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp"; | |
48 | stdout-path = "serial0:115200n8"; | |
49 | }; | |
50 | ||
51 | audio_clkout: audio_clkout { | |
52 | /* | |
53 | * This is same as <&rcar_sound 0> | |
54 | * but needed to avoid cs2000/rcar_sound probe dead-lock | |
55 | */ | |
56 | compatible = "fixed-clock"; | |
57 | #clock-cells = <0>; | |
58 | clock-frequency = <11289600>; | |
59 | }; | |
60 | ||
b33be336 LP |
61 | backlight: backlight { |
62 | compatible = "pwm-backlight"; | |
63 | pwms = <&pwm1 0 50000>; | |
64 | ||
65 | brightness-levels = <256 128 64 16 8 4 0>; | |
66 | default-brightness-level = <6>; | |
67 | ||
68 | enable-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; | |
69 | }; | |
70 | ||
d25e8ff0 GU |
71 | reg_1p8v: regulator0 { |
72 | compatible = "regulator-fixed"; | |
73 | regulator-name = "fixed-1.8V"; | |
74 | regulator-min-microvolt = <1800000>; | |
75 | regulator-max-microvolt = <1800000>; | |
76 | regulator-boot-on; | |
77 | regulator-always-on; | |
78 | }; | |
79 | ||
80 | reg_3p3v: regulator1 { | |
81 | compatible = "regulator-fixed"; | |
82 | regulator-name = "fixed-3.3V"; | |
83 | regulator-min-microvolt = <3300000>; | |
84 | regulator-max-microvolt = <3300000>; | |
85 | regulator-boot-on; | |
86 | regulator-always-on; | |
87 | }; | |
88 | ||
89 | rsnd_ak4613: sound { | |
90 | compatible = "simple-audio-card"; | |
91 | ||
92 | simple-audio-card,format = "left_j"; | |
93 | simple-audio-card,bitclock-master = <&sndcpu>; | |
94 | simple-audio-card,frame-master = <&sndcpu>; | |
95 | ||
96 | sndcpu: simple-audio-card,cpu { | |
97 | sound-dai = <&rcar_sound>; | |
98 | }; | |
99 | ||
100 | sndcodec: simple-audio-card,codec { | |
101 | sound-dai = <&ak4613>; | |
102 | }; | |
103 | }; | |
104 | ||
105 | vbus0_usb2: regulator-vbus0-usb2 { | |
106 | compatible = "regulator-fixed"; | |
107 | ||
108 | regulator-name = "USB20_VBUS0"; | |
109 | regulator-min-microvolt = <5000000>; | |
110 | regulator-max-microvolt = <5000000>; | |
111 | ||
112 | gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>; | |
113 | enable-active-high; | |
114 | }; | |
115 | ||
116 | vcc_sdhi0: regulator-vcc-sdhi0 { | |
117 | compatible = "regulator-fixed"; | |
118 | ||
119 | regulator-name = "SDHI0 Vcc"; | |
120 | regulator-min-microvolt = <3300000>; | |
121 | regulator-max-microvolt = <3300000>; | |
122 | ||
123 | gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>; | |
124 | enable-active-high; | |
125 | }; | |
126 | ||
127 | vccq_sdhi0: regulator-vccq-sdhi0 { | |
128 | compatible = "regulator-gpio"; | |
129 | ||
130 | regulator-name = "SDHI0 VccQ"; | |
131 | regulator-min-microvolt = <1800000>; | |
132 | regulator-max-microvolt = <3300000>; | |
133 | ||
134 | gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>; | |
135 | gpios-states = <1>; | |
136 | states = <3300000 1 | |
137 | 1800000 0>; | |
138 | }; | |
139 | ||
140 | vcc_sdhi3: regulator-vcc-sdhi3 { | |
141 | compatible = "regulator-fixed"; | |
142 | ||
143 | regulator-name = "SDHI3 Vcc"; | |
144 | regulator-min-microvolt = <3300000>; | |
145 | regulator-max-microvolt = <3300000>; | |
146 | ||
147 | gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>; | |
148 | enable-active-high; | |
149 | }; | |
150 | ||
151 | vccq_sdhi3: regulator-vccq-sdhi3 { | |
152 | compatible = "regulator-gpio"; | |
153 | ||
154 | regulator-name = "SDHI3 VccQ"; | |
155 | regulator-min-microvolt = <1800000>; | |
156 | regulator-max-microvolt = <3300000>; | |
157 | ||
158 | gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; | |
159 | gpios-states = <1>; | |
160 | states = <3300000 1 | |
161 | 1800000 0>; | |
162 | }; | |
163 | ||
1cdfc42d LP |
164 | hdmi0-out { |
165 | compatible = "hdmi-connector"; | |
166 | label = "HDMI0 OUT"; | |
167 | type = "a"; | |
168 | ||
169 | port { | |
170 | hdmi0_con: endpoint { | |
171 | }; | |
172 | }; | |
173 | }; | |
174 | ||
175 | hdmi1-out { | |
176 | compatible = "hdmi-connector"; | |
177 | label = "HDMI1 OUT"; | |
178 | type = "a"; | |
179 | ||
180 | port { | |
181 | hdmi1_con: endpoint { | |
182 | }; | |
183 | }; | |
184 | }; | |
185 | ||
d25e8ff0 GU |
186 | vga { |
187 | compatible = "vga-connector"; | |
188 | ||
189 | port { | |
190 | vga_in: endpoint { | |
191 | remote-endpoint = <&adv7123_out>; | |
192 | }; | |
193 | }; | |
194 | }; | |
195 | ||
196 | vga-encoder { | |
197 | compatible = "adi,adv7123"; | |
198 | ||
199 | ports { | |
200 | #address-cells = <1>; | |
201 | #size-cells = <0>; | |
202 | ||
203 | port@0 { | |
204 | reg = <0>; | |
205 | adv7123_in: endpoint { | |
206 | remote-endpoint = <&du_out_rgb>; | |
207 | }; | |
208 | }; | |
209 | port@1 { | |
210 | reg = <1>; | |
211 | adv7123_out: endpoint { | |
212 | remote-endpoint = <&vga_in>; | |
213 | }; | |
214 | }; | |
215 | }; | |
216 | }; | |
217 | ||
218 | x12_clk: x12 { | |
219 | compatible = "fixed-clock"; | |
220 | #clock-cells = <0>; | |
221 | clock-frequency = <24576000>; | |
222 | }; | |
dee3978e LP |
223 | |
224 | /* External DU dot clocks */ | |
225 | x21_clk: x21-clock { | |
226 | compatible = "fixed-clock"; | |
227 | #clock-cells = <0>; | |
228 | clock-frequency = <33000000>; | |
229 | }; | |
230 | ||
231 | x22_clk: x22-clock { | |
232 | compatible = "fixed-clock"; | |
233 | #clock-cells = <0>; | |
234 | clock-frequency = <33000000>; | |
235 | }; | |
236 | ||
237 | x23_clk: x23-clock { | |
238 | compatible = "fixed-clock"; | |
239 | #clock-cells = <0>; | |
240 | clock-frequency = <25000000>; | |
241 | }; | |
d25e8ff0 GU |
242 | }; |
243 | ||
244 | &audio_clk_a { | |
245 | clock-frequency = <22579200>; | |
246 | }; | |
247 | ||
248 | &avb { | |
249 | pinctrl-0 = <&avb_pins>; | |
250 | pinctrl-names = "default"; | |
251 | renesas,no-ether-link; | |
252 | phy-handle = <&phy0>; | |
253 | status = "okay"; | |
254 | ||
255 | phy0: ethernet-phy@0 { | |
256 | rxc-skew-ps = <1500>; | |
257 | reg = <0>; | |
258 | interrupt-parent = <&gpio2>; | |
259 | interrupts = <11 IRQ_TYPE_LEVEL_LOW>; | |
260 | }; | |
261 | }; | |
262 | ||
263 | &du { | |
264 | pinctrl-0 = <&du_pins>; | |
265 | pinctrl-names = "default"; | |
266 | status = "okay"; | |
267 | ||
268 | ports { | |
269 | port@0 { | |
270 | endpoint { | |
271 | remote-endpoint = <&adv7123_in>; | |
272 | }; | |
273 | }; | |
274 | port@3 { | |
275 | lvds_connector: endpoint { | |
276 | }; | |
277 | }; | |
278 | }; | |
279 | }; | |
280 | ||
281 | &ehci0 { | |
282 | status = "okay"; | |
283 | }; | |
284 | ||
285 | &ehci1 { | |
286 | status = "okay"; | |
287 | }; | |
288 | ||
289 | &extal_clk { | |
290 | clock-frequency = <16666666>; | |
291 | }; | |
292 | ||
293 | &extalr_clk { | |
294 | clock-frequency = <32768>; | |
295 | }; | |
296 | ||
297 | &hsusb { | |
298 | status = "okay"; | |
299 | }; | |
300 | ||
301 | &i2c2 { | |
302 | pinctrl-0 = <&i2c2_pins>; | |
303 | pinctrl-names = "default"; | |
304 | ||
305 | status = "okay"; | |
306 | ||
307 | clock-frequency = <100000>; | |
308 | ||
309 | ak4613: codec@10 { | |
310 | compatible = "asahi-kasei,ak4613"; | |
311 | #sound-dai-cells = <0>; | |
312 | reg = <0x10>; | |
313 | clocks = <&rcar_sound 3>; | |
314 | ||
315 | asahi-kasei,in1-single-end; | |
316 | asahi-kasei,in2-single-end; | |
317 | asahi-kasei,out1-single-end; | |
318 | asahi-kasei,out2-single-end; | |
319 | asahi-kasei,out3-single-end; | |
320 | asahi-kasei,out4-single-end; | |
321 | asahi-kasei,out5-single-end; | |
322 | asahi-kasei,out6-single-end; | |
323 | }; | |
324 | ||
325 | cs2000: clk_multiplier@4f { | |
326 | #clock-cells = <0>; | |
327 | compatible = "cirrus,cs2000-cp"; | |
328 | reg = <0x4f>; | |
329 | clocks = <&audio_clkout>, <&x12_clk>; | |
330 | clock-names = "clk_in", "ref_clk"; | |
331 | ||
332 | assigned-clocks = <&cs2000>; | |
333 | assigned-clock-rates = <24576000>; /* 1/1 divide */ | |
334 | }; | |
335 | }; | |
336 | ||
c3dc4604 JM |
337 | &i2c4 { |
338 | status = "okay"; | |
339 | ||
dee3978e LP |
340 | versaclock5: clock-generator@6a { |
341 | compatible = "idt,5p49v5923"; | |
342 | reg = <0x6a>; | |
343 | #clock-cells = <1>; | |
344 | clocks = <&x23_clk>; | |
345 | clock-names = "xin"; | |
346 | }; | |
347 | ||
c3dc4604 JM |
348 | csa_vdd: adc@7c { |
349 | compatible = "maxim,max9611"; | |
350 | reg = <0x7c>; | |
351 | ||
352 | shunt-resistor-micro-ohms = <5000>; | |
353 | }; | |
354 | ||
355 | csa_dvfs: adc@7f { | |
356 | compatible = "maxim,max9611"; | |
357 | reg = <0x7f>; | |
358 | ||
359 | shunt-resistor-micro-ohms = <5000>; | |
360 | }; | |
361 | }; | |
362 | ||
d25e8ff0 GU |
363 | &i2c_dvfs { |
364 | status = "okay"; | |
365 | }; | |
366 | ||
367 | &ohci0 { | |
368 | status = "okay"; | |
369 | }; | |
370 | ||
371 | &ohci1 { | |
372 | status = "okay"; | |
373 | }; | |
374 | ||
375 | &pcie_bus_clk { | |
376 | clock-frequency = <100000000>; | |
377 | }; | |
378 | ||
379 | &pciec0 { | |
380 | status = "okay"; | |
381 | }; | |
382 | ||
383 | &pciec1 { | |
384 | status = "okay"; | |
385 | }; | |
386 | ||
387 | &pfc { | |
388 | pinctrl-0 = <&scif_clk_pins>; | |
389 | pinctrl-names = "default"; | |
390 | ||
391 | avb_pins: avb { | |
392 | mux { | |
393 | groups = "avb_link", "avb_phy_int", "avb_mdc", | |
394 | "avb_mii"; | |
395 | function = "avb"; | |
396 | }; | |
397 | ||
398 | pins_mdc { | |
399 | groups = "avb_mdc"; | |
400 | drive-strength = <24>; | |
401 | }; | |
402 | ||
403 | pins_mii_tx { | |
404 | pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0", | |
405 | "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3"; | |
406 | drive-strength = <12>; | |
407 | }; | |
408 | }; | |
409 | ||
410 | du_pins: du { | |
411 | groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0"; | |
412 | function = "du"; | |
413 | }; | |
414 | ||
415 | i2c2_pins: i2c2 { | |
416 | groups = "i2c2_a"; | |
417 | function = "i2c2"; | |
418 | }; | |
419 | ||
371294fc | 420 | pwm1_pins: pwm1 { |
b33be336 LP |
421 | groups = "pwm1_a"; |
422 | function = "pwm1"; | |
423 | }; | |
424 | ||
d25e8ff0 GU |
425 | scif1_pins: scif1 { |
426 | groups = "scif1_data_a", "scif1_ctrl"; | |
427 | function = "scif1"; | |
428 | }; | |
429 | ||
430 | scif2_pins: scif2 { | |
431 | groups = "scif2_data_a"; | |
432 | function = "scif2"; | |
433 | }; | |
434 | ||
435 | scif_clk_pins: scif_clk { | |
436 | groups = "scif_clk_a"; | |
437 | function = "scif_clk"; | |
438 | }; | |
439 | ||
440 | sdhi0_pins: sd0 { | |
441 | groups = "sdhi0_data4", "sdhi0_ctrl"; | |
442 | function = "sdhi0"; | |
443 | power-source = <3300>; | |
444 | }; | |
445 | ||
446 | sdhi0_pins_uhs: sd0_uhs { | |
447 | groups = "sdhi0_data4", "sdhi0_ctrl"; | |
448 | function = "sdhi0"; | |
449 | power-source = <1800>; | |
450 | }; | |
451 | ||
452 | sdhi2_pins: sd2 { | |
453 | groups = "sdhi2_data8", "sdhi2_ctrl"; | |
454 | function = "sdhi2"; | |
455 | power-source = <3300>; | |
456 | }; | |
457 | ||
458 | sdhi2_pins_uhs: sd2_uhs { | |
459 | groups = "sdhi2_data8", "sdhi2_ctrl"; | |
460 | function = "sdhi2"; | |
461 | power-source = <1800>; | |
462 | }; | |
463 | ||
464 | sdhi3_pins: sd3 { | |
465 | groups = "sdhi3_data4", "sdhi3_ctrl"; | |
466 | function = "sdhi3"; | |
467 | power-source = <3300>; | |
468 | }; | |
469 | ||
470 | sdhi3_pins_uhs: sd3_uhs { | |
471 | groups = "sdhi3_data4", "sdhi3_ctrl"; | |
472 | function = "sdhi3"; | |
473 | power-source = <1800>; | |
474 | }; | |
475 | ||
476 | sound_pins: sound { | |
477 | groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a"; | |
478 | function = "ssi"; | |
479 | }; | |
480 | ||
481 | sound_clk_pins: sound_clk { | |
482 | groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a", | |
483 | "audio_clkout_a", "audio_clkout3_a"; | |
484 | function = "audio_clk"; | |
485 | }; | |
486 | ||
487 | usb0_pins: usb0 { | |
488 | groups = "usb0"; | |
489 | function = "usb0"; | |
490 | }; | |
491 | ||
492 | usb1_pins: usb1 { | |
493 | mux { | |
494 | groups = "usb1"; | |
495 | function = "usb1"; | |
496 | }; | |
497 | ||
498 | ovc { | |
499 | pins = "GP_6_27"; | |
500 | bias-pull-up; | |
501 | }; | |
502 | ||
503 | pwen { | |
504 | pins = "GP_6_26"; | |
505 | bias-pull-down; | |
506 | }; | |
507 | }; | |
508 | }; | |
509 | ||
b33be336 LP |
510 | &pwm1 { |
511 | pinctrl-0 = <&pwm1_pins>; | |
512 | pinctrl-names = "default"; | |
513 | ||
514 | status = "okay"; | |
515 | }; | |
516 | ||
d25e8ff0 GU |
517 | &rcar_sound { |
518 | pinctrl-0 = <&sound_pins &sound_clk_pins>; | |
519 | pinctrl-names = "default"; | |
520 | ||
521 | /* Single DAI */ | |
522 | #sound-dai-cells = <0>; | |
523 | ||
524 | /* audio_clkout0/1/2/3 */ | |
525 | #clock-cells = <1>; | |
d37d2b3c | 526 | clock-frequency = <11289600 12288000>; |
d25e8ff0 GU |
527 | |
528 | status = "okay"; | |
529 | ||
530 | /* update <audio_clk_b> to <cs2000> */ | |
531 | clocks = <&cpg CPG_MOD 1005>, | |
532 | <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>, | |
533 | <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>, | |
534 | <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>, | |
535 | <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>, | |
536 | <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>, | |
537 | <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>, | |
538 | <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>, | |
539 | <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>, | |
540 | <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>, | |
541 | <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>, | |
542 | <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, | |
543 | <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>, | |
544 | <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>, | |
545 | <&audio_clk_a>, <&cs2000>, | |
546 | <&audio_clk_c>, | |
547 | <&cpg CPG_CORE CPG_AUDIO_CLK_I>; | |
548 | ||
549 | rcar_sound,dai { | |
550 | dai0 { | |
551 | playback = <&ssi0 &src0 &dvc0>; | |
552 | capture = <&ssi1 &src1 &dvc1>; | |
553 | }; | |
554 | }; | |
555 | }; | |
556 | ||
557 | &scif1 { | |
558 | pinctrl-0 = <&scif1_pins>; | |
559 | pinctrl-names = "default"; | |
560 | ||
561 | uart-has-rtscts; | |
562 | status = "okay"; | |
563 | }; | |
564 | ||
565 | &scif2 { | |
566 | pinctrl-0 = <&scif2_pins>; | |
567 | pinctrl-names = "default"; | |
568 | ||
569 | status = "okay"; | |
570 | }; | |
571 | ||
572 | &scif_clk { | |
573 | clock-frequency = <14745600>; | |
574 | }; | |
575 | ||
576 | &sdhi0 { | |
577 | pinctrl-0 = <&sdhi0_pins>; | |
578 | pinctrl-1 = <&sdhi0_pins_uhs>; | |
579 | pinctrl-names = "default", "state_uhs"; | |
580 | ||
581 | vmmc-supply = <&vcc_sdhi0>; | |
582 | vqmmc-supply = <&vccq_sdhi0>; | |
583 | cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>; | |
584 | wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>; | |
585 | bus-width = <4>; | |
586 | sd-uhs-sdr50; | |
587 | status = "okay"; | |
588 | }; | |
589 | ||
590 | &sdhi2 { | |
591 | /* used for on-board 8bit eMMC */ | |
592 | pinctrl-0 = <&sdhi2_pins>; | |
593 | pinctrl-1 = <&sdhi2_pins_uhs>; | |
594 | pinctrl-names = "default", "state_uhs"; | |
595 | ||
596 | vmmc-supply = <®_3p3v>; | |
597 | vqmmc-supply = <®_1p8v>; | |
598 | bus-width = <8>; | |
599 | mmc-hs200-1_8v; | |
600 | non-removable; | |
601 | status = "okay"; | |
602 | }; | |
603 | ||
604 | &sdhi3 { | |
605 | pinctrl-0 = <&sdhi3_pins>; | |
606 | pinctrl-1 = <&sdhi3_pins_uhs>; | |
607 | pinctrl-names = "default", "state_uhs"; | |
608 | ||
609 | vmmc-supply = <&vcc_sdhi3>; | |
610 | vqmmc-supply = <&vccq_sdhi3>; | |
611 | cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>; | |
612 | wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>; | |
613 | bus-width = <4>; | |
614 | sd-uhs-sdr50; | |
615 | status = "okay"; | |
616 | }; | |
617 | ||
618 | &ssi1 { | |
619 | shared-pin; | |
620 | }; | |
621 | ||
622 | &usb2_phy0 { | |
623 | pinctrl-0 = <&usb0_pins>; | |
624 | pinctrl-names = "default"; | |
625 | ||
626 | vbus-supply = <&vbus0_usb2>; | |
627 | status = "okay"; | |
628 | }; | |
629 | ||
630 | &usb2_phy1 { | |
631 | pinctrl-0 = <&usb1_pins>; | |
632 | pinctrl-names = "default"; | |
633 | ||
634 | status = "okay"; | |
635 | }; | |
636 | ||
637 | &wdt0 { | |
638 | timeout-sec = <60>; | |
639 | status = "okay"; | |
640 | }; | |
641 | ||
642 | &xhci0 { | |
643 | status = "okay"; | |
644 | }; |