From 12329b388e5bf7a60c16185d8f714a0596b681a7 Mon Sep 17 00:00:00 2001
From: Peter Johanson <peter@peterjohanson.com>
Date: Fri, 9 Dec 2022 17:07:45 -0500
Subject: [PATCH] feat(boards): Add Arduino Uno interconnect, nrf52840dk
 config.

---
 .../nrf52840dk_nrf52840.zmk.yml                   | 10 ++++++++++
 .../interconnects/arduino_uno/arduino_uno.zmk.yml | 15 +++++++++++++++
 app/boards/nrf52840dk_nrf52840.conf               | 12 ++++++++++++
 3 files changed, 37 insertions(+)
 create mode 100644 app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml
 create mode 100644 app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml
 create mode 100644 app/boards/nrf52840dk_nrf52840.conf

diff --git a/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml b/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml
new file mode 100644
index 00000000..2a0d9946
--- /dev/null
+++ b/app/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.zmk.yml
@@ -0,0 +1,10 @@
+file_format: "1"
+id: nrf52840dk_nrf52840
+name: Nordic nRF52840 DK
+type: board
+arch: arm
+outputs:
+  - usb
+  - ble
+url: https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dk
+exposes: [arduino_uno]
diff --git a/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml b/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml
new file mode 100644
index 00000000..8ec164eb
--- /dev/null
+++ b/app/boards/interconnects/arduino_uno/arduino_uno.zmk.yml
@@ -0,0 +1,15 @@
+file_format: "1"
+id: arduino_uno
+name: Arduino Uno Rev3
+type: interconnect
+url: https://store-usa.arduino.cc/products/arduino-uno-rev3?selectedStore=us
+manufacturer: Arduino
+description: |
+  The Arduino Uno Rev3 is a board who's popularity lead to countless shields being developed for it. By
+  natural extension, once there were many shields designed for it, many other *boards* began to be developed
+  that were compatible to leverage the extensive available shields. Today, many dev kits come with Uno
+  headers to make it easy to work with them.
+
+  Note: ZMK doesn't support boards with AVR 8-bit processors, such as the ATmega32U4, because Zephyrâ„¢ only
+  supports 32-bit and 64-bit platforms. As a result, boards like the original Arduino Uno Rev3 itself are
+  *not* supported by ZMK.
diff --git a/app/boards/nrf52840dk_nrf52840.conf b/app/boards/nrf52840dk_nrf52840.conf
new file mode 100644
index 00000000..6c9bcdf1
--- /dev/null
+++ b/app/boards/nrf52840dk_nrf52840.conf
@@ -0,0 +1,12 @@
+# Copyright (c) 2022 The ZMK Contributors
+# SPDX-License-Identifier: MIT
+
+CONFIG_ZMK_USB=y
+CONFIG_ZMK_BLE=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