From abac5f98b750293ff1b783d7958936a486c6d069 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Wed, 21 Feb 2024 17:11:27 -0800 Subject: [PATCH 1/4] Fix pin setup. --- boards/arm/zaphod/zaphod.dts | 29 ++++++++++++++++++++++++++--- 1 file changed, 26 insertions(+), 3 deletions(-) diff --git a/boards/arm/zaphod/zaphod.dts b/boards/arm/zaphod/zaphod.dts index c9810f95..7a0c3930 100644 --- a/boards/arm/zaphod/zaphod.dts +++ b/boards/arm/zaphod/zaphod.dts @@ -8,6 +8,27 @@ #include #include +&pinctrl { + spi0_default: spi0_default { + group1 { + psels = + , + , + ; + }; + }; + + spi0_sleep: spi0_sleep { + group1 { + psels = + , + , + ; + low-power-enable; + }; + }; +}; + / { model = "zaphod"; compatible = "petejohanson,zaphod"; @@ -100,9 +121,11 @@ &spi0 { compatible = "nordic,nrf-spim"; status = "okay"; - sck-pin = <7>; - mosi-pin = <5>; - miso-pin = <8>; + + pinctrl-0 = <&spi0_default>; + pinctrl-1 = <&spi0_default>; + pinctrl-names = "default", "sleep"; + cs-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; ls0xx: ls0xx@0 { From 9d5eb97974f5f5a8f37bc6a1c4082715f63ecbb2 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Sun, 3 Mar 2024 22:33:49 -0800 Subject: [PATCH 2/4] Bump the LVGL mem pool size. --- boards/arm/zaphod/Kconfig.defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boards/arm/zaphod/Kconfig.defconfig b/boards/arm/zaphod/Kconfig.defconfig index 4b0cfedb..ec1e3b0e 100644 --- a/boards/arm/zaphod/Kconfig.defconfig +++ b/boards/arm/zaphod/Kconfig.defconfig @@ -34,6 +34,9 @@ config ZMK_DISPLAY_STATUS_SCREEN_CUSTOM if ZMK_DISPLAY +config LV_Z_MEM_POOL_SIZE + default 4096 + choice LV_FONT_DEFAULT default LV_FONT_DEFAULT_MONTSERRAT_26 From 8723fa64190e49d900849e55991b48cdaaf00437 Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Mon, 4 Mar 2024 09:48:20 -0800 Subject: [PATCH 3/4] Bump LVGL mem pool for ZL too. --- boards/shields/zaphod_lite/Kconfig.defconfig | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boards/shields/zaphod_lite/Kconfig.defconfig b/boards/shields/zaphod_lite/Kconfig.defconfig index 6b2b6eec..c11aa1cb 100644 --- a/boards/shields/zaphod_lite/Kconfig.defconfig +++ b/boards/shields/zaphod_lite/Kconfig.defconfig @@ -18,6 +18,9 @@ if ZMK_DISPLAY config SYSTEM_WORKQUEUE_STACK_SIZE default 2048 +config LV_Z_MEM_POOL_SIZE + default 4096 + choice LV_FONT_DEFAULT default LV_FONT_DEFAULT_MONTSERRAT_26 From 4c675ee76ccc47d56133b91a2c383a7cd5eadfae Mon Sep 17 00:00:00 2001 From: Peter Johanson Date: Fri, 5 Apr 2024 11:39:57 -0700 Subject: [PATCH 4/4] Add wakeup-source and remove some labels. --- boards/arm/zaphod/zaphod.dts | 11 ++--------- boards/shields/zaphod_lite/zaphod_lite.overlay | 4 +--- 2 files changed, 3 insertions(+), 12 deletions(-) diff --git a/boards/arm/zaphod/zaphod.dts b/boards/arm/zaphod/zaphod.dts index 7a0c3930..af646ada 100644 --- a/boards/arm/zaphod/zaphod.dts +++ b/boards/arm/zaphod/zaphod.dts @@ -48,13 +48,11 @@ compatible = "gpio-leds"; blue_led: led_0 { gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>; - label = "Blue LED"; }; }; vbatt: vbatt { compatible = "zmk,battery-voltage-divider"; - label = "BATTERY"; io-channels = <&adc 7>; output-ohms = <2000000>; full-ohms = <(2000000 + 806000)>; @@ -75,7 +73,8 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + wakeup-source; + debounce-press-ms = <1>; debounce-release-ms = <5>; @@ -130,7 +129,6 @@ ls0xx: ls0xx@0 { compatible = "sharp,ls0xx"; - label = "DISPLAY"; spi-max-frequency = <2000000>; reg = <0>; width = <144>; @@ -144,7 +142,6 @@ compatible = "nordic,nrf-usbd"; cdc_acm_uart: cdc_acm_uart { compatible = "zephyr,cdc-acm-uart"; - label = "CDC_ACM_0"; }; }; @@ -160,21 +157,17 @@ #size-cells = <1>; sd_partition: partition@0 { - label = "mbr"; reg = <0x00000000 0x00001000>; }; code_partition: partition@1000 { - label = "code_partition"; reg = <0x00001000 0x000d3000>; }; storage_partition: partition@d4000 { - label = "storage"; reg = <0x000d4000 0x00020000>; }; boot_partition: partition@f4000 { - label = "adafruit_boot"; reg = <0x000f4000 0x0000c000>; }; }; diff --git a/boards/shields/zaphod_lite/zaphod_lite.overlay b/boards/shields/zaphod_lite/zaphod_lite.overlay index 65d8d0a4..1912c637 100644 --- a/boards/shields/zaphod_lite/zaphod_lite.overlay +++ b/boards/shields/zaphod_lite/zaphod_lite.overlay @@ -16,14 +16,12 @@ gpio-controller; spi-max-frequency = <200000>; reg = <0>; - label = "4HC595"; #gpio-cells = <2>; ngpios = <8>; }; ls0xx: ls0xx@1 { compatible = "sharp,ls0xx"; - label = "DISPLAY"; spi-max-frequency = <2000000>; reg = <1>; width = <144>; @@ -61,7 +59,7 @@ kscan: kscan { compatible = "zmk,kscan-gpio-matrix"; - label = "KSCAN"; + wakeup-source; debounce-press-ms = <1>; debounce-release-ms = <5>;