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