From 93b1e0ac442234c4ce60caf6937fa764df8d9913 Mon Sep 17 00:00:00 2001 From: Okke Formsma Date: Tue, 18 Aug 2020 21:27:19 +0200 Subject: Add nrfmicro 1.1, 1.1 flipped and 1.3 boards. --- app/boards/arm/nrfmicro/CMakeLists.txt | 14 ++++ app/boards/arm/nrfmicro/Kconfig | 5 ++ app/boards/arm/nrfmicro/Kconfig.board | 16 ++++ app/boards/arm/nrfmicro/Kconfig.defconfig | 33 ++++++++ .../arm/nrfmicro/arduino_pro_micro_pins.dtsi | 54 +++++++++++++ .../nrfmicro/arduino_pro_micro_pins_flipped.dtsi | 52 ++++++++++++ app/boards/arm/nrfmicro/board.cmake | 5 ++ app/boards/arm/nrfmicro/nrfmicro_11.dts | 93 ++++++++++++++++++++++ app/boards/arm/nrfmicro/nrfmicro_11.yaml | 15 ++++ app/boards/arm/nrfmicro/nrfmicro_11_defconfig | 22 +++++ app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts | 93 ++++++++++++++++++++++ app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml | 15 ++++ .../arm/nrfmicro/nrfmicro_11_flipped_defconfig | 22 +++++ app/boards/arm/nrfmicro/nrfmicro_13.dts | 93 ++++++++++++++++++++++ app/boards/arm/nrfmicro/nrfmicro_13.yaml | 15 ++++ app/boards/arm/nrfmicro/nrfmicro_13_defconfig | 22 +++++ app/boards/arm/nrfmicro/pinmux.c | 37 +++++++++ .../shields/kyria/boards/nrfmicro_11.overlay | 29 +++++++ .../kyria/boards/nrfmicro_11_flipped.overlay | 28 +++++++ .../shields/kyria/boards/nrfmicro_13.overlay | 28 +++++++ 20 files changed, 691 insertions(+) create mode 100644 app/boards/arm/nrfmicro/CMakeLists.txt create mode 100644 app/boards/arm/nrfmicro/Kconfig create mode 100644 app/boards/arm/nrfmicro/Kconfig.board create mode 100644 app/boards/arm/nrfmicro/Kconfig.defconfig create mode 100644 app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi create mode 100644 app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi create mode 100644 app/boards/arm/nrfmicro/board.cmake create mode 100644 app/boards/arm/nrfmicro/nrfmicro_11.dts create mode 100644 app/boards/arm/nrfmicro/nrfmicro_11.yaml create mode 100644 app/boards/arm/nrfmicro/nrfmicro_11_defconfig create mode 100644 app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts create mode 100644 app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml create mode 100644 app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig create mode 100644 app/boards/arm/nrfmicro/nrfmicro_13.dts create mode 100644 app/boards/arm/nrfmicro/nrfmicro_13.yaml create mode 100644 app/boards/arm/nrfmicro/nrfmicro_13_defconfig create mode 100644 app/boards/arm/nrfmicro/pinmux.c create mode 100644 app/boards/shields/kyria/boards/nrfmicro_11.overlay create mode 100644 app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay create mode 100644 app/boards/shields/kyria/boards/nrfmicro_13.overlay (limited to 'app/boards') diff --git a/app/boards/arm/nrfmicro/CMakeLists.txt b/app/boards/arm/nrfmicro/CMakeLists.txt new file mode 100644 index 0000000..cd4843a --- /dev/null +++ b/app/boards/arm/nrfmicro/CMakeLists.txt @@ -0,0 +1,14 @@ +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 +) + +if(CONFIG_PINMUX) +zephyr_library() +zephyr_library_sources(pinmux.c) +zephyr_library_include_directories(${ZEPHYR_BASE}/drivers) +endif() \ No newline at end of file diff --git a/app/boards/arm/nrfmicro/Kconfig b/app/boards/arm/nrfmicro/Kconfig new file mode 100644 index 0000000..17a3347 --- /dev/null +++ b/app/boards/arm/nrfmicro/Kconfig @@ -0,0 +1,5 @@ +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on (BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13) diff --git a/app/boards/arm/nrfmicro/Kconfig.board b/app/boards/arm/nrfmicro/Kconfig.board new file mode 100644 index 0000000..177373a --- /dev/null +++ b/app/boards/arm/nrfmicro/Kconfig.board @@ -0,0 +1,16 @@ +# nrfmicro board configuration + +# Copyright (c) 2020 Okke Formsma, joric +# SPDX-License-Identifier: MIT + +config BOARD_NRFMICRO_11 + bool "nrfmicro_11" + depends on SOC_NRF52840_QIAA + +config BOARD_NRFMICRO_11_FLIPPED + bool "nrfmicro_11_flipped" + depends on SOC_NRF52840_QIAA + +config BOARD_NRFMICRO_13 + bool "nrfmicro_13" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/nrfmicro/Kconfig.defconfig b/app/boards/arm/nrfmicro/Kconfig.defconfig new file mode 100644 index 0000000..2212277 --- /dev/null +++ b/app/boards/arm/nrfmicro/Kconfig.defconfig @@ -0,0 +1,33 @@ +# Electronut Labs Papyr board configuration + +# Copyright (c) 2020 Okke Formsma, joric +# SPDX-License-Identifier: MIT + +if BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 + +config BOARD + default "nrfmicro" + +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 PINMUX + default y + +endif # BOARD_NRFMICRO_11 || BOARD_NRFMICRO_11_FLIPPED || BOARD_NRFMICRO_13 diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi new file mode 100644 index 0000000..6cde2b4 --- /dev/null +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins.dtsi @@ -0,0 +1,54 @@ +/* + * Copyright (c) 2020 Okke Formsma, joric + * + * 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 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 15 0> /* D2 */ + , <3 0 &gpio0 17 0> /* D3 */ + , <4 0 &gpio0 20 0> /* D4/A6 */ + , <5 0 &gpio0 13 0> /* D5 */ + , <6 0 &gpio0 24 0> /* D6/A7 */ + , <7 0 &gpio0 9 0> /* D7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + , <16 0 &gpio0 28 0> /* D16 */ + , <14 0 &gpio0 3 0> /* D14 */ + , <15 0 &gpio1 13 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 &gpio0 2 0> /* A0 */ + , <1 0 &gpio0 29 0> /* A1 */ + , <2 0 &gpio0 31 0> /* A2 */ + , <3 0 &gpio0 30 0> /* A3 */ + , <6 0 &gpio0 20 0> /* D4/A6 */ + , <7 0 &gpio0 24 0> /* D6/A7 */ + , <8 0 &gpio0 10 0> /* D8/A8 */ + , <9 0 &gpio1 6 0> /* D9/A9 */ + , <10 0 &gpio1 11 0> /* D10/A10 */ + ; + }; +}; + + +pro_micro_i2c: &i2c0 {}; +pro_micro_spi: &spi0 {}; +pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi new file mode 100644 index 0000000..9bad7f4 --- /dev/null +++ b/app/boards/arm/nrfmicro/arduino_pro_micro_pins_flipped.dtsi @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020 Okke Formsma, joric + * + * 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 &gpio0 8 0> /* D0 */ + , <1 0 &gpio0 6 0> /* D1 */ + , <2 0 &gpio0 30 0> /* D2 */ + , <3 0 &gpio0 31 0> /* D3 */ + , <4 0 &gpio0 29 0> /* D4/A6 */ + , <5 0 &gpio0 2 0> /* D5 */ + , <6 0 &gpio1 13 0> /* D6/A7 */ + , <7 0 &gpio0 3 0> /* D7 */ + , <8 0 &gpio0 28 0> /* D8/A8 */ + , <9 0 &gpio1 11 0> /* D9/A9 */ + , <10 0 &gpio1 6 0> /* D10/A10 */ + , <16 0 &gpio0 10 0> /* D16 */ + , <14 0 &gpio0 9 0> /* D14 */ + , <15 0 &gpio0 24 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 &gpio0 13 0> /* A0 */ + , <1 0 &gpio0 20 0> /* A1 */ + , <2 0 &gpio0 17 0> /* A2 */ + , <3 0 &gpio0 15 0> /* A3 */ + , <6 0 &gpio0 29 0> /* D4/A6 */ + , <7 0 &gpio1 13 0> /* D6/A7 */ + , <8 0 &gpio0 28 0> /* D8/A8 */ + , <9 0 &gpio1 11 0> /* D9/A9 */ + , <10 0 &gpio1 6 0> /* D10/A10 */ + ; + }; +}; + +pro_micro_i2c: &i2c0 {}; +pro_micro_spi: &spi0 {}; +pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/nrfmicro/board.cmake b/app/boards/arm/nrfmicro/board.cmake new file mode 100644 index 0000000..fa847d5 --- /dev/null +++ b/app/boards/arm/nrfmicro/board.cmake @@ -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) diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.dts b/app/boards/arm/nrfmicro/nrfmicro_11.dts new file mode 100644 index 0000000..dc07ac8 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_11.dts @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2020 Okke Formsma, joric + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include +#include "arduino_pro_micro_pins.dtsi" + +/ { + model = "nrfmicro"; + compatible = "joric,nrfmicro"; + + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; + +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <15>; + scl-pin = <17>; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + status = "okay"; + current-speed = <115200>; + tx-pin = <39>; + rx-pin = <34>; + rts-pin = <33>; + cts-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>; + + boot_partition: partition@0 { + label = "adafruit_boot"; + reg = <0x000000000 0x0000C000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000d2000>; + }; + + /* + * The flash starting at 0x000f8000 and ending at + * 0x000fffff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@f8000 { + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11.yaml b/app/boards/arm/nrfmicro/nrfmicro_11.yaml new file mode 100644 index 0000000..4608130 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_11.yaml @@ -0,0 +1,15 @@ +identifier: nrfmicro_11 +name: nrfmicro_11 +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig new file mode 100644 index 0000000..c1ac836 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_11_defconfig @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_NRFMICRO_11=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 +CONFIG_CLOCK_CONTROL_NRF=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts new file mode 100644 index 0000000..5bf493f --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.dts @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2020 Okke Formsma, joric + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include +#include "arduino_pro_micro_pins_flipped.dtsi" + +/ { + model = "nrfmicro"; + compatible = "joric,nrfmicro"; + + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; + +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <30>; + scl-pin = <31>; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + status = "okay"; + current-speed = <115200>; + tx-pin = <39>; + rx-pin = <34>; + rts-pin = <33>; + cts-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>; + + boot_partition: partition@0 { + label = "adafruit_boot"; + reg = <0x000000000 0x0000C000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000d2000>; + }; + + /* + * The flash starting at 0x000f8000 and ending at + * 0x000fffff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@f8000 { + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml new file mode 100644 index 0000000..74461f0 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped.yaml @@ -0,0 +1,15 @@ +identifier: nrfmicro_11_flipped +name: nrfmicro_11_flipped +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog diff --git a/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig new file mode 100644 index 0000000..b35cb79 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_11_flipped_defconfig @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_NRFMICRO_11_FLIPPED=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 +CONFIG_CLOCK_CONTROL_NRF=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.dts b/app/boards/arm/nrfmicro/nrfmicro_13.dts new file mode 100644 index 0000000..dc07ac8 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_13.dts @@ -0,0 +1,93 @@ +/* + * Copyright (c) 2020 Okke Formsma, joric + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include +#include "arduino_pro_micro_pins.dtsi" + +/ { + model = "nrfmicro"; + compatible = "joric,nrfmicro"; + + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; + +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <15>; + scl-pin = <17>; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + status = "okay"; + current-speed = <115200>; + tx-pin = <39>; + rx-pin = <34>; + rts-pin = <33>; + cts-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>; + + boot_partition: partition@0 { + label = "adafruit_boot"; + reg = <0x000000000 0x0000C000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000d2000>; + }; + + /* + * The flash starting at 0x000f8000 and ending at + * 0x000fffff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@f8000 { + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; diff --git a/app/boards/arm/nrfmicro/nrfmicro_13.yaml b/app/boards/arm/nrfmicro/nrfmicro_13.yaml new file mode 100644 index 0000000..a7415e4 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_13.yaml @@ -0,0 +1,15 @@ +identifier: nrfmicro_13 +name: nrfmicro_13 +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog diff --git a/app/boards/arm/nrfmicro/nrfmicro_13_defconfig b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig new file mode 100644 index 0000000..cac1164 --- /dev/null +++ b/app/boards/arm/nrfmicro/nrfmicro_13_defconfig @@ -0,0 +1,22 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_NRFMICRO_13=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 +CONFIG_CLOCK_CONTROL_NRF=y +CONFIG_CLOCK_CONTROL_NRF_K32SRC_RC=y diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c new file mode 100644 index 0000000..803d20d --- /dev/null +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -0,0 +1,37 @@ +/* + * Copyright (c) 2020 Okke Formsma, joric + * + * SPDX-License-Identifier: MIT + */ + +#include +#include +#include +#include +#include +#include + +static int pinmux_nrfmicro_init(struct device *port) +{ + ARG_UNUSED(port); + + struct device *p1 = device_get_binding("GPIO_1"); + +#if defined(BOARD_NRFMICRO_13) + struct device *p0 = device_get_binding("GPIO_0"); + // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) + gpio_pin_configure(p1, 9, GPIO_OUTPUT); + gpio_pin_set(p1, 9, 0); + + // enable charger (nRFMicro 1.3 only) + gpio_pin_configure(p0, 5, GPIO_OUTPUT); + gpio_pin_set(p0, 5, 0); +#else + // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) + gpio_pin_configure(p1, 9, GPIO_OUTPUT); + gpio_pin_set(p1, 9, 1); +#endif + return 0; +} + +SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); \ No newline at end of file diff --git a/app/boards/shields/kyria/boards/nrfmicro_11.overlay b/app/boards/shields/kyria/boards/nrfmicro_11.overlay new file mode 100644 index 0000000..d7f724f --- /dev/null +++ b/app/boards/shields/kyria/boards/nrfmicro_11.overlay @@ -0,0 +1,29 @@ +&spi1 { + compatible = "nordic,nrf-spi"; + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <12>; // 0.12 is not broken out on the nRFMicro + miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; + diff --git a/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay new file mode 100644 index 0000000..c5f2a94 --- /dev/null +++ b/app/boards/shields/kyria/boards/nrfmicro_11_flipped.overlay @@ -0,0 +1,28 @@ +&spi1 { + compatible = "nordic,nrf-spi"; + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <12>; // 0.12 is not broken out on the nRFMicro + miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; diff --git a/app/boards/shields/kyria/boards/nrfmicro_13.overlay b/app/boards/shields/kyria/boards/nrfmicro_13.overlay new file mode 100644 index 0000000..c5f2a94 --- /dev/null +++ b/app/boards/shields/kyria/boards/nrfmicro_13.overlay @@ -0,0 +1,28 @@ +&spi1 { + compatible = "nordic,nrf-spi"; + status = "okay"; + mosi-pin = <6>; + // Unused pins, needed for SPI definition, but not used by the ws2812 driver itself. + sck-pin = <12>; // 0.12 is not broken out on the nRFMicro + miso-pin = <22>; // 0.22 is not broken out on the nRFMicro + + led_strip: ws2812@0 { + compatible = "worldsemi,ws2812-spi"; + label = "WS2812"; + + /* SPI */ + reg = <0>; /* ignored, but necessary for SPI bindings */ + spi-max-frequency = <4000000>; + + /* WS2812 */ + chain-length = <10>; /* arbitrary; change at will */ + spi-one-frame = <0x70>; + spi-zero-frame = <0x40>; + }; +}; + +/ { + chosen { + zmk,underglow = &led_strip; + }; +}; -- cgit v1.2.3 From 506c3b031e042430149cd663a561a13cd6e5835b Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 19 Aug 2020 16:35:18 -0400 Subject: refactor(boards): Rename to bluemicro840_v1. --- app/boards/arm/bluemicro52840_v1/CMakeLists.txt | 8 -- app/boards/arm/bluemicro52840_v1/Kconfig | 8 -- app/boards/arm/bluemicro52840_v1/Kconfig.board | 8 -- app/boards/arm/bluemicro52840_v1/Kconfig.defconfig | 30 ------- .../bluemicro52840_v1/arduino_pro_micro_pins.dtsi | 52 ------------ .../arm/bluemicro52840_v1/bluemicro52840_v1.dts | 96 ---------------------- .../arm/bluemicro52840_v1/bluemicro52840_v1.yaml | 15 ---- .../bluemicro52840_v1/bluemicro52840_v1_defconfig | 20 ----- app/boards/arm/bluemicro52840_v1/board.cmake | 5 -- app/boards/arm/bluemicro840/CMakeLists.txt | 8 ++ app/boards/arm/bluemicro840/Kconfig | 8 ++ app/boards/arm/bluemicro840/Kconfig.board | 8 ++ app/boards/arm/bluemicro840/Kconfig.defconfig | 30 +++++++ .../arm/bluemicro840/arduino_pro_micro_pins.dtsi | 52 ++++++++++++ app/boards/arm/bluemicro840/bluemicro840_v1.dts | 96 ++++++++++++++++++++++ app/boards/arm/bluemicro840/bluemicro840_v1.yaml | 15 ++++ .../arm/bluemicro840/bluemicro840_v1_defconfig | 20 +++++ app/boards/arm/bluemicro840/board.cmake | 5 ++ 18 files changed, 242 insertions(+), 242 deletions(-) delete mode 100644 app/boards/arm/bluemicro52840_v1/CMakeLists.txt delete mode 100644 app/boards/arm/bluemicro52840_v1/Kconfig delete mode 100644 app/boards/arm/bluemicro52840_v1/Kconfig.board delete mode 100644 app/boards/arm/bluemicro52840_v1/Kconfig.defconfig delete mode 100644 app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi delete mode 100644 app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts delete mode 100644 app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml delete mode 100644 app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig delete mode 100644 app/boards/arm/bluemicro52840_v1/board.cmake create mode 100644 app/boards/arm/bluemicro840/CMakeLists.txt create mode 100644 app/boards/arm/bluemicro840/Kconfig create mode 100644 app/boards/arm/bluemicro840/Kconfig.board create mode 100644 app/boards/arm/bluemicro840/Kconfig.defconfig create mode 100644 app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1.dts create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1.yaml create mode 100644 app/boards/arm/bluemicro840/bluemicro840_v1_defconfig create mode 100644 app/boards/arm/bluemicro840/board.cmake (limited to 'app/boards') diff --git a/app/boards/arm/bluemicro52840_v1/CMakeLists.txt b/app/boards/arm/bluemicro52840_v1/CMakeLists.txt deleted file mode 100644 index 00952c3..0000000 --- a/app/boards/arm/bluemicro52840_v1/CMakeLists.txt +++ /dev/null @@ -1,8 +0,0 @@ -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 -) diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig b/app/boards/arm/bluemicro52840_v1/Kconfig deleted file mode 100644 index 67751a0..0000000 --- a/app/boards/arm/bluemicro52840_v1/Kconfig +++ /dev/null @@ -1,8 +0,0 @@ -# SPDX-License-Identifier: MIT - -config BOARD_ENABLE_DCDC - bool "Enable DCDC mode" - select SOC_DCDC_NRF52X - default y - depends on BOARD_BLUEMICRO52840_V1 - diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig.board b/app/boards/arm/bluemicro52840_v1/Kconfig.board deleted file mode 100644 index dea0555..0000000 --- a/app/boards/arm/bluemicro52840_v1/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# BlueMicro52840_V1 board configuration - -# Copyright (c) 2020 Pete Johanson, Derek Schmell -# SPDX-License-Identifier: MIT - -config BOARD_BLUEMICRO52840_V1 - bool "BlueMicro52840_V1" - depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig b/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig deleted file mode 100644 index 90a5ed9..0000000 --- a/app/boards/arm/bluemicro52840_v1/Kconfig.defconfig +++ /dev/null @@ -1,30 +0,0 @@ -# BlueMicro52840 board configuration - -# Copyright (c) 2020 Pete Johanson, Derek Schmell -# SPDX-License-Identifier: MIT - -if BOARD_BLUEMICRO52840_V1 - -config BOARD - default "bluemicro52840_v1" - -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_BLUEMICRO52840_V1 diff --git a/app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi deleted file mode 100644 index 940d891..0000000 --- a/app/boards/arm/bluemicro52840_v1/arduino_pro_micro_pins.dtsi +++ /dev/null @@ -1,52 +0,0 @@ -/* - * Copyright (c) 2020 Derek Schmell - * - * 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 &gpio0 8 0> /* D0 D2 */ - , <1 0 &gpio0 6 0> /* D1 D3*/ - , <2 0 &gpio0 15 0> /* D2 D1*/ - , <3 0 &gpio0 17 0> /* D3 D0*/ - , <4 0 &gpio0 20 0> /* D4/A6 D4*/ - , <5 0 &gpio0 13 0> /* D5 C6*/ - , <6 0 &gpio0 24 0> /* D6/A7 D7*/ - , <7 0 &gpio0 9 0> /* D7 E6*/ - , <8 0 &gpio0 10 0> /* D8/A8 B4*/ - , <9 0 &gpio1 6 0> /* D9/A9 B5*/ - , <10 0 &gpio1 11 0> /* D10/A10 B6*/ - , <16 0 &gpio0 28 0> /* D16 B2*/ - , <14 0 &gpio0 3 0> /* D14 B3*/ - , <15 0 &gpio1 13 0> /* D15 B1*/ - ; - }; - - 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 &gpio0 2 0> /* A0 F7*/ - , <1 0 &gpio0 29 0> /* A1 F6*/ - , <2 0 &gpio0 26 0> /* A2 F5*/ - , <3 0 &gpio0 30 0> /* A3 F4*/ - , <6 0 &gpio0 20 0> /* D4/A6 D4*/ - , <7 0 &gpio0 24 0> /* D6/A7 D7*/ - , <8 0 &gpio0 10 0> /* D8/A8 B4*/ - , <9 0 &gpio1 6 0> /* D9/A9 B5*/ - , <10 0 &gpio1 13 0> /* D10/A10 B6*/ - ; - }; -}; - -pro_micro_i2c: &i2c0 {}; -pro_micro_spi: &spi0 {}; -pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts b/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts deleted file mode 100644 index f8abc66..0000000 --- a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.dts +++ /dev/null @@ -1,96 +0,0 @@ -/* - * Copyright (c) 2020 Pete Johanson, Derek Schmell - * - * SPDX-License-Identifier: MIT - */ - -/dts-v1/; -#include -#include "arduino_pro_micro_pins.dtsi" - -/ { - model = "BlueMicro52840_V1"; - compatible = "bluemicro52840,v1"; - - chosen { - zephyr,code-partition = &code_partition; - // zephyr,console = &uart0; - //zephyr,bt-mon-uart = &uart0; - //zephyr,bt-c2h-uart = &uart0; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - }; - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; - }; - }; - -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <17>; -}; - -&uart0 { - compatible = "nordic,nrf-uarte"; - status = "okay"; - current-speed = <115200>; - tx-pin = <39>; - rx-pin = <34>; - rts-pin = <33>; - cts-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>; - - boot_partition: partition@0 { - label = "adafruit_boot"; - reg = <0x000000000 0x0000C000>; - }; - code_partition: partition@26000 { - label = "code_partition"; - reg = <0x00026000 0x000d2000>; - }; - - /* - * The flash starting at 0x000f8000 and ending at - * 0x000fffff is reserved for use by the application. - */ - - /* - * Storage partition will be used by FCB/LittleFS/NVS - * if enabled. - */ - storage_partition: partition@f8000 { - label = "storage"; - reg = <0x000f8000 0x00008000>; - }; - }; -}; diff --git a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml b/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml deleted file mode 100644 index fca969d..0000000 --- a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1.yaml +++ /dev/null @@ -1,15 +0,0 @@ -identifier: bluemicro52840_v1 -name: BlueMicro52840_V1 -type: mcu -arch: arm -toolchain: - - zephyr - - gnuarmemb - - xtools -supported: - - adc - - usb_device - - ble - - ieee802154 - - pwm - - watchdog diff --git a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig b/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig deleted file mode 100644 index f87e69d..0000000 --- a/app/boards/arm/bluemicro52840_v1/bluemicro52840_v1_defconfig +++ /dev/null @@ -1,20 +0,0 @@ -# SPDX-License-Identifier: MIT - -CONFIG_SOC_SERIES_NRF52X=y -CONFIG_SOC_NRF52840_QIAA=y -CONFIG_BOARD_BLUEMICRO52840_V1=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 \ No newline at end of file diff --git a/app/boards/arm/bluemicro52840_v1/board.cmake b/app/boards/arm/bluemicro52840_v1/board.cmake deleted file mode 100644 index fa847d5..0000000 --- a/app/boards/arm/bluemicro52840_v1/board.cmake +++ /dev/null @@ -1,5 +0,0 @@ -# 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) diff --git a/app/boards/arm/bluemicro840/CMakeLists.txt b/app/boards/arm/bluemicro840/CMakeLists.txt new file mode 100644 index 0000000..00952c3 --- /dev/null +++ b/app/boards/arm/bluemicro840/CMakeLists.txt @@ -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 +) diff --git a/app/boards/arm/bluemicro840/Kconfig b/app/boards/arm/bluemicro840/Kconfig new file mode 100644 index 0000000..0e6743d --- /dev/null +++ b/app/boards/arm/bluemicro840/Kconfig @@ -0,0 +1,8 @@ +# SPDX-License-Identifier: MIT + +config BOARD_ENABLE_DCDC + bool "Enable DCDC mode" + select SOC_DCDC_NRF52X + default y + depends on BOARD_BLUEMICRO840_V1 + diff --git a/app/boards/arm/bluemicro840/Kconfig.board b/app/boards/arm/bluemicro840/Kconfig.board new file mode 100644 index 0000000..bc271af --- /dev/null +++ b/app/boards/arm/bluemicro840/Kconfig.board @@ -0,0 +1,8 @@ +# BlueMicro840 board configuration + +# Copyright (c) 2020 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: MIT + +config BOARD_BLUEMICRO840_V1 + bool "BlueMicro840_V1" + depends on SOC_NRF52840_QIAA diff --git a/app/boards/arm/bluemicro840/Kconfig.defconfig b/app/boards/arm/bluemicro840/Kconfig.defconfig new file mode 100644 index 0000000..566b5a4 --- /dev/null +++ b/app/boards/arm/bluemicro840/Kconfig.defconfig @@ -0,0 +1,30 @@ +# BlueMicro840 board configuration + +# Copyright (c) 2020 Pete Johanson, Derek Schmell +# SPDX-License-Identifier: MIT + +if BOARD_BLUEMICRO840_V1 + +config BOARD + default "bluemicro840_v1" + +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_BLUEMICRO840_V1 diff --git a/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi new file mode 100644 index 0000000..940d891 --- /dev/null +++ b/app/boards/arm/bluemicro840/arduino_pro_micro_pins.dtsi @@ -0,0 +1,52 @@ +/* + * Copyright (c) 2020 Derek Schmell + * + * 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 &gpio0 8 0> /* D0 D2 */ + , <1 0 &gpio0 6 0> /* D1 D3*/ + , <2 0 &gpio0 15 0> /* D2 D1*/ + , <3 0 &gpio0 17 0> /* D3 D0*/ + , <4 0 &gpio0 20 0> /* D4/A6 D4*/ + , <5 0 &gpio0 13 0> /* D5 C6*/ + , <6 0 &gpio0 24 0> /* D6/A7 D7*/ + , <7 0 &gpio0 9 0> /* D7 E6*/ + , <8 0 &gpio0 10 0> /* D8/A8 B4*/ + , <9 0 &gpio1 6 0> /* D9/A9 B5*/ + , <10 0 &gpio1 11 0> /* D10/A10 B6*/ + , <16 0 &gpio0 28 0> /* D16 B2*/ + , <14 0 &gpio0 3 0> /* D14 B3*/ + , <15 0 &gpio1 13 0> /* D15 B1*/ + ; + }; + + 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 &gpio0 2 0> /* A0 F7*/ + , <1 0 &gpio0 29 0> /* A1 F6*/ + , <2 0 &gpio0 26 0> /* A2 F5*/ + , <3 0 &gpio0 30 0> /* A3 F4*/ + , <6 0 &gpio0 20 0> /* D4/A6 D4*/ + , <7 0 &gpio0 24 0> /* D6/A7 D7*/ + , <8 0 &gpio0 10 0> /* D8/A8 B4*/ + , <9 0 &gpio1 6 0> /* D9/A9 B5*/ + , <10 0 &gpio1 13 0> /* D10/A10 B6*/ + ; + }; +}; + +pro_micro_i2c: &i2c0 {}; +pro_micro_spi: &spi0 {}; +pro_micro_serial: &uart0 {}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.dts b/app/boards/arm/bluemicro840/bluemicro840_v1.dts new file mode 100644 index 0000000..c693662 --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.dts @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2020 Pete Johanson, Derek Schmell + * + * SPDX-License-Identifier: MIT + */ + +/dts-v1/; +#include +#include "arduino_pro_micro_pins.dtsi" + +/ { + model = "BlueMicro840_V1"; + compatible = "bluemicro840,v1"; + + chosen { + zephyr,code-partition = &code_partition; + // zephyr,console = &uart0; + //zephyr,bt-mon-uart = &uart0; + //zephyr,bt-c2h-uart = &uart0; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + }; + + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 42 GPIO_ACTIVE_HIGH>; + label = "Blue LED"; + }; + }; + +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <15>; + scl-pin = <17>; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + status = "okay"; + current-speed = <115200>; + tx-pin = <39>; + rx-pin = <34>; + rts-pin = <33>; + cts-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>; + + boot_partition: partition@0 { + label = "adafruit_boot"; + reg = <0x000000000 0x0000C000>; + }; + code_partition: partition@26000 { + label = "code_partition"; + reg = <0x00026000 0x000d2000>; + }; + + /* + * The flash starting at 0x000f8000 and ending at + * 0x000fffff is reserved for use by the application. + */ + + /* + * Storage partition will be used by FCB/LittleFS/NVS + * if enabled. + */ + storage_partition: partition@f8000 { + label = "storage"; + reg = <0x000f8000 0x00008000>; + }; + }; +}; diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1.yaml b/app/boards/arm/bluemicro840/bluemicro840_v1.yaml new file mode 100644 index 0000000..9e1dd54 --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1.yaml @@ -0,0 +1,15 @@ +identifier: bluemicro840_v1 +name: BlueMicro840_V1 +type: mcu +arch: arm +toolchain: + - zephyr + - gnuarmemb + - xtools +supported: + - adc + - usb_device + - ble + - ieee802154 + - pwm + - watchdog diff --git a/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig new file mode 100644 index 0000000..96f03ca --- /dev/null +++ b/app/boards/arm/bluemicro840/bluemicro840_v1_defconfig @@ -0,0 +1,20 @@ +# SPDX-License-Identifier: MIT + +CONFIG_SOC_SERIES_NRF52X=y +CONFIG_SOC_NRF52840_QIAA=y +CONFIG_BOARD_BLUEMICRO840_V1=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 \ No newline at end of file diff --git a/app/boards/arm/bluemicro840/board.cmake b/app/boards/arm/bluemicro840/board.cmake new file mode 100644 index 0000000..fa847d5 --- /dev/null +++ b/app/boards/arm/bluemicro840/board.cmake @@ -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) -- cgit v1.2.3 From 6da6d7397f37f9e81fc3e99e153e88babc8fd3ab Mon Sep 17 00:00:00 2001 From: Jared Giles Date: Thu, 20 Aug 2020 00:41:31 +0100 Subject: Fixed arrows on default keymap --- app/boards/shields/corne/corne.keymap | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/corne/corne.keymap b/app/boards/shields/corne/corne.keymap index a88d036..c0bbb4a 100644 --- a/app/boards/shields/corne/corne.keymap +++ b/app/boards/shields/corne/corne.keymap @@ -21,12 +21,12 @@ lower_layer { // ----------------------------------------------------------------------------------------- // | ESC | 1 | 2 | 3 | 4 | 5 | | 6 | 7 | 8 | 9 | 0 | BKSP | -// | CTRL | | | | | | | RGT | UP | DWN | LFT | | | +// | CTRL | | | | | | | LFT | DWN | UP | RGT | | | // | SHFT | | | | | | | | | | | | | // | GUI | | SPC | | ENT | | ALT | bindings = < &kp ESC &kp NUM_1 &kp NUM_2 &kp NUM_3 &kp NUM_4 &kp NUM_5 &kp NUM_6 &kp NUM_7 &kp NUM_8 &kp NUM_9 &kp NUM_0 &kp BKSP - &kp LCTL &trans &trans &trans &trans &trans &kp RARW &kp UARW &kp DARW &kp LARW &trans &trans + &kp LCTL &trans &trans &trans &trans &trans &kp LARW &kp DARW &kp UARW &kp RARW &trans &trans &kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp LGUI &trans &kp SPC &kp RET &trans &kp RALT >; @@ -40,8 +40,8 @@ // | GUI | | SPC | | ENT | | ALT | bindings = < &kp ESC &kp BANG &kp ATSN &kp HASH &kp CURU &kp PRCT &kp CRRT &kp AMPS &kp KMLT &kp LPRN &kp RPRN &kp BKSP - &kp LCTL &trans &trans &trans &trans &trans &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp PIPE &trans - &kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &trans + &kp LCTL &trans &trans &trans &trans &trans &kp MINUS &kp EQL &kp LBKT &kp RBKT &kp PIPE &kp GRAV + &kp LSFT &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp BSLH &kp TILD &kp LGUI &trans &kp SPC &kp RET &trans &kp RALT >; }; -- cgit v1.2.3 From a65b746a863bbd8e07cf404b4249526f75b069a3 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Wed, 19 Aug 2020 23:34:34 -0400 Subject: fix(bluetooth): Add unpair combo if DT node exists --- app/boards/shields/corne/corne_left.conf | 1 - app/boards/shields/corne/corne_right.conf | 1 - app/boards/shields/kyria/kyria_left.conf | 3 +-- app/boards/shields/kyria/kyria_right.conf | 1 - app/boards/shields/lily58/lily58_left.conf | 1 - app/boards/shields/lily58/lily58_right.conf | 1 - 6 files changed, 1 insertion(+), 7 deletions(-) (limited to 'app/boards') diff --git a/app/boards/shields/corne/corne_left.conf b/app/boards/shields/corne/corne_left.conf index 338fa59..1e028a7 100644 --- a/app/boards/shields/corne/corne_left.conf +++ b/app/boards/shields/corne/corne_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/corne/corne_right.conf b/app/boards/shields/corne/corne_right.conf index be344c4..990cf7c 100644 --- a/app/boards/shields/corne/corne_right.conf +++ b/app/boards/shields/corne/corne_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/kyria/kyria_left.conf b/app/boards/shields/kyria/kyria_left.conf index 338fa59..e51dee4 100644 --- a/app/boards/shields/kyria/kyria_left.conf +++ b/app/boards/shields/kyria/kyria_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y -CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file +CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y \ No newline at end of file diff --git a/app/boards/shields/kyria/kyria_right.conf b/app/boards/shields/kyria/kyria_right.conf index be344c4..990cf7c 100644 --- a/app/boards/shields/kyria/kyria_right.conf +++ b/app/boards/shields/kyria/kyria_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/lily58/lily58_left.conf b/app/boards/shields/lily58/lily58_left.conf index 338fa59..1e028a7 100644 --- a/app/boards/shields/lily58/lily58_left.conf +++ b/app/boards/shields/lily58/lily58_left.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_CENTRAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y \ No newline at end of file diff --git a/app/boards/shields/lily58/lily58_right.conf b/app/boards/shields/lily58/lily58_right.conf index cf16779..990cf7c 100644 --- a/app/boards/shields/lily58/lily58_right.conf +++ b/app/boards/shields/lily58/lily58_right.conf @@ -1,3 +1,2 @@ CONFIG_ZMK_SPLIT=y CONFIG_ZMK_SPLIT_BLE_ROLE_PERIPHERAL=y -CONFIG_ZMK_BLE_UNPAIR_COMBO=y -- cgit v1.2.3 From 4efce4223ae38306a254b11db628d782f1d7f382 Mon Sep 17 00:00:00 2001 From: Mega Mind <68985133+megamind4089@users.noreply.github.com> Date: Thu, 20 Aug 2020 18:59:41 +0800 Subject: Use correct macro for board --- app/boards/arm/nrfmicro/pinmux.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'app/boards') diff --git a/app/boards/arm/nrfmicro/pinmux.c b/app/boards/arm/nrfmicro/pinmux.c index 803d20d..c02ca92 100644 --- a/app/boards/arm/nrfmicro/pinmux.c +++ b/app/boards/arm/nrfmicro/pinmux.c @@ -17,7 +17,7 @@ static int pinmux_nrfmicro_init(struct device *port) struct device *p1 = device_get_binding("GPIO_1"); -#if defined(BOARD_NRFMICRO_13) +#if CONFIG_BOARD_NRFMICRO_13 struct device *p0 = device_get_binding("GPIO_0"); // enable EXT_VCC (use 0 for nRFMicro 1.3, use 1 for nRFMicro 1.1) gpio_pin_configure(p1, 9, GPIO_OUTPUT); @@ -34,4 +34,4 @@ static int pinmux_nrfmicro_init(struct device *port) return 0; } -SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); \ No newline at end of file +SYS_INIT(pinmux_nrfmicro_init, APPLICATION, CONFIG_APPLICATION_INIT_PRIORITY); -- cgit v1.2.3