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/r7fa6m4af3cfb.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_ra6m4-pinctrl.dtsi"
14
15/ {
16	model = "Renesas EK-RA6M4";
17	compatible = "renesas,ra6m4", "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 = <&ioport4 15 GPIO_ACTIVE_HIGH>;
30			label = "LED1";
31		};
32		led2: led2 {
33			gpios = <&ioport4 4 GPIO_ACTIVE_HIGH>;
34			label = "LED2";
35		};
36		led3: led3 {
37			gpios = <&ioport4 0 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 6 (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&ioport4 {
95	status = "okay";
96};
97
98&xtal {
99	clock-frequency = <DT_FREQ_M(24)>;
100	mosel = <0>;
101	#clock-cells = <0>;
102	status = "okay";
103};
104
105&subclk {
106	status = "okay";
107};
108
109&pll {
110	clocks = <&xtal>;
111	div = <3>;
112	mul = <25 0>;
113	status = "okay";
114};
115
116&pclka {
117	clocks = <&pll>;
118	div = <2>;
119	status = "okay";
120};
121
122&adc0 {
123	status = "okay";
124	pinctrl-0 = <&adc0_default>;
125	pinctrl-names = "default";
126};
127
128&port_irq10 {
129	interrupts = <41 12>;
130	status = "okay";
131};
132
133&port_irq11 {
134	interrupts = <42 12>;
135	status = "okay";
136};
137
138&pwm1 {
139	pinctrl-0 = <&pwm1_default>;
140	pinctrl-names = "default";
141	interrupts = <63 1>, <64 1>;
142	interrupt-names = "gtioca", "overflow";
143	status = "okay";
144};
145