blob: b992b1a3d95690307322e4459dfc9292d23b67ee [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
Ai Kyuse1c0e7b92016-02-15 16:01:50 +010065 vcc_sdhi0: regulator@1 {
66 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
76 vccq_sdhi0: regulator@2 {
77 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
89 vcc_sdhi3: regulator@3 {
90 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
100 vccq_sdhi3: regulator@4 {
101 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
Kuninori Morimoto8a8f1812015-12-01 05:36:34 +0000113 audio_clkout: audio_clkout {
114 /*
115 * This is same as <&rcar_sound 0>
116 * but needed to avoid cs2000/rcar_sound probe dead-lock
117 */
118 compatible = "fixed-clock";
119 #clock-cells = <0>;
120 clock-frequency = <11289600>;
121 };
122
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000123 rsnd_ak4613: sound {
124 compatible = "simple-audio-card";
125
126 simple-audio-card,format = "left_j";
127 simple-audio-card,bitclock-master = <&sndcpu>;
128 simple-audio-card,frame-master = <&sndcpu>;
129
130 sndcpu: simple-audio-card,cpu {
131 sound-dai = <&rcar_sound>;
132 };
133
134 sndcodec: simple-audio-card,codec {
135 sound-dai = <&ak4613>;
136 };
137 };
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900138};
139
140&extal_clk {
141 clock-frequency = <16666666>;
142};
143
144&pfc {
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100145 pinctrl-0 = <&scif_clk_pins>;
146 pinctrl-names = "default";
147
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900148 scif1_pins: scif1 {
149 renesas,groups = "scif1_data_a", "scif1_ctrl";
150 renesas,function = "scif1";
151 };
152 scif2_pins: scif2 {
153 renesas,groups = "scif2_data_a";
154 renesas,function = "scif2";
155 };
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100156 scif_clk_pins: scif_clk {
157 renesas,groups = "scif_clk_a";
158 renesas,function = "scif_clk";
159 };
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900160
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900161 i2c2_pins: i2c2 {
162 renesas,groups = "i2c2_a";
163 renesas,function = "i2c2";
164 };
165
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900166 avb_pins: avb {
167 renesas,groups = "avb_mdc";
168 renesas,function = "avb";
169 };
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000170
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100171 sdhi0_pins: sd0 {
172 renesas,groups = "sdhi0_data4", "sdhi0_ctrl";
173 renesas,function = "sdhi0";
174 };
175
176 sdhi3_pins: sd3 {
177 renesas,groups = "sdhi3_data4", "sdhi3_ctrl";
178 renesas,function = "sdhi3";
179 };
180
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000181 sound_pins: sound {
182 renesas,groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
183 renesas,function = "ssi";
184 };
185
186 sound_clk_pins: sound_clk {
187 renesas,groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
188 "audio_clkout_a", "audio_clkout3_a";
189 renesas,function = "audio_clk";
190 };
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900191
192 usb1_pins: usb1 {
193 renesas,groups = "usb1";
194 renesas,function = "usb1";
195 };
196
197 usb2_pins: usb2 {
198 renesas,groups = "usb2";
199 renesas,function = "usb2";
200 };
Kuninori Morimoto1950fab2015-10-02 11:56:12 +0900201};
202
203&scif1 {
204 pinctrl-0 = <&scif1_pins>;
205 pinctrl-names = "default";
206
207 status = "okay";
208};
209
210&scif2 {
211 pinctrl-0 = <&scif2_pins>;
212 pinctrl-names = "default";
213
214 status = "okay";
215};
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900216
Geert Uytterhoevena3fc85e2016-01-29 11:17:26 +0100217&scif_clk {
218 clock-frequency = <14745600>;
219 status = "okay";
220};
221
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900222&i2c2 {
223 pinctrl-0 = <&i2c2_pins>;
224 pinctrl-names = "default";
225
226 status = "okay";
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000227
228 clock-frequency = <100000>;
229
230 ak4613: codec@10 {
231 compatible = "asahi-kasei,ak4613";
232 #sound-dai-cells = <0>;
233 reg = <0x10>;
234 clocks = <&rcar_sound 3>;
Kuninori Morimoto40fbe142015-11-27 01:04:41 +0000235
236 asahi-kasei,in1-single-end;
237 asahi-kasei,in2-single-end;
238 asahi-kasei,out1-single-end;
239 asahi-kasei,out2-single-end;
240 asahi-kasei,out3-single-end;
241 asahi-kasei,out4-single-end;
242 asahi-kasei,out5-single-end;
243 asahi-kasei,out6-single-end;
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000244 };
Kuninori Morimoto8a8f1812015-12-01 05:36:34 +0000245
246 cs2000: clk_multiplier@4f {
247 #clock-cells = <0>;
248 compatible = "cirrus,cs2000-cp";
249 reg = <0x4f>;
250 clocks = <&audio_clkout>, <&x12_clk>;
251 clock-names = "clk_in", "ref_clk";
252
253 assigned-clocks = <&cs2000>;
254 assigned-clock-rates = <24576000>; /* 1/1 divide */
255 };
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000256};
257
258&rcar_sound {
259 pinctrl-0 = <&sound_pins &sound_clk_pins>;
260 pinctrl-names = "default";
261
262 /* Single DAI */
263 #sound-dai-cells = <0>;
264
265 /* audio_clkout0/1/2/3 */
266 #clock-cells = <1>;
267 clock-frequency = <11289600>;
268
269 status = "okay";
270
Kuninori Morimoto8a8f1812015-12-01 05:36:34 +0000271 /* update <audio_clk_b> to <cs2000> */
272 clocks = <&cpg CPG_MOD 1005>,
273 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
274 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
275 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
276 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
277 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
278 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
279 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
280 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
281 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
282 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
283 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
284 <&audio_clk_a>, <&cs2000>,
285 <&audio_clk_c>,
286 <&cpg CPG_CORE R8A7795_CLK_S0D4>;
287
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000288 rcar_sound,dai {
289 dai0 {
Kuninori Morimoto672b7932015-11-25 06:39:13 +0000290 playback = <&ssi0 &src0 &dvc0>;
291 capture = <&ssi1 &src1 &dvc1>;
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000292 };
293 };
294};
295
Kouei Abe52ee9fb2015-12-14 16:42:35 +0100296&sata {
297 status = "okay";
298};
299
Ai Kyuse1c0e7b92016-02-15 16:01:50 +0100300&sdhi0 {
301 pinctrl-0 = <&sdhi0_pins>;
302 pinctrl-names = "default";
303
304 vmmc-supply = <&vcc_sdhi0>;
305 vqmmc-supply = <&vccq_sdhi0>;
306 cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
307 wp-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
308 bus-width = <4>;
309 status = "okay";
310};
311
312&sdhi3 {
313 pinctrl-0 = <&sdhi3_pins>;
314 pinctrl-names = "default";
315
316 vmmc-supply = <&vcc_sdhi3>;
317 vqmmc-supply = <&vccq_sdhi3>;
318 cd-gpios = <&gpio4 15 GPIO_ACTIVE_LOW>;
319 wp-gpios = <&gpio4 16 GPIO_ACTIVE_HIGH>;
320 bus-width = <4>;
321 status = "okay";
322};
323
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000324&ssi1 {
Kuninori Morimoto994aadf2015-11-25 06:37:49 +0000325 shared-pin;
326};
327
328&audio_clk_a {
329 clock-frequency = <22579200>;
Kuninori Morimoto637d8012015-10-28 08:05:28 +0900330};
331
Kazuya Mizuguchi6fa501c2015-11-02 13:31:45 +0900332&avb {
333 pinctrl-0 = <&avb_pins>;
334 pinctrl-names = "default";
335 renesas,no-ether-link;
336 phy-handle = <&phy0>;
337 status = "okay";
338
339 phy0: ethernet-phy@0 {
340 rxc-skew-ps = <900>;
341 rxdv-skew-ps = <0>;
342 rxd0-skew-ps = <0>;
343 rxd1-skew-ps = <0>;
344 rxd2-skew-ps = <0>;
345 rxd3-skew-ps = <0>;
346 txc-skew-ps = <900>;
347 txen-skew-ps = <0>;
348 txd0-skew-ps = <0>;
349 txd1-skew-ps = <0>;
350 txd2-skew-ps = <0>;
351 txd3-skew-ps = <0>;
352 reg = <0>;
353 interrupt-parent = <&gpio2>;
354 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
355 };
356};
Yoshihiro Shimoda856ea9e2016-01-22 19:03:23 +0900357
358&xhci0 {
359 status = "okay";
360};
Yoshihiro Shimodae24250c2016-02-23 21:28:34 +0900361
362&usb2_phy1 {
363 pinctrl-0 = <&usb1_pins>;
364 pinctrl-names = "default";
365
366 status = "okay";
367};
368
369&usb2_phy2 {
370 pinctrl-0 = <&usb2_pins>;
371 pinctrl-names = "default";
372
373 status = "okay";
374};
Yoshihiro Shimoda474efca2016-02-23 21:28:35 +0900375
376&ehci1 {
377 status = "okay";
378};
379
380&ehci2 {
381 status = "okay";
382};
383
384&ohci1 {
385 status = "okay";
386};
387
388&ohci2 {
389 status = "okay";
390};