1/*
2 * Copyright (c) 2022 Friedt Professional Engineering Services, Inc
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <espressif/esp32c3/esp32c3_fx4.dtsi>
10#include "icev_wireless-pinctrl.dtsi"
11#include <zephyr/dt-bindings/input/input-event-codes.h>
12
13/ {
14	model = "icev_wireless";
15	compatible = "espressif,esp32c3";
16
17	chosen {
18		zephyr,sram = &sram0;
19		zephyr,console = &usb_serial;
20		zephyr,shell-uart = &usb_serial;
21		zephyr,flash = &flash0;
22	};
23
24	aliases {
25		led0 = &led_green;
26		i2c-0 = &i2c0;
27		sw0 = &user_button1;
28		watchdog0 = &wdt0;
29	};
30
31	leds {
32		compatible = "gpio-leds";
33		led_green: led_0 {
34			gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;
35			label = "LED Green";
36		};
37	};
38
39	gpio_keys {
40		compatible = "gpio-keys";
41		user_button1: button_1 {
42			label = "User SW1";
43			gpios = <&gpio0 9 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
44			zephyr,code = <INPUT_KEY_0>;
45		};
46	};
47};
48
49&cpu0 {
50	clock-frequency = <ESP32_CLK_CPU_160M>;
51};
52
53&uart0 {
54	current-speed = <115200>;
55	pinctrl-0 = <&uart0_default>;
56	pinctrl-names = "default";
57};
58
59&usb_serial {
60	status = "okay";
61};
62
63&i2c0 {
64	clock-frequency = <I2C_BITRATE_STANDARD>;
65	pinctrl-0 = <&i2c0_default>;
66	pinctrl-names = "default";
67	status = "okay";
68};
69
70&trng0 {
71	status = "okay";
72};
73
74&spi2 {
75	status = "okay";
76	#address-cells = <1>;
77	#size-cells = <0>;
78	pinctrl-0 = <&spim2_default>;
79	pinctrl-names = "default";
80};
81
82&gpio0 {
83	status = "okay";
84};
85
86&wdt0 {
87	status = "okay";
88};
89
90&timer0 {
91	status = "okay";
92};
93
94&timer1 {
95	status = "okay";
96};
97
98&flash0 {
99	status = "okay";
100	partitions {
101		compatible = "fixed-partitions";
102		#address-cells = <1>;
103		#size-cells = <1>;
104
105		boot_partition: partition@0 {
106			label = "mcuboot";
107			reg = <0x00000000 0x0000F000>;
108			read-only;
109		};
110
111		slot0_partition: partition@10000 {
112			label = "image-0";
113			reg = <0x00010000 0x00100000>;
114		};
115
116		slot1_partition: partition@110000 {
117			label = "image-1";
118			reg = <0x00110000 0x00100000>;
119		};
120
121		scratch_partition: partition@210000 {
122			label = "image-scratch";
123			reg = <0x00210000 0x00040000>;
124		};
125
126		storage_partition: partition@250000 {
127			label = "storage";
128			reg = <0x00250000 0x00006000>;
129		};
130	};
131};
132