Initial commit with settings updated to match schematic.
This commit is contained in:
parent
6217664bc3
commit
691f394398
10 changed files with 270 additions and 0 deletions
8
app/boards/arm/dogbone/CMakeLists.txt
Normal file
8
app/boards/arm/dogbone/CMakeLists.txt
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
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
|
||||||
|
)
|
7
app/boards/arm/dogbone/Kconfig
Normal file
7
app/boards/arm/dogbone/Kconfig
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config BOARD_ENABLE_DCDC
|
||||||
|
bool "Enable DCDC mode"
|
||||||
|
select SOC_DCDC_NRF52X
|
||||||
|
default y
|
||||||
|
depends on (BOARD_DOGBONE)
|
8
app/boards/arm/dogbone/Kconfig.board
Normal file
8
app/boards/arm/dogbone/Kconfig.board
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# dogbone board configuration
|
||||||
|
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
config BOARD_DOGBONE
|
||||||
|
bool "dogbone"
|
||||||
|
depends on SOC_NRF52840_QIAA
|
31
app/boards/arm/dogbone/Kconfig.defconfig
Normal file
31
app/boards/arm/dogbone/Kconfig.defconfig
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
if BOARD_DOGBONE
|
||||||
|
|
||||||
|
config BOARD
|
||||||
|
default "dogbone"
|
||||||
|
|
||||||
|
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_DOGBONE
|
52
app/boards/arm/dogbone/arduino_pro_micro_pins.dtsi
Normal file
52
app/boards/arm/dogbone/arduino_pro_micro_pins.dtsi
Normal file
|
@ -0,0 +1,52 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/ {
|
||||||
|
pro_micro_d: connector_d {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio1 14 0> /* D0 */
|
||||||
|
, <1 0 &gpio1 12 0> /* D1 */
|
||||||
|
, <2 0 &gpio0 25 0> /* D2 */
|
||||||
|
, <3 0 &gpio0 11 0> /* D3 */
|
||||||
|
, <4 0 &gpio1 8 0> /* D4/A6 */
|
||||||
|
, <5 0 &gpio0 27 0> /* D5 */
|
||||||
|
, <6 0 &gpio0 8 0> /* D6/A7 */
|
||||||
|
, <7 0 &gpio0 6 0> /* D7 */
|
||||||
|
, <8 0 &gpio0 31 0> /* D8/A8 */
|
||||||
|
, <9 0 &gpio0 26 0> /* D9/A9 */
|
||||||
|
, <10 0 &gpio0 29 0> /* D10/A10 */
|
||||||
|
, <16 0 &gpio0 28 0> /* D16 */
|
||||||
|
, <14 0 &gpio0 2 0> /* D14 */
|
||||||
|
, <15 0 &gpio0 3 0> /* D15 */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
|
||||||
|
pro_micro_a: connector_a {
|
||||||
|
compatible = "arduino-pro-micro";
|
||||||
|
#gpio-cells = <2>;
|
||||||
|
gpio-map-mask = <0xffffffff 0xffffffc0>;
|
||||||
|
gpio-map-pass-thru = <0 0x3f>;
|
||||||
|
gpio-map
|
||||||
|
= <0 0 &gpio1 15 0> /* A0 */
|
||||||
|
, <1 0 &gpio1 13 0> /* A1 */
|
||||||
|
, <2 0 &gpio1 10 0> /* A2 */
|
||||||
|
, <3 0 &gpio1 11 0> /* A3 */
|
||||||
|
, <6 0 &gpio1 8 0> /* D4/A6 */
|
||||||
|
, <7 0 &gpio0 8 0> /* D6/A7 */
|
||||||
|
, <8 0 &gpio0 31 0> /* D8/A8 */
|
||||||
|
, <9 0 &gpio0 26 0> /* D9/A9 */
|
||||||
|
, <10 0 &gpio0 29 0> /* D10/A10 */
|
||||||
|
;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
pro_micro_i2c: &i2c0 {};
|
||||||
|
pro_micro_spi: &spi0 {};
|
||||||
|
pro_micro_serial: &uart1 {};
|
5
app/boards/arm/dogbone/board.cmake
Normal file
5
app/boards/arm/dogbone/board.cmake
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
# 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)
|
24
app/boards/arm/dogbone/dogbone.dts
Normal file
24
app/boards/arm/dogbone/dogbone.dts
Normal file
|
@ -0,0 +1,24 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include "dogbone.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
ext-power {
|
||||||
|
compatible = "zmk,ext-power-generic";
|
||||||
|
label = "EXT_POWER";
|
||||||
|
control-gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt {
|
||||||
|
compatible = "zmk,battery-voltage-divider";
|
||||||
|
label = "BATTERY";
|
||||||
|
io-channels = <&adc 2>;
|
||||||
|
output-ohms = <2000000>;
|
||||||
|
full-ohms = <(2000000 + 820000)>;
|
||||||
|
};
|
||||||
|
};
|
100
app/boards/arm/dogbone/dogbone.dtsi
Normal file
100
app/boards/arm/dogbone/dogbone.dtsi
Normal file
|
@ -0,0 +1,100 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <nordic/nrf52840_qiaa.dtsi>
|
||||||
|
#include "arduino_pro_micro_pins.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
model = "dogbone";
|
||||||
|
compatible = "dogbone";
|
||||||
|
|
||||||
|
chosen {
|
||||||
|
zephyr,code-partition = &code_partition;
|
||||||
|
zephyr,sram = &sram0;
|
||||||
|
zephyr,flash = &flash0;
|
||||||
|
};
|
||||||
|
|
||||||
|
leds {
|
||||||
|
compatible = "gpio-leds";
|
||||||
|
blue_led: led_0 {
|
||||||
|
gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
|
||||||
|
label = "Blue LED";
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
||||||
|
|
||||||
|
&adc {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpiote {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio0 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&gpio1 {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
&i2c0 {
|
||||||
|
compatible = "nordic,nrf-twi";
|
||||||
|
sda-pin = <25>;
|
||||||
|
scl-pin = <11>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart1 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
tx-pin = <14>;
|
||||||
|
rx-pin = <12>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&usbd {
|
||||||
|
status = "okay";
|
||||||
|
};
|
||||||
|
|
||||||
|
|
||||||
|
&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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
15
app/boards/arm/dogbone/dogbone.yaml
Normal file
15
app/boards/arm/dogbone/dogbone.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
identifier: dogbone
|
||||||
|
name: dogbone
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- adc
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- watchdog
|
20
app/boards/arm/dogbone/dogbone_defconfig
Normal file
20
app/boards/arm/dogbone/dogbone_defconfig
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
CONFIG_SOC_SERIES_NRF52X=y
|
||||||
|
CONFIG_SOC_NRF52840_QIAA=y
|
||||||
|
CONFIG_BOARD_DOGBONE=y
|
||||||
|
|
||||||
|
# Enable MPU
|
||||||
|
CONFIG_ARM_MPU=y
|
||||||
|
|
||||||
|
# enable GPIO
|
||||||
|
CONFIG_GPIO=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
|
Loading…
Add table
Reference in a new issue