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