From f952548c980cd95923e40a1a718d9009e78c0f22 Mon Sep 17 00:00:00 2001 From: Kyle McCreery Date: Thu, 17 Nov 2022 01:35:05 -0500 Subject: [PATCH] Applying review feedback. --- app/boards/arm/pillbug/pillbug.dts | 97 +++++++++++++++- app/boards/arm/pillbug/pillbug.dtsi | 106 ------------------ app/boards/arm/pillbug/pillbug.zmk.yml | 4 +- .../interconnects/blackpill/blackpill.zmk.yml | 2 - 4 files changed, 97 insertions(+), 112 deletions(-) delete mode 100644 app/boards/arm/pillbug/pillbug.dtsi diff --git a/app/boards/arm/pillbug/pillbug.dts b/app/boards/arm/pillbug/pillbug.dts index cbdb1062..4b8f157f 100644 --- a/app/boards/arm/pillbug/pillbug.dts +++ b/app/boards/arm/pillbug/pillbug.dts @@ -5,13 +5,30 @@ */ /dts-v1/; -#include "pillbug.dtsi" + +#include +#include "blackpill_pins.dtsi" / { + model = "PillBug"; + compatible = "pillbug"; + chosen { + zephyr,code-partition = &code_partition; + zephyr,sram = &sram0; + zephyr,flash = &flash0; + zephyr,console = &cdc_acm_uart; zmk,battery = &vbatt; }; + leds { + compatible = "gpio-leds"; + blue_led: led_0 { + gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; + label = "Blue LED"; + }; + }; + ext-power { compatible = "zmk,ext-power-generic"; label = "EXT_POWER"; @@ -27,3 +44,81 @@ full-ohms = <(2000000 + 820000)>; }; }; + +&adc { + status = "okay"; +}; + +&gpiote { + status = "okay"; +}; + +&gpio0 { + status = "okay"; +}; + +&gpio1 { + status = "okay"; +}; + +&i2c0 { + compatible = "nordic,nrf-twi"; + sda-pin = <15>; + scl-pin = <13>; +}; + +&uart0 { + compatible = "nordic,nrf-uarte"; + tx-pin = <6>; + rx-pin = <8>; +}; + +&usbd { + status = "okay"; + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + + +&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 = "mbr"; + reg = <0x00000000 0x00001000>; + }; + + code_partition: partition@1000 { + label = "code_partition"; + reg = <0x00001000 0x000d3000>; + }; + + /* + * The flash starting at 0x000d4000 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@d4000 { + label = "storage"; + reg = <0x000d4000 0x00020000>; + }; + + boot_partition: partition@f4000 { + label = "adafruit_boot"; + reg = <0x000f4000 0x0000c000>; + }; + }; +}; diff --git a/app/boards/arm/pillbug/pillbug.dtsi b/app/boards/arm/pillbug/pillbug.dtsi deleted file mode 100644 index 5939b943..00000000 --- a/app/boards/arm/pillbug/pillbug.dtsi +++ /dev/null @@ -1,106 +0,0 @@ -/* - * Copyright (c) 2022 The ZMK Contributors - * - * SPDX-License-Identifier: MIT - */ - -#include -#include "blackpill_pins.dtsi" - -/ { - model = "PillBug"; - compatible = "pillbug"; - - chosen { - zephyr,code-partition = &code_partition; - zephyr,sram = &sram0; - zephyr,flash = &flash0; - zephyr,console = &cdc_acm_uart; - }; - - leds { - compatible = "gpio-leds"; - blue_led: led_0 { - gpios = <&gpio0 20 GPIO_ACTIVE_LOW>; - label = "Blue LED"; - }; - }; -}; - -&adc { - status = "okay"; -}; - -&gpiote { - status = "okay"; -}; - -&gpio0 { - status = "okay"; -}; - -&gpio1 { - status = "okay"; -}; - -&i2c0 { - compatible = "nordic,nrf-twi"; - sda-pin = <15>; - scl-pin = <13>; -}; - -&uart0 { - compatible = "nordic,nrf-uarte"; - tx-pin = <6>; - rx-pin = <8>; -}; - -&usbd { - status = "okay"; - cdc_acm_uart: cdc_acm_uart { - compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; - }; -}; - - -&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 = "mbr"; - reg = <0x00000000 0x00001000>; - }; - - code_partition: partition@1000 { - label = "code_partition"; - reg = <0x00001000 0x000d3000>; - }; - - /* - * The flash starting at 0x000d4000 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@d4000 { - label = "storage"; - reg = <0x000d4000 0x00020000>; - }; - - boot_partition: partition@f4000 { - label = "adafruit_boot"; - reg = <0x000f4000 0x0000c000>; - }; - }; -}; diff --git a/app/boards/arm/pillbug/pillbug.zmk.yml b/app/boards/arm/pillbug/pillbug.zmk.yml index 079a6d58..5df11b9e 100644 --- a/app/boards/arm/pillbug/pillbug.zmk.yml +++ b/app/boards/arm/pillbug/pillbug.zmk.yml @@ -3,10 +3,8 @@ id: pillbug name: PillBug type: board arch: arm -features: - - keys outputs: - usb - ble -url: https://mechwild.com +url: https://mechwild.com/product/pillbug exposes: [blackpill] diff --git a/app/boards/interconnects/blackpill/blackpill.zmk.yml b/app/boards/interconnects/blackpill/blackpill.zmk.yml index 1a769dec..d3fcdc88 100644 --- a/app/boards/interconnects/blackpill/blackpill.zmk.yml +++ b/app/boards/interconnects/blackpill/blackpill.zmk.yml @@ -6,5 +6,3 @@ url: https://github.com/WeActStudio/WeActStudio.MiniSTM32F4x1 manufacturer: WeAct Studio description: | The WeAct Studio BlackPill has grown in popularity due to its low price, availability, and utilization of the powerful STM32F4x1CEU6 microcontroller. The BlackPill features more GPIO than most other boards, but also has a comparatively larger footprint as a result. Many clones and variations of the original BlackPill are available on the market as an affordable and more powerful alternative to many popular boards. The official WeAct variations of the WeAct Studio BlackPill are powered by the STM32F411CEU6 and STM32F401CEU6 microcontrollers. - - Note: ZMK does not currently support STM32F4x1CEU6 based BlackPills, but the framework exists in Zephyr to add support in the future as a non-wireless option.