Merge 70c0d61161
into 0f972f1cc3
This commit is contained in:
commit
3e4e7ba20b
10 changed files with 304 additions and 0 deletions
8
app/boards/arm/sparkfun_micromod_nrf52840/Kconfig
Normal file
8
app/boards/arm/sparkfun_micromod_nrf52840/Kconfig
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# 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_SPARKFUN_MICROMOD_NRF52840)
|
7
app/boards/arm/sparkfun_micromod_nrf52840/Kconfig.board
Normal file
7
app/boards/arm/sparkfun_micromod_nrf52840/Kconfig.board
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
#Copyright(c) 2021 The ZMK Contributors
|
||||||
|
#SPDX - License - Identifier : MIT
|
||||||
|
|
||||||
|
config BOARD_SPARKFUN_MICROMOD_NRF52840
|
||||||
|
bool "sparkfun_micromod_nrf52840"
|
||||||
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|
29
app/boards/arm/sparkfun_micromod_nrf52840/Kconfig.defconfig
Normal file
29
app/boards/arm/sparkfun_micromod_nrf52840/Kconfig.defconfig
Normal file
|
@ -0,0 +1,29 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
|
||||||
|
if BOARD_SPARKFUN_MICROMOD_NRF52840
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "sparkfun_micromod_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
|
||||||
|
|
||||||
|
endif # BOARD_SPARKFUN_MICROMOD_NRF52840
|
6
app/boards/arm/sparkfun_micromod_nrf52840/board.cmake
Normal file
6
app/boards/arm/sparkfun_micromod_nrf52840/board.cmake
Normal file
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
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,48 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
sparkfun_micromod: connector {
|
||||||
|
compatible = "sparkfun,micromod-gpio";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio0 29 0> /* G0 - GPIO0/P0.29 , MicroMod pad 40 */
|
||||||
|
, <1 0 &gpio0 3 0> /* G1 - GPIO1/P0.03 , MicroMod pad 42 */
|
||||||
|
, <2 0 &gpio1 13 0> /* G2 - GPIO2/P1.13 , MicroMod pad 44 */
|
||||||
|
, <3 0 &gpio1 12 0> /* G3 - GPIO3/P1.12 , MicroMod pad 46 */
|
||||||
|
, <4 0 &gpio1 11 0> /* G4 - GPIO4/P1.11 , MicroMod pad 48 */
|
||||||
|
, <5 0 &gpio0 17 0> /* G5 - GPIO5/P0.17 , MicroMod pad 73 */
|
||||||
|
, <6 0 &gpio1 6 0> /* G6 - GPIO6/P1.06 , MicroMod pad 71 */
|
||||||
|
, <7 0 &gpio1 4 0> /* G7 - GPIO7/P1.04 , MicroMod pad 69 */
|
||||||
|
, <8 0 &gpio1 14 0> /* G8 - GPIO8/P1.14 , MicroMod pad 67 */
|
||||||
|
, <9 0 &gpio0 9 0> /* G9 - GPIO9/P0.09 , MicroMod pad 65 */
|
||||||
|
, <10 0 &gpio0 10 0> /* G10 - GPIO10/P0.10 , MicroMod pad 63 */
|
||||||
|
, <11 0 &gpio0 27 0> /* D0 - P0.27 , MicroMod pad pad 10 */
|
||||||
|
, <12 0 &gpio1 8 0> /* D1 - P1.08 , MicroMod pad pad 18 */
|
||||||
|
, <13 0 &gpio0 6 0> /* PWM0 - P0.06 , MicroMod pad pad 32 */
|
||||||
|
, <14 0 &gpio0 16 0> /* PWM1 - P0.16 , MicroMod pad pad 47 */
|
||||||
|
, <15 0 &gpio0 4 0> /* A0 - ADC0/P0.04 , MicroMod pad 34 (Input Only!) */
|
||||||
|
, <16 0 &gpio0 5 0> /* A1 - ADC1/P0.05 , MicroMod pad pad 38 (Input Only!) */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
sparkfun_micromod_d: &sparkfun_micromod {};
|
||||||
|
|
||||||
|
sparkfun_micromod_i2c: &i2c0 {};
|
||||||
|
sparkfun_micromod_i2c1: &i2c1 {};
|
||||||
|
|
||||||
|
sparkfun_micromod_spi: &spi0 {};
|
||||||
|
sparkfun_micromod_spi1: &spi1 {};
|
||||||
|
|
||||||
|
sparkfun_micromod_serial: &uart0 {};
|
||||||
|
sparkfun_micromod_serial1: &uart1 {};
|
|
@ -0,0 +1,145 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "sparkfun_micromod.dtsi"
|
||||||
|
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "Sparkfun MicroMod nrf52840";
|
||||||
|
compatible = "sparkfun,micromod-gpio";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,console = &cdc_acm_uart;
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
blue_led: led_0 {
|
||||||
|
gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||||
|
label = "Blue LED";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
tx-pin = <35>;
|
||||||
|
rx-pin = <42>;
|
||||||
|
};
|
||||||
|
&usbd {
|
||||||
|
status = "okay";
|
||||||
|
cdc_acm_uart: cdc_acm_uart {
|
||||||
|
compatible = "zephyr,cdc-acm-uart";
|
||||||
|
label = "CDC_ACM_0";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
/**
|
||||||
|
|
||||||
|
&spi1 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
// Cannot be used together with i2c0.
|
||||||
|
status = "okay";
|
||||||
|
sck-pin = <19>;
|
||||||
|
mosi-pin = <14>; // MOSI = COPI
|
||||||
|
miso-pin = <21>; // MISO = COPO
|
||||||
|
cs-gpios = <&gpio0 32 GPIO_ACTIVE_HIGH>;
|
||||||
|
|
||||||
|
|
||||||
|
};
|
||||||
|
|
||||||
|
&spi0 {
|
||||||
|
compatible = "nordic,nrf-spim";
|
||||||
|
status = "okay";
|
||||||
|
sck-pin = <28>;
|
||||||
|
mosi-pin = <31>; // MOSI = COPI
|
||||||
|
miso-pin = <2>; // MISO = COPO
|
||||||
|
cs-gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
**/
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
&i2c0 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <8>;
|
||||||
|
scl-pin = <11>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c1 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <33>;
|
||||||
|
scl-pin = <24>;
|
||||||
|
};
|
||||||
|
**/
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
&flash0 {
|
||||||
|
/*
|
||||||
|
* For more information, see:
|
||||||
|
* http://docs.zephyrproject.org/latest/devices/dts/flash_partitions.html
|
||||||
|
*/
|
||||||
|
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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,15 @@
|
||||||
|
identifier: sparkfun_micromod_nrf52840
|
||||||
|
name: sparkfun micromod nrf52840
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- adc
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- watchdog
|
|
@ -0,0 +1,10 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: sparkfun_micromod_nrf52840
|
||||||
|
name: sparkfun micromod nrf52840
|
||||||
|
type: board
|
||||||
|
arch: arm
|
||||||
|
outputs:
|
||||||
|
- usb
|
||||||
|
- ble
|
||||||
|
url: https://www.sparkfun.com/products/16984
|
||||||
|
exposes: [sparkfun_micromod]
|
|
@ -0,0 +1,28 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG_SOC_SERIES_NRF52X=y
|
||||||
|
CONFIG_SOC_NRF52840_QIAA=y
|
||||||
|
CONFIG_BOARD_SPARKFUN_MICROMOD_NRF52840=y
|
||||||
|
|
||||||
|
# Enable MPU
|
||||||
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable GPIO
|
||||||
|
CONFIG_GPIO=y
|
||||||
|
|
||||||
|
|
||||||
|
CONFIG_BUILD_OUTPUT_UF2=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
|
|
@ -0,0 +1,8 @@
|
||||||
|
file_format: "1"
|
||||||
|
id: sparkfun_micromod
|
||||||
|
name: SparkFun Micro Mod
|
||||||
|
type: interconnect
|
||||||
|
url: https://www.sparkfun.com/micromod
|
||||||
|
manufacturer: SparkFun
|
||||||
|
description: |
|
||||||
|
MicroMod is a modular interface developed by Sparkfun that uses an M.2 interface to connect a Processor board to a Carrier board.
|
Loading…
Add table
Reference in a new issue