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/r7fa6m2af3cfb.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_ra6m2-pinctrl.dtsi"
14
15/ {
16	model = "Renesas EK-RA6M2";
17	compatible = "renesas,ra6m2", "renesas,ra";
18
19	chosen {
20		zephyr,sram = &sram0;
21		zephyr,flash = &flash0;
22		zephyr,console = &uart7;
23		zephyr,shell-uart = &uart7;
24		zephyr,entropy = &trng;
25	};
26
27	leds {
28		compatible = "gpio-leds";
29		led1: led1 {
30			gpios = <&ioport1 6 GPIO_ACTIVE_HIGH>;
31			label = "LED1";
32		};
33	};
34
35	buttons {
36		compatible = "gpio-keys";
37		button0: s1 {
38			gpios = <&ioport1 5 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
39			label = "Push button switch 1";
40			zephyr,code = <INPUT_KEY_0>;
41		};
42	};
43
44	aliases {
45		led0 = &led1;
46		sw0 = &button0;
47	};
48};
49
50&sci7 {
51	pinctrl-0 = <&sci7_default>;
52	pinctrl-names = "default";
53	status = "okay";
54	uart7: uart {
55		current-speed = <115200>;
56		status = "okay";
57	};
58};
59
60&iic2 {
61	status = "okay";
62	#address-cells = <1>;
63	#size-cells = <0>;
64	interrupts = <91 1>, <92 1>, <93 1>, <94 1>;
65	interrupt-names = "rxi", "txi", "tei", "eri";
66	clock-frequency = <DT_FREQ_M(1)>;
67	pinctrl-0 = <&iic2_default>;
68	pinctrl-names = "default";
69};
70
71&spi0 {
72	pinctrl-0 = <&spi0_default>;
73	pinctrl-names = "default";
74	status = "okay";
75};
76
77&ioport1 {
78	status = "okay";
79};
80
81&xtal {
82	clock-frequency = <DT_FREQ_M(12)>;
83	mosel = <0>;
84	#clock-cells = <0>;
85	status = "okay";
86};
87
88&subclk {
89	status = "okay";
90};
91
92&pll {
93	clocks = <&xtal>;
94	div = <1>;
95	mul = <20 0>;
96	status = "okay";
97};
98
99&trng {
100	status ="okay";
101};
102
103&adc0 {
104	status = "okay";
105	pinctrl-0 = <&adc0_default>;
106	pinctrl-names = "default";
107};
108
109&port_irq0 {
110	interrupts = <41 12>;
111	status = "okay";
112};
113
114&pwm1 {
115	pinctrl-0 = <&pwm1_default>;
116	pinctrl-names = "default";
117	interrupts = <63 1>, <64 1>;
118	interrupt-names = "gtioca", "overflow";
119	status = "okay";
120};
121