1e4d755cfSYoshihiro Shimoda// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2e4d755cfSYoshihiro Shimoda/*
3e4d755cfSYoshihiro Shimoda * Device Tree Source for the White Hawk CPU board
4e4d755cfSYoshihiro Shimoda *
5e4d755cfSYoshihiro Shimoda * Copyright (C) 2022 Renesas Electronics Corp.
6e4d755cfSYoshihiro Shimoda */
7e4d755cfSYoshihiro Shimoda
8e4d755cfSYoshihiro Shimoda#include "r8a779g0.dtsi"
9e4d755cfSYoshihiro Shimoda
1060dc0e87SGeert Uytterhoeven#include <dt-bindings/gpio/gpio.h>
116672f840SGeert Uytterhoeven#include <dt-bindings/input/input.h>
1260dc0e87SGeert Uytterhoeven#include <dt-bindings/leds/common.h>
1360dc0e87SGeert Uytterhoeven
14e4d755cfSYoshihiro Shimoda/ {
15e4d755cfSYoshihiro Shimoda	model = "Renesas White Hawk CPU board";
16e4d755cfSYoshihiro Shimoda	compatible = "renesas,white-hawk-cpu", "renesas,r8a779g0";
17e4d755cfSYoshihiro Shimoda
187bb9e424SGeert Uytterhoeven	aliases {
1996f7071dSGeert Uytterhoeven		ethernet0 = &avb0;
207bb9e424SGeert Uytterhoeven		serial0 = &hscif0;
217bb9e424SGeert Uytterhoeven	};
227bb9e424SGeert Uytterhoeven
237bb9e424SGeert Uytterhoeven	chosen {
24f4b7dffdSKuninori Morimoto		bootargs = "ignore_loglevel rw root=/dev/nfs ip=on";
257bb9e424SGeert Uytterhoeven		stdout-path = "serial0:921600n8";
267bb9e424SGeert Uytterhoeven	};
277bb9e424SGeert Uytterhoeven
286672f840SGeert Uytterhoeven	keys {
296672f840SGeert Uytterhoeven		compatible = "gpio-keys";
306672f840SGeert Uytterhoeven
316672f840SGeert Uytterhoeven		pinctrl-0 = <&keys_pins>;
326672f840SGeert Uytterhoeven		pinctrl-names = "default";
336672f840SGeert Uytterhoeven
346672f840SGeert Uytterhoeven		key-1 {
356672f840SGeert Uytterhoeven			gpios = <&gpio5 0 GPIO_ACTIVE_LOW>;
366672f840SGeert Uytterhoeven			linux,code = <KEY_1>;
376672f840SGeert Uytterhoeven			label = "SW47";
386672f840SGeert Uytterhoeven			wakeup-source;
396672f840SGeert Uytterhoeven			debounce-interval = <20>;
406672f840SGeert Uytterhoeven		};
416672f840SGeert Uytterhoeven
426672f840SGeert Uytterhoeven		key-2 {
436672f840SGeert Uytterhoeven			gpios = <&gpio5 1 GPIO_ACTIVE_LOW>;
446672f840SGeert Uytterhoeven			linux,code = <KEY_2>;
456672f840SGeert Uytterhoeven			label = "SW48";
466672f840SGeert Uytterhoeven			wakeup-source;
476672f840SGeert Uytterhoeven			debounce-interval = <20>;
486672f840SGeert Uytterhoeven		};
496672f840SGeert Uytterhoeven
506672f840SGeert Uytterhoeven		key-3 {
516672f840SGeert Uytterhoeven			gpios = <&gpio5 2 GPIO_ACTIVE_LOW>;
526672f840SGeert Uytterhoeven			linux,code = <KEY_3>;
536672f840SGeert Uytterhoeven			label = "SW49";
546672f840SGeert Uytterhoeven			wakeup-source;
556672f840SGeert Uytterhoeven			debounce-interval = <20>;
566672f840SGeert Uytterhoeven		};
576672f840SGeert Uytterhoeven	};
586672f840SGeert Uytterhoeven
5960dc0e87SGeert Uytterhoeven	leds {
6060dc0e87SGeert Uytterhoeven		compatible = "gpio-leds";
6160dc0e87SGeert Uytterhoeven
6260dc0e87SGeert Uytterhoeven		led-1 {
6360dc0e87SGeert Uytterhoeven			gpios = <&gpio7 0 GPIO_ACTIVE_HIGH>;
6460dc0e87SGeert Uytterhoeven			color = <LED_COLOR_ID_GREEN>;
6560dc0e87SGeert Uytterhoeven			function = LED_FUNCTION_INDICATOR;
6660dc0e87SGeert Uytterhoeven			function-enumerator = <1>;
6760dc0e87SGeert Uytterhoeven		};
6860dc0e87SGeert Uytterhoeven
6960dc0e87SGeert Uytterhoeven		led-2 {
7060dc0e87SGeert Uytterhoeven			gpios = <&gpio7 1 GPIO_ACTIVE_HIGH>;
7160dc0e87SGeert Uytterhoeven			color = <LED_COLOR_ID_GREEN>;
7260dc0e87SGeert Uytterhoeven			function = LED_FUNCTION_INDICATOR;
7360dc0e87SGeert Uytterhoeven			function-enumerator = <2>;
7460dc0e87SGeert Uytterhoeven		};
7560dc0e87SGeert Uytterhoeven
7660dc0e87SGeert Uytterhoeven		led-3 {
7760dc0e87SGeert Uytterhoeven			gpios = <&gpio7 2 GPIO_ACTIVE_HIGH>;
7860dc0e87SGeert Uytterhoeven			color = <LED_COLOR_ID_GREEN>;
7960dc0e87SGeert Uytterhoeven			function = LED_FUNCTION_INDICATOR;
8060dc0e87SGeert Uytterhoeven			function-enumerator = <3>;
8160dc0e87SGeert Uytterhoeven		};
8260dc0e87SGeert Uytterhoeven	};
8360dc0e87SGeert Uytterhoeven
84e4d755cfSYoshihiro Shimoda	memory@48000000 {
85e4d755cfSYoshihiro Shimoda		device_type = "memory";
86e4d755cfSYoshihiro Shimoda		/* first 128MB is reserved for secure area. */
87e4d755cfSYoshihiro Shimoda		reg = <0x0 0x48000000 0x0 0x78000000>;
88e4d755cfSYoshihiro Shimoda	};
89e4d755cfSYoshihiro Shimoda
90e4d755cfSYoshihiro Shimoda	memory@480000000 {
91e4d755cfSYoshihiro Shimoda		device_type = "memory";
92e4d755cfSYoshihiro Shimoda		reg = <0x4 0x80000000 0x0 0x80000000>;
93e4d755cfSYoshihiro Shimoda	};
94e4d755cfSYoshihiro Shimoda
95e4d755cfSYoshihiro Shimoda	memory@600000000 {
96e4d755cfSYoshihiro Shimoda		device_type = "memory";
97e4d755cfSYoshihiro Shimoda		reg = <0x6 0x00000000 0x1 0x00000000>;
98e4d755cfSYoshihiro Shimoda	};
99e4d755cfSYoshihiro Shimoda};
100e4d755cfSYoshihiro Shimoda
10196f7071dSGeert Uytterhoeven&avb0 {
10296f7071dSGeert Uytterhoeven	pinctrl-0 = <&avb0_pins>;
10396f7071dSGeert Uytterhoeven	pinctrl-names = "default";
10496f7071dSGeert Uytterhoeven	phy-handle = <&phy0>;
10596f7071dSGeert Uytterhoeven	tx-internal-delay-ps = <2000>;
10696f7071dSGeert Uytterhoeven	status = "okay";
10796f7071dSGeert Uytterhoeven
10896f7071dSGeert Uytterhoeven	phy0: ethernet-phy@0 {
10996f7071dSGeert Uytterhoeven		compatible = "ethernet-phy-id0022.1622",
11096f7071dSGeert Uytterhoeven			     "ethernet-phy-ieee802.3-c22";
11196f7071dSGeert Uytterhoeven		rxc-skew-ps = <1500>;
11296f7071dSGeert Uytterhoeven		reg = <0>;
11396f7071dSGeert Uytterhoeven		interrupt-parent = <&gpio7>;
11496f7071dSGeert Uytterhoeven		interrupts = <5 IRQ_TYPE_LEVEL_LOW>;
11596f7071dSGeert Uytterhoeven		reset-gpios = <&gpio7 10 GPIO_ACTIVE_LOW>;
11696f7071dSGeert Uytterhoeven	};
11796f7071dSGeert Uytterhoeven};
11896f7071dSGeert Uytterhoeven
119e4d755cfSYoshihiro Shimoda&extal_clk {
120e4d755cfSYoshihiro Shimoda	clock-frequency = <16666666>;
121e4d755cfSYoshihiro Shimoda};
122e4d755cfSYoshihiro Shimoda
123e4d755cfSYoshihiro Shimoda&extalr_clk {
124e4d755cfSYoshihiro Shimoda	clock-frequency = <32768>;
125e4d755cfSYoshihiro Shimoda};
126e4d755cfSYoshihiro Shimoda
127e4d755cfSYoshihiro Shimoda&hscif0 {
128e4d755cfSYoshihiro Shimoda	status = "okay";
129e4d755cfSYoshihiro Shimoda};
130e4d755cfSYoshihiro Shimoda
13177643815SGeert Uytterhoeven&i2c0 {
13277643815SGeert Uytterhoeven	pinctrl-0 = <&i2c0_pins>;
13377643815SGeert Uytterhoeven	pinctrl-names = "default";
13477643815SGeert Uytterhoeven
13577643815SGeert Uytterhoeven	status = "okay";
13677643815SGeert Uytterhoeven	clock-frequency = <400000>;
13777643815SGeert Uytterhoeven
138*92378fd2SGeert Uytterhoeven	io_expander_a: gpio@20 {
139*92378fd2SGeert Uytterhoeven		compatible = "onnn,pca9654";
140*92378fd2SGeert Uytterhoeven		reg = <0x20>;
141*92378fd2SGeert Uytterhoeven		interrupt-parent = <&gpio0>;
142*92378fd2SGeert Uytterhoeven		interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
143*92378fd2SGeert Uytterhoeven		gpio-controller;
144*92378fd2SGeert Uytterhoeven		#gpio-cells = <2>;
145*92378fd2SGeert Uytterhoeven		interrupt-controller;
146*92378fd2SGeert Uytterhoeven		#interrupt-cells = <2>;
147*92378fd2SGeert Uytterhoeven	};
148*92378fd2SGeert Uytterhoeven
14977643815SGeert Uytterhoeven	eeprom@50 {
15077643815SGeert Uytterhoeven		compatible = "rohm,br24g01", "atmel,24c01";
15177643815SGeert Uytterhoeven		label = "cpu-board";
15277643815SGeert Uytterhoeven		reg = <0x50>;
15377643815SGeert Uytterhoeven		pagesize = <8>;
15477643815SGeert Uytterhoeven	};
15577643815SGeert Uytterhoeven};
15677643815SGeert Uytterhoeven
1577a8d590dSGeert Uytterhoeven&pfc {
1587a8d590dSGeert Uytterhoeven	pinctrl-0 = <&scif_clk_pins>;
1597a8d590dSGeert Uytterhoeven	pinctrl-names = "default";
1607a8d590dSGeert Uytterhoeven
16196f7071dSGeert Uytterhoeven	avb0_pins: avb0 {
16296f7071dSGeert Uytterhoeven		mux {
16396f7071dSGeert Uytterhoeven			groups = "avb0_link", "avb0_mdio", "avb0_rgmii",
16496f7071dSGeert Uytterhoeven				 "avb0_txcrefclk";
16596f7071dSGeert Uytterhoeven			function = "avb0";
16696f7071dSGeert Uytterhoeven		};
16796f7071dSGeert Uytterhoeven
16896f7071dSGeert Uytterhoeven		pins_mdio {
16996f7071dSGeert Uytterhoeven			groups = "avb0_mdio";
17096f7071dSGeert Uytterhoeven			drive-strength = <21>;
17196f7071dSGeert Uytterhoeven		};
17296f7071dSGeert Uytterhoeven
17396f7071dSGeert Uytterhoeven		pins_mii {
17496f7071dSGeert Uytterhoeven			groups = "avb0_rgmii";
17596f7071dSGeert Uytterhoeven			drive-strength = <21>;
17696f7071dSGeert Uytterhoeven		};
17796f7071dSGeert Uytterhoeven
17896f7071dSGeert Uytterhoeven	};
1797a8d590dSGeert Uytterhoeven	hscif0_pins: hscif0 {
1807a8d590dSGeert Uytterhoeven		groups = "hscif0_data";
1817a8d590dSGeert Uytterhoeven		function = "hscif0";
1827a8d590dSGeert Uytterhoeven	};
1837a8d590dSGeert Uytterhoeven
18477643815SGeert Uytterhoeven	i2c0_pins: i2c0 {
18577643815SGeert Uytterhoeven		groups = "i2c0";
18677643815SGeert Uytterhoeven		function = "i2c0";
18777643815SGeert Uytterhoeven	};
18877643815SGeert Uytterhoeven
1896672f840SGeert Uytterhoeven	keys_pins: keys {
1906672f840SGeert Uytterhoeven		pins = "GP_5_0", "GP_5_1", "GP_5_2";
1916672f840SGeert Uytterhoeven		bias-pull-up;
1926672f840SGeert Uytterhoeven	};
1936672f840SGeert Uytterhoeven
1947a8d590dSGeert Uytterhoeven	scif_clk_pins: scif_clk {
1957a8d590dSGeert Uytterhoeven		groups = "scif_clk";
1967a8d590dSGeert Uytterhoeven		function = "scif_clk";
1977a8d590dSGeert Uytterhoeven	};
1987a8d590dSGeert Uytterhoeven};
1997a8d590dSGeert Uytterhoeven
200e4d755cfSYoshihiro Shimoda&scif_clk {
201e4d755cfSYoshihiro Shimoda	clock-frequency = <24000000>;
202e4d755cfSYoshihiro Shimoda};
203495e36c3SGeert Uytterhoeven
204495e36c3SGeert Uytterhoeven&rwdt {
205495e36c3SGeert Uytterhoeven	timeout-sec = <60>;
206495e36c3SGeert Uytterhoeven	status = "okay";
207495e36c3SGeert Uytterhoeven};
208