1/*
2 * Copyright (c) 2023 Raytac Corporation
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6#include "raytac_mdbt53v_db_40_nrf5340_cpuapp_common-pinctrl.dtsi"
7#include <zephyr/dt-bindings/input/input-event-codes.h>
8
9/ {
10
11	chosen {
12		zephyr,console = &uart0;
13		zephyr,shell-uart = &uart0;
14		zephyr,uart-mcumgr = &uart0;
15		zephyr,bt-mon-uart = &uart0;
16		zephyr,bt-c2h-uart = &uart0;
17		zephyr,bt-hci = &bt_hci_ipc0;
18		nordic,802154-spinel-ipc = &ipc0;
19		zephyr,ieee802154 = &ieee802154;
20	};
21
22	leds {
23		compatible = "gpio-leds";
24		led0: led_0 {
25			gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
26			label = "Green LED 0";
27		};
28	};
29
30	pwmleds {
31		compatible = "pwm-leds";
32		pwm_led0: pwm_led_0 {
33			pwms = <&pwm0 0 PWM_MSEC(20) PWM_POLARITY_INVERTED>;
34		};
35	};
36
37	buttons {
38		compatible = "gpio-keys";
39		button0: button_0 {
40			gpios = <&gpio0 24 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
41			label = "Push button 1";
42			zephyr,code = <INPUT_KEY_0>;
43		};
44		button1: button_1 {
45			gpios = <&gpio0 8 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
46			label = "Push button 2";
47			zephyr,code = <INPUT_KEY_1>;
48		};
49		button2: button_2 {
50			gpios = <&gpio0 23 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
51			label = "Push button 3";
52			zephyr,code = <INPUT_KEY_2>;
53		};
54	};
55
56	gpio_fwd: nrf-gpio-forwarder {
57		compatible = "nordic,nrf-gpio-forwarder";
58		status = "okay";
59		uart {
60			gpios = <&gpio1 1 0>, <&gpio1 0 0>, <&gpio0 11 0>, <&gpio0 10 0>;
61		};
62	};
63
64	/* These aliases are provided for compatibility with samples */
65	aliases {
66		led0 = &led0;
67		pwm-led0 = &pwm_led0;
68		sw0 = &button0;
69		sw1 = &button1;
70		sw2 = &button2;
71		bootloader-led0 = &led0;
72		mcuboot-button0 = &button0;
73		mcuboot-led0 = &led0;
74		watchdog0 = &wdt0;
75	};
76};
77
78&vregmain {
79	regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
80};
81
82&vregradio {
83	regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
84};
85
86&vregh {
87	status = "okay";
88};
89
90&lfxo {
91	load-capacitors = "internal";
92	load-capacitance-picofarad = <7>;
93};
94
95&adc {
96	status = "okay";
97};
98
99&gpiote {
100	status = "okay";
101};
102
103&gpio0 {
104	status = "okay";
105};
106
107&gpio1 {
108	status = "okay";
109};
110
111&i2c1 {
112	compatible = "nordic,nrf-twim";
113	status = "okay";
114	pinctrl-0 = <&i2c1_default>;
115	pinctrl-1 = <&i2c1_sleep>;
116	pinctrl-names = "default", "sleep";
117};
118
119&uart0 {
120	status = "okay";
121	current-speed = <115200>;
122	pinctrl-0 = <&uart0_default>;
123	pinctrl-1 = <&uart0_sleep>;
124	pinctrl-names = "default", "sleep";
125};
126
127&uart1 {
128	compatible = "nordic,nrf-uarte";
129	current-speed = <115200>;
130	pinctrl-0 = <&uart1_default>;
131	pinctrl-1 = <&uart1_sleep>;
132	pinctrl-names = "default", "sleep";
133};
134
135&pwm0 {
136	status = "okay";
137	pinctrl-0 = <&pwm0_default>;
138	pinctrl-1 = <&pwm0_sleep>;
139	pinctrl-names = "default", "sleep";
140};
141
142&qspi {
143	status = "okay";
144	pinctrl-0 = <&qspi_default>;
145	pinctrl-1 = <&qspi_sleep>;
146	pinctrl-names = "default", "sleep";
147};
148
149&spi4 {
150	compatible = "nordic,nrf-spim";
151	status = "okay";
152	cs-gpios = <&gpio0 11 0>;
153	pinctrl-0 = <&spi4_default>;
154	pinctrl-1 = <&spi4_sleep>;
155	pinctrl-names = "default", "sleep";
156};
157
158&ieee802154 {
159	status = "okay";
160};
161
162/* Include default memory partition configuration file */
163#include <common/nordic/nrf5340_cpuapp_partition.dtsi>
164