xref: /freebsd/sys/contrib/device-tree/src/arm64/renesas/r8a779g0-white-hawk-cpu.dtsi (revision 7fdf597e96a02165cfe22ff357b857d5fa15ed8a)
1// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2/*
3 * Device Tree Source for the White Hawk CPU board
4 *
5 * Copyright (C) 2022 Renesas Electronics Corp.
6 */
7
8#include "r8a779g0.dtsi"
9
10#include <dt-bindings/gpio/gpio.h>
11#include <dt-bindings/input/input.h>
12#include <dt-bindings/leds/common.h>
13
14/ {
15	model = "Renesas White Hawk CPU board";
16	compatible = "renesas,white-hawk-cpu", "renesas,r8a779g0";
17
18	aliases {
19		ethernet0 = &avb0;
20		serial0 = &hscif0;
21	};
22
23	chosen {
24		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
25		stdout-path = "serial0:921600n8";
26	};
27
28	keys {
29		compatible = "gpio-keys";
30
31		pinctrl-0 = <&keys_pins>;
32		pinctrl-names = "default";
33
34		key-1 {
35			gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
36			linux,code = <KEY_1>;
37			label = "SW47";
38			wakeup-source;
39			debounce-interval = <20>;
40		};
41
42		key-2 {
43			gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
44			linux,code = <KEY_2>;
45			label = "SW48";
46			wakeup-source;
47			debounce-interval = <20>;
48		};
49
50		key-3 {
51			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
52			linux,code = <KEY_3>;
53			label = "SW49";
54			wakeup-source;
55			debounce-interval = <20>;
56		};
57	};
58
59	leds {
60		compatible = "gpio-leds";
61
62		led-1 {
63			gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
64			color = <LED_COLOR_ID_GREEN>;
65			function = LED_FUNCTION_INDICATOR;
66			function-enumerator = <1>;
67		};
68
69		led-2 {
70			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
71			color = <LED_COLOR_ID_GREEN>;
72			function = LED_FUNCTION_INDICATOR;
73			function-enumerator = <2>;
74		};
75
76		led-3 {
77			gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
78			color = <LED_COLOR_ID_GREEN>;
79			function = LED_FUNCTION_INDICATOR;
80			function-enumerator = <3>;
81		};
82	};
83
84	memory@48000000 {
85		device_type = "memory";
86		/* first 128MB is reserved for secure area. */
87		reg = <0x0 0x48000000 0x0 0x78000000>;
88	};
89
90	memory@480000000 {
91		device_type = "memory";
92		reg = <0x4 0x80000000 0x0 0x80000000>;
93	};
94
95	memory@600000000 {
96		device_type = "memory";
97		reg = <0x6 0x00000000 0x1 0x00000000>;
98	};
99
100	mini-dp-con {
101		compatible = "dp-connector";
102		label = "CN5";
103		type = "mini";
104
105		port {
106			mini_dp_con_in: endpoint {
107				remote-endpoint = <&sn65dsi86_out>;
108			};
109		};
110	};
111
112	reg_1p2v: regulator-1p2v {
113		compatible = "regulator-fixed";
114		regulator-name = "fixed-1.2V";
115		regulator-min-microvolt = <1200000>;
116		regulator-max-microvolt = <1200000>;
117		regulator-boot-on;
118		regulator-always-on;
119	};
120
121	reg_1p8v: regulator-1p8v {
122		compatible = "regulator-fixed";
123		regulator-name = "fixed-1.8V";
124		regulator-min-microvolt = <1800000>;
125		regulator-max-microvolt = <1800000>;
126		regulator-boot-on;
127		regulator-always-on;
128	};
129
130	reg_3p3v: regulator-3p3v {
131		compatible = "regulator-fixed";
132		regulator-name = "fixed-3.3V";
133		regulator-min-microvolt = <3300000>;
134		regulator-max-microvolt = <3300000>;
135		regulator-boot-on;
136		regulator-always-on;
137	};
138
139	sn65dsi86_refclk: clk-x6 {
140		compatible = "fixed-clock";
141		#clock-cells = <0>;
142		clock-frequency = <38400000>;
143	};
144};
145
146&avb0 {
147	pinctrl-0 = <&avb0_pins>;
148	pinctrl-names = "default";
149	phy-handle = <&phy0>;
150	tx-internal-delay-ps = <2000>;
151	status = "okay";
152
153	phy0: ethernet-phy@0 {
154		compatible = "ethernet-phy-id0022.1622",
155			     "ethernet-phy-ieee802.3-c22";
156		rxc-skew-ps = <1500>;
157		reg = <0>;
158		interrupt-parent = <&gpio7>;
159		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
160		reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>;
161	};
162};
163
164&dsi0 {
165	status = "okay";
166
167	ports {
168		port@1 {
169			dsi0_out: endpoint {
170				remote-endpoint = <&sn65dsi86_in>;
171				data-lanes = <1 2 3 4>;
172			};
173		};
174	};
175};
176
177&du {
178	status = "okay";
179};
180
181&extal_clk {
182	clock-frequency = <16666666>;
183};
184
185&extalr_clk {
186	clock-frequency = <32768>;
187};
188
189&hscif0 {
190	pinctrl-0 = <&hscif0_pins>;
191	pinctrl-names = "default";
192
193	status = "okay";
194};
195
196&i2c0 {
197	pinctrl-0 = <&i2c0_pins>;
198	pinctrl-names = "default";
199
200	status = "okay";
201	clock-frequency = <400000>;
202
203	io_expander_a: gpio@20 {
204		compatible = "onnn,pca9654";
205		reg = <0x20>;
206		interrupt-parent = <&gpio0>;
207		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
208		gpio-controller;
209		#gpio-cells = <2>;
210		interrupt-controller;
211		#interrupt-cells = <2>;
212	};
213
214	eeprom@50 {
215		compatible = "rohm,br24g01", "atmel,24c01";
216		label = "cpu-board";
217		reg = <0x50>;
218		pagesize = <8>;
219	};
220};
221
222&i2c1 {
223	pinctrl-0 = <&i2c1_pins>;
224	pinctrl-names = "default";
225
226	status = "okay";
227	clock-frequency = <400000>;
228
229	bridge@2c {
230		compatible = "ti,sn65dsi86";
231		reg = <0x2c>;
232
233		clocks = <&sn65dsi86_refclk>;
234		clock-names = "refclk";
235
236		interrupt-parent = <&intc_ex>;
237		interrupts = <0 IRQ_TYPE_LEVEL_HIGH>;
238
239		enable-gpios = <&gpio1 26 GPIO_ACTIVE_HIGH>;
240
241		vccio-supply = <&reg_1p8v>;
242		vpll-supply = <&reg_1p8v>;
243		vcca-supply = <&reg_1p2v>;
244		vcc-supply = <&reg_1p2v>;
245
246		ports {
247			#address-cells = <1>;
248			#size-cells = <0>;
249
250			port@0 {
251				reg = <0>;
252				sn65dsi86_in: endpoint {
253					remote-endpoint = <&dsi0_out>;
254				};
255			};
256
257			port@1 {
258				reg = <1>;
259				sn65dsi86_out: endpoint {
260					remote-endpoint = <&mini_dp_con_in>;
261				};
262			};
263		};
264	};
265};
266
267&mmc0 {
268	pinctrl-0 = <&mmc_pins>;
269	pinctrl-1 = <&mmc_pins>;
270	pinctrl-names = "default", "state_uhs";
271
272	vmmc-supply = <&reg_3p3v>;
273	vqmmc-supply = <&reg_1p8v>;
274	mmc-hs200-1_8v;
275	mmc-hs400-1_8v;
276	bus-width = <8>;
277	no-sd;
278	no-sdio;
279	non-removable;
280	full-pwr-cycle-in-suspend;
281	status = "okay";
282};
283
284&pfc {
285	pinctrl-0 = <&scif_clk_pins>;
286	pinctrl-names = "default";
287
288	avb0_pins: avb0 {
289		mux {
290			groups = "avb0_link", "avb0_mdio", "avb0_rgmii",
291				 "avb0_txcrefclk";
292			function = "avb0";
293		};
294
295		pins_mdio {
296			groups = "avb0_mdio";
297			drive-strength = <21>;
298		};
299
300		pins_mii {
301			groups = "avb0_rgmii";
302			drive-strength = <21>;
303		};
304
305	};
306	hscif0_pins: hscif0 {
307		groups = "hscif0_data";
308		function = "hscif0";
309	};
310
311	i2c0_pins: i2c0 {
312		groups = "i2c0";
313		function = "i2c0";
314	};
315
316	i2c1_pins: i2c1 {
317		groups = "i2c1";
318		function = "i2c1";
319	};
320
321	keys_pins: keys {
322		pins = "GP_5_0", "GP_5_1", "GP_5_2";
323		bias-pull-up;
324	};
325
326	mmc_pins: mmc {
327		groups = "mmc_data8", "mmc_ctrl", "mmc_ds";
328		function = "mmc";
329		power-source = <1800>;
330	};
331
332	qspi0_pins: qspi0 {
333		groups = "qspi0_ctrl", "qspi0_data4";
334		function = "qspi0";
335	};
336
337	scif_clk_pins: scif_clk {
338		groups = "scif_clk";
339		function = "scif_clk";
340	};
341};
342
343&rpc {
344	pinctrl-0 = <&qspi0_pins>;
345	pinctrl-names = "default";
346
347	status = "okay";
348
349	flash@0 {
350		compatible = "spansion,s25fs512s", "jedec,spi-nor";
351		reg = <0>;
352		spi-max-frequency = <40000000>;
353		spi-rx-bus-width = <4>;
354
355		partitions {
356			compatible = "fixed-partitions";
357			#address-cells = <1>;
358			#size-cells = <1>;
359
360			boot@0 {
361				reg = <0x0 0x1200000>;
362				read-only;
363			};
364			user@1200000 {
365				reg = <0x1200000 0x2e00000>;
366			};
367		};
368	};
369};
370
371&rwdt {
372	timeout-sec = <60>;
373	status = "okay";
374};
375
376&scif_clk {
377	clock-frequency = <24000000>;
378};
379