blob: b1eab6876f8c6769d66f8b65fdd384f4b16f005f [file] [log] [blame]
Kuninori Morimoto1950fab2015-10-02 11:56:12 +09001/*
2 * Device Tree Source for the Salvator-X board
3 *
4 * Copyright (C) 2015 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
Kuninori Morimoto672b7932015-11-25 06:39:13 +000011/*
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
Kuninori Morimoto1950fab2015-10-02 11:56:12 +090034/dts-v1/;
35#include "r8a7795.dtsi"
Ai Kyuse1c0e7b92016-02-15 16:01:50 +010036#include <dt-bindings/gpio/gpio.h>
Kuninori Morimoto1950fab2015-10-02 11:56:12 +090037
38/ {
39 model = "Renesas Salvator-X board based on r8a7795";
40 compatible = "renesas,salvator-x", "renesas,r8a7795";
41
42 aliases {
43 serial0 = &scif2;
44 serial1 = &scif1;
Geert Uytterhoeven10ca6db2015-11-02 13:31:48 +090045 ethernet0 = &avb;
Kuninori Morimoto1950fab2015-10-02 11:56:12 +090046 };
47
48 chosen {
Simon Hormanb2407c52015-11-02 13:31:46 +090049 bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp";
Kuninori Morimoto1950fab2015-10-02 11:56:12 +090050 stdout-path = "serial0:115200n8";
51 };
52
53 memory@48000000 {
54 device_type = "memory";
55 /* first 128MB is reserved for secure area. */
56 reg = <0x0 0x48000000 0x0 0x38000000>;
57 };
Kuninori Morimoto994aadf2015-11-25 06:37:49 +000058
59 x12_clk: x12_clk {
60 compatible = "fixed-clock";
61 #clock-cells = <0>;
62 clock-frequency = <24576000>;
63 };
64
Geert Uytterhoeven4a4e2132016-05-20 09:10:14 +020065 vcc_sdhi0: regulator-vcc-sdhi0 {
Ai Kyuse1c0e7b92016-02-15 16:01:50 +010066 compatible = "regulator-fixed";
67
68 regulator-name = "SDHI0 Vcc";
69 regulator-min-microvolt = <3300000>;
70 regulator-max-microvolt = <3300000>;
71
72 gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
73 enable-active-high;
74 };
75
Geert Uytterhoeven4a4e2132016-05-20 09:10:14 +020076 vccq_sdhi0: regulator-vccq-sdhi0 {
Ai Kyuse1c0e7b92016-02-15 16:01:50 +010077 compatible = "regulator-gpio";
78
79 regulator-name = "SDHI0 VccQ";
80 regulator-min-microvolt = <1800000>;
81 regulator-max-microvolt = <3300000>;
82
83 gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
84 gpios-states = <1>;
85 states = <3300000 1
86 1800000 0>;
87 };
88
Geert Uytterhoeven4a4e2132016-05-20 09:10:14 +020089 vcc_sdhi3: regulator-vcc-sdhi3 {
Ai Kyuse1c0e7b92016-02-15 16:01:50 +010090 compatible = "regulator-fixed";
91
92 regulator-name = "SDHI3 Vcc";
93 regulator-min-microvolt = <3300000>;
94 regulator-max-microvolt = <3300000>;
95
96 gpio = <&gpio3 15 GPIO_ACTIVE_HIGH>;
97 enable-active-high;
98 };
99
Geert Uytterhoeven4a4e2132016-05-20 09:10:14 +0200100 vccq_sdhi3: regulator-vccq-sdhi3 {
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100101 compatible = "regulator-gpio";
102
103 regulator-name = "SDHI3 VccQ";
104 regulator-min-microvolt = <1800000>;
105 regulator-max-microvolt = <3300000>;
106
107 gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>;
108 gpios-states = <1>;
109 states = <3300000 1
110 1800000 0>;
111 };
112
Yoshihiro Shimodaa905b722016-07-21 19:46:58 +0900113 vbus0_usb2: regulator-vbus0-usb2 {
114 compatible = "regulator-fixed";
115
116 regulator-name = "USB20_VBUS0";
117 regulator-min-microvolt = <5000000>;
118 regulator-max-microvolt = <5000000>;
119
120 gpio = <&gpio6 16 GPIO_ACTIVE_HIGH>;
121 enable-active-high;
122 };
123
Kuninori Morimoto8a8f1812015-12-01 05:36:34 +0000124 audio_clkout: audio_clkout {
125 /*
126 * This is same as <&rcar_sound 0>
127 * but needed to avoid cs2000/rcar_sound probe dead-lock
128 */
129 compatible = "fixed-clock";
130 #clock-cells = <0>;
131 clock-frequency = <11289600>;
132 };
133
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000134 rsnd_ak4613: sound {
135 compatible = "simple-audio-card";
136
137 simple-audio-card,format = "left_j";
138 simple-audio-card,bitclock-master = <&sndcpu>;
139 simple-audio-card,frame-master = <&sndcpu>;
140
141 sndcpu: simple-audio-card,cpu {
142 sound-dai = <&rcar_sound>;
143 };
144
145 sndcodec: simple-audio-card,codec {
146 sound-dai = <&ak4613>;
147 };
148 };
Laurent Pinchartaadc4ee2016-08-09 15:29:12 +0300149
150 vga-encoder {
151 compatible = "adi,adv7123";
152
153 ports {
154 #address-cells = <1>;
155 #size-cells = <0>;
156
157 port@0 {
158 reg = <0>;
159 adv7123_in: endpoint {
160 remote-endpoint = <&du_out_rgb>;
161 };
162 };
163 port@1 {
164 reg = <1>;
165 adv7123_out: endpoint {
166 remote-endpoint = <&vga_in>;
167 };
168 };
169 };
170 };
171
172 vga {
173 compatible = "vga-connector";
174
175 port {
176 vga_in: endpoint {
177 remote-endpoint = <&adv7123_out>;
178 };
179 };
180 };
181};
182
183&du {
Laurent Pinchart272bde02016-08-12 12:18:55 +0300184 pinctrl-0 = <&du_pins>;
185 pinctrl-names = "default";
Laurent Pinchartaadc4ee2016-08-09 15:29:12 +0300186 status = "okay";
187
188 ports {
189 port@0 {
190 endpoint {
191 remote-endpoint = <&adv7123_in>;
192 };
193 };
194 };
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900195};
196
197&extal_clk {
198 clock-frequency = <16666666>;
199};
200
Wolfram Sangde5a79f2016-03-30 16:58:22 +0200201&extalr_clk {
202 clock-frequency = <32768>;
203};
204
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900205&pfc {
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100206 pinctrl-0 = <&scif_clk_pins>;
207 pinctrl-names = "default";
208
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900209 scif1_pins: scif1 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900210 groups = "scif1_data_a", "scif1_ctrl";
211 function = "scif1";
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900212 };
213 scif2_pins: scif2 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900214 groups = "scif2_data_a";
215 function = "scif2";
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900216 };
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100217 scif_clk_pins: scif_clk {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900218 groups = "scif_clk_a";
219 function = "scif_clk";
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100220 };
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900221
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900222 i2c2_pins: i2c2 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900223 groups = "i2c2_a";
224 function = "i2c2";
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900225 };
226
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900227 avb_pins: avb {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900228 groups = "avb_mdc";
229 function = "avb";
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900230 };
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000231
Laurent Pinchart272bde02016-08-12 12:18:55 +0300232 du_pins: du {
233 groups = "du_rgb888", "du_sync", "du_oddf", "du_clk_out_0";
234 function = "du";
235 };
236
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100237 sdhi0_pins: sd0 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900238 groups = "sdhi0_data4", "sdhi0_ctrl";
239 function = "sdhi0";
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100240 };
241
242 sdhi3_pins: sd3 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900243 groups = "sdhi3_data4", "sdhi3_ctrl";
244 function = "sdhi3";
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100245 };
246
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000247 sound_pins: sound {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900248 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
249 function = "ssi";
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000250 };
251
252 sound_clk_pins: sound_clk {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900253 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
254 "audio_clkout_a", "audio_clkout3_a";
255 function = "audio_clk";
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000256 };
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900257
Yoshihiro Shimodaa905b722016-07-21 19:46:58 +0900258 usb0_pins: usb0 {
259 groups = "usb0";
260 function = "usb0";
261 };
262
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900263 usb1_pins: usb1 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900264 groups = "usb1";
265 function = "usb1";
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900266 };
267
268 usb2_pins: usb2 {
Simon Hormanfa3d2ae2016-03-18 07:57:10 +0900269 groups = "usb2";
270 function = "usb2";
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900271 };
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900272};
273
274&scif1 {
275 pinctrl-0 = <&scif1_pins>;
276 pinctrl-names = "default";
277
Geert Uytterhoeven3cac4782016-05-04 10:57:58 +0200278 uart-has-rtscts;
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900279 status = "okay";
280};
281
282&scif2 {
283 pinctrl-0 = <&scif2_pins>;
284 pinctrl-names = "default";
285
286 status = "okay";
287};
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900288
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100289&scif_clk {
290 clock-frequency = <14745600>;
291 status = "okay";
292};
293
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900294&i2c2 {
295 pinctrl-0 = <&i2c2_pins>;
296 pinctrl-names = "default";
297
298 status = "okay";
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000299
300 clock-frequency = <100000>;
301
302 ak4613: codec@10 {
303 compatible = "asahi-kasei,ak4613";
304 #sound-dai-cells = <0>;
305 reg = <0x10>;
306 clocks = <&rcar_sound 3>;
Kuninori Morimoto40fbe142015-11-27 01:04:41 +0000307
308 asahi-kasei,in1-single-end;
309 asahi-kasei,in2-single-end;
310 asahi-kasei,out1-single-end;
311 asahi-kasei,out2-single-end;
312 asahi-kasei,out3-single-end;
313 asahi-kasei,out4-single-end;
314 asahi-kasei,out5-single-end;
315 asahi-kasei,out6-single-end;
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000316 };
Kuninori Morimoto8a8f1812015-12-01 05:36:34 +0000317
318 cs2000: clk_multiplier@4f {
319 #clock-cells = <0>;
320 compatible = "cirrus,cs2000-cp";
321 reg = <0x4f>;
322 clocks = <&audio_clkout>, <&x12_clk>;
323 clock-names = "clk_in", "ref_clk";
324
325 assigned-clocks = <&cs2000>;
326 assigned-clock-rates = <24576000>; /* 1/1 divide */
327 };
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000328};
329
330&rcar_sound {
331 pinctrl-0 = <&sound_pins &sound_clk_pins>;
332 pinctrl-names = "default";
333
334 /* Single DAI */
335 #sound-dai-cells = <0>;
336
337 /* audio_clkout0/1/2/3 */
338 #clock-cells = <1>;
339 clock-frequency = <11289600>;
340
341 status = "okay";
342
Kuninori Morimoto8a8f1812015-12-01 05:36:34 +0000343 /* update <audio_clk_b> to <cs2000> */
344 clocks = <&cpg CPG_MOD 1005>,
345 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
346 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
347 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
348 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
349 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
350 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
351 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
352 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
353 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
354 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
355 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
356 <&audio_clk_a>, <&cs2000>,
357 <&audio_clk_c>,
358 <&cpg CPG_CORE R8A7795_CLK_S0D4>;
359
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000360 rcar_sound,dai {
361 dai0 {
Kuninori Morimoto672b7932015-11-25 06:39:13 +0000362 playback = <&ssi0 &src0 &dvc0>;
363 capture = <&ssi1 &src1 &dvc1>;
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000364 };
365 };
366};
367
Kouei Abe52ee9fb2015-12-14 16:42:35 +0100368&sata {
369 status = "okay";
370};
371
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100372&sdhi0 {
373 pinctrl-0 = <&sdhi0_pins>;
374 pinctrl-names = "default";
375
376 vmmc-supply = <&vcc_sdhi0>;
377 vqmmc-supply = <&vccq_sdhi0>;
378 cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
379 wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
380 bus-width = <4>;
381 status = "okay";
382};
383
384&sdhi3 {
385 pinctrl-0 = <&sdhi3_pins>;
386 pinctrl-names = "default";
387
388 vmmc-supply = <&vcc_sdhi3>;
389 vqmmc-supply = <&vccq_sdhi3>;
390 cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
391 wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
392 bus-width = <4>;
393 status = "okay";
394};
395
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000396&ssi1 {
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000397 shared-pin;
398};
399
Wolfram Sang329260d2016-04-01 13:56:25 +0200400&wdt0 {
401 timeout-sec = <60>;
402 status = "okay";
403};
404
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000405&audio_clk_a {
406 clock-frequency = <22579200>;
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900407};
408
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900409&avb {
410 pinctrl-0 = <&avb_pins>;
411 pinctrl-names = "default";
412 renesas,no-ether-link;
413 phy-handle = <&phy0>;
414 status = "okay";
415
416 phy0: ethernet-phy@0 {
417 rxc-skew-ps = <900>;
418 rxdv-skew-ps = <0>;
419 rxd0-skew-ps = <0>;
420 rxd1-skew-ps = <0>;
421 rxd2-skew-ps = <0>;
422 rxd3-skew-ps = <0>;
423 txc-skew-ps = <900>;
424 txen-skew-ps = <0>;
425 txd0-skew-ps = <0>;
426 txd1-skew-ps = <0>;
427 txd2-skew-ps = <0>;
428 txd3-skew-ps = <0>;
429 reg = <0>;
430 interrupt-parent = <&gpio2>;
431 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
432 };
433};
Yoshihiro Shimoda856ea9e2016-01-22 19:03:23 +0900434
435&xhci0 {
436 status = "okay";
437};
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900438
Yoshihiro Shimodaa905b722016-07-21 19:46:58 +0900439&usb2_phy0 {
440 pinctrl-0 = <&usb0_pins>;
441 pinctrl-names = "default";
442
443 vbus-supply = <&vbus0_usb2>;
444 status = "okay";
445};
446
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900447&usb2_phy1 {
448 pinctrl-0 = <&usb1_pins>;
449 pinctrl-names = "default";
450
451 status = "okay";
452};
453
454&usb2_phy2 {
455 pinctrl-0 = <&usb2_pins>;
456 pinctrl-names = "default";
457
458 status = "okay";
459};
Yoshihiro Shimoda474efca2016-02-23 21:28:35 +0900460
Yoshihiro Shimoda34ccd782016-07-21 19:46:59 +0900461&ehci0 {
462 status = "okay";
463};
464
Yoshihiro Shimoda474efca2016-02-23 21:28:35 +0900465&ehci1 {
466 status = "okay";
467};
468
469&ehci2 {
470 status = "okay";
471};
472
Yoshihiro Shimoda34ccd782016-07-21 19:46:59 +0900473&ohci0 {
474 status = "okay";
475};
476
Yoshihiro Shimoda474efca2016-02-23 21:28:35 +0900477&ohci1 {
478 status = "okay";
479};
480
481&ohci2 {
482 status = "okay";
483};
Phil Edworthybbd27302016-04-05 11:51:27 +0100484
Yoshihiro Shimoda0b4dca72016-07-21 19:47:00 +0900485&hsusb {
486 status = "okay";
487};
488
Phil Edworthybbd27302016-04-05 11:51:27 +0100489&pcie_bus_clk {
Geert Uytterhoeven9f33a8a2016-04-25 16:08:30 +0200490 clock-frequency = <100000000>;
Phil Edworthybbd27302016-04-05 11:51:27 +0100491 status = "okay";
492};
493
494&pciec0 {
495 status = "okay";
496};
497
498&pciec1 {
499 status = "okay";
500};