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		serial0 = &hscif0;
20	};
21
22	chosen {
23		stdout-path = "serial0:921600n8";
24	};
25
26	keys {
27		compatible = "gpio-keys";
28
29		pinctrl-0 = <&keys_pins>;
30		pinctrl-names = "default";
31
32		key-1 {
33			gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
34			linux,code = <KEY_1>;
35			label = "SW47";
36			wakeup-source;
37			debounce-interval = <20>;
38		};
39
40		key-2 {
41			gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
42			linux,code = <KEY_2>;
43			label = "SW48";
44			wakeup-source;
45			debounce-interval = <20>;
46		};
47
48		key-3 {
49			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
50			linux,code = <KEY_3>;
51			label = "SW49";
52			wakeup-source;
53			debounce-interval = <20>;
54		};
55	};
56
57	leds {
58		compatible = "gpio-leds";
59
60		led-1 {
61			gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
62			color = <LED_COLOR_ID_GREEN>;
63			function = LED_FUNCTION_INDICATOR;
64			function-enumerator = <1>;
65		};
66
67		led-2 {
68			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
69			color = <LED_COLOR_ID_GREEN>;
70			function = LED_FUNCTION_INDICATOR;
71			function-enumerator = <2>;
72		};
73
74		led-3 {
75			gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
76			color = <LED_COLOR_ID_GREEN>;
77			function = LED_FUNCTION_INDICATOR;
78			function-enumerator = <3>;
79		};
80	};
81
82	memory@48000000 {
83		device_type = "memory";
84		/* first 128MB is reserved for secure area. */
85		reg = <0x0 0x48000000 0x0 0x78000000>;
86	};
87
88	memory@480000000 {
89		device_type = "memory";
90		reg = <0x4 0x80000000 0x0 0x80000000>;
91	};
92
93	memory@600000000 {
94		device_type = "memory";
95		reg = <0x6 0x00000000 0x1 0x00000000>;
96	};
97};
98
99&extal_clk {
100	clock-frequency = <16666666>;
101};
102
103&extalr_clk {
104	clock-frequency = <32768>;
105};
106
107&hscif0 {
108	status = "okay";
109};
110
111&i2c0 {
112	pinctrl-0 = <&i2c0_pins>;
113	pinctrl-names = "default";
114
115	status = "okay";
116	clock-frequency = <400000>;
117
118	eeprom@50 {
119		compatible = "rohm,br24g01", "atmel,24c01";
120		label = "cpu-board";
121		reg = <0x50>;
122		pagesize = <8>;
123	};
124};
125
126&pfc {
127	pinctrl-0 = <&scif_clk_pins>;
128	pinctrl-names = "default";
129
130	hscif0_pins: hscif0 {
131		groups = "hscif0_data";
132		function = "hscif0";
133	};
134
135	i2c0_pins: i2c0 {
136		groups = "i2c0";
137		function = "i2c0";
138	};
139
140	keys_pins: keys {
141		pins = "GP_5_0", "GP_5_1", "GP_5_2";
142		bias-pull-up;
143	};
144
145	scif_clk_pins: scif_clk {
146		groups = "scif_clk";
147		function = "scif_clk";
148	};
149};
150
151&scif_clk {
152	clock-frequency = <24000000>;
153};
154
155&rwdt {
156	timeout-sec = <60>;
157	status = "okay";
158};
159