From 97e62f2da5bf8c4500aab4887bef02d912bb0137 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 14 Mar 2022 22:23:20 -0400 Subject: [PATCH] feat(boards): Add Seeed(uino) XIAO interconnect * Document the Seeed(uino) XIAO interconnect * Add metadata files for two upstream boards, XIAO and XIAO BLE. * Add conf and overlay files to properly configure the boards for ZMK use. --- .../arm/seeeduino_xiao/seeeduino_xiao.zmk.yml | 9 +++++ .../seeeduino_xiao_ble.zmk.yml | 10 ++++++ .../seeed_xiao/seeed_xiao.zmk.yml | 10 ++++++ app/boards/seeeduino_xiao.conf | 5 +++ app/boards/seeeduino_xiao.overlay | 19 +++++++++++ app/boards/seeeduino_xiao_ble.conf | 8 +++++ app/boards/seeeduino_xiao_ble.overlay | 33 +++++++++++++++++++ 7 files changed, 94 insertions(+) create mode 100644 app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml create mode 100644 app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml create mode 100644 app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml create mode 100644 app/boards/seeeduino_xiao.conf create mode 100644 app/boards/seeeduino_xiao.overlay create mode 100644 app/boards/seeeduino_xiao_ble.conf create mode 100644 app/boards/seeeduino_xiao_ble.overlay diff --git a/app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml b/app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml new file mode 100644 index 00000000..1225fb31 --- /dev/null +++ b/app/boards/arm/seeeduino_xiao/seeeduino_xiao.zmk.yml @@ -0,0 +1,9 @@ +file_format: "1" +id: seeeduino_xiao +name: Seeeduino XIAO +type: board +arch: arm +outputs: + - usb +url: https://wiki.seeedstudio.com/Seeeduino-XIAO/ +exposes: [seeed_xiao] diff --git a/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml b/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml new file mode 100644 index 00000000..360bd04b --- /dev/null +++ b/app/boards/arm/seeeduino_xiao_ble/seeeduino_xiao_ble.zmk.yml @@ -0,0 +1,10 @@ +file_format: "1" +id: seeeduino_xiao_ble +name: Seeeduino XIAO BLE +type: board +arch: arm +outputs: + - usb + - ble +url: https://wiki.seeedstudio.com/XIAO_BLE/ +exposes: [seeed_xiao] diff --git a/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml b/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml new file mode 100644 index 00000000..cb9f6b56 --- /dev/null +++ b/app/boards/interconnects/seeed_xiao/seeed_xiao.zmk.yml @@ -0,0 +1,10 @@ +file_format: "1" +id: seeed_xiao +name: Seeed XIAO +type: interconnect +url: https://wiki.seeedstudio.com/Seeeduino-XIAO/ +manufacturer: Seeed +description: | + The Seeed(uino) XIAO is a popular smaller format micro-controller, that has gained popularity as an alterative + to the SparkFun Pro Micro. Since its creation, several pin compatible controllers, such + as the Seeeduino XIAO BLE, Adafruit QT Py and Adafruit QT Py RP2040, have become available. diff --git a/app/boards/seeeduino_xiao.conf b/app/boards/seeeduino_xiao.conf new file mode 100644 index 00000000..f0db8ed1 --- /dev/null +++ b/app/boards/seeeduino_xiao.conf @@ -0,0 +1,5 @@ +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_UART_INTERRUPT_DRIVEN=n +CONFIG_ZMK_USB=y diff --git a/app/boards/seeeduino_xiao.overlay b/app/boards/seeeduino_xiao.overlay new file mode 100644 index 00000000..70080286 --- /dev/null +++ b/app/boards/seeeduino_xiao.overlay @@ -0,0 +1,19 @@ +/* + * Copyright (c) 2022 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + +/ { + chosen { + zephyr,console = &cdc_acm_uart; + }; +}; + +&usb0 { + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; + diff --git a/app/boards/seeeduino_xiao_ble.conf b/app/boards/seeeduino_xiao_ble.conf new file mode 100644 index 00000000..92367028 --- /dev/null +++ b/app/boards/seeeduino_xiao_ble.conf @@ -0,0 +1,8 @@ + +CONFIG_CONSOLE=n +CONFIG_SERIAL=n +CONFIG_UART_CONSOLE=n +CONFIG_UART_INTERRUPT_DRIVEN=n +CONFIG_ZMK_USB=y +CONFIG_ZMK_BLE=y + diff --git a/app/boards/seeeduino_xiao_ble.overlay b/app/boards/seeeduino_xiao_ble.overlay new file mode 100644 index 00000000..7e0d4ff9 --- /dev/null +++ b/app/boards/seeeduino_xiao_ble.overlay @@ -0,0 +1,33 @@ +/* + * Copyright (c) 2021 The ZMK Contributors + * + * SPDX-License-Identifier: MIT + */ + + +/ { + chosen { + zephyr,console = &cdc_acm_uart; + }; + + vbatt { + compatible = "zmk,battery-voltage-divider"; + label = "BATTERY"; + io-channels = <&adc 7>; + power-gpios = <&gpio0 14 (GPIO_OPEN_DRAIN | GPIO_ACTIVE_LOW)>; + output-ohms = <1000000>; + full-ohms = <(1000000 + 510000)>; + }; +}; + +&adc { + status = "okay"; +}; + +&usbd { + cdc_acm_uart: cdc_acm_uart { + compatible = "zephyr,cdc-acm-uart"; + label = "CDC_ACM_0"; + }; +}; +