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