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