1/*
2 * Copyright (c) 2024 Analog Devices, Inc.
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7/dts-v1/;
8
9#include <adi/max32/max32670.dtsi>
10#include <adi/max32/max32670-pinctrl.dtsi>
11#include <zephyr/dt-bindings/gpio/adi-max32-gpio.h>
12#include <zephyr/dt-bindings/input/input-event-codes.h>
13
14/ {
15	model = "Analog Devices MAX32670EVKIT";
16	compatible = "adi,max32670evkit";
17
18	chosen {
19		zephyr,console = &uart0;
20		zephyr,shell-uart = &uart0;
21		zephyr,sram = &sram3;
22		zephyr,flash = &flash0;
23	};
24
25	leds {
26		compatible = "gpio-leds";
27		led1: led_1 {
28			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
29			label = "Red LED";
30		};
31		led2: led_2 {
32			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
33			label = "Blue LED";
34		};
35	};
36
37	buttons {
38		compatible = "gpio-keys";
39		pb1: pb1 {
40			gpios = <&gpio0 21 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
41			label = "SW2";
42			zephyr,code = <INPUT_KEY_0>;
43		};
44	};
45
46	/* These aliases are provided for compatibility with samples */
47	aliases {
48		led0 = &led1;
49		led1 = &led2;
50		sw0 = &pb1;
51		watchdog0 = &wdt0;
52	};
53};
54
55&uart0 {
56	pinctrl-0 = <&uart0a_tx_p0_9 &uart0a_rx_p0_8>;
57	pinctrl-names = "default";
58	current-speed = <115200>;
59	data-bits = <8>;
60	parity = "none";
61	status = "okay";
62};
63
64&clk_ipo {
65	status = "okay";
66};
67
68/*
69 * ERTCO is required for counter RTC
70 */
71&clk_ertco {
72	status = "okay";
73};
74
75&gpio0 {
76	status = "okay";
77};
78
79&gpio1 {
80	status = "okay";
81};
82
83&trng {
84	status = "okay";
85};
86
87&i2c0 {
88	status = "okay";
89	pinctrl-0 = <&i2c0_scl_p0_6 &i2c0_sda_p0_7>;
90	pinctrl-names = "default";
91};
92
93&dma0 {
94	status = "okay";
95};
96
97&wdt0 {
98	status = "okay";
99};
100
101&spi0 {
102	status = "okay";
103	pinctrl-0 = <&spi0_mosi_p0_3 &spi0_miso_p0_2 &spi0_sck_p0_4 &spi0_ss0_p0_5>;
104	pinctrl-names = "default";
105};
106
107&rtc_counter {
108	status = "okay";
109};
110