From 04cd57d8991bcc7a1ec23175cccb2a1e5baf6baf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Nicolas=20M=C3=BCnnich?= Date: Sun, 28 Dec 2025 22:30:42 +0000 Subject: [PATCH] feat(boards): Add ZMK specific tweaks for upstream rp2040 board --- .../extensions/rp2040_zero/rp2040_zero.conf | 16 ++++++++++++++ .../rp2040_zero/rp2040_zero.overlay | 22 +++++++++++++++++++ 2 files changed, 38 insertions(+) create mode 100644 app/boards/extensions/rp2040_zero/rp2040_zero.conf create mode 100644 app/boards/extensions/rp2040_zero/rp2040_zero.overlay diff --git a/app/boards/extensions/rp2040_zero/rp2040_zero.conf b/app/boards/extensions/rp2040_zero/rp2040_zero.conf new file mode 100644 index 000000000..147adc6d7 --- /dev/null +++ b/app/boards/extensions/rp2040_zero/rp2040_zero.conf @@ -0,0 +1,16 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_UART_INTERRUPT_DRIVEN=n +CONFIG_ZMK_USB=y + +CONFIG_MPU_ALLOW_FLASH_WRITE=y +CONFIG_NVS=y +CONFIG_SETTINGS_NVS=y +CONFIG_FLASH=y +CONFIG_FLASH_PAGE_LAYOUT=y +CONFIG_FLASH_MAP=y + +CONFIG_RETAINED_MEM=y +CONFIG_RETENTION=y +CONFIG_RETENTION_BOOT_MODE=y \ No newline at end of file diff --git a/app/boards/extensions/rp2040_zero/rp2040_zero.overlay b/app/boards/extensions/rp2040_zero/rp2040_zero.overlay new file mode 100644 index 000000000..b040a9183 --- /dev/null +++ b/app/boards/extensions/rp2040_zero/rp2040_zero.overlay @@ -0,0 +1,22 @@ +/* + * Copyright (c) 2025 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +#include + +&uart0 { status = "disabled"; }; + +&code_partition { + reg = <0x100 (DT_SIZE_M(2) - 0x100 - DT_SIZE_K(512))>; +}; + +&flash0 { + partitions { + storage_partition: partition@180000 { + reg = <0x180000 DT_SIZE_K(512)>; + read-only; + }; + }; +}; \ No newline at end of file