1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the armadillo 800 eva board
4 *
5 * Copyright (C) 2012 Renesas Solutions Corp.
6 */
7
8/dts-v1/;
9#include "r8a7740.dtsi"
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/interrupt-controller/irq.h>
13#include <dt-bindings/pwm/pwm.h>
14
15/ {
16	model = "armadillo 800 eva";
17	compatible = "renesas,armadillo800eva", "renesas,r8a7740";
18
19	aliases {
20		serial0 = &scifa1;
21	};
22
23	chosen {
24		bootargs = "earlyprintk ignore_loglevel root=/dev/nfs ip=on rw";
25		stdout-path = "serial0:115200n8";
26	};
27
28	memory@40000000 {
29		device_type = "memory";
30		reg = <0x40000000 0x20000000>;
31	};
32
33	reg_3p3v: regulator-3p3v {
34		compatible = "regulator-fixed";
35		regulator-name = "fixed-3.3V";
36		regulator-min-microvolt = <3300000>;
37		regulator-max-microvolt = <3300000>;
38		regulator-always-on;
39		regulator-boot-on;
40	};
41
42	vcc_sdhi0: regulator-vcc-sdhi0 {
43		compatible = "regulator-fixed";
44
45		regulator-name = "SDHI0 Vcc";
46		regulator-min-microvolt = <3300000>;
47		regulator-max-microvolt = <3300000>;
48
49		gpio = <&pfc 75 GPIO_ACTIVE_HIGH>;
50		enable-active-high;
51	};
52
53	vccq_sdhi0: regulator-vccq-sdhi0 {
54		compatible = "regulator-gpio";
55
56		regulator-name = "SDHI0 VccQ";
57		regulator-min-microvolt = <1800000>;
58		regulator-max-microvolt = <3300000>;
59		vin-supply = <&vcc_sdhi0>;
60
61		enable-gpio = <&pfc 74 GPIO_ACTIVE_HIGH>;
62		gpios = <&pfc 17 GPIO_ACTIVE_HIGH>;
63		states = <3300000 0>, <1800000 1>;
64
65		enable-active-high;
66	};
67
68	reg_5p0v: regulator-5p0v {
69		compatible = "regulator-fixed";
70		regulator-name = "fixed-5.0V";
71		regulator-min-microvolt = <5000000>;
72		regulator-max-microvolt = <5000000>;
73		regulator-always-on;
74		regulator-boot-on;
75	};
76
77	keyboard {
78		compatible = "gpio-keys";
79
80		power-key {
81			gpios = <&pfc 99 GPIO_ACTIVE_LOW>;
82			linux,code = <KEY_POWER>;
83			label = "SW3";
84			wakeup-source;
85		};
86
87		back-key {
88			gpios = <&pfc 100 GPIO_ACTIVE_LOW>;
89			linux,code = <KEY_BACK>;
90			label = "SW4";
91		};
92
93		menu-key {
94			gpios = <&pfc 97 GPIO_ACTIVE_LOW>;
95			linux,code = <KEY_MENU>;
96			label = "SW5";
97		};
98
99		home-key {
100			gpios = <&pfc 98 GPIO_ACTIVE_LOW>;
101			linux,code = <KEY_HOME>;
102			label = "SW6";
103		};
104	};
105
106	leds {
107		compatible = "gpio-leds";
108		led3 {
109			gpios = <&pfc 102 GPIO_ACTIVE_HIGH>;
110			label = "LED3";
111		};
112		led4 {
113			gpios = <&pfc 111 GPIO_ACTIVE_HIGH>;
114			label = "LED4";
115		};
116		led5 {
117			gpios = <&pfc 110 GPIO_ACTIVE_HIGH>;
118			label = "LED5";
119		};
120		led6 {
121			gpios = <&pfc 177 GPIO_ACTIVE_HIGH>;
122			label = "LED6";
123		};
124	};
125
126	i2c2: i2c-2 {
127		#address-cells = <1>;
128		#size-cells = <0>;
129		compatible = "i2c-gpio";
130		sda-gpios = <&pfc 208 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
131		scl-gpios = <&pfc 91 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
132		i2c-gpio,delay-us = <5>;
133	};
134
135	backlight {
136		compatible = "pwm-backlight";
137		pwms = <&tpu 2 33333 PWM_POLARITY_INVERTED>;
138		brightness-levels = <0 1 2 4 8 16 32 64 128 255>;
139		default-brightness-level = <9>;
140		pinctrl-0 = <&backlight_pins>;
141		pinctrl-names = "default";
142		power-supply = <&reg_5p0v>;
143		enable-gpios = <&pfc 61 GPIO_ACTIVE_HIGH>;
144	};
145
146	sound {
147		compatible = "simple-audio-card";
148
149		simple-audio-card,format = "i2s";
150
151		simple-audio-card,cpu {
152			sound-dai = <&sh_fsi2 0>;
153			bitclock-inversion;
154		};
155
156		simple-audio-card,codec {
157			sound-dai = <&wm8978>;
158			bitclock-master;
159			frame-master;
160			system-clock-frequency = <12288000>;
161		};
162	};
163};
164
165&ether {
166	pinctrl-0 = <&ether_pins>;
167	pinctrl-names = "default";
168
169	phy-handle = <&phy0>;
170	status = "okay";
171
172	phy0: ethernet-phy@0 {
173		compatible = "ethernet-phy-id0007.c0f1",
174			     "ethernet-phy-ieee802.3-c22";
175		reg = <0>;
176		reset-gpios = <&pfc 18 GPIO_ACTIVE_LOW>;
177	};
178};
179
180&extal1_clk {
181	clock-frequency = <24000000>;
182};
183&extal2_clk {
184	clock-frequency = <48000000>;
185};
186&fsibck_clk {
187	clock-frequency = <12288000>;
188};
189&cpg_clocks {
190	renesas,mode = <0x05>; /* MD_CK0 | MD_CK2 */
191};
192
193&cmt1 {
194	status = "okay";
195};
196
197&i2c0 {
198	status = "okay";
199	touchscreen@55 {
200		compatible = "sitronix,st1232";
201		reg = <0x55>;
202		interrupt-parent = <&irqpin1>;
203		interrupts = <2 IRQ_TYPE_LEVEL_LOW>;
204		pinctrl-0 = <&st1232_pins>;
205		pinctrl-names = "default";
206		gpios = <&pfc 166 GPIO_ACTIVE_LOW>;
207	};
208
209	wm8978: codec@1a {
210		#sound-dai-cells = <0>;
211		compatible = "wlf,wm8978";
212		reg = <0x1a>;
213	};
214};
215
216&i2c2 {
217	status = "okay";
218	rtc@30 {
219		compatible = "sii,s35390a";
220		reg = <0x30>;
221	};
222};
223
224&pfc {
225	pinctrl-0 = <&lcd0_pins>;
226	pinctrl-names = "default";
227
228	ether_pins: ether {
229		groups = "gether_mii", "gether_int";
230		function = "gether";
231	};
232
233	scifa1_pins: scifa1 {
234		groups = "scifa1_data";
235		function = "scifa1";
236	};
237
238	st1232_pins: touchscreen {
239		groups = "intc_irq10";
240		function = "intc";
241	};
242
243	backlight_pins: backlight {
244		groups = "tpu0_to2_1";
245		function = "tpu0";
246	};
247
248	mmc0_pins: mmc0 {
249		groups = "mmc0_data8_1", "mmc0_ctrl_1";
250		function = "mmc0";
251	};
252
253	sdhi0_pins: sd0 {
254		groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_wp";
255		function = "sdhi0";
256	};
257
258	fsia_pins: sounda {
259		groups = "fsia_sclk_in", "fsia_mclk_out",
260			 "fsia_data_in_1", "fsia_data_out_0";
261		function = "fsia";
262	};
263
264	lcd0_pins: lcd0 {
265		groups = "lcd0_data24_0", "lcd0_lclk_1", "lcd0_sync";
266		function = "lcd0";
267	};
268
269	lcd0-mux-hog {
270		/* DBGMD/LCDC0/FSIA MUX */
271		gpio-hog;
272		gpios = <176 0>;
273		output-high;
274	};
275};
276
277&tpu {
278	status = "okay";
279};
280
281&mmcif0 {
282	pinctrl-0 = <&mmc0_pins>;
283	pinctrl-names = "default";
284
285	vmmc-supply = <&reg_3p3v>;
286	bus-width = <8>;
287	non-removable;
288	status = "okay";
289};
290
291&scifa1 {
292	pinctrl-0 = <&scifa1_pins>;
293	pinctrl-names = "default";
294
295	status = "okay";
296};
297
298&sdhi0 {
299	pinctrl-0 = <&sdhi0_pins>;
300	pinctrl-names = "default";
301
302	vmmc-supply = <&vcc_sdhi0>;
303	vqmmc-supply = <&vccq_sdhi0>;
304	bus-width = <4>;
305	cd-gpios = <&pfc 167 GPIO_ACTIVE_LOW>;
306	status = "okay";
307};
308
309&sh_fsi2 {
310	pinctrl-0 = <&fsia_pins>;
311	pinctrl-names = "default";
312
313	status = "okay";
314};
315
316&tmu0 {
317	status = "okay";
318};
319