Skip to content

Commit 762e74e

Browse files
committed
applications: nrf_desktop: add support for the nRF54LM20 DK
Added initial support for the nRF54LM20 DK in the nRF Desktop application. The new target has been tested with nRF54LM20 DK v0.3.0. The DK target will eventually supersede the PDK target. For now, both targets are maintained in the nRF Desktop application. Ref: NCSDK-33956 Signed-off-by: Kamil Piszczek <[email protected]>
1 parent 2ad751a commit 762e74e

25 files changed

+1099
-0
lines changed
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
label = "HID0";
13+
protocol-code = "mouse";
14+
in-polling-period-us = <125>;
15+
in-report-size = <64>;
16+
};
17+
};
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* Application does not use cpuflpr core. Assign whole RRAM to cpuapp. */
8+
&cpuapp_rram {
9+
reg = < 0x0 DT_SIZE_K(2036) >;
10+
};
11+
12+
/ {
13+
/* Disable pwmleds and redefine them to align configuration with CAF LEDs requirements. */
14+
/delete-node/ pwmleds;
15+
16+
pwmleds0 {
17+
compatible = "pwm-leds";
18+
status = "okay";
19+
20+
pwm_led0: led_pwm_0 {
21+
status = "okay";
22+
pwms = <&pwm20 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
23+
label = "LED System State";
24+
};
25+
};
26+
27+
pwmleds1 {
28+
compatible = "pwm-leds";
29+
status = "okay";
30+
31+
pwm_led1: led_pwm_1 {
32+
status = "okay";
33+
pwms = <&pwm21 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>;
34+
label = "LED Conn State";
35+
};
36+
};
37+
};
38+
39+
&pwm20 {
40+
status = "okay";
41+
pinctrl-0 = <&pwm20_default_alt>;
42+
pinctrl-1 = <&pwm20_sleep_alt>;
43+
pinctrl-names = "default", "sleep";
44+
};
45+
46+
&pwm21 {
47+
status = "okay";
48+
pinctrl-0 = <&pwm21_default_alt>;
49+
pinctrl-1 = <&pwm21_sleep_alt>;
50+
pinctrl-names = "default", "sleep";
51+
};
52+
53+
&pinctrl {
54+
pwm20_default_alt: pwm20_default_alt {
55+
group1 {
56+
psels = <NRF_PSEL(PWM_OUT0, 1, 22)>;
57+
};
58+
};
59+
60+
pwm20_sleep_alt: pwm20_sleep_alt {
61+
group1 {
62+
psels = <NRF_PSEL(PWM_OUT0, 1, 22)>;
63+
low-power-enable;
64+
};
65+
};
66+
67+
pwm21_default_alt: pwm21_default_alt {
68+
group1 {
69+
psels = <NRF_PSEL(PWM_OUT0, 1, 25)>;
70+
};
71+
};
72+
73+
pwm21_sleep_alt: pwm21_sleep_alt {
74+
group1 {
75+
psels = <NRF_PSEL(PWM_OUT0, 1, 25)>;
76+
low-power-enable;
77+
};
78+
};
79+
};
Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
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+
label = "HID0";
13+
protocol-code = "mouse";
14+
in-polling-period-us = <125>;
15+
in-report-size = <64>;
16+
};
17+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
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+
label = "HID0";
13+
protocol-code = "mouse";
14+
in-polling-period-us = <125>;
15+
in-report-size = <64>;
16+
};
17+
};
18+
19+
/* For nRF54L, watchdog status is disabled by default. Needs to be enabled in DTS overlay. */
20+
&wdt31 {
21+
status = "okay";
22+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <caf/gpio_pins.h>
8+
9+
/* This configuration file is included only once from button module and holds
10+
* information about pins forming keyboard matrix.
11+
*/
12+
13+
/* This structure enforces the header file is included only once in the build.
14+
* Violating this requirement triggers a multiple definition error at link time.
15+
*/
16+
const struct {} buttons_def_include_once;
17+
18+
static const struct gpio_pin col[] = {};
19+
20+
static const struct gpio_pin row[] = {
21+
{ .port = 1, .pin = DT_GPIO_PIN(DT_NODELABEL(button0), gpios) },
22+
{ .port = 1, .pin = DT_GPIO_PIN(DT_NODELABEL(button1), gpios) },
23+
{ .port = 1, .pin = DT_GPIO_PIN(DT_NODELABEL(button2), gpios) },
24+
{ .port = 0, .pin = DT_GPIO_PIN(DT_NODELABEL(button3), gpios) },
25+
};
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include <caf/click_detector.h>
8+
9+
/* This configuration file is included only once from click_detector module
10+
* and holds information about click detector configuration.
11+
*/
12+
13+
/* This structure enforces the header file is included only once in the build.
14+
* Violating this requirement triggers a multiple definition error at link time.
15+
*/
16+
const struct {} click_detector_def_include_once;
17+
18+
static const struct click_detector_config click_detector_config[] = {
19+
#if CONFIG_DESKTOP_BLE_PEER_CONTROL
20+
{
21+
.key_id = CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON,
22+
.consume_button_event = false,
23+
},
24+
#endif /* CONFIG_DESKTOP_BLE_PEER_CONTROL */
25+
};
Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "hid_keyboard_leds.h"
8+
9+
/* This configuration file is included only once from hid_state module and holds
10+
* information about LEDs associated with HID keyboard LEDs report.
11+
*/
12+
13+
/* This structure enforces the header file is included only once in the build.
14+
* Violating this requirement triggers a multiple definition error at link time.
15+
*/
16+
const struct {} hid_keyboard_leds_def_include_once;
17+
18+
static const struct led_effect keyboard_led_on = LED_EFFECT_LED_ON(LED_COLOR(255, 255, 255));
19+
static const struct led_effect keyboard_led_off = LED_EFFECT_LED_OFF();
20+
21+
/* Map HID keyboard LEDs to application LED IDs. */
22+
static const uint8_t keyboard_led_map[] = {
23+
};
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
#include "hid_keymap.h"
8+
#include <caf/key_id.h>
9+
10+
/* This configuration file is included only once from hid_state module and holds
11+
* information about mapping between buttons and generated reports.
12+
*/
13+
14+
/* This structure enforces the header file is included only once in the build.
15+
* Violating this requirement triggers a multiple definition error at link time.
16+
*/
17+
const struct {} hid_keymap_def_include_once;
18+
19+
/*
20+
* HID keymap. The Consumer Control keys are defined in section 15 of
21+
* the HID Usage Tables document under the following URL:
22+
* https://www.usb.org/sites/default/files/hut1_12.pdf
23+
*/
24+
static const struct hid_keymap hid_keymap[] = {
25+
/* Intentionally left empty. nRF54LM20 DK by default uses all 4 buttons
26+
* only to control generating motion.
27+
*/
28+
};
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
/*
2+
* Copyright (c) 2025 Nordic Semiconductor ASA
3+
*
4+
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
*/
6+
7+
/* Application does not use cpuflpr core. Assign whole RRAM to cpuapp. */
8+
&cpuapp_rram {
9+
reg = < 0x0 DT_SIZE_K(2036) >;
10+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
-----BEGIN PRIVATE KEY-----
2+
MC4CAQAwBQYDK2VwBCIEIFhR5tisVfxfoqS17OebTkJe5elwdsQj4tTAcGfz0r/r
3+
-----END PRIVATE KEY-----

0 commit comments

Comments
 (0)