1/*
2 * Copyright (c) 2023 Renesas Electronics Corporation and/or its affiliates
3 * SPDX-License-Identifier: Apache-2.0
4 */
5
6/dts-v1/;
7#include <renesas/smartbond/da14695.dtsi>
8#include "da14695_dk_usb-pinctrl.dtsi"
9#include <zephyr/dt-bindings/input/input-event-codes.h>
10
11/ {
12	model = "DA14695 series Development Kit USB";
13	compatible = "renesas,da14695_dk_usb";
14	#address-cells = <1>;
15	#size-cells = <1>;
16
17	chosen {
18		zephyr,sram = &sram0;
19		zephyr,flash = &flash0;
20		zephyr,console = &uart;
21		zephyr,shell-uart = &uart;
22		zephyr,code-partition = &slot0_partition;
23	};
24
25	leds {
26		compatible = "gpio-leds";
27		red_led: led_0 {
28			gpios = <&gpio1 1 GPIO_ACTIVE_HIGH>;
29		};
30	};
31
32	buttons {
33		compatible = "gpio-keys";
34		button0: button_0 {
35			gpios = <&gpio0 6 (GPIO_PULL_DOWN | GPIO_ACTIVE_HIGH)>;
36			label = "Push button switch K1";
37			zephyr,code = <INPUT_KEY_0>;
38		};
39	};
40
41	mikrobus_1_header: mikrobus-connector-1 {
42		compatible = "mikro-bus";
43		#gpio-cells = <2>;
44		gpio-map-mask = <0xffffffff 0xffffffc0>;
45		gpio-map-pass-thru = <0 0x3f>;
46		gpio-map =	<0 0 &gpio1 9 0>,	/* AN  */
47				<1 0 &gpio0 12 0>,	/* RST */
48				<2 0 &gpio0 20 0>,	/* CS   */
49				<3 0 &gpio0 21 0>,	/* SCK  */
50				<4 0 &gpio0 24 0>,	/* MISO */
51				<5 0 &gpio0 26 0>,	/* MOSI */
52							/* +3.3V */
53							/* GND */
54				<6 0 &gpio1 1 0>,	/* PWM  */
55				<7 0 &gpio0 27 0>,	/* INT  */
56				<8 0 &gpio0 28 0>,	/* RX   */
57				<9 0 &gpio0 29 0>,	/* TX   */
58				<10 0 &gpio0 30 0>,	/* SCL  */
59				<11 0 &gpio0 31 0>;	/* SDA  */
60							/* +5V */
61							/* GND */
62	};
63
64	mikrobus_2_header: mikrobus-connector-2 {
65		compatible = "mikro-bus";
66		#gpio-cells = <2>;
67		gpio-map-mask = <0xffffffff 0xffffffc0>;
68		gpio-map-pass-thru = <0 0x3f>;
69		gpio-map =	<0 0 &gpio0 25 0>,	/* AN  */
70				<1 0 &gpio0 12 0>,	/* RST */
71				<2 0 &gpio1 2 0>,	/* CS   */
72				<3 0 &gpio1 3 0>,	/* SCK  */
73				<4 0 &gpio1 4 0>,	/* MISO */
74				<5 0 &gpio1 5 0>,	/* MOSI */
75							/* +3.3V */
76							/* GND */
77				<6 0 &gpio1 6 0>,	/* PWM  */
78				<7 0 &gpio1 7 0>,	/* INT  */
79				<8 0 &gpio1 8 0>,	/* RX   */
80				<9 0 &gpio0 17 0>,	/* TX   */
81				<10 0 &gpio0 18 0>,	/* SCL  */
82				<11 0 &gpio0 19 0>;	/* SDA  */
83							/* +5V */
84							/* GND */
85	};
86
87	aliases {
88		led0 = &red_led;
89		watchdog0 = &wdog;
90	};
91
92	sysclk: system-clock {
93		compatible = "fixed-clock";
94		clock-frequency = <32000000>;
95		#clock-cells = <0>;
96	};
97};
98
99&flash0 {
100	reg = <0x16000000 DT_SIZE_M(1)>;
101
102	partitions {
103		compatible = "fixed-partitions";
104		#address-cells = <1>;
105		#size-cells = <1>;
106
107		/*
108		 * Flash area from 0x0000 to 0x2400 is reserved
109		 * for product header added by flasher.
110		 */
111
112		boot_partition: partition@2400 {
113			label = "mcuboot";
114			reg = <0x000002400 0x00009c00>;
115		};
116		slot0_partition: partition@c000 {
117			label = "image-0";
118			reg = <0x0000c000 0x00076000>;
119		};
120		slot1_partition: partition@82000 {
121			label = "image-1";
122			reg = <0x00082000 0x00076000>;
123		};
124		storage_partition: partition@f8000 {
125			label = "storage";
126			reg = <0x000f8000 0x00008000>;
127		};
128	};
129};
130
131&gpio0 {
132	status = "okay";
133};
134
135&gpio1 {
136	status = "okay";
137};
138
139&uart {
140	current-speed = <115200>;
141	status = "okay";
142	pinctrl-0 = <&uart_default>;
143	pinctrl-names = "default";
144};
145
146&uart2 {
147	current-speed = <115200>;
148	status = "okay";
149	pinctrl-0 = <&uart2_default>;
150	pinctrl-names = "default";
151};
152
153&uart3 {
154	current-speed = <115200>;
155	status = "okay";
156	pinctrl-0 = <&uart3_default>;
157	pinctrl-names = "default";
158};
159
160zephyr_udc0: &usbd {
161	compatible = "renesas,smartbond-usbd";
162	status = "okay";
163};
164
165&rc32m {
166	status = "disabled";
167};
168
169&xtal32m {
170	status = "okay";
171};
172
173&xtal32k {
174	status = "okay";
175};
176
177&lp_clk {
178	clock-src = <&xtal32k>;
179};
180
181&sys_clk {
182	clock-src = <&xtal32m>;
183};
184
185&pll {
186	status = "okay";
187};
188
189&i2c {
190	status = "okay";
191	pinctrl-0 = <&i2c_default>;
192	pinctrl-1 = <&i2c_sleep>;
193	pinctrl-names = "default", "sleep";
194};
195
196&i2c2 {
197	status = "okay";
198	pinctrl-0 = <&i2c2_default>;
199	pinctrl-1 = <&i2c2_sleep>;
200	pinctrl-names = "default", "sleep";
201};
202
203&spi {
204	status = "okay";
205	pinctrl-0 = <&spi_controller>;
206	pinctrl-1 = <&spi_sleep>;
207	pinctrl-names = "default", "sleep";
208};
209
210&spi2 {
211	status = "okay";
212	pinctrl-0 = <&spi2_controller>;
213	pinctrl-1 = <&spi2_sleep>;
214	pinctrl-names = "default", "sleep";
215};
216
217mikrobus_1_i2c: &i2c {};
218
219mikrobus_1_spi: &spi {};
220
221mikrobus_1_uart: &uart3 {};
222
223mikrobus_2_i2c: &i2c2 {};
224
225mikrobus_2_spi: &spi2 {};
226
227mikrobus_2_uart: &uart2 {};
228
229mikrobus_i2c: &mikrobus_1_i2c {};
230
231mikrobus_spi: &mikrobus_1_spi {};
232
233mikrobus_serial: &mikrobus_1_uart {};
234
235mikrobus_header: &mikrobus_1_header {};
236