xref: /linux/arch/arm64/boot/dts/renesas/ulcb.dtsi (revision 11a33f81616158c642ee4082e5688113994a56fc)
1// SPDX-License-Identifier: GPL-2.0
2/*
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.
7 */
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 {
16		serial0 = &scif2;
17		ethernet0 = &avb;
18	};
19
20	chosen {
21		stdout-path = "serial0:115200n8";
22	};
23
24	audio_clkout: audio-clkout {
25		/*
26		 * This is same as <&rcar_sound 0>
27		 * but needed to avoid cs2000/rcar_sound probe dead-lock
28		 */
29		compatible = "fixed-clock";
30		#clock-cells = <0>;
31		clock-frequency = <12288000>;
32	};
33
34	hdmi0-out {
35		compatible = "hdmi-connector";
36		type = "a";
37
38		port {
39			hdmi0_con: endpoint {
40			};
41		};
42	};
43
44	keyboard {
45		compatible = "gpio-keys";
46
47		key-1 {
48			linux,code = <KEY_1>;
49			label = "SW3";
50			wakeup-source;
51			debounce-interval = <20>;
52			gpios = <&gpio6 11 GPIO_ACTIVE_LOW>;
53		};
54	};
55
56	leds {
57		compatible = "gpio-leds";
58
59		led5 {
60			gpios = <&gpio6 12 GPIO_ACTIVE_HIGH>;
61		};
62		led6 {
63			gpios = <&gpio6 13 GPIO_ACTIVE_HIGH>;
64		};
65	};
66
67	reg_1p8v: regulator0 {
68		compatible = "regulator-fixed";
69		regulator-name = "fixed-1.8V";
70		regulator-min-microvolt = <1800000>;
71		regulator-max-microvolt = <1800000>;
72		regulator-boot-on;
73		regulator-always-on;
74	};
75
76	reg_3p3v: regulator1 {
77		compatible = "regulator-fixed";
78		regulator-name = "fixed-3.3V";
79		regulator-min-microvolt = <3300000>;
80		regulator-max-microvolt = <3300000>;
81		regulator-boot-on;
82		regulator-always-on;
83	};
84
85	rsnd_ak4613: sound {
86		compatible = "simple-audio-card";
87
88		simple-audio-card,format = "left_j";
89		simple-audio-card,bitclock-master = <&sndcpu>;
90		simple-audio-card,frame-master = <&sndcpu>;
91
92		sndcpu: simple-audio-card,cpu {
93			sound-dai = <&rcar_sound>;
94		};
95
96		sndcodec: simple-audio-card,codec {
97			sound-dai = <&ak4613>;
98		};
99	};
100
101	vcc_sdhi0: regulator-vcc-sdhi0 {
102		compatible = "regulator-fixed";
103
104		regulator-name = "SDHI0 Vcc";
105		regulator-min-microvolt = <3300000>;
106		regulator-max-microvolt = <3300000>;
107
108		gpio = <&gpio5 2 GPIO_ACTIVE_HIGH>;
109		enable-active-high;
110	};
111
112	vccq_sdhi0: regulator-vccq-sdhi0 {
113		compatible = "regulator-gpio";
114
115		regulator-name = "SDHI0 VccQ";
116		regulator-min-microvolt = <1800000>;
117		regulator-max-microvolt = <3300000>;
118
119		gpios = <&gpio5 1 GPIO_ACTIVE_HIGH>;
120		gpios-states = <1>;
121		states = <3300000 1
122			  1800000 0>;
123	};
124
125	x12_clk: x12 {
126		compatible = "fixed-clock";
127		#clock-cells = <0>;
128		clock-frequency = <24576000>;
129	};
130
131	x23_clk: x23-clock {
132		compatible = "fixed-clock";
133		#clock-cells = <0>;
134		clock-frequency = <25000000>;
135	};
136};
137
138&audio_clk_a {
139	clock-frequency = <22579200>;
140};
141
142&avb {
143	pinctrl-0 = <&avb_pins>;
144	pinctrl-names = "default";
145	phy-handle = <&phy0>;
146	phy-mode = "rgmii-txid";
147	status = "okay";
148
149	phy0: ethernet-phy@0 {
150		rxc-skew-ps = <1500>;
151		reg = <0>;
152		interrupt-parent = <&gpio2>;
153		interrupts = <11 IRQ_TYPE_LEVEL_LOW>;
154		reset-gpios = <&gpio2 10 GPIO_ACTIVE_LOW>;
155	};
156};
157
158&du {
159	status = "okay";
160};
161
162&ehci1 {
163	status = "okay";
164};
165
166&extal_clk {
167	clock-frequency = <16666666>;
168};
169
170&extalr_clk {
171	clock-frequency = <32768>;
172};
173
174&hdmi0 {
175	status = "okay";
176
177	ports {
178		port@1 {
179			reg = <1>;
180			rcar_dw_hdmi0_out: endpoint {
181				remote-endpoint = <&hdmi0_con>;
182			};
183		};
184	};
185};
186
187&hdmi0_con {
188	remote-endpoint = <&rcar_dw_hdmi0_out>;
189};
190
191&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";
201		#sound-dai-cells = <0>;
202		reg = <0x10>;
203		clocks = <&rcar_sound 3>;
204
205		asahi-kasei,in1-single-end;
206		asahi-kasei,in2-single-end;
207		asahi-kasei,out1-single-end;
208		asahi-kasei,out2-single-end;
209		asahi-kasei,out3-single-end;
210		asahi-kasei,out4-single-end;
211		asahi-kasei,out5-single-end;
212		asahi-kasei,out6-single-end;
213	};
214
215	cs2000: clk-multiplier@4f {
216		#clock-cells = <0>;
217		compatible = "cirrus,cs2000-cp";
218		reg = <0x4f>;
219		clocks = <&audio_clkout>, <&x12_clk>;
220		clock-names = "clk_in", "ref_clk";
221
222		assigned-clocks = <&cs2000>;
223		assigned-clock-rates = <24576000>; /* 1/1 divide */
224	};
225};
226
227&i2c4 {
228	status = "okay";
229
230	clock-frequency = <400000>;
231
232	versaclock5: clock-generator@6a {
233		compatible = "idt,5p49v5925";
234		reg = <0x6a>;
235		#clock-cells = <1>;
236		clocks = <&x23_clk>;
237		clock-names = "xin";
238	};
239};
240
241&i2c_dvfs {
242	status = "okay";
243
244	clock-frequency = <400000>;
245
246	pmic: pmic@30 {
247		pinctrl-0 = <&irq0_pins>;
248		pinctrl-names = "default";
249
250		compatible = "rohm,bd9571mwv";
251		reg = <0x30>;
252		interrupt-parent = <&intc_ex>;
253		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
254		interrupt-controller;
255		#interrupt-cells = <2>;
256		gpio-controller;
257		#gpio-cells = <2>;
258		rohm,ddr-backup-power = <0xf>;
259		rohm,rstbmode-pulse;
260
261		regulators {
262			dvfs: dvfs {
263				regulator-name = "dvfs";
264				regulator-min-microvolt = <750000>;
265				regulator-max-microvolt = <1030000>;
266				regulator-boot-on;
267				regulator-always-on;
268			};
269		};
270	};
271};
272
273&ohci1 {
274	status = "okay";
275};
276
277&pfc {
278	pinctrl-0 = <&scif_clk_pins>;
279	pinctrl-names = "default";
280
281	avb_pins: avb {
282		mux {
283			groups = "avb_link", "avb_mdio", "avb_mii";
284			function = "avb";
285		};
286
287		pins_mdio {
288			groups = "avb_mdio";
289			drive-strength = <24>;
290		};
291
292		pins_mii_tx {
293			pins = "PIN_AVB_TX_CTL", "PIN_AVB_TXC", "PIN_AVB_TD0",
294			       "PIN_AVB_TD1", "PIN_AVB_TD2", "PIN_AVB_TD3";
295			drive-strength = <12>;
296		};
297	};
298
299	i2c2_pins: i2c2 {
300		groups = "i2c2_a";
301		function = "i2c2";
302	};
303
304	irq0_pins: irq0 {
305		groups = "intc_ex_irq0";
306		function = "intc_ex";
307	};
308
309	scif2_pins: scif2 {
310		groups = "scif2_data_a";
311		function = "scif2";
312	};
313
314	scif_clk_pins: scif_clk {
315		groups = "scif_clk_a";
316		function = "scif_clk";
317	};
318
319	sdhi0_pins: sd0 {
320		groups = "sdhi0_data4", "sdhi0_ctrl";
321		function = "sdhi0";
322		power-source = <3300>;
323	};
324
325	sdhi0_pins_uhs: sd0_uhs {
326		groups = "sdhi0_data4", "sdhi0_ctrl";
327		function = "sdhi0";
328		power-source = <1800>;
329	};
330
331	sdhi2_pins: sd2 {
332		groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
333		function = "sdhi2";
334		power-source = <3300>;
335	};
336
337	sdhi2_pins_uhs: sd2_uhs {
338		groups = "sdhi2_data8", "sdhi2_ctrl", "sdhi2_ds";
339		function = "sdhi2";
340		power-source = <1800>;
341	};
342
343	sound_pins: sound {
344		groups = "ssi01239_ctrl", "ssi0_data", "ssi1_data_a";
345		function = "ssi";
346	};
347
348	sound_clk_pins: sound-clk {
349		groups = "audio_clk_a_a", "audio_clk_b_a", "audio_clk_c_a",
350			 "audio_clkout_a", "audio_clkout3_a";
351		function = "audio_clk";
352	};
353
354	usb1_pins: usb1 {
355		groups = "usb1";
356		function = "usb1";
357	};
358};
359
360&rcar_sound {
361	pinctrl-0 = <&sound_pins &sound_clk_pins>;
362	pinctrl-names = "default";
363
364	/* Single DAI */
365	#sound-dai-cells = <0>;
366
367	/* audio_clkout0/1/2/3 */
368	#clock-cells = <1>;
369	clock-frequency = <12288000 11289600>;
370
371	status = "okay";
372
373	/* update <audio_clk_b> to <cs2000> */
374	clocks = <&cpg CPG_MOD 1005>,
375		 <&cpg CPG_MOD 1006>, <&cpg CPG_MOD 1007>,
376		 <&cpg CPG_MOD 1008>, <&cpg CPG_MOD 1009>,
377		 <&cpg CPG_MOD 1010>, <&cpg CPG_MOD 1011>,
378		 <&cpg CPG_MOD 1012>, <&cpg CPG_MOD 1013>,
379		 <&cpg CPG_MOD 1014>, <&cpg CPG_MOD 1015>,
380		 <&cpg CPG_MOD 1022>, <&cpg CPG_MOD 1023>,
381		 <&cpg CPG_MOD 1024>, <&cpg CPG_MOD 1025>,
382		 <&cpg CPG_MOD 1026>, <&cpg CPG_MOD 1027>,
383		 <&cpg CPG_MOD 1028>, <&cpg CPG_MOD 1029>,
384		 <&cpg CPG_MOD 1030>, <&cpg CPG_MOD 1031>,
385		 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
386		 <&cpg CPG_MOD 1020>, <&cpg CPG_MOD 1021>,
387		 <&cpg CPG_MOD 1019>, <&cpg CPG_MOD 1018>,
388		 <&audio_clk_a>, <&cs2000>,
389		 <&audio_clk_c>,
390		 <&cpg CPG_CORE CPG_AUDIO_CLK_I>;
391
392	rcar_sound,dai {
393		dai0 {
394			playback = <&ssi0 &src0 &dvc0>;
395			capture  = <&ssi1 &src1 &dvc1>;
396		};
397	};
398};
399
400&scif2 {
401	pinctrl-0 = <&scif2_pins>;
402	pinctrl-names = "default";
403
404	status = "okay";
405};
406
407&scif_clk {
408	clock-frequency = <14745600>;
409};
410
411&sdhi0 {
412	pinctrl-0 = <&sdhi0_pins>;
413	pinctrl-1 = <&sdhi0_pins_uhs>;
414	pinctrl-names = "default", "state_uhs";
415
416	vmmc-supply = <&vcc_sdhi0>;
417	vqmmc-supply = <&vccq_sdhi0>;
418	cd-gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
419	bus-width = <4>;
420	sd-uhs-sdr50;
421	sd-uhs-sdr104;
422	status = "okay";
423};
424
425&sdhi2 {
426	/* used for on-board 8bit eMMC */
427	pinctrl-0 = <&sdhi2_pins>;
428	pinctrl-1 = <&sdhi2_pins_uhs>;
429	pinctrl-names = "default", "state_uhs";
430
431	vmmc-supply = <&reg_3p3v>;
432	vqmmc-supply = <&reg_1p8v>;
433	bus-width = <8>;
434	mmc-hs200-1_8v;
435	non-removable;
436	status = "okay";
437};
438
439&ssi1 {
440	shared-pin;
441};
442
443&usb2_phy1 {
444	pinctrl-0 = <&usb1_pins>;
445	pinctrl-names = "default";
446
447	status = "okay";
448};
449
450&rwdt {
451	timeout-sec = <60>;
452	status = "okay";
453};
454