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