1/*
2 * Copyright (c) 2024 Renesas Electronics Corporation
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6/dts-v1/;
7
8#include <renesas/ra/ra6/r7fa6m3ah3cfc.dtsi>
9#include <dt-bindings/gpio/gpio.h>
10#include <dt-bindings/input/input-event-codes.h>
11#include <zephyr/dt-bindings/adc/adc.h>
12
13#include "ek_ra6m3-pinctrl.dtsi"
14
15/ {
16	model = "Renesas EK-RA6M3";
17	compatible = "renesas,ra6m3", "renesas,ra";
18
19	chosen {
20		zephyr,sram = &sram0;
21		zephyr,console = &uart8;
22		zephyr,shell-uart = &uart8;
23		zephyr,flash = &flash0;
24		zephyr,entropy = &trng;
25	};
26
27	leds {
28		compatible = "gpio-leds";
29		led1: led1 {
30			gpios = <&ioport4 3 GPIO_ACTIVE_HIGH>;
31			label = "LED1";
32		};
33		led2: led2 {
34			gpios = <&ioport4 0 GPIO_ACTIVE_HIGH>;
35			label = "LED2";
36		};
37		led3: led3 {
38			gpios = <&ioport1 0 GPIO_ACTIVE_HIGH>;
39			label = "LED3";
40		};
41	};
42
43	buttons {
44		compatible = "gpio-keys";
45		button0: s1 {
46			gpios = <&ioport0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
47			label = "Push button switch 1";
48			zephyr,code = <INPUT_KEY_0>;
49		};
50		button1: s2 {
51			gpios = <&ioport0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
52			label = "Push button switch 2";
53			zephyr,code = <INPUT_KEY_1>;
54		};
55	};
56
57	aliases {
58		led0 = &led1;
59		sw0 = &button0;
60		sw1 = &button1;
61	};
62};
63
64&spi0 {
65	pinctrl-0 = <&spi0_default>;
66	pinctrl-names = "default";
67	status = "okay";
68};
69
70&ioport0 {
71	status = "okay";
72};
73
74&ioport1 {
75	status = "okay";
76};
77
78&ioport4 {
79	status = "okay";
80};
81
82&sci8 {
83	pinctrl-0 = <&sci8_default>;
84	pinctrl-names = "default";
85	status = "okay";
86	uart8: uart {
87		current-speed = <115200>;
88		status = "okay";
89	};
90};
91
92&iic2 {
93	status = "okay";
94	#address-cells = <1>;
95	#size-cells = <0>;
96	interrupts = <91 1>, <92 1>, <93 1>, <94 1>;
97	interrupt-names = "rxi", "txi", "tei", "eri";
98	clock-frequency = <DT_FREQ_M(1)>;
99	pinctrl-0 = <&iic2_default>;
100	pinctrl-names = "default";
101};
102
103&xtal {
104	clock-frequency = <DT_FREQ_M(24)>;
105	mosel = <0>;
106	#clock-cells = <0>;
107	status = "okay";
108};
109
110&subclk {
111	status = "okay";
112};
113
114&pll {
115	clocks = <&xtal>;
116	div = <2>;
117	mul = <20 0>;
118	status = "okay";
119};
120
121&trng {
122	status ="okay";
123};
124
125&usbhs {
126	pinctrl-0 = <&usbhs_default>;
127	pinctrl-names = "default";
128	maximum-speed = "high-speed";
129	status = "okay";
130	zephyr_udc0: udc {
131		status = "okay";
132	};
133};
134
135&usbhs_phy {
136	phys-clock-src = "xtal";
137};
138
139&adc0 {
140	status = "okay";
141	pinctrl-0 = <&adc0_default>;
142	pinctrl-names = "default";
143};
144
145&port_irq12 {
146	interrupts = <41 12>;
147	status = "okay";
148};
149
150&port_irq13 {
151	interrupts = <42 12>;
152	status = "okay";
153};
154
155&pwm1 {
156	pinctrl-0 = <&pwm1_default>;
157	pinctrl-names = "default";
158	interrupts = <63 1>, <64 1>;
159	interrupt-names = "gtioca", "overflow";
160	status = "okay";
161};
162