blob: 0be2716659e96fba4a3636078ca50fcbc3e0131e [file] [log] [blame]
Marek Vasutcbff9f82018-12-03 21:43:05 +01001// SPDX-License-Identifier: GPL-2.0
Marek Vasut37a79082017-09-12 23:01:51 +02002/*
3 * Device Tree Source for the R-Car Gen3 ULCB board
4 *
5 * Copyright (C) 2016 Renesas Electronics Corp.
6 * Copyright (C) 2016 Cogent Embedded, Inc.
Marek Vasut37a79082017-09-12 23:01:51 +02007 */
8
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input.h>
11
12/ {
13 model = "Renesas R-Car Gen3 ULCB board";
14
15 aliases {
Marek Vasut71d2a5e2023-01-26 21:01:32 +010016 i2c0 = &i2c0;
17 i2c1 = &i2c1;
18 i2c2 = &i2c2;
19 i2c3 = &i2c3;
20 i2c4 = &i2c4;
21 i2c5 = &i2c5;
22 i2c6 = &i2c6;
23 i2c7 = &i2c_dvfs;
Marek Vasut37a79082017-09-12 23:01:51 +020024 serial0 = &scif2;
25 ethernet0 = &avb;
Marek Vasut71d2a5e2023-01-26 21:01:32 +010026 mmc0 = &sdhi2;
27 mmc1 = &sdhi0;
Marek Vasut37a79082017-09-12 23:01:51 +020028 };
29
30 chosen {
Marek Vasutc7d68122020-04-04 16:12:48 +020031 bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
Marek Vasut37a79082017-09-12 23:01:51 +020032 stdout-path = "serial0:115200n8";
33 };
34
35 audio_clkout: audio-clkout {
36 /*
37 * This is same as <&rcar_sound 0>
38 * but needed to avoid cs2000/rcar_sound probe dead-lock
39 */
40 compatible = "fixed-clock";
41 #clock-cells = <0>;
Marek Vasut2519a292018-06-06 20:03:30 +020042 clock-frequency = <12288000>;
Marek Vasut37a79082017-09-12 23:01:51 +020043 };
44
Marek Vasut62b2bb52017-11-29 04:27:36 +010045 hdmi0-out {
46 compatible = "hdmi-connector";
47 type = "a";
48
49 port {
50 hdmi0_con: endpoint {
Marek Vasut71d2a5e2023-01-26 21:01:32 +010051 remote-endpoint = <&rcar_dw_hdmi0_out>;
Marek Vasut62b2bb52017-11-29 04:27:36 +010052 };
53 };
54 };
55
Marek Vasut37a79082017-09-12 23:01:51 +020056 keyboard {
57 compatible = "gpio-keys";
58
59 key-1 {
60 linux,code = <KEY_1>;
61 label = "SW3";
62 wakeup-source;
63 debounce-interval = <20>;
64 gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
65 };
66 };
67
68 leds {
69 compatible = "gpio-leds";
70
71 led5 {
72 gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
73 };
74 led6 {
75 gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
76 };
77 };
78
Marek Vasut71d2a5e2023-01-26 21:01:32 +010079 reg_1p8v: regulator-1p8v {
Marek Vasut37a79082017-09-12 23:01:51 +020080 compatible = "regulator-fixed";
81 regulator-name = "fixed-1.8V";
82 regulator-min-microvolt = <1800000>;
83 regulator-max-microvolt = <1800000>;
84 regulator-boot-on;
85 regulator-always-on;
86 };
87
Marek Vasut71d2a5e2023-01-26 21:01:32 +010088 reg_3p3v: regulator-3p3v {
Marek Vasut37a79082017-09-12 23:01:51 +020089 compatible = "regulator-fixed";
90 regulator-name = "fixed-3.3V";
91 regulator-min-microvolt = <3300000>;
92 regulator-max-microvolt = <3300000>;
93 regulator-boot-on;
94 regulator-always-on;
95 };
96
Marek Vasut37a79082017-09-12 23:01:51 +020097 vcc_sdhi0: regulator-vcc-sdhi0 {
98 compatible = "regulator-fixed";
99
100 regulator-name = "SDHI0 Vcc";
101 regulator-min-microvolt = <3300000>;
102 regulator-max-microvolt = <3300000>;
103
104 gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
105 enable-active-high;
106 };
107
108 vccq_sdhi0: regulator-vccq-sdhi0 {
109 compatible = "regulator-gpio";
110
111 regulator-name = "SDHI0 VccQ";
112 regulator-min-microvolt = <1800000>;
113 regulator-max-microvolt = <3300000>;
114
115 gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
116 gpios-states = <1>;
Marek Vasutc7d68122020-04-04 16:12:48 +0200117 states = <3300000 1>, <1800000 0>;
Marek Vasut37a79082017-09-12 23:01:51 +0200118 };
119
120 x12_clk: x12 {
121 compatible = "fixed-clock";
122 #clock-cells = <0>;
123 clock-frequency = <24576000>;
124 };
Marek Vasut62b2bb52017-11-29 04:27:36 +0100125
126 x23_clk: x23-clock {
127 compatible = "fixed-clock";
128 #clock-cells = <0>;
129 clock-frequency = <25000000>;
130 };
Marek Vasut37a79082017-09-12 23:01:51 +0200131};
132
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100133&a57_0 {
134 cpu-supply = <&dvfs>;
135};
136
Marek Vasut37a79082017-09-12 23:01:51 +0200137&audio_clk_a {
138 clock-frequency = <22579200>;
139};
140
141&avb {
142 pinctrl-0 = <&avb_pins>;
143 pinctrl-names = "default";
Marek Vasut37a79082017-09-12 23:01:51 +0200144 phy-handle = <&phy0>;
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100145 tx-internal-delay-ps = <2000>;
Marek Vasut37a79082017-09-12 23:01:51 +0200146 status = "okay";
147
148 phy0: ethernet-phy@0 {
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100149 compatible = "ethernet-phy-id0022.1622",
150 "ethernet-phy-ieee802.3-c22";
Marek Vasut37a79082017-09-12 23:01:51 +0200151 rxc-skew-ps = <1500>;
152 reg = <0>;
153 interrupt-parent = <&gpio2>;
154 interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
Marek Vasut2519a292018-06-06 20:03:30 +0200155 reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
Marek Vasut37a79082017-09-12 23:01:51 +0200156 };
157};
158
Marek Vasut2519a292018-06-06 20:03:30 +0200159&du {
160 status = "okay";
161};
162
Marek Vasut37a79082017-09-12 23:01:51 +0200163&ehci1 {
164 status = "okay";
165};
166
167&extal_clk {
168 clock-frequency = <16666666>;
169};
170
171&extalr_clk {
172 clock-frequency = <32768>;
173};
174
Marek Vasut62b2bb52017-11-29 04:27:36 +0100175&hdmi0 {
176 status = "okay";
177
178 ports {
179 port@1 {
180 reg = <1>;
181 rcar_dw_hdmi0_out: endpoint {
182 remote-endpoint = <&hdmi0_con>;
183 };
184 };
Marek Vasut317d13a2019-03-04 22:53:28 +0100185 port@2 {
186 reg = <2>;
Marek Vasut317d13a2019-03-04 22:53:28 +0100187 };
Marek Vasut62b2bb52017-11-29 04:27:36 +0100188 };
189};
190
Marek Vasut37a79082017-09-12 23:01:51 +0200191&i2c2 {
192 pinctrl-0 = <&i2c2_pins>;
193 pinctrl-names = "default";
194
195 status = "okay";
196
197 clock-frequency = <100000>;
198
199 ak4613: codec@10 {
200 compatible = "asahi-kasei,ak4613";
Marek Vasut37a79082017-09-12 23:01:51 +0200201 reg = <0x10>;
202 clocks = <&rcar_sound 3>;
203
204 asahi-kasei,in1-single-end;
205 asahi-kasei,in2-single-end;
206 asahi-kasei,out1-single-end;
207 asahi-kasei,out2-single-end;
208 asahi-kasei,out3-single-end;
209 asahi-kasei,out4-single-end;
210 asahi-kasei,out5-single-end;
211 asahi-kasei,out6-single-end;
212 };
213
214 cs2000: clk-multiplier@4f {
215 #clock-cells = <0>;
216 compatible = "cirrus,cs2000-cp";
217 reg = <0x4f>;
218 clocks = <&audio_clkout>, <&x12_clk>;
219 clock-names = "clk_in", "ref_clk";
220
221 assigned-clocks = <&cs2000>;
222 assigned-clock-rates = <24576000>; /* 1/1 divide */
223 };
224};
225
Marek Vasut62b2bb52017-11-29 04:27:36 +0100226&i2c4 {
227 status = "okay";
228
229 clock-frequency = <400000>;
230
231 versaclock5: clock-generator@6a {
232 compatible = "idt,5p49v5925";
233 reg = <0x6a>;
234 #clock-cells = <1>;
235 clocks = <&x23_clk>;
236 clock-names = "xin";
237 };
238};
239
Marek Vasut02e80f02017-11-27 07:36:22 +0100240&i2c_dvfs {
241 status = "okay";
Marek Vasutcbff9f82018-12-03 21:43:05 +0100242
Marek Vasut317d13a2019-03-04 22:53:28 +0100243 clock-frequency = <400000>;
244
Marek Vasutcbff9f82018-12-03 21:43:05 +0100245 pmic: pmic@30 {
246 pinctrl-0 = <&irq0_pins>;
247 pinctrl-names = "default";
248
249 compatible = "rohm,bd9571mwv";
250 reg = <0x30>;
251 interrupt-parent = <&intc_ex>;
252 interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
253 interrupt-controller;
254 #interrupt-cells = <2>;
255 gpio-controller;
256 #gpio-cells = <2>;
257 rohm,ddr-backup-power = <0xf>;
258 rohm,rstbmode-pulse;
259
260 regulators {
261 dvfs: dvfs {
262 regulator-name = "dvfs";
263 regulator-min-microvolt = <750000>;
264 regulator-max-microvolt = <1030000>;
265 regulator-boot-on;
266 regulator-always-on;
267 };
268 };
269 };
Marek Vasutf984d382023-09-17 16:13:04 +0200270
271 eeprom@50 {
272 compatible = "rohm,br24t01", "atmel,24c01";
273 reg = <0x50>;
274 pagesize = <8>;
275 };
Marek Vasut02e80f02017-11-27 07:36:22 +0100276};
277
Marek Vasut37a79082017-09-12 23:01:51 +0200278&ohci1 {
279 status = "okay";
280};
281
282&pfc {
283 pinctrl-0 = <&scif_clk_pins>;
284 pinctrl-names = "default";
285
286 avb_pins: avb {
287 mux {
Marek Vasutcbff9f82018-12-03 21:43:05 +0100288 groups = "avb_link", "avb_mdio", "avb_mii";
Marek Vasut37a79082017-09-12 23:01:51 +0200289 function = "avb";
290 };
291
Marek Vasutcbff9f82018-12-03 21:43:05 +0100292 pins_mdio {
293 groups = "avb_mdio";
Marek Vasut37a79082017-09-12 23:01:51 +0200294 drive-strength = <24>;
295 };
296
297 pins_mii_tx {
298 pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
299 "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
300 drive-strength = <12>;
301 };
302 };
303
304 i2c2_pins: i2c2 {
305 groups = "i2c2_a";
306 function = "i2c2";
307 };
308
Marek Vasutcbff9f82018-12-03 21:43:05 +0100309 irq0_pins: irq0 {
310 groups = "intc_ex_irq0";
311 function = "intc_ex";
312 };
313
Marek Vasut37a79082017-09-12 23:01:51 +0200314 scif2_pins: scif2 {
315 groups = "scif2_data_a";
316 function = "scif2";
317 };
318
319 scif_clk_pins: scif_clk {
320 groups = "scif_clk_a";
321 function = "scif_clk";
322 };
323
324 sdhi0_pins: sd0 {
325 groups = "sdhi0_data4", "sdhi0_ctrl";
326 function = "sdhi0";
327 power-source = <3300>;
328 };
329
330 sdhi0_pins_uhs: sd0_uhs {
331 groups = "sdhi0_data4", "sdhi0_ctrl";
332 function = "sdhi0";
333 power-source = <1800>;
334 };
335
336 sdhi2_pins: sd2 {
Marek Vasutcbff9f82018-12-03 21:43:05 +0100337 groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
Marek Vasut37a79082017-09-12 23:01:51 +0200338 function = "sdhi2";
Marek Vasut37a79082017-09-12 23:01:51 +0200339 power-source = <1800>;
340 };
341
342 sound_pins: sound {
343 groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
344 function = "ssi";
345 };
346
347 sound_clk_pins: sound-clk {
348 groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
349 "audio_clkout_a", "audio_clkout3_a";
350 function = "audio_clk";
351 };
352
353 usb1_pins: usb1 {
354 groups = "usb1";
355 function = "usb1";
356 };
357};
358
359&rcar_sound {
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100360 pinctrl-0 = <&sound_pins>, <&sound_clk_pins>;
Marek Vasut37a79082017-09-12 23:01:51 +0200361 pinctrl-names = "default";
362
Marek Vasut37a79082017-09-12 23:01:51 +0200363 /* audio_clkout0/1/2/3 */
364 #clock-cells = <1>;
365 clock-frequency = <12288000 11289600>;
366
367 status = "okay";
368
369 /* update <audio_clk_b> to <cs2000> */
370 clocks = <&cpg CPG_MOD 1005>,
371 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
372 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
373 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
374 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
375 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
376 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
377 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
378 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
379 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
380 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
381 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
382 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
383 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
384 <&audio_clk_a>, <&cs2000>,
385 <&audio_clk_c>,
386 <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
Marek Vasut37a79082017-09-12 23:01:51 +0200387};
388
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100389&rpc {
390 /* Left disabled. To be enabled by firmware when unlocked. */
391
392 flash@0 {
393 compatible = "cypress,hyperflash", "cfi-flash";
394 reg = <0>;
395
396 partitions {
397 compatible = "fixed-partitions";
398 #address-cells = <1>;
399 #size-cells = <1>;
400
401 bootparam@0 {
402 reg = <0x00000000 0x040000>;
403 read-only;
404 };
405 bl2@40000 {
406 reg = <0x00040000 0x140000>;
407 read-only;
408 };
409 cert_header_sa6@180000 {
410 reg = <0x00180000 0x040000>;
411 read-only;
412 };
413 bl31@1c0000 {
414 reg = <0x001c0000 0x040000>;
415 read-only;
416 };
417 tee@200000 {
418 reg = <0x00200000 0x440000>;
419 read-only;
420 };
421 uboot@640000 {
422 reg = <0x00640000 0x100000>;
423 read-only;
424 };
425 dtb@740000 {
426 reg = <0x00740000 0x080000>;
427 };
428 kernel@7c0000 {
429 reg = <0x007c0000 0x1400000>;
430 };
431 user@1bc0000 {
432 reg = <0x01bc0000 0x2440000>;
433 };
434 };
435 };
436};
437
Marek Vasutc7d68122020-04-04 16:12:48 +0200438&rwdt {
439 timeout-sec = <60>;
440 status = "okay";
441};
442
Marek Vasut37a79082017-09-12 23:01:51 +0200443&scif2 {
444 pinctrl-0 = <&scif2_pins>;
445 pinctrl-names = "default";
446
447 status = "okay";
448};
449
450&scif_clk {
451 clock-frequency = <14745600>;
452};
453
454&sdhi0 {
455 pinctrl-0 = <&sdhi0_pins>;
456 pinctrl-1 = <&sdhi0_pins_uhs>;
457 pinctrl-names = "default", "state_uhs";
458
459 vmmc-supply = <&vcc_sdhi0>;
460 vqmmc-supply = <&vccq_sdhi0>;
461 cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
462 bus-width = <4>;
463 sd-uhs-sdr50;
Marek Vasut317d13a2019-03-04 22:53:28 +0100464 sd-uhs-sdr104;
Marek Vasut37a79082017-09-12 23:01:51 +0200465 status = "okay";
466};
467
468&sdhi2 {
469 /* used for on-board 8bit eMMC */
470 pinctrl-0 = <&sdhi2_pins>;
Marek Vasut317d13a2019-03-04 22:53:28 +0100471 pinctrl-1 = <&sdhi2_pins>;
Marek Vasut37a79082017-09-12 23:01:51 +0200472 pinctrl-names = "default", "state_uhs";
473
474 vmmc-supply = <&reg_3p3v>;
475 vqmmc-supply = <&reg_1p8v>;
476 bus-width = <8>;
477 mmc-hs200-1_8v;
Marek Vasut317d13a2019-03-04 22:53:28 +0100478 mmc-hs400-1_8v;
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100479 no-sd;
480 no-sdio;
Marek Vasut37a79082017-09-12 23:01:51 +0200481 non-removable;
Marek Vasut71d2a5e2023-01-26 21:01:32 +0100482 full-pwr-cycle-in-suspend;
Marek Vasut37a79082017-09-12 23:01:51 +0200483 status = "okay";
Marek Vasut37a79082017-09-12 23:01:51 +0200484};
485
486&ssi1 {
487 shared-pin;
488};
489
490&usb2_phy1 {
491 pinctrl-0 = <&usb1_pins>;
492 pinctrl-names = "default";
493
494 status = "okay";
495};
Marek Vasutf984d382023-09-17 16:13:04 +0200496
497
498/*
499 * For sound-test.
500 *
501 * We can switch Audio Card for testing
502 *
503 * #include "ulcb-simple-audio-card.dtsi"
504 * #include "ulcb-simple-audio-card-mix+split.dtsi"
505 * #include "ulcb-audio-graph-card.dtsi"
506 * #include "ulcb-audio-graph-card-mix+split.dtsi"
507 * #include "ulcb-audio-graph-card2-mix+split.dtsi"
508 */
509#include "ulcb-audio-graph-card2.dtsi"