xref: /linux/arch/arm/boot/dts/renesas/r8a7792-wheat.dts (revision c6e9dba3be5ef3b701b29b143609561915e5d0e9)
1// SPDX-License-Identifier: GPL-2.0
2/*
3 * Device Tree Source for the Wheat board
4 *
5 * Copyright (C) 2016 Renesas Electronics Corporation
6 * Copyright (C) 2016 Cogent  Embedded, Inc.
7 */
8
9/dts-v1/;
10#include "r8a7792.dtsi"
11#include <dt-bindings/gpio/gpio.h>
12#include <dt-bindings/input/input.h>
13
14/ {
15	model = "Wheat";
16	compatible = "renesas,wheat", "renesas,r8a7792";
17
18	aliases {
19		serial0 = &scif0;
20	};
21
22	chosen {
23		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
24		stdout-path = "serial0:115200n8";
25	};
26
27	memory@40000000 {
28		device_type = "memory";
29		reg = <0 0x40000000 0 0x40000000>;
30	};
31
32	d3_3v: regulator-3v3 {
33		compatible = "regulator-fixed";
34		regulator-name = "D3.3V";
35		regulator-min-microvolt = <3300000>;
36		regulator-max-microvolt = <3300000>;
37		regulator-boot-on;
38		regulator-always-on;
39	};
40
41	keyboard {
42		compatible = "gpio-keys";
43
44		key-a {
45			linux,code = <KEY_A>;
46			label = "SW2";
47			wakeup-source;
48			debounce-interval = <20>;
49			gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
50		};
51		key-b {
52			linux,code = <KEY_B>;
53			label = "SW3";
54			wakeup-source;
55			debounce-interval = <20>;
56			gpios = <&gpio11 2 GPIO_ACTIVE_LOW>;
57		};
58	};
59
60	vcc_sdhi0: regulator-vcc-sdhi0 {
61		compatible = "regulator-fixed";
62
63		regulator-name = "SDHI0 Vcc";
64		regulator-min-microvolt = <3300000>;
65		regulator-max-microvolt = <3300000>;
66
67		gpio = <&gpio11 12 GPIO_ACTIVE_HIGH>;
68		enable-active-high;
69	};
70
71	hdmi-out0 {
72		compatible = "hdmi-connector";
73		type = "a";
74
75		port {
76			hdmi_con0: endpoint {
77				remote-endpoint = <&adv7513_0_out>;
78			};
79		};
80	};
81
82	hdmi-out1 {
83		compatible = "hdmi-connector";
84		type = "a";
85
86		port {
87			hdmi_con1: endpoint {
88				remote-endpoint = <&adv7513_1_out>;
89			};
90		};
91	};
92
93	osc2_clk: osc2 {
94		compatible = "fixed-clock";
95		#clock-cells = <0>;
96		clock-frequency = <74250000>;
97	};
98};
99
100&extal_clk {
101	clock-frequency = <20000000>;
102};
103
104&lbsc {
105	ethernet@18000000 {
106		compatible = "smsc,lan89218", "smsc,lan9115";
107		reg = <0x18000000 0x100>;
108		phy-mode = "mii";
109		interrupt-parent = <&irqc>;
110		interrupts = <0 IRQ_TYPE_EDGE_FALLING>;
111		smsc,irq-push-pull;
112		smsc,save-mac-address;
113		reg-io-width = <4>;
114		vddvario-supply = <&d3_3v>;
115		vdd33a-supply = <&d3_3v>;
116
117		pinctrl-0 = <&lan89218_pins>;
118		pinctrl-names = "default";
119	};
120};
121
122&pfc {
123	scif0_pins: scif0 {
124		groups = "scif0_data";
125		function = "scif0";
126	};
127
128	lan89218_pins: lan89218 {
129		intc {
130			groups = "intc_irq0";
131			function = "intc";
132		};
133		lbsc {
134			groups = "lbsc_ex_cs0";
135			function = "lbsc";
136		};
137	};
138
139	can0_pins: can0 {
140		groups = "can0_data";
141		function = "can0";
142	};
143
144	can1_pins: can1 {
145		groups = "can1_data";
146		function = "can1";
147	};
148
149	sdhi0_pins: sdhi0 {
150		groups = "sdhi0_data4", "sdhi0_ctrl";
151		function = "sdhi0";
152	};
153
154	qspi_pins: qspi {
155		groups = "qspi_ctrl", "qspi_data4";
156		function = "qspi";
157	};
158
159	du0_pins: du0 {
160		groups = "du0_rgb888", "du0_sync", "du0_disp";
161		function = "du0";
162	};
163
164	du1_pins: du1 {
165		groups = "du1_rgb666", "du1_sync", "du1_disp";
166		function = "du1";
167	};
168};
169
170&rwdt {
171	timeout-sec = <60>;
172	status = "okay";
173};
174
175&scif0 {
176	pinctrl-0 = <&scif0_pins>;
177	pinctrl-names = "default";
178
179	status = "okay";
180};
181
182&can0 {
183	pinctrl-0 = <&can0_pins>;
184	pinctrl-names = "default";
185
186	status = "okay";
187};
188
189&can1 {
190	pinctrl-0 = <&can1_pins>;
191	pinctrl-names = "default";
192
193	status = "okay";
194};
195
196&sdhi0 {
197	pinctrl-0 = <&sdhi0_pins>;
198	pinctrl-names = "default";
199
200	vmmc-supply = <&vcc_sdhi0>;
201	cd-gpios = <&gpio11 11 GPIO_ACTIVE_LOW>;
202	status = "okay";
203};
204
205&qspi {
206	pinctrl-0 = <&qspi_pins>;
207	pinctrl-names = "default";
208	status = "okay";
209
210	flash@0 {
211		compatible = "spansion,s25fl512s", "jedec,spi-nor";
212		reg = <0>;
213		spi-max-frequency = <30000000>;
214		spi-tx-bus-width = <4>;
215		spi-rx-bus-width = <4>;
216		spi-cpol;
217		spi-cpha;
218		m25p,fast-read;
219
220		partitions {
221			compatible = "fixed-partitions";
222			#address-cells = <1>;
223			#size-cells = <1>;
224
225			partition@0 {
226				label = "loader";
227				reg = <0x00000000 0x00040000>;
228				read-only;
229			};
230			partition@40000 {
231				label = "user";
232				reg = <0x00040000 0x00400000>;
233				read-only;
234			};
235			partition@440000 {
236				label = "flash";
237				reg = <0x00440000 0x03bc0000>;
238			};
239		};
240	};
241};
242
243&i2c4 {
244	status = "okay";
245	clock-frequency = <400000>;
246
247	/*
248	 * The adv75xx resets its addresses to defaults during low power mode.
249	 * Because we have two ADV7513 devices on the same bus, we must change
250	 * both of them away from the defaults so that they do not conflict.
251	 */
252	hdmi@3d {
253		compatible = "adi,adv7513";
254		reg = <0x3d>, <0x4d>, <0x2d>, <0x5d>;
255		reg-names = "main", "edid", "cec", "packet";
256
257		adi,input-depth = <8>;
258		adi,input-colorspace = "rgb";
259		adi,input-clock = "1x";
260
261		ports {
262			#address-cells = <1>;
263			#size-cells = <0>;
264
265			port@0 {
266				reg = <0>;
267				adv7513_0_in: endpoint {
268					remote-endpoint = <&du_out_rgb0>;
269				};
270			};
271
272			port@1 {
273				reg = <1>;
274				adv7513_0_out: endpoint {
275					remote-endpoint = <&hdmi_con0>;
276				};
277			};
278		};
279	};
280
281	hdmi@39 {
282		compatible = "adi,adv7513";
283		reg = <0x39>, <0x49>, <0x29>, <0x59>;
284		reg-names = "main", "edid", "cec", "packet";
285
286		adi,input-depth = <8>;
287		adi,input-colorspace = "rgb";
288		adi,input-clock = "1x";
289
290		ports {
291			#address-cells = <1>;
292			#size-cells = <0>;
293
294			port@0 {
295				reg = <0>;
296				adv7513_1_in: endpoint {
297					remote-endpoint = <&du_out_rgb1>;
298				};
299			};
300
301			port@1 {
302				reg = <1>;
303				adv7513_1_out: endpoint {
304					remote-endpoint = <&hdmi_con1>;
305				};
306			};
307		};
308	};
309};
310
311&du {
312	pinctrl-0 = <&du0_pins>, <&du1_pins>;
313	pinctrl-names = "default";
314
315	clocks = <&cpg CPG_MOD 724>, <&cpg CPG_MOD 723>, <&osc2_clk>;
316	clock-names = "du.0", "du.1", "dclkin.0";
317	status = "okay";
318
319	ports {
320		port@0 {
321			endpoint {
322				remote-endpoint = <&adv7513_0_in>;
323			};
324		};
325		port@1 {
326			endpoint {
327				remote-endpoint = <&adv7513_1_in>;
328			};
329		};
330	};
331};
332