feat(boards): Add nice!nano v2
This commit is contained in:
parent
fc014b2506
commit
edb3ff1bb1
8 changed files with 171 additions and 97 deletions
|
@ -4,4 +4,4 @@ config BOARD_ENABLE_DCDC
|
||||||
bool "Enable DCDC mode"
|
bool "Enable DCDC mode"
|
||||||
select SOC_DCDC_NRF52X
|
select SOC_DCDC_NRF52X
|
||||||
default y
|
default y
|
||||||
depends on BOARD_NICE_NANO
|
depends on (BOARD_NICE_NANO || BOARD_NICE_NANO_V2)
|
||||||
|
|
|
@ -7,3 +7,7 @@ config BOARD_NICE_NANO
|
||||||
bool "nice!nano"
|
bool "nice!nano"
|
||||||
depends on SOC_NRF52840_QIAA
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|
||||||
|
config BOARD_NICE_NANO_V2
|
||||||
|
bool "nice!nano v2"
|
||||||
|
depends on SOC_NRF52840_QIAA
|
||||||
|
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
# Copyright (c) 2020 Pete Johanson
|
# Copyright (c) 2021 The ZMK Contributors
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
if BOARD_NICE_NANO
|
if BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
||||||
|
|
||||||
config BOARD
|
config BOARD
|
||||||
default "nice_nano"
|
default "nice_nano"
|
||||||
|
@ -28,4 +28,4 @@ config ZMK_USB
|
||||||
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
config ZMK_BATTERY_VOLTAGE_DIVIDER
|
||||||
default y
|
default y
|
||||||
|
|
||||||
endif # BOARD_NICE_NANO
|
endif # BOARD_NICE_NANO || BOARD_NICE_NANO_V2
|
||||||
|
|
|
@ -1,31 +1,13 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (c) 2020 Pete Johanson
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/dts-v1/;
|
/dts-v1/;
|
||||||
#include <nordic/nrf52840_qiaa.dtsi>
|
#include "nice_nano.dtsi"
|
||||||
#include "arduino_pro_micro_pins.dtsi"
|
|
||||||
|
|
||||||
/ {
|
/ {
|
||||||
model = "nice!nano";
|
|
||||||
compatible = "nice,nano";
|
|
||||||
|
|
||||||
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";
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
||||||
ext-power {
|
ext-power {
|
||||||
compatible = "zmk,ext-power-generic";
|
compatible = "zmk,ext-power-generic";
|
||||||
label = "EXT_POWER";
|
label = "EXT_POWER";
|
||||||
|
@ -40,76 +22,3 @@
|
||||||
full-ohms = <(2000000 + 806000)>;
|
full-ohms = <(2000000 + 806000)>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
&adc {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpiote {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio0 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&gpio1 {
|
|
||||||
status = "okay";
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c0 {
|
|
||||||
compatible = "nordic,nrf-twi";
|
|
||||||
sda-pin = <17>;
|
|
||||||
scl-pin = <20>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&uart0 {
|
|
||||||
compatible = "nordic,nrf-uarte";
|
|
||||||
tx-pin = <6>;
|
|
||||||
rx-pin = <8>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&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>;
|
|
||||||
};
|
|
||||||
};
|
|
||||||
};
|
|
||||||
|
|
100
app/boards/arm/nice_nano/nice_nano.dtsi
Normal file
100
app/boards/arm/nice_nano/nice_nano.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 = "nice!nano";
|
||||||
|
compatible = "nice,nano";
|
||||||
|
|
||||||
|
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 = <17>;
|
||||||
|
scl-pin = <20>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&uart0 {
|
||||||
|
compatible = "nordic,nrf-uarte";
|
||||||
|
tx-pin = <6>;
|
||||||
|
rx-pin = <8>;
|
||||||
|
};
|
||||||
|
|
||||||
|
&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>;
|
||||||
|
};
|
||||||
|
};
|
||||||
|
};
|
26
app/boards/arm/nice_nano/nice_nano_v2.dts
Normal file
26
app/boards/arm/nice_nano/nice_nano_v2.dts
Normal file
|
@ -0,0 +1,26 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2021 The ZMK Contributors
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: MIT
|
||||||
|
*/
|
||||||
|
|
||||||
|
/dts-v1/;
|
||||||
|
#include "nice_nano.dtsi"
|
||||||
|
|
||||||
|
/ {
|
||||||
|
ext-power {
|
||||||
|
compatible = "zmk,ext-power-generic";
|
||||||
|
label = "EXT_POWER";
|
||||||
|
control-gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
|
||||||
|
init-delay-ms = <10>;
|
||||||
|
};
|
||||||
|
|
||||||
|
vbatt {
|
||||||
|
compatible = "zmk,battery-voltage-divider";
|
||||||
|
label = "BATTERY";
|
||||||
|
io-channels = <&adc (0x0D - 1)>;
|
||||||
|
// Multiply ADC result by 5
|
||||||
|
full-ohms = <5>;
|
||||||
|
output-ohms = <1>;
|
||||||
|
};
|
||||||
|
};
|
15
app/boards/arm/nice_nano/nice_nano_v2.yaml
Normal file
15
app/boards/arm/nice_nano/nice_nano_v2.yaml
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
identifier: nice_nano_v2
|
||||||
|
name: nice!nano v2
|
||||||
|
type: mcu
|
||||||
|
arch: arm
|
||||||
|
toolchain:
|
||||||
|
- zephyr
|
||||||
|
- gnuarmemb
|
||||||
|
- xtools
|
||||||
|
supported:
|
||||||
|
- adc
|
||||||
|
- usb_device
|
||||||
|
- ble
|
||||||
|
- ieee802154
|
||||||
|
- pwm
|
||||||
|
- watchdog
|
20
app/boards/arm/nice_nano/nice_nano_v2_defconfig
Normal file
20
app/boards/arm/nice_nano/nice_nano_v2_defconfig
Normal file
|
@ -0,0 +1,20 @@
|
||||||
|
# SPDX-License-Identifier: MIT
|
||||||
|
|
||||||
|
CONFIG_SOC_SERIES_NRF52X=y
|
||||||
|
CONFIG_SOC_NRF52840_QIAA=y
|
||||||
|
CONFIG_BOARD_NICE_NANO_V2=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