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