Skip to content

Commit 30fa485

Browse files
mtfurlanfabiobaltieri
authored andcommitted
boards: qorvo: add DWM3001CDK support
Add support for the decawave DWM3001C board from qorvo Signed-off-by: Mara Furland <[email protected]>
1 parent 6d6d456 commit 30fa485

File tree

12 files changed

+411
-0
lines changed

12 files changed

+411
-0
lines changed
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
# DecaWave DWM3001CDK board configuration
2+
3+
# Copyright (c) 2024 The Zephyr Project Contributors
4+
# # SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_DECAWAVE_DWM3001CDK
7+
8+
config BOARD_SERIAL_BACKEND_CDC_ACM
9+
bool "Use USB CDC as serial console backend"
10+
default y
11+
12+
endif # BOARD_DECAWAVE_DWM3001CDK
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# DecaWave DWM3001CDK board configuration
2+
3+
# Copyright (c) 2019 Stéphane D'Alu
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
config BOARD_DECAWAVE_DWM3001CDK
7+
select SOC_NRF52833_QDAA
Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
# DecaWave DWM3001CDK board configuration
2+
3+
# Copyright (c) 2019 Stéphane D'Alu
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
if BOARD_DECAWAVE_DWM3001CDK
7+
8+
config BT_CTLR
9+
default BT
10+
11+
config I2C
12+
default SENSOR
13+
14+
if BOARD_SERIAL_BACKEND_CDC_ACM
15+
16+
config USB_DEVICE_STACK
17+
default y
18+
19+
config USB_CDC_ACM
20+
default SERIAL
21+
22+
config CONSOLE
23+
default y
24+
25+
config UART_CONSOLE
26+
default CONSOLE
27+
28+
config USB_DEVICE_INITIALIZE_AT_BOOT
29+
default y if !MCUBOOT && CONSOLE
30+
31+
config SHELL_BACKEND_SERIAL_CHECK_DTR
32+
default SHELL
33+
depends on UART_LINE_CTRL
34+
35+
config UART_LINE_CTRL
36+
default y
37+
38+
config USB_DEVICE_REMOTE_WAKEUP
39+
default n
40+
41+
if LOG
42+
43+
# Logger cannot use itself to log
44+
choice USB_CDC_ACM_LOG_LEVEL_CHOICE
45+
default USB_CDC_ACM_LOG_LEVEL_OFF
46+
endchoice
47+
48+
# Set USB log level to error only
49+
choice USB_DEVICE_LOG_LEVEL_CHOICE
50+
default USB_DEVICE_LOG_LEVEL_ERR
51+
endchoice
52+
53+
endif # LOG
54+
55+
if USB_DEVICE_STACK
56+
57+
# Enable UART driver, needed for CDC ACM
58+
config SERIAL
59+
default y
60+
61+
endif # USB_DEVICE_STACK
62+
63+
endif # BOARD_SERIAL_BACKEND_CDC_ACM
64+
65+
DT_CHOSEN_ZEPHYR_CONSOLE := zephyr,console
66+
67+
config UART_CONSOLE
68+
default y if $(dt_chosen_enabled,$(DT_CHOSEN_ZEPHYR_CONSOLE)) && CONSOLE
69+
70+
endif # BOARD_DECAWAVE_DWM3001CDK
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
board_runner_args(jlink "--device=nRF52833_xxAA" "--speed=4000")
4+
board_runner_args(pyocd "--target=nrf52833" "--frequency=4000000")
5+
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
6+
include(${ZEPHYR_BASE}/boards/common/nrfutil.board.cmake)
7+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
8+
include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/openocd-nrf5.board.cmake)
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
board:
2+
name: decawave_dwm3001cdk
3+
vendor: qorvo
4+
socs:
5+
- name: nrf52833
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright (c) 2022 Nordic Semiconductor
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
&pinctrl {
7+
i2c0_default: i2c0_default {
8+
group1 {
9+
psels = <NRF_PSEL(TWIM_SDA, 0, 24)>,
10+
<NRF_PSEL(TWIM_SCL, 1, 04)>;
11+
bias-pull-up;
12+
};
13+
};
14+
15+
i2c0_sleep: i2c0_sleep {
16+
group1 {
17+
psels = <NRF_PSEL(TWIM_SDA, 0, 24)>,
18+
<NRF_PSEL(TWIM_SCL, 1, 04)>;
19+
low-power-enable;
20+
};
21+
};
22+
23+
spi3_default: spi3_default {
24+
group1 {
25+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
26+
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
27+
<NRF_PSEL(SPIM_MISO, 0, 29)>;
28+
};
29+
};
30+
31+
spi3_sleep: spi3_sleep {
32+
group1 {
33+
psels = <NRF_PSEL(SPIM_SCK, 0, 3)>,
34+
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
35+
<NRF_PSEL(SPIM_MISO, 0, 29)>;
36+
low-power-enable;
37+
};
38+
};
39+
};
Lines changed: 160 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,160 @@
1+
/*
2+
* Copyright (c) 2019 Stéphane D'Alu
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
#include <nordic/nrf52833_qdaa.dtsi>
9+
#include "decawave_dwm3001cdk-pinctrl.dtsi"
10+
#include <zephyr/dt-bindings/input/input-event-codes.h>
11+
12+
/ {
13+
model = "Decawave DWM3001CDK";
14+
compatible = "decawave,dwm3001";
15+
16+
chosen {
17+
zephyr,console = &cdc_acm_uart0;
18+
zephyr,shell-uart = &cdc_acm_uart0;
19+
zephyr,uart-mcumgr = &cdc_acm_uart0;
20+
zephyr,bt-mon-uart = &cdc_acm_uart0;
21+
zephyr,bt-c2h-uart = &cdc_acm_uart0;
22+
zephyr,sram = &sram0;
23+
zephyr,flash = &flash0;
24+
zephyr,code-partition = &slot0_partition;
25+
zephyr,ieee802154 = &ieee802154;
26+
};
27+
28+
leds {
29+
compatible = "gpio-leds";
30+
// led from top of board down
31+
// D20: something related to jlink, red
32+
// D13: DW3000 tx(red)/rx(green)
33+
led0: led_0 {
34+
gpios = <&gpio0 04 GPIO_ACTIVE_LOW>;
35+
label = "D9 green LED";
36+
};
37+
led1: led_1 {
38+
gpios = <&gpio0 14 GPIO_ACTIVE_LOW>;
39+
label = "D12 red LED";
40+
};
41+
led2: led_2 {
42+
gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
43+
label = "D11 red LED";
44+
};
45+
led3: led_3 {
46+
gpios = <&gpio0 05 GPIO_ACTIVE_LOW>;
47+
label = "D10 blue LED";
48+
};
49+
};
50+
51+
buttons {
52+
compatible = "gpio-keys";
53+
// SW1 is connected to P0.18, which by default is nRESET and
54+
// will reset the board
55+
button2: button_2 {
56+
gpios = <&gpio0 2 (GPIO_PULL_UP | GPIO_ACTIVE_LOW)>;
57+
label = "Push button switch 2";
58+
zephyr,code = <INPUT_KEY_1>;
59+
};
60+
};
61+
62+
/* These aliases are provided for compatibility with samples */
63+
aliases {
64+
sw0 = &button2;
65+
led0 = &led0;
66+
led1 = &led1;
67+
led2 = &led2;
68+
led3 = &led3;
69+
watchdog0 = &wdt0;
70+
accel0 = &lis2dh12;
71+
};
72+
73+
};
74+
75+
&uicr {
76+
gpio-as-nreset;
77+
};
78+
79+
&gpiote {
80+
status = "okay";
81+
};
82+
83+
&gpio0 {
84+
status = "okay";
85+
};
86+
87+
&gpio1 {
88+
status = "okay";
89+
};
90+
91+
&i2c0 {
92+
compatible = "nordic,nrf-twim";
93+
status = "okay";
94+
clock-frequency = <I2C_BITRATE_FAST>;
95+
96+
pinctrl-0 = <&i2c0_default>;
97+
pinctrl-1 = <&i2c0_sleep>;
98+
pinctrl-names = "default", "sleep";
99+
lis2dh12: lis2dh12@19 {
100+
compatible = "st,lis2dh12", "st,lis2dh";
101+
reg = <0x19>;
102+
irq-gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
103+
};
104+
};
105+
106+
&spi3 {
107+
compatible = "nordic,nrf-spim";
108+
status = "okay";
109+
cs-gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
110+
111+
pinctrl-0 = <&spi3_default>;
112+
pinctrl-1 = <&spi3_sleep>;
113+
pinctrl-names = "default", "sleep";
114+
};
115+
116+
&ieee802154 {
117+
status = "okay";
118+
};
119+
120+
&flash0 {
121+
partitions {
122+
compatible = "fixed-partitions";
123+
#address-cells = <1>;
124+
#size-cells = <1>;
125+
126+
boot_partition: partition@0 {
127+
label = "mcuboot";
128+
reg = <0x00000000 0xC000>;
129+
};
130+
slot0_partition: partition@c000 {
131+
label = "image-0";
132+
reg = <0x0000C000 0x38000>;
133+
};
134+
slot1_partition: partition@44000 {
135+
label = "image-1";
136+
reg = <0x00044000 0x36000>;
137+
};
138+
storage_partition: partition@7a000 {
139+
label = "storage";
140+
reg = <0x0007A000 0x00006000>;
141+
};
142+
};
143+
};
144+
145+
zephyr_udc0: &usbd {
146+
compatible = "nordic,nrf-usbd";
147+
status = "okay";
148+
149+
cdc_acm_uart0: cdc_acm_uart0 {
150+
compatible = "zephyr,cdc-acm-uart";
151+
};
152+
};
153+
154+
&reg1 {
155+
regulator-initial-mode = <NRF5X_REG_MODE_DCDC>;
156+
};
157+
158+
&adc {
159+
status = "okay";
160+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
identifier: decawave_dwm3001cdk
2+
name: Decawave-DWM3001CDK
3+
type: mcu
4+
arch: arm
5+
ram: 128
6+
flash: 512
7+
vendor: decawave
8+
toolchain:
9+
- zephyr
10+
- gnuarmemb
11+
- xtools
12+
supported:
13+
- adc
14+
- usb_device
15+
- ble
16+
- gpio
17+
- pwm
18+
- watchdog
19+
- counter
20+
- netif:openthread
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# SPDX-License-Identifier: Apache-2.0
2+
3+
# Enable MPU
4+
CONFIG_ARM_MPU=y
5+
6+
# Enable hardware stack protection
7+
CONFIG_HW_STACK_PROTECTION=y
8+
9+
# Enable GPIO
10+
CONFIG_GPIO=y

0 commit comments

Comments
 (0)