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