Commit | Line | Data |
---|---|---|
f138e54c SS |
1 | /* |
2 | * Device Tree Source for the Porter board | |
3 | * | |
4 | * Copyright (C) 2015 Cogent Embedded, Inc. | |
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 | ||
493b4da7 SS |
11 | /* |
12 | * SSI-AK4642 | |
13 | * | |
f3b063c8 SS |
14 | * JP3: 2-1: AK4642 |
15 | * 2-3: ADV7511 | |
493b4da7 SS |
16 | * |
17 | * This command is required before playback/capture: | |
18 | * | |
19 | * amixer set "LINEOUT Mixer DACL" on | |
20 | */ | |
21 | ||
f138e54c SS |
22 | /dts-v1/; |
23 | #include "r8a7791.dtsi" | |
b941a5cb | 24 | #include <dt-bindings/gpio/gpio.h> |
f138e54c SS |
25 | |
26 | / { | |
27 | model = "Porter"; | |
28 | compatible = "renesas,porter", "renesas,r8a7791"; | |
29 | ||
30 | aliases { | |
31 | serial0 = &scif0; | |
32 | }; | |
33 | ||
34 | chosen { | |
0877098d | 35 | bootargs = "ignore_loglevel rw root=/dev/nfs ip=dhcp"; |
bf204769 | 36 | stdout-path = "serial0:115200n8"; |
f138e54c SS |
37 | }; |
38 | ||
39 | memory@40000000 { | |
40 | device_type = "memory"; | |
41 | reg = <0 0x40000000 0 0x40000000>; | |
42 | }; | |
43 | ||
44 | memory@200000000 { | |
45 | device_type = "memory"; | |
46 | reg = <2 0x00000000 0 0x40000000>; | |
47 | }; | |
b941a5cb SS |
48 | |
49 | vcc_sdhi0: regulator@0 { | |
50 | compatible = "regulator-fixed"; | |
51 | ||
52 | regulator-name = "SDHI0 Vcc"; | |
53 | regulator-min-microvolt = <3300000>; | |
54 | regulator-max-microvolt = <3300000>; | |
55 | regulator-always-on; | |
56 | }; | |
57 | ||
58 | vccq_sdhi0: regulator@1 { | |
59 | compatible = "regulator-gpio"; | |
60 | ||
61 | regulator-name = "SDHI0 VccQ"; | |
62 | regulator-min-microvolt = <1800000>; | |
63 | regulator-max-microvolt = <3300000>; | |
64 | ||
65 | gpios = <&gpio2 12 GPIO_ACTIVE_HIGH>; | |
66 | gpios-states = <1>; | |
67 | states = <3300000 1 | |
68 | 1800000 0>; | |
69 | }; | |
70 | ||
71 | vcc_sdhi2: regulator@2 { | |
72 | compatible = "regulator-fixed"; | |
73 | ||
74 | regulator-name = "SDHI2 Vcc"; | |
75 | regulator-min-microvolt = <3300000>; | |
76 | regulator-max-microvolt = <3300000>; | |
77 | regulator-always-on; | |
78 | }; | |
79 | ||
80 | vccq_sdhi2: regulator@3 { | |
81 | compatible = "regulator-gpio"; | |
82 | ||
83 | regulator-name = "SDHI2 VccQ"; | |
84 | regulator-min-microvolt = <1800000>; | |
85 | regulator-max-microvolt = <3300000>; | |
86 | ||
87 | gpios = <&gpio2 26 GPIO_ACTIVE_HIGH>; | |
88 | gpios-states = <1>; | |
89 | states = <3300000 1 | |
90 | 1800000 0>; | |
91 | }; | |
c5af8a42 SS |
92 | |
93 | hdmi-out { | |
94 | compatible = "hdmi-connector"; | |
95 | type = "a"; | |
96 | ||
97 | port { | |
98 | hdmi_con: endpoint { | |
99 | remote-endpoint = <&adv7511_out>; | |
100 | }; | |
101 | }; | |
102 | }; | |
103 | ||
104 | x3_clk: x3-clock { | |
105 | compatible = "fixed-clock"; | |
106 | #clock-cells = <0>; | |
107 | clock-frequency = <148500000>; | |
108 | }; | |
109 | ||
110 | x16_clk: x16-clock { | |
111 | compatible = "fixed-clock"; | |
112 | #clock-cells = <0>; | |
113 | clock-frequency = <74250000>; | |
114 | }; | |
493b4da7 SS |
115 | |
116 | x14_clk: x14-clock { | |
117 | compatible = "fixed-clock"; | |
118 | #clock-cells = <0>; | |
119 | clock-frequency = <11289600>; | |
120 | clock-output-names = "audio_clock"; | |
121 | }; | |
122 | ||
123 | sound { | |
124 | compatible = "simple-audio-card"; | |
125 | ||
126 | simple-audio-card,format = "left_j"; | |
127 | simple-audio-card,bitclock-master = <&soundcodec>; | |
128 | simple-audio-card,frame-master = <&soundcodec>; | |
129 | ||
130 | simple-audio-card,cpu { | |
131 | sound-dai = <&rcar_sound>; | |
132 | }; | |
133 | ||
134 | soundcodec: simple-audio-card,codec { | |
135 | sound-dai = <&ak4642>; | |
136 | clocks = <&x14_clk>; | |
137 | }; | |
138 | }; | |
f138e54c SS |
139 | }; |
140 | ||
141 | &extal_clk { | |
142 | clock-frequency = <20000000>; | |
143 | }; | |
144 | ||
145 | &pfc { | |
146 | scif0_pins: serial0 { | |
147 | renesas,groups = "scif0_data_d"; | |
148 | renesas,function = "scif0"; | |
149 | }; | |
0877098d SS |
150 | |
151 | ether_pins: ether { | |
152 | renesas,groups = "eth_link", "eth_mdio", "eth_rmii"; | |
153 | renesas,function = "eth"; | |
154 | }; | |
155 | ||
156 | phy1_pins: phy1 { | |
157 | renesas,groups = "intc_irq0"; | |
158 | renesas,function = "intc"; | |
159 | }; | |
b941a5cb SS |
160 | |
161 | sdhi0_pins: sd0 { | |
162 | renesas,groups = "sdhi0_data4", "sdhi0_ctrl"; | |
163 | renesas,function = "sdhi0"; | |
164 | }; | |
165 | ||
166 | sdhi2_pins: sd2 { | |
167 | renesas,groups = "sdhi2_data4", "sdhi2_ctrl"; | |
168 | renesas,function = "sdhi2"; | |
169 | }; | |
d6b94039 | 170 | |
2685a2ce SS |
171 | qspi_pins: spi0 { |
172 | renesas,groups = "qspi_ctrl", "qspi_data4"; | |
173 | renesas,function = "qspi"; | |
174 | }; | |
175 | ||
d6b94039 SS |
176 | i2c2_pins: i2c2 { |
177 | renesas,groups = "i2c2"; | |
178 | renesas,function = "i2c2"; | |
179 | }; | |
778f2e7a | 180 | |
99f7445e SS |
181 | usb0_pins: usb0 { |
182 | renesas,groups = "usb0"; | |
183 | renesas,function = "usb0"; | |
184 | }; | |
185 | ||
186 | usb1_pins: usb1 { | |
187 | renesas,groups = "usb1"; | |
188 | renesas,function = "usb1"; | |
189 | }; | |
190 | ||
778f2e7a SS |
191 | vin0_pins: vin0 { |
192 | renesas,groups = "vin0_data8", "vin0_clk"; | |
193 | renesas,function = "vin0"; | |
194 | }; | |
0768fbad SS |
195 | |
196 | can0_pins: can0 { | |
197 | renesas,groups = "can0_data"; | |
198 | renesas,function = "can0"; | |
199 | }; | |
c5af8a42 SS |
200 | |
201 | du_pins: du { | |
202 | renesas,groups = "du_rgb888", "du_sync", "du_disp", "du_clk_out_0"; | |
203 | renesas,function = "du"; | |
204 | }; | |
493b4da7 SS |
205 | |
206 | ssi_pins: sound { | |
207 | renesas,groups = "ssi0129_ctrl", "ssi0_data", "ssi1_data"; | |
208 | renesas,function = "ssi"; | |
209 | }; | |
210 | ||
211 | audio_clk_pins: audio_clk { | |
212 | renesas,groups = "audio_clk_a"; | |
213 | renesas,function = "audio_clk"; | |
214 | }; | |
f138e54c SS |
215 | }; |
216 | ||
217 | &scif0 { | |
218 | pinctrl-0 = <&scif0_pins>; | |
219 | pinctrl-names = "default"; | |
220 | ||
221 | status = "okay"; | |
222 | }; | |
0877098d SS |
223 | |
224 | ðer { | |
225 | pinctrl-0 = <ðer_pins &phy1_pins>; | |
226 | pinctrl-names = "default"; | |
227 | ||
228 | phy-handle = <&phy1>; | |
229 | renesas,ether-link-active-low; | |
230 | status = "ok"; | |
231 | ||
232 | phy1: ethernet-phy@1 { | |
233 | reg = <1>; | |
234 | interrupt-parent = <&irqc0>; | |
235 | interrupts = <0 IRQ_TYPE_LEVEL_LOW>; | |
236 | micrel,led-mode = <1>; | |
237 | }; | |
238 | }; | |
b941a5cb SS |
239 | |
240 | &sdhi0 { | |
241 | pinctrl-0 = <&sdhi0_pins>; | |
242 | pinctrl-names = "default"; | |
243 | ||
244 | vmmc-supply = <&vcc_sdhi0>; | |
245 | vqmmc-supply = <&vccq_sdhi0>; | |
246 | cd-gpios = <&gpio6 6 GPIO_ACTIVE_LOW>; | |
247 | wp-gpios = <&gpio6 7 GPIO_ACTIVE_HIGH>; | |
248 | status = "okay"; | |
249 | }; | |
250 | ||
251 | &sdhi2 { | |
252 | pinctrl-0 = <&sdhi2_pins>; | |
253 | pinctrl-names = "default"; | |
254 | ||
255 | vmmc-supply = <&vcc_sdhi2>; | |
256 | vqmmc-supply = <&vccq_sdhi2>; | |
257 | cd-gpios = <&gpio6 22 GPIO_ACTIVE_LOW>; | |
258 | status = "okay"; | |
259 | }; | |
efbb05c2 | 260 | |
2685a2ce SS |
261 | &qspi { |
262 | pinctrl-0 = <&qspi_pins>; | |
263 | pinctrl-names = "default"; | |
264 | ||
265 | status = "okay"; | |
266 | ||
267 | flash@0 { | |
2685a2ce SS |
268 | compatible = "spansion,s25fl512s", "jedec,spi-nor"; |
269 | reg = <0>; | |
270 | spi-max-frequency = <30000000>; | |
271 | spi-tx-bus-width = <4>; | |
272 | spi-rx-bus-width = <4>; | |
273 | m25p,fast-read; | |
274 | ||
26fac0ee | 275 | partitions { |
947ef628 | 276 | compatible = "fixed-partitions"; |
26fac0ee GU |
277 | #address-cells = <1>; |
278 | #size-cells = <1>; | |
279 | ||
280 | partition@0 { | |
281 | label = "loader_prg"; | |
282 | reg = <0x00000000 0x00040000>; | |
283 | read-only; | |
284 | }; | |
285 | partition@40000 { | |
286 | label = "user_prg"; | |
287 | reg = <0x00040000 0x00400000>; | |
288 | read-only; | |
289 | }; | |
290 | partition@440000 { | |
291 | label = "flash_fs"; | |
292 | reg = <0x00440000 0x03bc0000>; | |
293 | }; | |
2685a2ce SS |
294 | }; |
295 | }; | |
296 | }; | |
297 | ||
d6b94039 SS |
298 | &i2c2 { |
299 | pinctrl-0 = <&i2c2_pins>; | |
300 | pinctrl-names = "default"; | |
301 | ||
302 | status = "okay"; | |
303 | clock-frequency = <400000>; | |
778f2e7a | 304 | |
493b4da7 SS |
305 | ak4642: codec@12 { |
306 | compatible = "asahi-kasei,ak4642"; | |
307 | #sound-dai-cells = <0>; | |
308 | reg = <0x12>; | |
309 | }; | |
310 | ||
778f2e7a SS |
311 | composite-in@20 { |
312 | compatible = "adi,adv7180"; | |
313 | reg = <0x20>; | |
314 | remote = <&vin0>; | |
315 | ||
316 | port { | |
317 | adv7180: endpoint { | |
318 | bus-width = <8>; | |
319 | remote-endpoint = <&vin0ep>; | |
320 | }; | |
321 | }; | |
322 | }; | |
c5af8a42 SS |
323 | |
324 | hdmi@39 { | |
325 | compatible = "adi,adv7511w"; | |
326 | reg = <0x39>; | |
327 | interrupt-parent = <&gpio3>; | |
328 | interrupts = <29 IRQ_TYPE_LEVEL_LOW>; | |
329 | ||
330 | adi,input-depth = <8>; | |
331 | adi,input-colorspace = "rgb"; | |
332 | adi,input-clock = "1x"; | |
333 | adi,input-style = <1>; | |
334 | adi,input-justification = "evenly"; | |
335 | ||
336 | ports { | |
337 | #address-cells = <1>; | |
338 | #size-cells = <0>; | |
339 | ||
340 | port@0 { | |
341 | reg = <0>; | |
342 | adv7511_in: endpoint { | |
343 | remote-endpoint = <&du_out_rgb>; | |
344 | }; | |
345 | }; | |
346 | ||
347 | port@1 { | |
348 | reg = <1>; | |
349 | adv7511_out: endpoint { | |
350 | remote-endpoint = <&hdmi_con>; | |
351 | }; | |
352 | }; | |
353 | }; | |
354 | }; | |
d6b94039 SS |
355 | }; |
356 | ||
efbb05c2 SS |
357 | &sata0 { |
358 | status = "okay"; | |
359 | }; | |
778f2e7a SS |
360 | |
361 | /* composite video input */ | |
362 | &vin0 { | |
363 | status = "ok"; | |
364 | pinctrl-0 = <&vin0_pins>; | |
365 | pinctrl-names = "default"; | |
366 | ||
367 | port { | |
368 | #address-cells = <1>; | |
369 | #size-cells = <0>; | |
370 | ||
371 | vin0ep: endpoint { | |
372 | remote-endpoint = <&adv7180>; | |
373 | bus-width = <8>; | |
374 | }; | |
375 | }; | |
376 | }; | |
f9953c5e | 377 | |
99f7445e SS |
378 | &pci0 { |
379 | pinctrl-0 = <&usb0_pins>; | |
380 | pinctrl-names = "default"; | |
381 | ||
382 | status = "okay"; | |
383 | }; | |
384 | ||
385 | &pci1 { | |
386 | pinctrl-0 = <&usb1_pins>; | |
387 | pinctrl-names = "default"; | |
388 | ||
389 | status = "okay"; | |
390 | }; | |
391 | ||
c794f6a0 SS |
392 | &hsusb { |
393 | pinctrl-0 = <&usb0_pins>; | |
394 | pinctrl-names = "default"; | |
395 | ||
396 | status = "okay"; | |
c794f6a0 SS |
397 | }; |
398 | ||
99f7445e SS |
399 | &usbphy { |
400 | status = "okay"; | |
401 | }; | |
402 | ||
f9953c5e | 403 | &pcie_bus_clk { |
ac6908b3 | 404 | clock-frequency = <100000000>; |
f9953c5e SS |
405 | status = "okay"; |
406 | }; | |
407 | ||
408 | &pciec { | |
409 | status = "okay"; | |
410 | }; | |
0768fbad SS |
411 | |
412 | &can0 { | |
413 | pinctrl-0 = <&can0_pins>; | |
414 | pinctrl-names = "default"; | |
415 | ||
416 | status = "okay"; | |
417 | }; | |
c5af8a42 SS |
418 | |
419 | &du { | |
420 | pinctrl-0 = <&du_pins>; | |
421 | pinctrl-names = "default"; | |
422 | status = "okay"; | |
423 | ||
424 | clocks = <&mstp7_clks R8A7791_CLK_DU0>, | |
425 | <&mstp7_clks R8A7791_CLK_DU1>, | |
426 | <&mstp7_clks R8A7791_CLK_LVDS0>, | |
427 | <&x3_clk>, <&x16_clk>; | |
428 | clock-names = "du.0", "du.1", "lvds.0", | |
429 | "dclkin.0", "dclkin.1"; | |
430 | ||
431 | ports { | |
432 | port@1 { | |
433 | endpoint { | |
434 | remote-endpoint = <&adv7511_in>; | |
435 | }; | |
436 | }; | |
437 | }; | |
438 | }; | |
493b4da7 SS |
439 | |
440 | &rcar_sound { | |
441 | pinctrl-0 = <&ssi_pins &audio_clk_pins>; | |
442 | pinctrl-names = "default"; | |
443 | status = "okay"; | |
444 | ||
445 | /* Single DAI */ | |
446 | #sound-dai-cells = <0>; | |
447 | ||
448 | rcar_sound,dai { | |
449 | dai0 { | |
450 | playback = <&ssi0>; | |
451 | capture = <&ssi1>; | |
452 | }; | |
453 | }; | |
454 | }; | |
455 | ||
456 | &ssi1 { | |
457 | shared-pin; | |
458 | }; |