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
101&avb0 {
102	pinctrl-0 = <&avb0_pins>;
103	pinctrl-names = "default";
104	phy-handle = <&phy0>;
105	tx-internal-delay-ps = <2000>;
106	status = "okay";
107
108	phy0: ethernet-phy@0 {
109		compatible = "ethernet-phy-id0022.1622",
110			     "ethernet-phy-ieee802.3-c22";
111		rxc-skew-ps = <1500>;
112		reg = <0>;
113		interrupt-parent = <&gpio7>;
114		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
115		reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>;
116	};
117};
118
119&extal_clk {
120	clock-frequency = <16666666>;
121};
122
123&extalr_clk {
124	clock-frequency = <32768>;
125};
126
127&hscif0 {
128	status = "okay";
129};
130
131&i2c0 {
132	pinctrl-0 = <&i2c0_pins>;
133	pinctrl-names = "default";
134
135	status = "okay";
136	clock-frequency = <400000>;
137
138	eeprom@50 {
139		compatible = "rohm,br24g01", "atmel,24c01";
140		label = "cpu-board";
141		reg = <0x50>;
142		pagesize = <8>;
143	};
144};
145
146&pfc {
147	pinctrl-0 = <&scif_clk_pins>;
148	pinctrl-names = "default";
149
150	avb0_pins: avb0 {
151		mux {
152			groups = "avb0_link", "avb0_mdio", "avb0_rgmii",
153				 "avb0_txcrefclk";
154			function = "avb0";
155		};
156
157		pins_mdio {
158			groups = "avb0_mdio";
159			drive-strength = <21>;
160		};
161
162		pins_mii {
163			groups = "avb0_rgmii";
164			drive-strength = <21>;
165		};
166
167	};
168	hscif0_pins: hscif0 {
169		groups = "hscif0_data";
170		function = "hscif0";
171	};
172
173	i2c0_pins: i2c0 {
174		groups = "i2c0";
175		function = "i2c0";
176	};
177
178	keys_pins: keys {
179		pins = "GP_5_0", "GP_5_1", "GP_5_2";
180		bias-pull-up;
181	};
182
183	scif_clk_pins: scif_clk {
184		groups = "scif_clk";
185		function = "scif_clk";
186	};
187};
188
189&scif_clk {
190	clock-frequency = <24000000>;
191};
192
193&rwdt {
194	timeout-sec = <60>;
195	status = "okay";
196};
197