Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include "app_common.dtsi"

/ {
hid_dev_0: hid_dev_0 {
compatible = "zephyr,hid-device";
label = "HID0";
protocol-code = "mouse";
in-polling-period-us = <125>;
in-report-size = <64>;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
/*
* 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(2036) >;
};

/ {
/* Disable pwmleds and redefine them to align configuration with CAF LEDs requirements. */
/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";
};
};
};

&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";
};

&pinctrl {
pwm20_default_alt: pwm20_default_alt {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 22)>;
};
};

pwm20_sleep_alt: pwm20_sleep_alt {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 22)>;
low-power-enable;
};
};

pwm21_default_alt: pwm21_default_alt {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 25)>;
};
};

pwm21_sleep_alt: pwm21_sleep_alt {
group1 {
psels = <NRF_PSEL(PWM_OUT0, 1, 25)>;
low-power-enable;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include "app_common.dtsi"

/ {
hid_dev_0: hid_dev_0 {
compatible = "zephyr,hid-device";
label = "HID0";
protocol-code = "mouse";
in-polling-period-us = <125>;
in-report-size = <64>;
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include "app_common.dtsi"

/ {
hid_dev_0: hid_dev_0 {
compatible = "zephyr,hid-device";
label = "HID0";
protocol-code = "mouse";
in-polling-period-us = <125>;
in-report-size = <64>;
};
};

/* For nRF54L, watchdog status is disabled by default. Needs to be enabled in DTS overlay. */
&wdt31 {
status = "okay";
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <caf/gpio_pins.h>

/* 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) },
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include <caf/click_detector.h>

/* 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 */
};
Original file line number Diff line number Diff line change
@@ -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[] = {
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
/*
* Copyright (c) 2025 Nordic Semiconductor ASA
*
* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
*/

#include "hid_keymap.h"
#include <caf/key_id.h>

/* 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. nRF54LM20 DK by default uses all 4 buttons
* only to control generating motion.
*/
};
Original file line number Diff line number Diff line change
@@ -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(2036) >;
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
-----BEGIN PRIVATE KEY-----
MC4CAQAwBQYDK2VwBCIEIFhR5tisVfxfoqS17OebTkJe5elwdsQj4tTAcGfz0r/r
-----END PRIVATE KEY-----
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# 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

# The following features will be enabled once they are available
# - HW memory protection with FPROTECT library
# - Watchdog functionality
CONFIG_FPROTECT=n
CONFIG_BOOT_WATCHDOG_FEED=n

# Temporarily replace the HW crypto driver with SW driver until the HW driver is available.
CONFIG_PSA_CRYPTO_DRIVER_CRACEN=n
CONFIG_PSA_CRYPTO_DRIVER_OBERON=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 Link Time Optimization (LTO)
CONFIG_LTO=y
CONFIG_ISR_TABLES_LOCAL_DECLARATION=y

# Improve debugging experience by disabling reset on fatal error
CONFIG_RESET_ON_FATAL_ERROR=n
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
#
# Copyright (c) 2025 Nordic Semiconductor ASA
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_SIZE_OPTIMIZATIONS_AGGRESSIVE=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

# The following features will be enabled once they are available
# - HW memory protection with FPROTECT library
# - Watchdog functionality
CONFIG_FPROTECT=n
CONFIG_BOOT_WATCHDOG_FEED=n

# Temporarily replace the HW crypto driver with SW driver until the HW driver is available.
CONFIG_PSA_CRYPTO_DRIVER_CRACEN=n
CONFIG_PSA_CRYPTO_DRIVER_OBERON=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

# Link Time Optimization (LTO) is not supported for the LLVM toolchain variant.
CONFIG_LTO=n
CONFIG_ISR_TABLES_LOCAL_DECLARATION=n

# Improve debugging experience by disabling reset on fatal error
CONFIG_RESET_ON_FATAL_ERROR=n
Loading
Loading