Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Zephyr 3.2 Upgrade #1499

Merged
merged 21 commits into from Apr 6, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
4d0124f
refactor: Move to Zephyr 3.2 branch.
petejohanson Jan 16, 2023
5027ed6
refactor(display): Updates for LVGL v8.x changes.
petejohanson Jan 18, 2023
36cdac5
refactor: Move to LISTIFY/DT_FOREACH_PROP_ELEM macros.
petejohanson Sep 21, 2022
67ccca6
refactor: Move to new PM API.
petejohanson Sep 21, 2022
63e71a1
refactor(ble): New callback API for pairing complete.
petejohanson Sep 21, 2022
09a84ce
refactor(behaviors): Rename `reset` behavior.
petejohanson Sep 21, 2022
af586e3
refactor: Move to `zephyr/` include paths.
petejohanson Oct 8, 2022
7ba54de
refactor: Remove deprecated Kconfig override.
petejohanson Oct 8, 2022
efae1ba
refactor: Remove v1 logging vestiges.
petejohanson Jan 18, 2023
5bad121
refactor: Move away from deprecated label usages.
petejohanson Jan 18, 2023
8b7cc91
refactor: Move to updated Docker images.
petejohanson Oct 8, 2022
cf6fddd
fix(boards): Base config/overlay for rp2040 boards
petejohanson Dec 24, 2021
29bebf7
fix(logging): Disable USB driver logging.
petejohanson Jul 14, 2022
3a9216f
fix(kscan): Default wait between outputs on RP2040.
petejohanson Jul 15, 2022
a654b2d
fix(core): Bump system work queue stack on RP2040.
petejohanson Aug 4, 2022
48b5877
fix(shields): Don't try to disable xiao_i2c on Hummingbird.
petejohanson Oct 20, 2022
0b37bae
fix(underglow): Use `DT_HAS_CHOSEN` properly.
petejohanson Oct 20, 2022
b74830b
refactor(boards): Move to pinctrl.
petejohanson Nov 5, 2022
6e0d742
feat(docs): Add BLE feature/config pages.
petejohanson Jan 16, 2023
1015dda
fix(display): Tweak EPD driver init/blanking.
petejohanson Mar 17, 2023
66ffaac
feat(docs): Add blog post for Zephyr 3.2.
petejohanson Oct 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
2 changes: 1 addition & 1 deletion .devcontainer/Dockerfile
@@ -1,4 +1,4 @@
FROM docker.io/zmkfirmware/zmk-dev-arm:3.0
FROM docker.io/zmkfirmware/zmk-dev-arm:3.2

COPY .bashrc tmp
RUN mv /tmp/.bashrc ~/.bashrc
2 changes: 1 addition & 1 deletion .github/workflows/build.yml
Expand Up @@ -17,7 +17,7 @@ jobs:
if: ${{ always() }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.2
needs: compile-matrix
strategy:
matrix:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/hardware-metadata-validation.yml
Expand Up @@ -29,7 +29,7 @@ jobs:
validate-metadata:
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-dev-arm:3.0
image: docker.io/zmkfirmware/zmk-dev-arm:3.2
steps:
- uses: actions/checkout@v3
- name: Install dependencies
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Expand Up @@ -33,7 +33,7 @@ jobs:
test: ${{ fromJSON(needs.collect-tests.outputs.test-dirs) }}
runs-on: ubuntu-latest
container:
image: docker.io/zmkfirmware/zmk-build-arm:3.0
image: docker.io/zmkfirmware/zmk-build-arm:3.2
steps:
- name: Checkout
uses: actions/checkout@v3
Expand Down
15 changes: 10 additions & 5 deletions app/Kconfig
Expand Up @@ -121,6 +121,7 @@ menuconfig ZMK_BLE
if ZMK_BLE

config SYSTEM_WORKQUEUE_STACK_SIZE
default 4096 if SOC_RP2040
default 2048

config ZMK_BLE_THREAD_STACK_SIZE
Expand Down Expand Up @@ -419,19 +420,23 @@ if ZMK_USB_LOGGING
config ZMK_LOG_LEVEL
default 4

choice USB_CDC_ACM_LOG_LEVEL_CHOICE
default USB_CDC_ACM_LOG_LEVEL_OFF
endchoice

choice USB_DRIVER_LOG_LEVEL_CHOICE
default USB_DRIVER_LOG_LEVEL_OFF

endchoice

# We do this to avoid log loop where logging to USB generates more log messages.
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this comment no longer relevant, or does it still apply to the buffer size configs?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think above has 'nixed that issue, but there's probably still edge cases where this could occur.

config USB_CDC_ACM_LOG_LEVEL
default 1

config USB_CDC_ACM_RINGBUF_SIZE
default 1024

config LOG_BUFFER_SIZE
default 8192

config LOG_STRDUP_BUF_COUNT
default 16

config LOG_PROCESS_THREAD_STARTUP_DELAY_MS
default 1000

Expand Down
6 changes: 6 additions & 0 deletions app/boards/01space_rp2040_042lcd.conf
@@ -0,0 +1,6 @@
CONFIG_ZMK_DISPLAY=y
CONFIG_LV_FONT_UNSCII_8=n
CONFIG_ZMK_USB=y
CONFIG_I2C=y
CONFIG_I2C_DW=y
CONFIG_LV_Z_VDB_SIZE=50
9 changes: 9 additions & 0 deletions app/boards/01space_rp2040_042lcd.overlay
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "usb_console.dtsi"

&xiao_serial { status = "disabled"; };
4 changes: 4 additions & 0 deletions app/boards/adafruit_kb2040.conf
@@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y
9 changes: 9 additions & 0 deletions app/boards/adafruit_kb2040.overlay
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "usb_console.dtsi"

&pro_micro_serial { status = "disabled"; };
4 changes: 4 additions & 0 deletions app/boards/adafruit_qt_py_rp2040.conf
@@ -0,0 +1,4 @@
CONFIG_CONSOLE=n
CONFIG_SERIAL=n
CONFIG_UART_CONSOLE=n
CONFIG_ZMK_USB=y
9 changes: 9 additions & 0 deletions app/boards/adafruit_qt_py_rp2040.overlay
@@ -0,0 +1,9 @@
/*
* Copyright (c) 2023 The ZMK Contributors
*
* SPDX-License-Identifier: MIT
*/

#include "usb_console.dtsi"

&xiao_serial { status = "disabled"; };
9 changes: 9 additions & 0 deletions app/boards/arm/adafruit_kb2040/adafruit_kb2040.zmk.yml
@@ -0,0 +1,9 @@
file_format: "1"
id: adafruit_kb2040
name: Adafruit KB2040
type: board
arch: arm
outputs:
- usb
url: https://www.adafruit.com/product/5302
exposes: [pro_micro]
@@ -0,0 +1,9 @@
file_format: "1"
id: adafruit_qt_py_rp2040
name: Adafruit QT Py RP2040
type: board
arch: arm
outputs:
- usb
url: https://www.adafruit.com/product/4900
exposes: [seeed_xiao]
39 changes: 39 additions & 0 deletions app/boards/arm/bluemicro840/bluemicro840_v1-pinctrl.dtsi
@@ -0,0 +1,39 @@
/*
* Copyright (c) 2022 The ZMK Contributors
* SPDX-License-Identifier: MIT
*/

&pinctrl {
uart0_default: uart0_default {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>;
bias-pull-up;
};
group2 {
psels = <NRF_PSEL(UART_TX, 0, 6)>;
};
};

uart0_sleep: uart0_sleep {
group1 {
psels = <NRF_PSEL(UART_RX, 0, 8)>,
<NRF_PSEL(UART_TX, 0, 6)>;
low-power-enable;
};
};

i2c0_default: i2c0_default {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>;
};
};

i2c0_sleep: i2c0_sleep {
group1 {
psels = <NRF_PSEL(TWIM_SDA, 0, 17)>,
<NRF_PSEL(TWIM_SCL, 0, 20)>;
low-power-enable;
};
};
};
13 changes: 8 additions & 5 deletions app/boards/arm/bluemicro840/bluemicro840_v1.dts
Expand Up @@ -7,6 +7,7 @@
/dts-v1/;
#include <nordic/nrf52840_qiaa.dtsi>
#include "arduino_pro_micro_pins.dtsi"
#include "bluemicro840_v1-pinctrl.dtsi"

/ {
model = "BlueMicro840_V1";
Expand Down Expand Up @@ -62,15 +63,17 @@
};

&i2c0 {
compatible = "nordic,nrf-twi";
sda-pin = <15>;
scl-pin = <17>;
compatible = "nordic,nrf-twim";
pinctrl-0 = <&i2c0_default>;
pinctrl-1 = <&i2c0_sleep>;
pinctrl-names = "default", "sleep";
};

&uart0 {
compatible = "nordic,nrf-uarte";
tx-pin = <6>;
rx-pin = <8>;
pinctrl-0 = <&uart0_default>;
pinctrl-1 = <&uart0_sleep>;
pinctrl-names = "default", "sleep";
};

&usbd {
Expand Down
4 changes: 3 additions & 1 deletion app/boards/arm/bluemicro840/bluemicro840_v1_defconfig
Expand Up @@ -7,6 +7,8 @@ CONFIG_BOARD_BLUEMICRO840_V1=y
# Enable MPU
CONFIG_ARM_MPU=y

CONFIG_PINCTRL=y

# enable GPIO
CONFIG_GPIO=y

Expand All @@ -18,4 +20,4 @@ CONFIG_NVS=y
CONFIG_SETTINGS_NVS=y
CONFIG_FLASH=y
CONFIG_FLASH_PAGE_LAYOUT=y
CONFIG_FLASH_MAP=y
CONFIG_FLASH_MAP=y
9 changes: 9 additions & 0 deletions app/boards/arm/boardsource_blok/boardsource_blok.zmk.yml
@@ -0,0 +1,9 @@
file_format: "1"
id: boardsource_blok
name: BoardSource blok
type: board
arch: arm
outputs:
- usb
url: https://peg.software/docs/blok
exposes: [pro_micro]
10 changes: 5 additions & 5 deletions app/boards/arm/bt60/bt60_v1.keymap
Expand Up @@ -56,7 +56,7 @@
// ------------------------------------------------------------------------------------------
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR &trans
Expand Down Expand Up @@ -84,7 +84,7 @@
raise {
bindings = <
&trans &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp INS &kp DEL
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &reset
&kp CLCK &bt BT_PRV &bt BT_NXT &bt BT_CLR &trans &trans &trans &trans &trans &trans &trans &kp UP &trans &sys_reset
&trans &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp LEFT &kp RIGHT &trans
&trans &trans &trans &trans &trans &trans &trans &trans &trans &trans &kp DOWN &trans &trans
&trans &trans &trans &bootloader &trans &trans &trans
Expand Down Expand Up @@ -112,7 +112,7 @@
raise {
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL
&reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
&sys_reset &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &trans &bootloader
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
Expand Down Expand Up @@ -140,7 +140,7 @@
raise {
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp F1
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &trans &bt BT_CLR
Expand Down Expand Up @@ -168,7 +168,7 @@
raise {
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT &trans
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
Expand Down
2 changes: 1 addition & 1 deletion app/boards/arm/bt60/bt60_v1_hs.keymap
Expand Up @@ -26,7 +26,7 @@
raise {
bindings = <
&kp GRAVE &kp F1 &kp F2 &kp F3 &kp F4 &kp F5 &kp F6 &kp F7 &kp F8 &kp F9 &kp F10 &kp F11 &kp F12 &kp DEL &trans
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &reset
&trans &trans &kp UP &trans &trans &trans &trans &trans &kp INS &trans &kp PSCRN &kp SLCK &kp PAUSE_BREAK &sys_reset
&trans &kp LEFT &kp DOWN &kp RIGHT &trans &trans &trans &trans &trans &trans &kp HOME &kp PG_UP &bootloader
&kp C_PREV &kp C_VOL_DN &kp C_VOL_UP &kp C_MUTE &trans &trans &trans &trans &trans &kp END &kp PG_DN &kp C_NEXT
&bt BT_PRV &bt BT_NXT &trans &trans &trans &trans &trans &bt BT_CLR
Expand Down
12 changes: 6 additions & 6 deletions app/boards/arm/corneish_zen/Kconfig.defconfig
Expand Up @@ -42,12 +42,12 @@ config USB_DEVICE_STACK
endif # USB

config ZMK_DISPLAY
select LVGL_USE_CONT
select LVGL_FONT_MONTSERRAT_26
select LVGL_FONT_MONTSERRAT_20
select LVGL_FONT_MONTSERRAT_16
select LVGL_USE_LABEL
select LVGL_USE_IMG
select LV_USE_CONT
select LV_FONT_MONTSERRAT_26
select LV_FONT_MONTSERRAT_20
select LV_FONT_MONTSERRAT_16
select LV_USE_LABEL
select LV_USE_IMG

choice ZMK_DISPLAY_STATUS_SCREEN
default ZMK_DISPLAY_STATUS_SCREEN_CUSTOM
Expand Down
27 changes: 23 additions & 4 deletions app/boards/arm/corneish_zen/corneish_zen_v2_left.dts
Expand Up @@ -53,12 +53,31 @@

};

&pinctrl {
spi0_default: spi0_default {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
<NRF_PSEL(SPIM_MISO, 0, 22)>;
};
};

spi0_sleep: spi0_sleep {
group1 {
psels = <NRF_PSEL(SPIM_SCK, 0, 27)>,
<NRF_PSEL(SPIM_MOSI, 0, 8)>,
<NRF_PSEL(SPIM_MISO, 0, 22)>;
low-power-enable;
};
};
};

&spi0 {
status = "okay";
compatible = "nordic,nrf-spim";
sck-pin = <27>;
mosi-pin = <8>;
miso-pin = <22>;
pinctrl-0 = <&spi0_default>;
pinctrl-1 = <&spi0_sleep>;
pinctrl-names = "default", "sleep";
cs-gpios = <&gpio1 8 GPIO_ACTIVE_LOW>;

epd: il0323@0 {
Expand All @@ -75,4 +94,4 @@
cdi = <0xd2>;
tcon = <0x22>;
};
};
};
23 changes: 12 additions & 11 deletions app/boards/arm/corneish_zen/corneish_zen_v2_left_defconfig
Expand Up @@ -13,6 +13,9 @@ CONFIG_ZMK_DISPLAY=y
# Enable MPU
CONFIG_ARM_MPU=y

# enable pinctrl
CONFIG_PINCTRL=y

# enable GPIO
CONFIG_GPIO=y

Expand All @@ -39,17 +42,15 @@ CONFIG_ZMK_DISPLAY_WORK_QUEUE_DEDICATED=y
CONFIG_ZMK_DISPLAY_DEDICATED_THREAD_STACK_SIZE=2048
CONFIG_SSD1306=n
CONFIG_IL0323=y
CONFIG_LVGL_BITS_PER_PIXEL=1
CONFIG_LVGL_COLOR_DEPTH_1=y
CONFIG_LVGL_DPI=145
CONFIG_LVGL_VDB_SIZE=100
CONFIG_LVGL_USE_THEME_MONO=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_RED=n
CONFIG_LVGL_THEME_DEFAULT_COLOR_PRIMARY_BLACK=y
CONFIG_LVGL_THEME_DEFAULT_COLOR_SECONDARY_WHITE=y
CONFIG_LVGL_THEME_DEFAULT_FONT_SMALL_MONTSERRAT_16=y
CONFIG_LVGL_THEME_DEFAULT_FONT_NORMAL_MONTSERRAT_26=y
CONFIG_LV_Z_BITS_PER_PIXEL=1
CONFIG_LV_COLOR_DEPTH_1=y
CONFIG_LV_DPI_DEF=145
CONFIG_LV_Z_VDB_SIZE=100
CONFIG_LV_USE_THEME_MONO=y
CONFIG_LV_COLOR_CHROMA_KEY_HEX=0x00FF00
CONFIG_ZMK_LV_FONT_DEFAULT_SMALL_MONTSERRAT_16=y
CONFIG_LV_FONT_MONTSERRAT_26=y
CONFIG_LV_FONT_DEFAULT_MONTSERRAT_26=y

# custom status screens
CONFIG_ZMK_DISPLAY_STATUS_SCREEN_CUSTOM=y
Expand Down