xref: /freebsd/sys/contrib/device-tree/src/arm/renesas/r8a7779-marzen.dts (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the R-Car H1 (R8A77790) Marzen board
4 *
5 * Copyright (C) 2013 Renesas Solutions Corp.
6 * Copyright (C) 2013 Simon Horman
7 */
8
9/dts-v1/;
10#include "r8a7779.dtsi"
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13#include <dt-bindings/interrupt-controller/irq.h>
14
15/ {
16	model = "marzen";
17	compatible = "renesas,marzen", "renesas,r8a7779";
18
19	aliases {
20		serial0 = &scif2;
21		serial1 = &scif4;
22	};
23
24	chosen {
25		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
26		stdout-path = "serial0:115200n8";
27	};
28
29	memory@60000000 {
30		device_type = "memory";
31		reg = <0x60000000 0x40000000>;
32	};
33
34	fixedregulator3v3: regulator-3v3 {
35		compatible = "regulator-fixed";
36		regulator-name = "fixed-3.3V";
37		regulator-min-microvolt = <3300000>;
38		regulator-max-microvolt = <3300000>;
39		regulator-boot-on;
40		regulator-always-on;
41	};
42
43	vccq_sdhi0: regulator-vccq-sdhi0 {
44		compatible = "regulator-gpio";
45
46		regulator-name = "SDHI0 VccQ";
47		regulator-min-microvolt = <1800000>;
48		regulator-max-microvolt = <3300000>;
49
50		gpios = <&gpio3 20 GPIO_ACTIVE_HIGH>;
51		gpios-states = <1>;
52		states = <3300000 1>, <1800000 0>;
53	};
54
55	keypad-0 {
56		compatible = "gpio-keys";
57
58		pinctrl-0 = <&keypad0_pins>;
59		pinctrl-names = "default";
60
61		interrupt-parent = <&gpio0>;
62
63		key-1 {
64			interrupts = <17 IRQ_TYPE_EDGE_FALLING>;
65			linux,code = <KEY_1>;
66			label = "SW1-1";
67			wakeup-source;
68			debounce-interval = <20>;
69		};
70		key-2 {
71			interrupts = <18 IRQ_TYPE_EDGE_FALLING>;
72			linux,code = <KEY_2>;
73			label = "SW1-2";
74			wakeup-source;
75			debounce-interval = <20>;
76		};
77	};
78
79	keypad-1 {
80		compatible = "gpio-keys-polled";
81		poll-interval = <50>;
82
83		pinctrl-0 = <&keypad1_pins>;
84		pinctrl-names = "default";
85
86		key-3 {
87			gpios = <&gpio0 19 GPIO_ACTIVE_LOW>;
88			linux,code = <KEY_3>;
89			label = "SW1-3";
90			debounce-interval = <20>;
91		};
92		key-4 {
93			gpios = <&gpio0 20 GPIO_ACTIVE_LOW>;
94			linux,code = <KEY_4>;
95			label = "SW1-4";
96			debounce-interval = <20>;
97		};
98	};
99
100	leds {
101		compatible = "gpio-leds";
102		led2 {
103			gpios = <&gpio4 29 GPIO_ACTIVE_HIGH>;
104		};
105		led3 {
106			gpios = <&gpio4 30 GPIO_ACTIVE_HIGH>;
107		};
108		led4 {
109			gpios = <&gpio4 31 GPIO_ACTIVE_HIGH>;
110		};
111	};
112
113	vga-encoder {
114		compatible = "adi,adv7123";
115
116		ports {
117			#address-cells = <1>;
118			#size-cells = <0>;
119
120			port@0 {
121				reg = <0>;
122				vga_enc_in: endpoint {
123					remote-endpoint = <&du_out_rgb0>;
124				};
125			};
126			port@1 {
127				reg = <1>;
128				vga_enc_out: endpoint {
129					remote-endpoint = <&vga_in>;
130				};
131			};
132		};
133	};
134
135	vga {
136		compatible = "vga-connector";
137
138		port {
139			vga_in: endpoint {
140				remote-endpoint = <&vga_enc_out>;
141			};
142		};
143	};
144
145	lvds-encoder {
146		compatible = "thine,thc63lvdm83d";
147
148		ports {
149			#address-cells = <1>;
150			#size-cells = <0>;
151
152			port@0 {
153				reg = <0>;
154				lvds_enc_in: endpoint {
155					remote-endpoint = <&du_out_rgb1>;
156				};
157			};
158			port@1 {
159				reg = <1>;
160				lvds_connector: endpoint {
161				};
162			};
163		};
164	};
165
166	x3_clk: x3-clock {
167		compatible = "fixed-clock";
168		#clock-cells = <0>;
169		clock-frequency = <65000000>;
170	};
171};
172
173&du {
174	pinctrl-0 = <&du_pins>;
175	pinctrl-names = "default";
176	status = "okay";
177
178	clocks = <&mstp1_clks R8A7779_CLK_DU>, <&x3_clk>;
179	clock-names = "du.0", "dclkin.0";
180
181	ports {
182		port@0 {
183			endpoint {
184				remote-endpoint = <&vga_enc_in>;
185			};
186		};
187		port@1 {
188			endpoint {
189				remote-endpoint = <&lvds_enc_in>;
190			};
191		};
192	};
193};
194
195&gpio0 {
196	keypad0-hog {
197		gpio-hog;
198		gpios = <17 GPIO_ACTIVE_LOW>, <18 GPIO_ACTIVE_LOW>;
199		input;
200	};
201};
202
203&i2c0 {
204	status = "okay";
205
206	clock-frequency = <100000>;
207};
208
209&irqpin0 {
210	status = "okay";
211};
212
213&extal_clk {
214	clock-frequency = <31250000>;
215};
216
217&lbsc {
218	flash@0 {
219		compatible = "cfi-flash";
220		reg = <0x0 0x04000000>;
221		pinctrl-0 = <&flash_pins>;
222		pinctrl-names = "default";
223		bank-width = <2>;
224
225		partitions {
226			compatible = "fixed-partitions";
227			#address-cells = <1>;
228			#size-cells = <1>;
229
230			partition@0 {
231				label = "uboot";
232				reg = <0x00000000 0x00040000>;
233				read-only;
234			};
235			partition@40000 {
236				label = "uboot-env";
237				reg = <0x00040000 0x00040000>;
238				read-only;
239			};
240			partition@80000 {
241				label = "flash";
242				reg = <0x00080000 0x03f80000>;
243			};
244		};
245	};
246
247	ethernet@18000000 {
248		compatible = "smsc,lan89218", "smsc,lan9115";
249		reg = <0x18000000 0x100>;
250		pinctrl-0 = <&ethernet_pins>;
251		pinctrl-names = "default";
252
253		phy-mode = "mii";
254		interrupt-parent = <&irqpin0>;
255		interrupts = <1 IRQ_TYPE_EDGE_FALLING>;
256		smsc,irq-push-pull;
257		reg-io-width = <4>;
258		vddvario-supply = <&fixedregulator3v3>;
259		vdd33a-supply = <&fixedregulator3v3>;
260	};
261};
262
263&tmu0 {
264	status = "okay";
265};
266
267&pfc {
268	pinctrl-0 = <&scif_clk_pins>;
269	pinctrl-names = "default";
270
271	du_pins: du {
272		du0 {
273			groups = "du0_rgb888", "du0_sync_1", "du0_clk_out_0", "du0_clk_in";
274			function = "du0";
275		};
276		du1 {
277			groups = "du1_rgb666", "du1_sync_1", "du1_clk_out";
278			function = "du1";
279		};
280	};
281
282	scif_clk_pins: scif_clk {
283		groups = "scif_clk_b";
284		function = "scif_clk";
285	};
286
287	ethernet_pins: ethernet {
288		intc {
289			groups = "intc_irq1_b";
290			function = "intc";
291		};
292		lbsc {
293			groups = "lbsc_ex_cs0";
294			function = "lbsc";
295		};
296	};
297
298	flash_pins: flash {
299		groups = "lbsc_cs0";
300		function = "lbsc";
301	};
302
303	scif2_pins: scif2 {
304		groups = "scif2_data_c";
305		function = "scif2";
306	};
307
308	scif4_pins: scif4 {
309		groups = "scif4_data";
310		function = "scif4";
311	};
312
313	sdhi0_pins: sd0 {
314		groups = "sdhi0_data4", "sdhi0_ctrl", "sdhi0_cd";
315		function = "sdhi0";
316	};
317
318	hspi0_pins: hspi0 {
319		groups = "hspi0";
320		function = "hspi0";
321	};
322
323	keypad0_pins: keypad-0 {
324		pins = "GP_0_17", "GP_0_18";
325		bias-pull-up;
326	};
327	keypad1_pins: keypad-1 {
328		pins = "GP_0_19", "GP_0_20";
329		bias-pull-up;
330	};
331};
332
333&sata {
334	status = "okay";
335};
336
337&scif2 {
338	pinctrl-0 = <&scif2_pins>;
339	pinctrl-names = "default";
340
341	status = "okay";
342};
343
344&scif4 {
345	pinctrl-0 = <&scif4_pins>;
346	pinctrl-names = "default";
347
348	status = "okay";
349};
350
351&scif_clk {
352	clock-frequency = <14745600>;
353};
354
355&sdhi0 {
356	pinctrl-0 = <&sdhi0_pins>;
357	pinctrl-names = "default";
358
359	vmmc-supply = <&fixedregulator3v3>;
360	vqmmc-supply = <&vccq_sdhi0>;
361	bus-width = <4>;
362	status = "okay";
363};
364
365&hspi0 {
366	pinctrl-0 = <&hspi0_pins>;
367	pinctrl-names = "default";
368	status = "okay";
369};
370