Skip to content

Commit e985a83

Browse files
MarekPietakapi-no
authored andcommitted
applications: nrf_desktop: Add dongle configurations for nRF54H20 DK
Change adds nRF54H20 DK's debug and release configurations acting as a dongle. Jira: NCSDK-31539 Signed-off-by: Marek Pieta <[email protected]> Signed-off-by: Divya Pillai <[email protected]> Signed-off-by: Pekka Niskanen <[email protected]>
1 parent abe0ed1 commit e985a83

File tree

13 files changed

+492
-4
lines changed

13 files changed

+492
-4
lines changed

applications/nrf_desktop/board_configuration.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -166,13 +166,14 @@ Sample mouse or keyboard (``nrf54l15dk/nrf54l15/cpuapp``)
166166
* The board supports the ``debug`` :ref:`nrf_desktop_bluetooth_guide_fast_pair` configuration that acts as a mouse (``fast_pair`` file suffix).
167167
The configuration uses the MCUboot bootloader built in the direct-xip mode (``MCUBOOT+XIP``), and supports firmware updates using the :ref:`nrf_desktop_dfu` and :ref:`nrf_desktop_dfu_mcumgr`.
168168

169-
Sample mouse (``nrf54h20dk/nrf54h20/cpuapp``)
170-
* The configuration uses the nRF54H20 DK.
171-
* The build types allow to build the application as a mouse.
169+
Sample mouse or dongle (``nrf54h20dk/nrf54h20/cpuapp``)
170+
* The configuration uses the nRF54H20 Development Kit.
171+
* The build types allow to build the application as a mouse or dongle.
172172
* Inputs are simulated based on the hardware button presses.
173173
* Bluetooth LE and USB High-Speed transports are enabled.
174174
Bluetooth LE is configured to use Nordic Semiconductor's SoftDevice Link Layer and Low Latency Packet Mode (LLPM).
175175
USB High-Speed is configured to use the USB next stack (:kconfig:option:`CONFIG_USB_DEVICE_STACK_NEXT`).
176176
* In ``debug`` configurations, logs are provided through the UART.
177177
For detailed information on working with the nRF54H20 DK, see the :ref:`ug_nrf54h20_gs` documentation.
178-
* The configurations use the Software Updates for Internet of Things (SUIT) and supports firmware updates using the :ref:`nrf_desktop_dfu` and :ref:`nrf_desktop_smp`.
178+
* The configurations use the Software Updates for Internet of Things (SUIT) and support firmware updates using the :ref:`nrf_desktop_dfu`.
179+
Configurations acting as HID peripherals also support firmware updates using the :ref:`nrf_desktop_dfu_mcumgr`.
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "app_common.dtsi"
8+
9+
/ {
10+
hid_dev_0: hid_dev_0 {
11+
compatible = "zephyr,hid-device";
12+
interface-name = "HID0";
13+
protocol-code = "keyboard";
14+
in-polling-period-us = <125>;
15+
in-report-size = <64>;
16+
};
17+
hid_dev_1: hid_dev_1 {
18+
compatible = "zephyr,hid-device";
19+
interface-name = "HID1";
20+
protocol-code = "keyboard";
21+
in-polling-period-us = <125>;
22+
in-report-size = <64>;
23+
};
24+
};
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "app_common.dtsi"
8+
9+
/ {
10+
hid_dev_0: hid_dev_0 {
11+
compatible = "zephyr,hid-device";
12+
interface-name = "HID0";
13+
protocol-code = "keyboard";
14+
in-polling-period-us = <125>;
15+
in-report-size = <64>;
16+
};
17+
hid_dev_1: hid_dev_1 {
18+
compatible = "zephyr,hid-device";
19+
interface-name = "HID1";
20+
protocol-code = "keyboard";
21+
in-polling-period-us = <125>;
22+
in-report-size = <64>;
23+
};
24+
};
25+
26+
/* For nRF54H, watchdog status is disabled by default. Needs to be enabled in DTS overlay. */
27+
&wdt010 {
28+
status = "okay";
29+
};
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* This configuration file defines discovery parameters for BLE central.
8+
* Used only by ble_discovery module.
9+
*/
10+
11+
/* This structure enforces the header file is included only once in the build.
12+
* Violating this requirement triggers a multiple definition error at link time.
13+
*/
14+
const struct {} ble_discovery_include_once;
15+
16+
#include "ble_event.h"
17+
18+
struct bt_peripheral {
19+
uint16_t pid;
20+
enum peer_type peer_type;
21+
};
22+
23+
static const uint16_t vendor_vid = 0x1915;
24+
25+
/* Peripherals parameters. */
26+
static const struct bt_peripheral bt_peripherals[] = {
27+
{
28+
.pid = 0x52da,
29+
.peer_type = PEER_TYPE_MOUSE,
30+
},
31+
{
32+
.pid = 0x52db,
33+
.peer_type = PEER_TYPE_MOUSE,
34+
},
35+
{
36+
.pid = 0x52de,
37+
.peer_type = PEER_TYPE_MOUSE,
38+
},
39+
{
40+
.pid = 0x52dd,
41+
.peer_type = PEER_TYPE_KEYBOARD,
42+
},
43+
};
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* This configuration file defines filters for BLE central (based on BLE
8+
* names). Used only by ble_scan module.
9+
*/
10+
11+
/* This structure enforces the header file is included only once in the build.
12+
* Violating this requirement triggers a multiple definition error at link time.
13+
*/
14+
const struct {} ble_scan_include_once;
15+
16+
#include "ble_event.h"
17+
18+
static const char * const peer_name[] = {
19+
[PEER_TYPE_MOUSE] = "Mouse nRF Desktop",
20+
[PEER_TYPE_KEYBOARD] = "Keyboard nRF Desktop",
21+
};
Lines changed: 112 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,112 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
# debug: Dongle version
8+
#
9+
# This debug build type configuration acts as a dongle.
10+
#
11+
# Application Configuration
12+
13+
CONFIG_DESKTOP_INIT_LOG_HID_REPORT_EVENT=n
14+
CONFIG_DESKTOP_INIT_LOG_HID_REPORT_SENT_EVENT=n
15+
CONFIG_CAF_INIT_LOG_KEEP_ALIVE_EVENTS=n
16+
17+
CONFIG_DESKTOP_ROLE_HID_DONGLE=y
18+
CONFIG_DESKTOP_DEVICE_PID=0x52DC
19+
CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD=y
20+
21+
CONFIG_CAF_BUTTONS=y
22+
CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y
23+
CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n
24+
25+
CONFIG_CAF_CLICK_DETECTOR=y
26+
27+
CONFIG_CAF_LEDS=y
28+
29+
CONFIG_DESKTOP_USB_ENABLE=y
30+
# Enable the only USB stack that supports USBHS
31+
CONFIG_DESKTOP_USB_STACK_NEXT=y
32+
33+
# The LLPM must be explicitly enabled, as the Bluetooth Controller
34+
# is not part of the main application.
35+
CONFIG_CAF_BLE_USE_LLPM=y
36+
37+
CONFIG_DESKTOP_BLE_PEER_CONTROL=y
38+
CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000
39+
CONFIG_DESKTOP_BLE_NEW_PEER_SCAN_REQUEST=y
40+
CONFIG_DESKTOP_BLE_NEW_PEER_SCAN_ON_BOOT=y
41+
CONFIG_DESKTOP_BLE_PEER_ERASE=y
42+
43+
CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y
44+
CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_ENABLE=y
45+
46+
################################################################################
47+
# Zephyr Configuration
48+
49+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3584
50+
CONFIG_ISR_STACK_SIZE=2560
51+
CONFIG_MAIN_STACK_SIZE=2816
52+
CONFIG_BT_RX_STACK_SIZE=2048
53+
CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
54+
CONFIG_BT_HCI_TX_STACK_SIZE=1536
55+
CONFIG_IDLE_STACK_SIZE=512
56+
57+
CONFIG_BOOT_BANNER=n
58+
CONFIG_NCS_BOOT_BANNER=n
59+
60+
CONFIG_NUM_COOP_PRIORITIES=10
61+
CONFIG_NUM_PREEMPT_PRIORITIES=11
62+
63+
CONFIG_HEAP_MEM_POOL_SIZE=2048
64+
65+
CONFIG_HW_STACK_PROTECTION=y
66+
CONFIG_RESET_ON_FATAL_ERROR=n
67+
68+
CONFIG_GPIO=y
69+
70+
CONFIG_SPEED_OPTIMIZATIONS=y
71+
72+
CONFIG_REBOOT=y
73+
74+
CONFIG_LED=y
75+
# PWM not supported on this target, using GPIO instead.
76+
CONFIG_LED_GPIO=y
77+
78+
CONFIG_BT_PRIVACY=y
79+
80+
CONFIG_BT_BUF_ACL_TX_SIZE=35
81+
CONFIG_BT_ATT_TX_COUNT=6
82+
83+
# Configure Zephyr system power management
84+
CONFIG_PM=y
85+
CONFIG_PM_S2RAM=y
86+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
87+
88+
################################################################################
89+
# Debug logs configuration
90+
91+
CONFIG_ASSERT=y
92+
CONFIG_ASSERT_LEVEL=2
93+
94+
# UART logging is one of two suggested ways of reading logs on nRF54H20DK.
95+
CONFIG_SERIAL=y
96+
CONFIG_CONSOLE=y
97+
CONFIG_UART_CONSOLE=y
98+
99+
CONFIG_LOG=y
100+
CONFIG_LOG_BACKEND_UART=y
101+
CONFIG_LOG_BACKEND_SHOW_COLOR=n
102+
CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n
103+
CONFIG_LOG_MODE_DEFERRED=y
104+
CONFIG_LOG_PRINTK=y
105+
CONFIG_LOG_BUFFER_SIZE=4096
106+
CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024
107+
108+
################################################################################
109+
# DFU configuration
110+
111+
CONFIG_SUIT=y
112+
CONFIG_SUIT_DFU_CANDIDATE_PROCESSING_MINIMAL=y
Lines changed: 98 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,98 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
# release: Dongle version
8+
#
9+
# This release build type configuration acts as a dongle.
10+
#
11+
# Application Configuration
12+
13+
CONFIG_DESKTOP_ROLE_HID_DONGLE=y
14+
CONFIG_DESKTOP_DEVICE_PID=0x52DC
15+
CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD=y
16+
17+
CONFIG_CAF_BUTTONS=y
18+
CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y
19+
CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n
20+
21+
CONFIG_CAF_CLICK_DETECTOR=y
22+
23+
CONFIG_CAF_LEDS=y
24+
25+
CONFIG_DESKTOP_USB_ENABLE=y
26+
# Enable the only USB stack that supports USBHS
27+
CONFIG_DESKTOP_USB_STACK_NEXT=y
28+
29+
# The LLPM must be explicitly enabled, as the Bluetooth Controller
30+
# is not part of the main application.
31+
CONFIG_CAF_BLE_USE_LLPM=y
32+
33+
CONFIG_DESKTOP_BLE_PEER_CONTROL=y
34+
CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000
35+
CONFIG_DESKTOP_BLE_NEW_PEER_SCAN_REQUEST=y
36+
CONFIG_DESKTOP_BLE_NEW_PEER_SCAN_ON_BOOT=y
37+
CONFIG_DESKTOP_BLE_PEER_ERASE=y
38+
39+
CONFIG_DESKTOP_WATCHDOG_ENABLE=y
40+
CONFIG_DESKTOP_FAILSAFE_ENABLE=y
41+
42+
CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y
43+
CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_ENABLE=y
44+
45+
################################################################################
46+
# Zephyr Configuration
47+
48+
CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=3584
49+
CONFIG_ISR_STACK_SIZE=2560
50+
CONFIG_MAIN_STACK_SIZE=2816
51+
CONFIG_BT_RX_STACK_SIZE=2048
52+
CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y
53+
CONFIG_BT_HCI_TX_STACK_SIZE=1536
54+
CONFIG_IDLE_STACK_SIZE=512
55+
56+
CONFIG_BOOT_BANNER=n
57+
CONFIG_NCS_BOOT_BANNER=n
58+
59+
CONFIG_NUM_COOP_PRIORITIES=10
60+
CONFIG_NUM_PREEMPT_PRIORITIES=11
61+
62+
CONFIG_HEAP_MEM_POOL_SIZE=2048
63+
64+
CONFIG_HW_STACK_PROTECTION=n
65+
CONFIG_RESET_ON_FATAL_ERROR=n
66+
67+
CONFIG_GPIO=y
68+
69+
CONFIG_SPEED_OPTIMIZATIONS=y
70+
71+
CONFIG_REBOOT=y
72+
73+
CONFIG_LED=y
74+
# PWM not supported on this target, using GPIO instead.
75+
CONFIG_LED_GPIO=y
76+
77+
CONFIG_BT_PRIVACY=y
78+
79+
CONFIG_BT_BUF_ACL_TX_SIZE=35
80+
CONFIG_BT_ATT_TX_COUNT=6
81+
82+
# Configure Zephyr system power management
83+
CONFIG_PM=y
84+
CONFIG_PM_S2RAM=y
85+
CONFIG_PM_S2RAM_CUSTOM_MARKING=y
86+
87+
################################################################################
88+
# Disable unused features
89+
90+
CONFIG_SERIAL=n
91+
CONFIG_CONSOLE=n
92+
CONFIG_UART_CONSOLE=n
93+
94+
################################################################################
95+
# DFU configuration
96+
97+
CONFIG_SUIT=y
98+
CONFIG_SUIT_DFU_CANDIDATE_PROCESSING_MINIMAL=y
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
8+
SB_CONFIG_NETCORE_IPC_RADIO=y
9+
SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
################################################################################
7+
8+
SB_CONFIG_NETCORE_IPC_RADIO=y
9+
SB_CONFIG_NETCORE_IPC_RADIO_BT_HCI_IPC=y

0 commit comments

Comments
 (0)