Merge bae11bff19
into b74cd39ab5
This commit is contained in:
commit
18687175cc
10 changed files with 326 additions and 0 deletions
9
app/boards/arm/adafruit_feather_nrf52840/CMakeLists.txt
Normal file
9
app/boards/arm/adafruit_feather_nrf52840/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
|
||||
set_property(GLOBAL APPEND PROPERTY extra_post_build_commands
|
||||
COMMAND ${PYTHON_EXECUTABLE} ${ZEPHYR_BASE}/../tools/uf2/utils/uf2conv.py
|
||||
-c
|
||||
-b 0x26000
|
||||
-f 0xADA52840
|
||||
-o ${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.uf2
|
||||
${PROJECT_BINARY_DIR}/${CONFIG_KERNEL_BIN_NAME}.bin
|
||||
)
|
10
app/boards/arm/adafruit_feather_nrf52840/Kconfig
Normal file
10
app/boards/arm/adafruit_feather_nrf52840/Kconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
# Adafruit Feather nRF52840 Express board configuration
|
||||
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ENABLE_DCDC
|
||||
bool "Enable DCDC mode"
|
||||
select SOC_DCDC_NRF52X
|
||||
default y
|
||||
depends on BOARD_ADAFRUIT_FEATHER_NRF52840
|
8
app/boards/arm/adafruit_feather_nrf52840/Kconfig.board
Normal file
8
app/boards/arm/adafruit_feather_nrf52840/Kconfig.board
Normal file
|
@ -0,0 +1,8 @@
|
|||
# Adafruit Feather nRF52840 Express board configuration
|
||||
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
config BOARD_ADAFRUIT_FEATHER_NRF52840
|
||||
bool "Adafruit Feather nRF52840 Express"
|
||||
depends on SOC_NRF52840_QIAA
|
33
app/boards/arm/adafruit_feather_nrf52840/Kconfig.defconfig
Normal file
33
app/boards/arm/adafruit_feather_nrf52840/Kconfig.defconfig
Normal file
|
@ -0,0 +1,33 @@
|
|||
# Adafruit Feather nRF52840 Express board configuration
|
||||
|
||||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
if BOARD_ADAFRUIT_FEATHER_NRF52840
|
||||
|
||||
config BOARD
|
||||
default "adafruit_feather_nrf52840"
|
||||
|
||||
if USB
|
||||
|
||||
config USB_NRFX
|
||||
default y
|
||||
|
||||
config USB_DEVICE_STACK
|
||||
default y
|
||||
|
||||
endif # USB
|
||||
|
||||
config BT_CTLR
|
||||
default BT
|
||||
|
||||
config ZMK_BLE
|
||||
default y
|
||||
|
||||
config ZMK_USB
|
||||
default y
|
||||
|
||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||
default y
|
||||
|
||||
endif # BOARD_ADAFRUIT_FEATHER_NRF52840
|
|
@ -0,0 +1,155 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/dts-v1/;
|
||||
#include <nordic/nrf52840_qiaa.dtsi>
|
||||
#include "feather_connector.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Adafruit Feather nRF52840 Express ZMK";
|
||||
compatible = "adafruit,feather-nrf52840-zmk";
|
||||
|
||||
chosen {
|
||||
zephyr,code-partition = &code_partition;
|
||||
zephyr,sram = &sram0;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,console = &cdc_acm_uart;
|
||||
zmk,battery = &vbatt;
|
||||
};
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
led0: led_0 {
|
||||
gpios = <&gpio1 15 0>;
|
||||
label = "Red LED";
|
||||
};
|
||||
blue_led: led_1 {
|
||||
gpios = <&gpio1 10 0>;
|
||||
label = "Blue LED";
|
||||
};
|
||||
};
|
||||
|
||||
vbatt: vbatt {
|
||||
compatible = "zmk,battery-voltage-divider";
|
||||
label = "VBATT";
|
||||
io-channels = <&adc 5>;
|
||||
output-ohms = <100000>;
|
||||
full-ohms = <(100000 + 100000)>;
|
||||
};
|
||||
|
||||
/* These aliases are provided for compatibility with samples */
|
||||
aliases {
|
||||
led0 = &led0;
|
||||
led1 = &blue_led;
|
||||
};
|
||||
};
|
||||
|
||||
&adc {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpiote {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&gpio1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&uart0 {
|
||||
compatible = "nordic,nrf-uart";
|
||||
current-speed = <115200>;
|
||||
status = "okay";
|
||||
tx-pin = <25>;
|
||||
rx-pin = <24>;
|
||||
};
|
||||
|
||||
&i2c0 {
|
||||
status = "okay";
|
||||
sda-pin = <12>;
|
||||
scl-pin = <11>;
|
||||
};
|
||||
|
||||
&spi1 {
|
||||
compatible = "nordic,nrf-spi";
|
||||
status = "okay";
|
||||
sck-pin = <14>;
|
||||
mosi-pin = <13>;
|
||||
miso-pin = <15>;
|
||||
};
|
||||
|
||||
&qspi {
|
||||
status = "okay";
|
||||
sck-pin = <19>;
|
||||
io-pins = <17>, <22>, <23>, <21>;
|
||||
csn-pins = <20>;
|
||||
gd25q16: gd25q16@0 {
|
||||
compatible = "nordic,qspi-nor";
|
||||
reg = <0>;
|
||||
writeoc = "pp4io";
|
||||
readoc = "read4io";
|
||||
sck-frequency = <16000000>;
|
||||
label = "GD25Q16";
|
||||
jedec-id = [c8 40 15];
|
||||
size = <16777216>;
|
||||
has-dpd;
|
||||
t-enter-dpd = <20000>;
|
||||
t-exit-dpd = <20000>;
|
||||
};
|
||||
};
|
||||
|
||||
&flash0 {
|
||||
/*
|
||||
* For more information, see:
|
||||
* https://docs.zephyrproject.org/latest/guides/dts/legacy-macros.html#legacy-flash-partitions
|
||||
*/
|
||||
partitions {
|
||||
compatible = "fixed-partitions";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
sd_partition: partition@0 {
|
||||
label = "softdevice";
|
||||
reg = <0x00000000 0x00026000>;
|
||||
};
|
||||
code_partition: partition@26000 {
|
||||
label = "code_partition";
|
||||
reg = <0x00026000 0x000c6000>;
|
||||
};
|
||||
|
||||
/*
|
||||
* The flash starting at 0x000ec000 and ending at
|
||||
* 0x000f3fff is reserved for use by the application.
|
||||
*/
|
||||
|
||||
/*
|
||||
* Storage partition will be used by FCB/LittleFS/NVS
|
||||
* if enabled.
|
||||
*/
|
||||
storage_partition: partition@ec000 {
|
||||
label = "storage";
|
||||
reg = <0x000ec000 0x00008000>;
|
||||
};
|
||||
|
||||
boot_partition: partition@f4000 {
|
||||
label = "adafruit_boot";
|
||||
reg = <0x000f4000 0x0000c000>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&usbd {
|
||||
/*compatible = "nordic,nrf-usbd";*/
|
||||
status = "okay";
|
||||
cdc_acm_uart: cdc_acm_uart {
|
||||
compatible = "zephyr,cdc-acm-uart";
|
||||
label = "CDC_ACM_0";
|
||||
};
|
||||
};
|
|
@ -0,0 +1,19 @@
|
|||
identifier: adafruit_feather_nrf52840
|
||||
name: Adafruit Feather nRF52840 Express
|
||||
type: mcu
|
||||
arch: arm
|
||||
toolchain:
|
||||
- zephyr
|
||||
- gnuarmemb
|
||||
- xtools
|
||||
supported:
|
||||
- adc
|
||||
- usb_device
|
||||
- usb_cdc
|
||||
- ble
|
||||
- ieee802154
|
||||
- watchdog
|
||||
- counter
|
||||
- feather_serial
|
||||
- feather_i2c
|
||||
- feather_spi
|
|
@ -0,0 +1,8 @@
|
|||
identifier: adafruit_feather_nrf52840
|
||||
name: Adafruit Feather nRF52840 Express
|
||||
type: mcu
|
||||
arch: arm
|
||||
outputs:
|
||||
- usb
|
||||
- ble
|
||||
url: https://www.adafruit.com/product/4062
|
|
@ -0,0 +1,32 @@
|
|||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
CONFIG_SOC_SERIES_NRF52X=y
|
||||
CONFIG_SOC_NRF52840_QIAA=y
|
||||
CONFIG_BOARD_ADAFRUIT_FEATHER_NRF52840=y
|
||||
|
||||
# Enable MPU
|
||||
CONFIG_ARM_MPU=y
|
||||
|
||||
# enable GPIO
|
||||
CONFIG_GPIO=y
|
||||
|
||||
## enable uart driver
|
||||
#CONFIG_SERIAL=y
|
||||
#
|
||||
## enable console
|
||||
#CONFIG_CONSOLE=y
|
||||
#CONFIG_UART_CONSOLE=y
|
||||
#
|
||||
## additional board options
|
||||
#CONFIG_GPIO_AS_PINRESET=y
|
||||
|
||||
CONFIG_USE_DT_CODE_PARTITION=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_BUILD_OUTPUT_UF2=y
|
13
app/boards/arm/adafruit_feather_nrf52840/board.cmake
Normal file
13
app/boards/arm/adafruit_feather_nrf52840/board.cmake
Normal file
|
@ -0,0 +1,13 @@
|
|||
# Copyright (c) 2021 The ZMK Contributors
|
||||
# SPDX-License-Identifier: MIT
|
||||
|
||||
# board_runner_args(jlink "--device=nrf52" "--speed=4000")
|
||||
# board_runner_args(pyocd "--target=nrf52840" "--frequency=4000000")
|
||||
# board_runner_args(blackmagicprobe "--gdb-serial=/dev/ttyBmpGdb")
|
||||
# include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
|
||||
# include(${ZEPHYR_BASE}/boards/common/pyocd.board.cmake)
|
||||
# include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||
|
||||
board_runner_args(nrfjprog "--nrf-family=NRF52" "--softreset")
|
||||
include(${ZEPHYR_BASE}/boards/common/blackmagicprobe.board.cmake)
|
||||
include(${ZEPHYR_BASE}/boards/common/nrfjprog.board.cmake)
|
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2021 The ZMK Contributors
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
/ {
|
||||
feather_header: connector {
|
||||
compatible = "adafruit-feather-header";
|
||||
#gpio-cells = <2>;
|
||||
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||
gpio-map-pass-thru = <0 0x3f>;
|
||||
gpio-map = <0 0 &gpio0 4 0>, /* A0 */
|
||||
<1 0 &gpio0 5 0>, /* A1 */
|
||||
<2 0 &gpio0 30 0>, /* A2 */
|
||||
<3 0 &gpio0 28 0>, /* A3 */
|
||||
<4 0 &gpio0 2 0>, /* A4 */
|
||||
<5 0 &gpio0 3 0>, /* A5 */
|
||||
<6 0 &gpio0 14 0>, /* SCK */
|
||||
<7 0 &gpio0 13 0>, /* MOSI */
|
||||
<8 0 &gpio0 15 0>, /* MISO */
|
||||
<9 0 &gpio0 24 0>, /* RXD */
|
||||
<10 0 &gpio0 25 0>, /* TXD */
|
||||
<11 0 &gpio0 10 0>, /* D2 (NFC2) */
|
||||
<12 0 &gpio0 12 0>, /* SDA */
|
||||
<13 0 &gpio0 11 0>, /* SCL */
|
||||
<14 0 &gpio1 8 0>, /* D5 */
|
||||
<15 0 &gpio0 7 0>, /* D6 */
|
||||
<16 0 &gpio0 26 0>, /* D9 */
|
||||
<17 0 &gpio0 27 0>, /* D10 */
|
||||
<18 0 &gpio0 6 0>, /* D11 */
|
||||
<19 0 &gpio0 8 0>, /* D12 */
|
||||
<20 0 &gpio1 9 0>; /* D13 */
|
||||
};
|
||||
};
|
||||
|
||||
feather_serial: &uart0 {};
|
||||
feather_i2c: &i2c0 {};
|
||||
feather_spi: &spi1 {};
|
Loading…
Add table
Reference in a new issue