From d0ae4f6600b1fceab61b441218c1c0d30510adb8 Mon Sep 17 00:00:00 2001 From: Marek Pieta Date: Mon, 20 Jan 2025 14:20:27 +0100 Subject: [PATCH] applications: nrf_desktop: Add nRF54L05 support nRF54L05 is emulated on nRF54L15 DK. Jira: NCSDK-30311 Signed-off-by: Marek Pieta --- .../nrf54l15dk_nrf54l05_cpuapp/app.overlay | 7 + .../app_common.dtsi | 112 ++++++++++++++++ .../app_release.overlay | 12 ++ .../app_release_fast_pair.overlay | 12 ++ .../app_release_keyboard.overlay | 12 ++ .../nrf54l15dk_nrf54l05_cpuapp/buttons_def.h | 25 ++++ .../buttons_sim_def.h | 26 ++++ .../click_detector_def.h | 25 ++++ .../hid_keyboard_leds_def.h | 23 ++++ .../hid_keyboard_leds_def_keyboard.h | 36 +++++ .../hid_keymap_def.h | 28 ++++ .../hid_keymap_def_keyboard.h | 57 ++++++++ .../images/mcuboot/app.overlay | 10 ++ .../images/mcuboot/mcuboot_private.pem | 3 + .../mcuboot/mcuboot_private_fast_pair.pem | 3 + .../images/mcuboot/prj_release.conf | 42 ++++++ .../images/mcuboot/prj_release_fast_pair.conf | 42 ++++++ .../images/mcuboot/prj_release_keyboard.conf | 42 ++++++ .../led_state_def.h | 49 +++++++ .../nrf54l15dk_nrf54l05_cpuapp/pm_static.yml | 8 ++ .../pm_static_release.yml | 47 +++++++ .../pm_static_release_fast_pair.yml | 51 +++++++ .../pm_static_release_keyboard.yml | 47 +++++++ .../port_state_def.h | 25 ++++ .../nrf54l15dk_nrf54l05_cpuapp/prj.conf | 113 ++++++++++++++++ .../prj_release.conf | 100 ++++++++++++++ .../prj_release_fast_pair.conf | 124 ++++++++++++++++++ .../prj_release_keyboard.conf | 107 +++++++++++++++ .../sysbuild_release.conf | 13 ++ .../sysbuild_release_fast_pair.conf | 14 ++ .../sysbuild_release_keyboard.conf | 13 ++ applications/nrf_desktop/sample.yaml | 16 ++- 32 files changed, 1243 insertions(+), 1 deletion(-) create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app.overlay create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_common.dtsi create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release.overlay create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_fast_pair.overlay create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_keyboard.overlay create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_sim_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/click_detector_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def_keyboard.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def_keyboard.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/app.overlay create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private.pem create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private_fast_pair.pem create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_fast_pair.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_keyboard.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/led_state_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static.yml create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release.yml create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_fast_pair.yml create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_keyboard.yml create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/port_state_def.h create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_fast_pair.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_keyboard.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_fast_pair.conf create mode 100644 applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_keyboard.conf diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app.overlay b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app.overlay new file mode 100644 index 00000000000..51eda84e94e --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app.overlay @@ -0,0 +1,7 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "app_common.dtsi" diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_common.dtsi b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_common.dtsi new file mode 100644 index 00000000000..3aed7bae7cd --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_common.dtsi @@ -0,0 +1,112 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* Application does not use cpuflpr core. Assign whole RRAM to cpuapp. */ +&cpuapp_rram { + reg = < 0x0 DT_SIZE_K(500) >; +}; + +/ { + /* Disable pwmleds and redefine them to align configuration with CAF LEDs requirements. + * The configuration needs to match the used board revision. + */ + /delete-node/ pwmleds; + + pwmleds0 { + compatible = "pwm-leds"; + status = "okay"; + + pwm_led0: led_pwm_0 { + status = "okay"; + pwms = <&pwm20 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "LED System State"; + }; + }; + + pwmleds1 { + compatible = "pwm-leds"; + status = "okay"; + + pwm_led1: led_pwm_1 { + status = "okay"; + pwms = <&pwm21 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "LED Conn State"; + }; + }; + + pwmleds2 { + compatible = "pwm-leds"; + status = "okay"; + + pwm_led2: led_pwm_2 { + status = "okay"; + pwms = <&pwm22 0 PWM_MSEC(20) PWM_POLARITY_NORMAL>; + label = "LED Num Lock"; + }; + }; +}; + +&pwm20 { + status = "okay"; + pinctrl-0 = <&pwm20_default_alt>; + pinctrl-1 = <&pwm20_sleep_alt>; + pinctrl-names = "default", "sleep"; +}; + +&pwm21 { + status = "okay"; + pinctrl-0 = <&pwm21_default_alt>; + pinctrl-1 = <&pwm21_sleep_alt>; + pinctrl-names = "default", "sleep"; +}; + +&pwm22 { + status = "okay"; + pinctrl-0 = <&pwm22_default_alt>; + pinctrl-1 = <&pwm22_sleep_alt>; + pinctrl-names = "default", "sleep"; +}; + +&pinctrl { + pwm20_default_alt: pwm20_default_alt { + group1 { + psels = ; + }; + }; + + pwm20_sleep_alt: pwm20_sleep_alt { + group1 { + psels = ; + low-power-enable; + }; + }; + + pwm21_default_alt: pwm21_default_alt { + group1 { + psels = ; + }; + }; + + pwm21_sleep_alt: pwm21_sleep_alt { + group1 { + psels = ; + low-power-enable; + }; + }; + + pwm22_default_alt: pwm22_default_alt { + group1 { + psels = ; + }; + }; + + pwm22_sleep_alt: pwm22_sleep_alt { + group1 { + psels = ; + low-power-enable; + }; + }; +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release.overlay b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release.overlay new file mode 100644 index 00000000000..3faa341ff1c --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "app_common.dtsi" + +/* For nRF54L, watchdog status is disabled by default. Needs to be enabled in DTS overlay. */ +&wdt31 { + status = "okay"; +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_fast_pair.overlay b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_fast_pair.overlay new file mode 100644 index 00000000000..3faa341ff1c --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_fast_pair.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "app_common.dtsi" + +/* For nRF54L, watchdog status is disabled by default. Needs to be enabled in DTS overlay. */ +&wdt31 { + status = "okay"; +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_keyboard.overlay b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_keyboard.overlay new file mode 100644 index 00000000000..3faa341ff1c --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/app_release_keyboard.overlay @@ -0,0 +1,12 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "app_common.dtsi" + +/* For nRF54L, watchdog status is disabled by default. Needs to be enabled in DTS overlay. */ +&wdt31 { + status = "okay"; +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_def.h new file mode 100644 index 00000000000..77b68b4f91c --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_def.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include + +/* This configuration file is included only once from button module and holds + * information about pins forming keyboard matrix. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} buttons_def_include_once; + +static const struct gpio_pin col[] = {}; + +static const struct gpio_pin row[] = { + { .port = 1, .pin = DT_GPIO_PIN(DT_NODELABEL(button0), gpios) }, + { .port = 1, .pin = DT_GPIO_PIN(DT_NODELABEL(button1), gpios) }, + { .port = 1, .pin = DT_GPIO_PIN(DT_NODELABEL(button2), gpios) }, + { .port = 0, .pin = DT_GPIO_PIN(DT_NODELABEL(button3), gpios) }, +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_sim_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_sim_def.h new file mode 100644 index 00000000000..edf1fdafc10 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/buttons_sim_def.h @@ -0,0 +1,26 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include + +/* This configuration file is included only once from buttons_sim module + * and holds information about generated button presses sequence. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} buttons_sim_def_include_once; + +const static uint16_t simulated_key_sequence[] = { + KEY_ID(0x00, 0x11), /* N */ + KEY_ID(0x00, 0x12), /* O */ + KEY_ID(0x00, 0x15), /* R */ + KEY_ID(0x00, 0x07), /* D */ + KEY_ID(0x00, 0x0C), /* I */ + KEY_ID(0x00, 0x06), /* C */ + KEY_ID(0x00, 0x2C), /* spacebar */ +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/click_detector_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/click_detector_def.h new file mode 100644 index 00000000000..f8dadda3b84 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/click_detector_def.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include + +/* This configuration file is included only once from click_detector module + * and holds information about click detector configuration. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} click_detector_def_include_once; + +static const struct click_detector_config click_detector_config[] = { +#if CONFIG_DESKTOP_BLE_PEER_CONTROL + { + .key_id = CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON, + .consume_button_event = false, + }, +#endif /* CONFIG_DESKTOP_BLE_PEER_CONTROL */ +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def.h new file mode 100644 index 00000000000..9f3a247783a --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def.h @@ -0,0 +1,23 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "hid_keyboard_leds.h" + +/* This configuration file is included only once from hid_state module and holds + * information about LEDs associated with HID keyboard LEDs report. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} hid_keyboard_leds_def_include_once; + +static const struct led_effect keyboard_led_on = LED_EFFECT_LED_ON(LED_COLOR(255, 255, 255)); +static const struct led_effect keyboard_led_off = LED_EFFECT_LED_OFF(); + +/* Map HID keyboard LEDs to application LED IDs. */ +static const uint8_t keyboard_led_map[] = { +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def_keyboard.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def_keyboard.h new file mode 100644 index 00000000000..6d8ee4143d8 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keyboard_leds_def_keyboard.h @@ -0,0 +1,36 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "hid_keyboard_leds.h" + +/* This configuration file is included only once from hid_state module and holds + * information about LEDs associated with HID keyboard LEDs report. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} hid_keyboard_leds_def_include_once; + +/* On the nRF54L05 SoC, you can only use the **GPIO1** port for PWM hardware peripheral output. + * Because of that, on the DK PCA10156 revision v0.8.1, **LED 0** and **LED 2** cannot be used for + * PWM output. + * + * You can still use these LEDs with the PWM LED driver, but you must set the LED color to + * ``LED_COLOR(255, 255, 255)`` or ``LED_COLOR(0, 0, 0)``. This ensures the PWM peripheral is not + * used for the mentioned LEDs. + */ +static const struct led_effect keyboard_led_on = LED_EFFECT_LED_ON(LED_COLOR(255, 255, 255)); +static const struct led_effect keyboard_led_off = LED_EFFECT_LED_OFF(); + +/* Map HID keyboard LEDs to application LED IDs. */ +static const uint8_t keyboard_led_map[] = { + [HID_KEYBOARD_LEDS_NUM_LOCK] = 2, + [HID_KEYBOARD_LEDS_CAPS_LOCK] = LED_UNAVAILABLE, + [HID_KEYBOARD_LEDS_SCROLL_LOCK] = LED_UNAVAILABLE, + [HID_KEYBOARD_LEDS_COMPOSE] = LED_UNAVAILABLE, + [HID_KEYBOARD_LEDS_KANA] = LED_UNAVAILABLE, +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def.h new file mode 100644 index 00000000000..cf649d52669 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def.h @@ -0,0 +1,28 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "hid_keymap.h" +#include + +/* This configuration file is included only once from hid_state module and holds + * information about mapping between buttons and generated reports. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} hid_keymap_def_include_once; + +/* + * HID keymap. The Consumer Control keys are defined in section 15 of + * the HID Usage Tables document under the following URL: + * https://www.usb.org/sites/default/files/hut1_12.pdf + */ +static const struct hid_keymap hid_keymap[] = { + /* Intentionally left empty. nRF54L DK by default uses all buttons only to control + * generating motion. + */ +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def_keyboard.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def_keyboard.h new file mode 100644 index 00000000000..5d0e77c34c5 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/hid_keymap_def_keyboard.h @@ -0,0 +1,57 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "hid_keymap.h" +#include + +/* This configuration file is included only once from hid_state module and holds + * information about mapping between buttons and generated reports. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} hid_keymap_def_include_once; + +/* + * HID keymap. The Consumer Control keys are defined in section 15 of + * the HID Usage Tables document under the following URL: + * https://www.usb.org/sites/default/files/hut1_12.pdf + */ +static const struct hid_keymap hid_keymap[] = { + { KEY_ID(0x00, 0x00), 0x0004, REPORT_ID_KEYBOARD_KEYS }, /* A */ + { KEY_ID(0x00, 0x01), 0x0005, REPORT_ID_KEYBOARD_KEYS }, /* B */ + { KEY_ID(0x00, 0x02), 0x00E1, REPORT_ID_KEYBOARD_KEYS }, /* left shift */ + + { KEY_ID(0x00, 0x04), 0x0004, REPORT_ID_KEYBOARD_KEYS }, /* A */ + { KEY_ID(0x00, 0x05), 0x0005, REPORT_ID_KEYBOARD_KEYS }, /* B */ + { KEY_ID(0x00, 0x06), 0x0006, REPORT_ID_KEYBOARD_KEYS }, /* C */ + { KEY_ID(0x00, 0x07), 0x0007, REPORT_ID_KEYBOARD_KEYS }, /* D */ + { KEY_ID(0x00, 0x08), 0x0008, REPORT_ID_KEYBOARD_KEYS }, /* E */ + { KEY_ID(0x00, 0x09), 0x0009, REPORT_ID_KEYBOARD_KEYS }, /* F */ + { KEY_ID(0x00, 0x0A), 0x000A, REPORT_ID_KEYBOARD_KEYS }, /* G */ + { KEY_ID(0x00, 0x0B), 0x000B, REPORT_ID_KEYBOARD_KEYS }, /* H */ + { KEY_ID(0x00, 0x0C), 0x000C, REPORT_ID_KEYBOARD_KEYS }, /* I */ + { KEY_ID(0x00, 0x0D), 0x000D, REPORT_ID_KEYBOARD_KEYS }, /* J */ + { KEY_ID(0x00, 0x0E), 0x000E, REPORT_ID_KEYBOARD_KEYS }, /* K */ + { KEY_ID(0x00, 0x0F), 0x000F, REPORT_ID_KEYBOARD_KEYS }, /* L */ + { KEY_ID(0x00, 0x10), 0x0010, REPORT_ID_KEYBOARD_KEYS }, /* M */ + { KEY_ID(0x00, 0x11), 0x0011, REPORT_ID_KEYBOARD_KEYS }, /* N */ + { KEY_ID(0x00, 0x12), 0x0012, REPORT_ID_KEYBOARD_KEYS }, /* O */ + { KEY_ID(0x00, 0x13), 0x0013, REPORT_ID_KEYBOARD_KEYS }, /* P */ + { KEY_ID(0x00, 0x14), 0x0014, REPORT_ID_KEYBOARD_KEYS }, /* Q */ + { KEY_ID(0x00, 0x15), 0x0015, REPORT_ID_KEYBOARD_KEYS }, /* R */ + { KEY_ID(0x00, 0x16), 0x0016, REPORT_ID_KEYBOARD_KEYS }, /* S */ + { KEY_ID(0x00, 0x17), 0x0017, REPORT_ID_KEYBOARD_KEYS }, /* T */ + { KEY_ID(0x00, 0x18), 0x0018, REPORT_ID_KEYBOARD_KEYS }, /* U */ + { KEY_ID(0x00, 0x19), 0x0019, REPORT_ID_KEYBOARD_KEYS }, /* V */ + { KEY_ID(0x00, 0x1A), 0x001A, REPORT_ID_KEYBOARD_KEYS }, /* W */ + { KEY_ID(0x00, 0x1B), 0x001B, REPORT_ID_KEYBOARD_KEYS }, /* X */ + { KEY_ID(0x00, 0x1C), 0x001C, REPORT_ID_KEYBOARD_KEYS }, /* Y */ + { KEY_ID(0x00, 0x1D), 0x001D, REPORT_ID_KEYBOARD_KEYS }, /* Z */ + + { KEY_ID(0x00, 0x2C), 0x002C, REPORT_ID_KEYBOARD_KEYS }, /* spacebar */ +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/app.overlay b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/app.overlay new file mode 100644 index 00000000000..1da774e2470 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/app.overlay @@ -0,0 +1,10 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +/* Application does not use cpuflpr core. Assign whole RRAM to cpuapp. */ +&cpuapp_rram { + reg = < 0x0 DT_SIZE_K(500) >; +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private.pem b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private.pem new file mode 100644 index 00000000000..fffa0a3d635 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private.pem @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIFqLzeegnySVGPsME/47B+L0N6FArMzALaRVMHGnTHMZ +-----END PRIVATE KEY----- diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private_fast_pair.pem b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private_fast_pair.pem new file mode 100644 index 00000000000..19cf15cbfbe --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/mcuboot_private_fast_pair.pem @@ -0,0 +1,3 @@ +-----BEGIN PRIVATE KEY----- +MC4CAQAwBQYDK2VwBCIEIBwNpAMFyNNApXgkk5PkbABGHPX65WNGiOmSOAvwyv48 +-----END PRIVATE KEY----- diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release.conf new file mode 100644 index 00000000000..1a060f1dd67 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release.conf @@ -0,0 +1,42 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_SIZE_OPTIMIZATIONS=y + +CONFIG_HW_STACK_PROTECTION=y + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_MAX_IMG_SECTORS=256 +CONFIG_BOOT_BOOTSTRAP=n + +CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_RESET_ON_FATAL_ERROR=y + +# Reduce memory consumption +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_SYS_CLOCK_EXISTS=n +CONFIG_CLOCK_CONTROL=n +CONFIG_NRF_GRTC_TIMER=n +CONFIG_NRF_GRTC_START_SYSCOUNTER=n +CONFIG_SPI_NOR=n +CONFIG_GPIO=n +CONFIG_SERIAL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_PRINTK=n +CONFIG_USE_SEGGER_RTT=n + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Activate LTO +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_fast_pair.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_fast_pair.conf new file mode 100644 index 00000000000..1a060f1dd67 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_fast_pair.conf @@ -0,0 +1,42 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_SIZE_OPTIMIZATIONS=y + +CONFIG_HW_STACK_PROTECTION=y + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_MAX_IMG_SECTORS=256 +CONFIG_BOOT_BOOTSTRAP=n + +CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_RESET_ON_FATAL_ERROR=y + +# Reduce memory consumption +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_SYS_CLOCK_EXISTS=n +CONFIG_CLOCK_CONTROL=n +CONFIG_NRF_GRTC_TIMER=n +CONFIG_NRF_GRTC_START_SYSCOUNTER=n +CONFIG_SPI_NOR=n +CONFIG_GPIO=n +CONFIG_SERIAL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_PRINTK=n +CONFIG_USE_SEGGER_RTT=n + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Activate LTO +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_keyboard.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_keyboard.conf new file mode 100644 index 00000000000..1a060f1dd67 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/images/mcuboot/prj_release_keyboard.conf @@ -0,0 +1,42 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +CONFIG_SIZE_OPTIMIZATIONS=y + +CONFIG_HW_STACK_PROTECTION=y + +CONFIG_MAIN_STACK_SIZE=10240 + +CONFIG_BOOT_MAX_IMG_SECTORS=256 +CONFIG_BOOT_BOOTSTRAP=n + +CONFIG_BOOT_VERSION_CMP_USE_BUILD_NUMBER=y + +CONFIG_FLASH=y +CONFIG_FPROTECT=y + +CONFIG_RESET_ON_FATAL_ERROR=y + +# Reduce memory consumption +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n +CONFIG_SYS_CLOCK_EXISTS=n +CONFIG_CLOCK_CONTROL=n +CONFIG_NRF_GRTC_TIMER=n +CONFIG_NRF_GRTC_START_SYSCOUNTER=n +CONFIG_SPI_NOR=n +CONFIG_GPIO=n +CONFIG_SERIAL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_PRINTK=n +CONFIG_USE_SEGGER_RTT=n + +# Use minimal C library instead of the Picolib +CONFIG_MINIMAL_LIBC=y + +# Activate LTO +CONFIG_LTO=y +CONFIG_ISR_TABLES_LOCAL_DECLARATION=y diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/led_state_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/led_state_def.h new file mode 100644 index 00000000000..c6c29a1abe2 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/led_state_def.h @@ -0,0 +1,49 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include "led_state.h" +#include + +/* This configuration file is included only once from led_state module and holds + * information about LED effect associated with each state. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} led_state_def_include_once; + + +/* Map function to LED ID */ +static const uint8_t led_map[LED_ID_COUNT] = { + [LED_ID_SYSTEM_STATE] = 0, + [LED_ID_PEER_STATE] = 1 +}; + +/* On the nRF54L05 SoC, you can only use the **GPIO1** port for PWM hardware peripheral output. + * Because of that, on the DK PCA10156 revision v0.8.1 **LED 0** and **LED 2** cannot be used + * for PWM output. + * + * You can still use these LEDs with the PWM LED driver, but you must set the LED color to + * ``LED_COLOR(255, 255, 255)`` or ``LED_COLOR(0, 0, 0)``. This ensures the PWM peripheral is not + * used for the mentioned LEDs. + */ + +static const struct led_effect led_system_state_effect[LED_SYSTEM_STATE_COUNT] = { + [LED_SYSTEM_STATE_IDLE] = LED_EFFECT_LED_ON(LED_COLOR(255, 255, 255)), + [LED_SYSTEM_STATE_CHARGING] = LED_EFFECT_LED_ON(LED_COLOR(255, 255, 255)), + [LED_SYSTEM_STATE_ERROR] = LED_EFFECT_LED_BLINK(200, LED_COLOR(255, 255, 255)), +}; + +static const struct led_effect led_peer_state_effect[LED_PEER_COUNT][LED_PEER_STATE_COUNT] = { + {[LED_PEER_STATE_DISCONNECTED] = LED_EFFECT_LED_OFF(), + [LED_PEER_STATE_CONNECTED] = LED_EFFECT_LED_ON(LED_COLOR(100, 100, 100)), + [LED_PEER_STATE_PEER_SEARCH] = LED_EFFECT_LED_BREATH(1000, LED_COLOR(100, 100, 100)), + [LED_PEER_STATE_CONFIRM_SELECT] = LED_EFFECT_LED_BLINK(50, LED_COLOR(100, 100, 100)), + [LED_PEER_STATE_CONFIRM_ERASE] = LED_EFFECT_LED_BLINK(25, LED_COLOR(100, 100, 100)), + [LED_PEER_STATE_ERASE_ADV] = LED_EFFECT_LED_BREATH(100, LED_COLOR(100, 100, 100)), + }, +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static.yml b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static.yml new file mode 100644 index 00000000000..009017c95c9 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static.yml @@ -0,0 +1,8 @@ +app: + address: 0x0000 + region: flash_primary + size: 0x79000 +settings_storage: + address: 0x79000 + region: flash_primary + size: 0x4000 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release.yml b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release.yml new file mode 100644 index 00000000000..7897b645aa5 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release.yml @@ -0,0 +1,47 @@ +app: + address: 0x7800 + region: flash_primary + size: 0x38800 +mcuboot: + address: 0x0 + region: flash_primary + size: 0x7000 +mcuboot_pad: + address: 0x7000 + region: flash_primary + size: 0x800 +mcuboot_primary: + address: 0x7000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + size: 0x39000 + span: *id001 +mcuboot_primary_app: + address: 0x7800 + orig_span: &id002 + - app + region: flash_primary + size: 0x38800 + span: *id002 +mcuboot_secondary: + address: 0x40000 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: flash_primary + size: 0x39000 + span: *id003 +mcuboot_secondary_pad: + region: flash_primary + address: 0x40000 + size: 0x800 +mcuboot_secondary_app: + region: flash_primary + address: 0x40800 + size: 0x38800 +settings_storage: + address: 0x79000 + region: flash_primary + size: 0x4000 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_fast_pair.yml b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_fast_pair.yml new file mode 100644 index 00000000000..54358ed7e25 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_fast_pair.yml @@ -0,0 +1,51 @@ +app: + address: 0x7800 + region: flash_primary + size: 0x37800 +mcuboot: + address: 0x0 + region: flash_primary + size: 0x7000 +mcuboot_pad: + address: 0x7000 + region: flash_primary + size: 0x800 +mcuboot_primary: + address: 0x7000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + size: 0x38000 + span: *id001 +mcuboot_primary_app: + address: 0x7800 + orig_span: &id002 + - app + region: flash_primary + size: 0x37800 + span: *id002 +mcuboot_secondary: + address: 0x3f000 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: flash_primary + size: 0x38000 + span: *id003 +mcuboot_secondary_pad: + region: flash_primary + address: 0x3f000 + size: 0x800 +mcuboot_secondary_app: + region: flash_primary + address: 0x3f800 + size: 0x37800 +bt_fast_pair: + address: 0x77000 + region: flash_primary + size: 0x1000 +settings_storage: + address: 0x78000 + region: flash_primary + size: 0x5000 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_keyboard.yml b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_keyboard.yml new file mode 100644 index 00000000000..7897b645aa5 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/pm_static_release_keyboard.yml @@ -0,0 +1,47 @@ +app: + address: 0x7800 + region: flash_primary + size: 0x38800 +mcuboot: + address: 0x0 + region: flash_primary + size: 0x7000 +mcuboot_pad: + address: 0x7000 + region: flash_primary + size: 0x800 +mcuboot_primary: + address: 0x7000 + orig_span: &id001 + - app + - mcuboot_pad + region: flash_primary + size: 0x39000 + span: *id001 +mcuboot_primary_app: + address: 0x7800 + orig_span: &id002 + - app + region: flash_primary + size: 0x38800 + span: *id002 +mcuboot_secondary: + address: 0x40000 + orig_span: &id003 + - mcuboot_secondary_pad + - mcuboot_secondary_app + region: flash_primary + size: 0x39000 + span: *id003 +mcuboot_secondary_pad: + region: flash_primary + address: 0x40000 + size: 0x800 +mcuboot_secondary_app: + region: flash_primary + address: 0x40800 + size: 0x38800 +settings_storage: + address: 0x79000 + region: flash_primary + size: 0x4000 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/port_state_def.h b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/port_state_def.h new file mode 100644 index 00000000000..1b4906e1477 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/port_state_def.h @@ -0,0 +1,25 @@ +/* + * Copyright (c) 2025 Nordic Semiconductor ASA + * + * SPDX-License-Identifier: LicenseRef-Nordic-5-Clause + */ + +#include + +#include "port_state.h" + +/* This configuration file is included only once from board module and holds + * information about default pin states set while board is on and off. + */ + +/* This structure enforces the header file is included only once in the build. + * Violating this requirement triggers a multiple definition error at link time. + */ +const struct {} port_state_def_include_once; + + +static const struct port_state port_state_on[] = { +}; + +static const struct port_state port_state_off[] = { +}; diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj.conf new file mode 100644 index 00000000000..bdc675fc80c --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj.conf @@ -0,0 +1,113 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ +# Application Configuration + +CONFIG_DESKTOP_INIT_LOG_MOTION_EVENT=n +CONFIG_DESKTOP_INIT_LOG_HID_REPORT_EVENT=n +CONFIG_DESKTOP_INIT_LOG_HID_REPORT_SENT_EVENT=n +CONFIG_CAF_INIT_LOG_KEEP_ALIVE_EVENTS=n + +CONFIG_DESKTOP_ROLE_HID_PERIPHERAL=y +CONFIG_DESKTOP_PERIPHERAL_TYPE_MOUSE=y +CONFIG_DESKTOP_DEVICE_PID=0x52DE +CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE=y + +CONFIG_DESKTOP_MOTION_BUTTONS_ENABLE=y +CONFIG_DESKTOP_MOTION_BUTTONS_UP_KEY_ID=0 +CONFIG_DESKTOP_MOTION_BUTTONS_DOWN_KEY_ID=3 +CONFIG_DESKTOP_MOTION_BUTTONS_LEFT_KEY_ID=2 +CONFIG_DESKTOP_MOTION_BUTTONS_RIGHT_KEY_ID=1 + +CONFIG_CAF_BUTTONS=y +CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y +CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n + +CONFIG_CAF_CLICK_DETECTOR=y + +CONFIG_CAF_LEDS=y + +CONFIG_DESKTOP_BLE_USE_DEFAULT_ID=y + +CONFIG_DESKTOP_BLE_PEER_CONTROL=y +CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000 +CONFIG_DESKTOP_BLE_PEER_ERASE_ON_START=y + +CONFIG_DESKTOP_BLE_SECURITY_FAIL_TIMEOUT_S=10 +CONFIG_DESKTOP_BLE_LOW_LATENCY_LOCK=y + +CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y +CONFIG_DESKTOP_CONFIG_CHANNEL_OUT_REPORT=y + +################################################################################ +# Zephyr Configuration + +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 +CONFIG_ISR_STACK_SIZE=1536 +CONFIG_MAIN_STACK_SIZE=840 +CONFIG_BT_RX_STACK_SIZE=2048 +CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y +CONFIG_BT_HCI_TX_STACK_SIZE=1536 + +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n + +CONFIG_NUM_COOP_PRIORITIES=10 +CONFIG_NUM_PREEMPT_PRIORITIES=11 + +CONFIG_HEAP_MEM_POOL_SIZE=512 + +CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 +CONFIG_SYSTEM_CLOCK_NO_WAIT=y + +CONFIG_HW_STACK_PROTECTION=y +CONFIG_RESET_ON_FATAL_ERROR=n + +CONFIG_GPIO=y + +CONFIG_REBOOT=y + +CONFIG_SPEED_OPTIMIZATIONS=y + +CONFIG_PWM=y + +CONFIG_LED=y +CONFIG_LED_PWM=y + +CONFIG_BT_MAX_PAIRED=2 +CONFIG_BT_ID_MAX=3 + +CONFIG_BT_CTLR_SDC_LLPM=y +CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y +CONFIG_BT_ATT_TX_COUNT=4 +CONFIG_BT_CONN_TX_MAX=4 + +# External FLASH is not used by the application. Disable the driver. +CONFIG_SPI_NOR=n + +# Assign RRAM write buffer size to ensure short write slots. Trying to allocate long write slots +# while maintaining a BLE connection with short interval and no connection latency may lead to +# timeouts in flash_sync_mpsl. +CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=8 + +################################################################################ + +CONFIG_ASSERT=y +CONFIG_ASSERT_LEVEL=2 + +# nRF54L DK uses UART for logs. +CONFIG_SERIAL=y +CONFIG_CONSOLE=y +CONFIG_UART_CONSOLE=y + +CONFIG_LOG=y +CONFIG_LOG_BACKEND_UART=y +CONFIG_LOG_BACKEND_SHOW_COLOR=n +CONFIG_LOG_BACKEND_FORMAT_TIMESTAMP=n +CONFIG_LOG_MODE_DEFERRED=y +CONFIG_LOG_PRINTK=y +CONFIG_LOG_BUFFER_SIZE=4096 +CONFIG_LOG_PROCESS_THREAD_STACK_SIZE=1024 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release.conf new file mode 100644 index 00000000000..3708b59a790 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release.conf @@ -0,0 +1,100 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ +# Application Configuration + +CONFIG_DESKTOP_ROLE_HID_PERIPHERAL=y +CONFIG_DESKTOP_PERIPHERAL_TYPE_MOUSE=y +CONFIG_DESKTOP_DEVICE_PID=0x52DE +CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE=y + +CONFIG_DESKTOP_MOTION_BUTTONS_ENABLE=y +CONFIG_DESKTOP_MOTION_BUTTONS_UP_KEY_ID=0 +CONFIG_DESKTOP_MOTION_BUTTONS_DOWN_KEY_ID=3 +CONFIG_DESKTOP_MOTION_BUTTONS_LEFT_KEY_ID=2 +CONFIG_DESKTOP_MOTION_BUTTONS_RIGHT_KEY_ID=1 + +CONFIG_CAF_BUTTONS=y +CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y +CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n + +CONFIG_CAF_CLICK_DETECTOR=y + +CONFIG_CAF_LEDS=y + +CONFIG_DESKTOP_BLE_PEER_CONTROL=y +CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000 +CONFIG_DESKTOP_BLE_PEER_ERASE_ON_START=y + +CONFIG_DESKTOP_BLE_SECURITY_FAIL_TIMEOUT_S=10 +CONFIG_DESKTOP_BLE_LOW_LATENCY_LOCK=y + +CONFIG_DESKTOP_WATCHDOG_ENABLE=y +CONFIG_DESKTOP_FAILSAFE_ENABLE=y + +CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y +CONFIG_DESKTOP_CONFIG_CHANNEL_OUT_REPORT=y +CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_ENABLE=y + +################################################################################ +# Zephyr Configuration + +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 +CONFIG_ISR_STACK_SIZE=1536 +CONFIG_MAIN_STACK_SIZE=840 +CONFIG_BT_RX_STACK_SIZE=2048 +CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y +CONFIG_BT_HCI_TX_STACK_SIZE=1536 + +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n + +CONFIG_NUM_COOP_PRIORITIES=10 +CONFIG_NUM_PREEMPT_PRIORITIES=11 + +CONFIG_HEAP_MEM_POOL_SIZE=512 + +CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 +CONFIG_SYSTEM_CLOCK_NO_WAIT=y + +CONFIG_HW_STACK_PROTECTION=n +CONFIG_RESET_ON_FATAL_ERROR=n + +CONFIG_GPIO=y + +CONFIG_SERIAL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n + +CONFIG_REBOOT=y + +CONFIG_SPEED_OPTIMIZATIONS=y + +CONFIG_PWM=y + +CONFIG_LED=y +CONFIG_LED_PWM=y + +CONFIG_BT_MAX_PAIRED=2 +CONFIG_BT_ID_MAX=3 + +CONFIG_BT_CTLR_SDC_LLPM=y +CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y +CONFIG_BT_ATT_TX_COUNT=4 +CONFIG_BT_CONN_TX_MAX=4 + +CONFIG_STREAM_FLASH=y +CONFIG_IMG_MANAGER=y +CONFIG_MCUBOOT_IMG_MANAGER=y + +# External FLASH is not used by the application. Disable the driver. +CONFIG_SPI_NOR=n + +# Assign RRAM write buffer size to ensure short write slots. Trying to allocate long write slots +# while maintaining a BLE connection with short interval and no connection latency may lead to +# timeouts in flash_sync_mpsl. +CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=8 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_fast_pair.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_fast_pair.conf new file mode 100644 index 00000000000..95b34aa65d8 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_fast_pair.conf @@ -0,0 +1,124 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ +# release: Fast Pair version +# +# This release build type configuration enables Fast Pair support. +# The build type configuration supports only configuration channel DFU transport. +# +# Application Configuration + +CONFIG_DESKTOP_ROLE_HID_PERIPHERAL=y +CONFIG_DESKTOP_PERIPHERAL_TYPE_MOUSE=y +CONFIG_DESKTOP_DEVICE_PID=0x52DE +CONFIG_DESKTOP_DEVICE_GENERATION="FastPair" +CONFIG_DESKTOP_HID_BOOT_INTERFACE_MOUSE=y + +CONFIG_DESKTOP_MOTION_BUTTONS_ENABLE=y +CONFIG_DESKTOP_MOTION_BUTTONS_UP_KEY_ID=0 +CONFIG_DESKTOP_MOTION_BUTTONS_DOWN_KEY_ID=3 +CONFIG_DESKTOP_MOTION_BUTTONS_LEFT_KEY_ID=2 +CONFIG_DESKTOP_MOTION_BUTTONS_RIGHT_KEY_ID=1 + +CONFIG_CAF_BUTTONS=y +CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y +CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n + +CONFIG_CAF_CLICK_DETECTOR=y + +CONFIG_CAF_LEDS=y + +# Align advertising intervals with Fast Pair specification. +CONFIG_CAF_BLE_ADV_FAST_INT_MIN=0x0040 +CONFIG_CAF_BLE_ADV_FAST_INT_MAX=0x0060 +CONFIG_CAF_BLE_ADV_SLOW_INT_MIN=0x0060 +CONFIG_CAF_BLE_ADV_SLOW_INT_MAX=0x0080 + +# Disable filter accept list to allow for multiple bonds for a given local identity. +CONFIG_CAF_BLE_ADV_FILTER_ACCEPT_LIST=n +CONFIG_CAF_BLE_STATE_MAX_LOCAL_ID_BONDS=3 + +# Align the advertised TX power with Fast Pair expectations. +CONFIG_BT_ADV_PROV_TX_POWER_CORRECTION_VAL=-11 + +CONFIG_DESKTOP_BLE_PEER_CONTROL=y +CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000 +CONFIG_DESKTOP_BLE_PEER_ERASE_ON_START=y + +CONFIG_DESKTOP_BLE_SECURITY_FAIL_TIMEOUT_S=30 +CONFIG_DESKTOP_BLE_LOW_LATENCY_LOCK=y + +CONFIG_DESKTOP_WATCHDOG_ENABLE=y +CONFIG_DESKTOP_FAILSAFE_ENABLE=y + +CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y +CONFIG_DESKTOP_CONFIG_CHANNEL_OUT_REPORT=y +CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_ENABLE=y + +################################################################################ +# Zephyr Configuration + +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 +CONFIG_ISR_STACK_SIZE=1536 +CONFIG_MAIN_STACK_SIZE=840 +CONFIG_BT_RX_STACK_SIZE=2048 +CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y +CONFIG_BT_HCI_TX_STACK_SIZE=1536 + +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n + +CONFIG_NUM_COOP_PRIORITIES=10 +CONFIG_NUM_PREEMPT_PRIORITIES=11 + +CONFIG_HEAP_MEM_POOL_SIZE=2048 + +CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 +CONFIG_SYSTEM_CLOCK_NO_WAIT=y + +CONFIG_HW_STACK_PROTECTION=n +CONFIG_RESET_ON_FATAL_ERROR=n + +CONFIG_GPIO=y + +CONFIG_SERIAL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n + +CONFIG_REBOOT=y + +# Optimize for size to reduce memory footprint. +CONFIG_SIZE_OPTIMIZATIONS=y + +CONFIG_PWM=y + +CONFIG_LED=y +CONFIG_LED_PWM=y + +CONFIG_BT_MAX_PAIRED=4 +CONFIG_BT_ID_MAX=3 + +CONFIG_BT_CTLR_SDC_LLPM=y +CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y +CONFIG_BT_ATT_TX_COUNT=4 +CONFIG_BT_CONN_TX_MAX=4 + +CONFIG_STREAM_FLASH=y +CONFIG_IMG_MANAGER=y +CONFIG_MCUBOOT_IMG_MANAGER=y + +CONFIG_BT_FAST_PAIR=y +CONFIG_BT_FAST_PAIR_USE_CASE_MOUSE=y +CONFIG_BT_PRIVACY=y + +# External FLASH is not used by the application. Disable the driver. +CONFIG_SPI_NOR=n + +# Assign RRAM write buffer size to ensure short write slots. Trying to allocate long write slots +# while maintaining a BLE connection with short interval and no connection latency may lead to +# timeouts in flash_sync_mpsl. +CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=8 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_keyboard.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_keyboard.conf new file mode 100644 index 00000000000..58ff36ab55d --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/prj_release_keyboard.conf @@ -0,0 +1,107 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ +# release: Keyboard version +# +# This release build type configuration acts as a keyboard. +# +# Application Configuration + +CONFIG_DESKTOP_ROLE_HID_PERIPHERAL=y +CONFIG_DESKTOP_PERIPHERAL_TYPE_KEYBOARD=y +CONFIG_DESKTOP_DEVICE_PID=0x52DD +CONFIG_DESKTOP_HID_BOOT_INTERFACE_KEYBOARD=y +CONFIG_DESKTOP_HID_STATE_HID_KEYMAP_DEF_PATH="hid_keymap_def_keyboard.h" +CONFIG_DESKTOP_HID_STATE_HID_KEYBOARD_LEDS_DEF_PATH="hid_keyboard_leds_def_keyboard.h" +CONFIG_DESKTOP_HID_REPORT_EXPIRATION=10000 +CONFIG_DESKTOP_HID_EVENT_QUEUE_SIZE=60 + +CONFIG_CAF_BUTTONS=y +CONFIG_CAF_BUTTONS_POLARITY_INVERSED=y +CONFIG_CAF_BUTTONS_PM_KEEP_ALIVE=n + +CONFIG_CAF_CLICK_DETECTOR=y + +CONFIG_CAF_LEDS=y + +CONFIG_DESKTOP_BUTTONS_SIM_ENABLE=y +CONFIG_DESKTOP_BUTTONS_SIM_INTERVAL=100 +CONFIG_DESKTOP_BUTTONS_SIM_LOOP_FOREVER=y +CONFIG_DESKTOP_BUTTONS_SIM_TRIGGER_KEY_ID=0x03 + +CONFIG_DESKTOP_BLE_PEER_CONTROL=y +CONFIG_DESKTOP_BLE_PEER_CONTROL_BUTTON=0x0000 +CONFIG_DESKTOP_BLE_PEER_ERASE_ON_START=y + +CONFIG_DESKTOP_BLE_SECURITY_FAIL_TIMEOUT_S=10 +CONFIG_DESKTOP_BLE_LOW_LATENCY_LOCK=y + +CONFIG_DESKTOP_WATCHDOG_ENABLE=y +CONFIG_DESKTOP_FAILSAFE_ENABLE=y + +CONFIG_DESKTOP_CONFIG_CHANNEL_ENABLE=y +CONFIG_DESKTOP_CONFIG_CHANNEL_OUT_REPORT=y +CONFIG_DESKTOP_CONFIG_CHANNEL_DFU_ENABLE=y + +################################################################################ +# Zephyr Configuration + +CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=1536 +CONFIG_ISR_STACK_SIZE=1536 +CONFIG_MAIN_STACK_SIZE=840 +CONFIG_BT_RX_STACK_SIZE=2048 +CONFIG_BT_HCI_TX_STACK_SIZE_WITH_PROMPT=y +CONFIG_BT_HCI_TX_STACK_SIZE=1536 + +CONFIG_BOOT_BANNER=n +CONFIG_NCS_BOOT_BANNER=n + +CONFIG_NUM_COOP_PRIORITIES=10 +CONFIG_NUM_PREEMPT_PRIORITIES=11 + +CONFIG_HEAP_MEM_POOL_SIZE=4096 + +CONFIG_SYS_CLOCK_TICKS_PER_SEC=1000 +CONFIG_SYSTEM_CLOCK_NO_WAIT=y + +CONFIG_HW_STACK_PROTECTION=n +CONFIG_RESET_ON_FATAL_ERROR=n + +CONFIG_GPIO=y + +CONFIG_SERIAL=n +CONFIG_CONSOLE=n +CONFIG_UART_CONSOLE=n +CONFIG_USE_SEGGER_RTT=n + +CONFIG_REBOOT=y + +CONFIG_SPEED_OPTIMIZATIONS=y + +CONFIG_PWM=y + +CONFIG_LED=y +CONFIG_LED_PWM=y + +CONFIG_BT_MAX_PAIRED=2 +CONFIG_BT_ID_MAX=3 + +CONFIG_BT_CTLR_SDC_LLPM=y +CONFIG_BT_CTLR_TX_PWR_DYNAMIC_CONTROL=y +CONFIG_BT_ATT_TX_COUNT=6 +CONFIG_BT_CONN_TX_MAX=6 + +CONFIG_STREAM_FLASH=y +CONFIG_IMG_MANAGER=y +CONFIG_MCUBOOT_IMG_MANAGER=y + +# External FLASH is not used by the application. Disable the driver. +CONFIG_SPI_NOR=n + +# Assign RRAM write buffer size to ensure short write slots. Trying to allocate long write slots +# while maintaining a BLE connection with short interval and no connection latency may lead to +# timeouts in flash_sync_mpsl. +CONFIG_NRF_RRAM_WRITE_BUFFER_SIZE=8 diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release.conf new file mode 100644 index 00000000000..75c65285841 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ + +SB_CONFIG_BOOTLOADER_MCUBOOT=y +SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y +SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y +SB_CONFIG_BOOT_SIGNATURE_TYPE_PURE=y +SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU=y +SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private.pem" diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_fast_pair.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_fast_pair.conf new file mode 100644 index 00000000000..ce44ce83fb4 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_fast_pair.conf @@ -0,0 +1,14 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ + +SB_CONFIG_BT_FAST_PAIR=y +SB_CONFIG_BOOTLOADER_MCUBOOT=y +SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y +SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y +SB_CONFIG_BOOT_SIGNATURE_TYPE_PURE=y +SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU=y +SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private_fast_pair.pem" diff --git a/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_keyboard.conf b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_keyboard.conf new file mode 100644 index 00000000000..75c65285841 --- /dev/null +++ b/applications/nrf_desktop/configuration/nrf54l15dk_nrf54l05_cpuapp/sysbuild_release_keyboard.conf @@ -0,0 +1,13 @@ +# +# Copyright (c) 2025 Nordic Semiconductor ASA +# +# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause +# +################################################################################ + +SB_CONFIG_BOOTLOADER_MCUBOOT=y +SB_CONFIG_MCUBOOT_MODE_DIRECT_XIP=y +SB_CONFIG_BOOT_SIGNATURE_TYPE_ED25519=y +SB_CONFIG_BOOT_SIGNATURE_TYPE_PURE=y +SB_CONFIG_MCUBOOT_SIGNATURE_USING_KMU=y +SB_CONFIG_BOOT_SIGNATURE_KEY_FILE="\${APPLICATION_CONFIG_DIR}/images/mcuboot/mcuboot_private.pem" diff --git a/applications/nrf_desktop/sample.yaml b/applications/nrf_desktop/sample.yaml index 093f47ed454..edb7bf03bd0 100644 --- a/applications/nrf_desktop/sample.yaml +++ b/applications/nrf_desktop/sample.yaml @@ -48,6 +48,7 @@ tests: - nrf52840dongle/nrf52840 - nrf52840gmouse/nrf52840 - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l05/cpuapp integration_platforms: - nrf52dmouse/nrf52832 - nrf52kbd/nrf52832 @@ -60,6 +61,7 @@ tests: - nrf52840dongle/nrf52840 - nrf52840gmouse/nrf52840 - nrf5340dk/nrf5340/cpuapp + - nrf54l15dk/nrf54l05/cpuapp applications.nrf_desktop.zdebug_wwcb: build_only: true platform_allow: nrf52840dk/nrf52840 @@ -159,6 +161,13 @@ tests: integration_platforms: - nrf52840dk/nrf52840 extra_args: FILE_SUFFIX=keyboard + applications.nrf_desktop.zrelease_keyboard: + build_only: true + platform_allow: + - nrf54l15dk/nrf54l05/cpuapp + integration_platforms: + - nrf54l15dk/nrf54l05/cpuapp + extra_args: FILE_SUFFIX=release_keyboard applications.nrf_desktop.zdebug_nrf21540ek: build_only: true platform_allow: nrf52840dk/nrf52840 @@ -192,6 +201,7 @@ tests: - nrf52840gmouse/nrf52840 - nrf5340dk/nrf5340/cpuapp - nrf54h20dk/nrf54h20/cpuapp + - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp integration_platforms: @@ -207,6 +217,7 @@ tests: - nrf52840gmouse/nrf52840 - nrf5340dk/nrf5340/cpuapp - nrf54h20dk/nrf54h20/cpuapp + - nrf54l15dk/nrf54l05/cpuapp - nrf54l15dk/nrf54l10/cpuapp - nrf54l15dk/nrf54l15/cpuapp extra_args: FILE_SUFFIX=release @@ -221,9 +232,12 @@ tests: - FP_ANTI_SPOOFING_KEY=8E8ulwhSIp/skZeg27xmWv2SxRxTOagypHrf2OdrhGY= applications.nrf_desktop.zrelease_fast_pair.gmouse: build_only: true - platform_allow: nrf52840gmouse/nrf52840 + platform_allow: + - nrf52840gmouse/nrf52840 + - nrf54l15dk/nrf54l05/cpuapp integration_platforms: - nrf52840gmouse/nrf52840 + - nrf54l15dk/nrf54l05/cpuapp extra_args: - FILE_SUFFIX=release_fast_pair - FP_MODEL_ID=0x8E717D