Skip to content

Commit

Permalink
slicemk: add 1551USB3 MS88SFA board (TODO TODO TODO)
Browse files Browse the repository at this point in the history
This should be squashed into "add boards" once mature.
  • Loading branch information
xudongzheng committed Nov 18, 2023
1 parent 741fb6f commit 7dbb71d
Show file tree
Hide file tree
Showing 5 changed files with 159 additions and 0 deletions.
4 changes: 4 additions & 0 deletions app/boards/arm/slicemk_1551usb3_ms88sfa_blue/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
config BOARD_ENABLE_DCDC
bool "Enable DCDC mode"
select SOC_DCDC_NRF52X
default y
3 changes: 3 additions & 0 deletions app/boards/arm/slicemk_1551usb3_ms88sfa_blue/Kconfig.board
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
config BOARD_SLICEMK_1551USB3_MS88SFA_BLUE
bool "SliceMK 1551USB3 MS88SFA Blue"
depends on SOC_NRF52840_QIAA
19 changes: 19 additions & 0 deletions app/boards/arm/slicemk_1551usb3_ms88sfa_blue/Kconfig.defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
if BOARD_SLICEMK_1551USB3_MS88SFA_BLUE

config BOARD
default "SliceMK 1551USB3 MS88SFA Blue"

if USB

config USB_NRFX
default y

config USB_DEVICE_STACK
default y

endif # USB

config BT_CTLR
default BT

endif # BOARD_SLICEMK_1551USB3_MS88SFA_BLUE
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>

/ {
model = "SliceMK 1551USB3 MS88SFA Blue";

chosen {
zephyr,code-partition = &code_partition;
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,console = &cdc_acm_uart;

zmk,backlight = &backlight;
};

// The dongle doesn't have a button beside the reset button but ZMK needs
// something to be defined for kscan. A pin that is not broken out is
// specified here to avoid conflicting with custom user integration using
// the breakout pins.
slicemk_button: slicemk_button {
compatible = "slicemk-button";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio1 1 0>;
};

// Use backlight to control TP4056 charger.
backlight: gpioleds {
compatible = "gpio-leds";
gpio_led_0 {
gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>;
};
};

// Define PA/LNA.
nrf_radio_fem: fem {
compatible = "generic-fem-two-ctrl-pins";
ctx-gpios = <&gpio1 6 0>;
ctx-settle-time-us = <1>;
crx-gpios = <&gpio1 4 0>;
crx-settle-time-us = <1>;
};
};

&radio {
fem = <&nrf_radio_fem>;
};

&adc {
status = "okay";
};

&gpiote {
status = "okay";
};

&gpio0 {
status = "okay";
};

&gpio1 {
status = "okay";
};

&usbd {
status = "okay";
cdc_acm_uart: cdc_acm_uart {
compatible = "zephyr,cdc-acm-uart";
label = "CDC_ACM_0";
};
};

&flash0 {
partitions {
compatible = "fixed-partitions";
#address-cells = <1>;
#size-cells = <1>;

// Application starts at 0x1000 after the MBR.
code_partition: partition@1000 {
label = "code_partition";
reg = <0x00001000 0x000e9000>;
};

// Define storage partition before the bootloader, which starts at
// 0xf4000. The storage partition has been 10 pages since Adafruit
// bootloader version 0.6.0.
storage_partition: partition@ea000 {
label = "storage";
reg = <0x000ea000 0x0000a000>;
};
};
};
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
CONFIG_SOC_SERIES_NRF52X=y
CONFIG_SOC_NRF52840_QIAA=y
CONFIG_BOARD_SLICEMK_1551USB3_MS88SFA_BLUE=y

# Follow DeviceTree partition.
CONFIG_USE_DT_CODE_PARTITION=y

# Build UF2 firmware.
CONFIG_BUILD_OUTPUT_UF2=y

# Enable MPU.
CONFIG_ARM_MPU=y

# Enable hardware stack protection.
CONFIG_HW_STACK_PROTECTION=y

# Enable basic functionality.
CONFIG_ADC=y
CONFIG_GPIO=y

# Use NVS for settings.
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

# Set NVS sector count to reflect storage partition size.
CONFIG_SETTINGS_NVS_SECTOR_COUNT=10

# Include support for Coded PHY.
CONFIG_BT_CTLR_PHY_CODED=y

# Use backlight to control TP4056 charger.
CONFIG_ZMK_BACKLIGHT=y
CONFIG_ZMK_BACKLIGHT_BRT_STEP=100
CONFIG_ZMK_BACKLIGHT_BRT_START=100
CONFIG_ZMK_BACKLIGHT_ON_START=y

0 comments on commit 7dbb71d

Please sign in to comment.