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/r7fa6m5bh3cfc.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_ra6m5-pinctrl.dtsi"
14
15/ {
16	model = "Renesas EK-RA6M5";
17	compatible = "renesas,ra6m5", "renesas,ra";
18
19	chosen {
20		zephyr,sram = &sram0;
21		zephyr,flash = &flash0;
22		zephyr,console = &uart0;
23		zephyr,shell-uart = &uart0;
24	};
25
26	leds {
27		compatible = "gpio-leds";
28		led1: led1 {
29			gpios = <&ioport0 6 GPIO_ACTIVE_HIGH>;
30			label = "LED1";
31		};
32		led2: led2 {
33			gpios = <&ioport0 7 GPIO_ACTIVE_HIGH>;
34			label = "LED2";
35		};
36		led3: led3 {
37			gpios = <&ioport0 8 GPIO_ACTIVE_HIGH>;
38			label = "LED3";
39		};
40	};
41
42	buttons {
43		compatible = "gpio-keys";
44		button0: s1 {
45			gpios = <&ioport0 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
46			label = "Push button switch 1";
47			zephyr,code = <INPUT_KEY_0>;
48		};
49		button1: s2 {
50			gpios = <&ioport0 4 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
51			label = "Push button switch 2";
52			zephyr,code = <INPUT_KEY_1>;
53		};
54	};
55
56	aliases {
57		led0 = &led1;
58		sw0 = &button0;
59		sw1 = &button1;
60	};
61};
62
63&sci0 {
64	pinctrl-0 = <&sci0_default>;
65	pinctrl-names = "default";
66	status = "okay";
67	uart0: uart {
68		current-speed = <115200>;
69		status = "okay";
70	};
71};
72
73&iic1 {
74	status = "okay";
75	#address-cells = <1>;
76	#size-cells = <0>;
77	interrupts = <91 1>, <92 1>, <93 1>, <94 1>;
78	interrupt-names = "rxi", "txi", "tei", "eri";
79	clock-frequency = <DT_FREQ_M(1)>;
80	pinctrl-0 = <&iic1_default>;
81	pinctrl-names = "default";
82};
83
84&spi0 {
85	pinctrl-0 = <&spi0_default>;
86	pinctrl-names = "default";
87	status = "okay";
88};
89
90&ioport0 {
91	status = "okay";
92};
93
94&xtal {
95	clock-frequency = <DT_FREQ_M(24)>;
96	mosel = <0>;
97	#clock-cells = <0>;
98	status = "okay";
99};
100
101&subclk {
102	status = "okay";
103};
104
105&pll {
106	clocks = <&xtal>;
107	div = <3>;
108	mul = <25 0>;
109	status = "okay";
110};
111
112&usbhs {
113	pinctrl-0 = <&usbhs_default>;
114	pinctrl-names = "default";
115	maximum-speed = "high-speed";
116	status = "okay";
117	zephyr_udc0: udc {
118		status = "okay";
119	};
120};
121
122&usbhs_phy {
123	phys-clock-src = "xtal";
124};
125
126&adc0 {
127	status = "okay";
128	pinctrl-0 = <&adc0_default>;
129	pinctrl-names = "default";
130};
131
132&port_irq9 {
133	interrupts = <41 12>;
134	status = "okay";
135};
136
137&port_irq10 {
138	interrupts = <42 12>;
139	status = "okay";
140};
141
142&pwm1 {
143	pinctrl-0 = <&pwm1_default>;
144	pinctrl-names = "default";
145	interrupts = <63 1>, <64 1>;
146	interrupt-names = "gtioca", "overflow";
147	status = "okay";
148};
149