From d80063ff513969f622a6cffd1a9d074ccc3cfa24 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 24 Jul 2020 16:39:11 -0400 Subject: Initial display support. --- app/boards/shields/kyria/Kconfig.defconfig | 44 ++++++++++++++++++++++++++++++ app/boards/shields/kyria/kyria.dtsi | 18 ++++++++++-- 2 files changed, 60 insertions(+), 2 deletions(-) (limited to 'app/boards/shields') diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index bc0a7b8..b7d6a43 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -19,4 +19,48 @@ if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_RIGHT config ZMK_SPLIT default y +config EC11 + default y + +if EC11 + +choice EC11_TRIGGER + default EC11_TRIGGER_GLOBAL_THREAD +endchoice + +endif + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES + default 128 + +config LVGL_VER_RES + default 64 + +config LVGL_VDB_SIZE + default 64 + +config LVGL_DPI + default 148 + +config LVGL_BITS_PER_PIXEL + default 1 + +choice LVGL_COLOR_DEPTH + default LVGL_COLOR_DEPTH_1 +endchoice + +endif # LVGL + endif diff --git a/app/boards/shields/kyria/kyria.dtsi b/app/boards/shields/kyria/kyria.dtsi index 89fc70f..bbead84 100644 --- a/app/boards/shields/kyria/kyria.dtsi +++ b/app/boards/shields/kyria/kyria.dtsi @@ -81,8 +81,22 @@ RC(2,0) RC(2,1) RC(2,2) RC(2,3) RC(2,4) RC(2,5) RC(2,6) RC(2,7) RC(2,8) RC(2,9) sensors = <&left_encoder &right_encoder>; }; - // TODO: Encoder node(s) - // TODO: OLED node // TODO: RGB node(s) }; +&pro_micro_i2c { + status = "okay"; + + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <64>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <63>; + prechargep = <0x22>; + }; +}; -- cgit v1.2.3 From 2ca6c21027027c2d30d22bb7cc26397e460fa384 Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 24 Jul 2020 22:08:31 -0400 Subject: Add the Lily58 OLED. --- app/boards/shields/lily58/Kconfig.defconfig | 37 +++++++++++++++++++++++++++++ app/boards/shields/lily58/lily58.dtsi | 21 ++++++++++++++-- 2 files changed, 56 insertions(+), 2 deletions(-) (limited to 'app/boards/shields') diff --git a/app/boards/shields/lily58/Kconfig.defconfig b/app/boards/shields/lily58/Kconfig.defconfig index 8f278b0..e4bd8da 100644 --- a/app/boards/shields/lily58/Kconfig.defconfig +++ b/app/boards/shields/lily58/Kconfig.defconfig @@ -12,3 +12,40 @@ config ZMK_KEYBOARD_NAME default "Lily58 Right" endif + +if SHIELD_LILY58_LEFT || SHIELD_LILY58_RIGHT + +if ZMK_DISPLAY + +config I2C + default y + +config SSD1306 + default y + +endif # ZMK_DISPLAY + +if LVGL + +config LVGL_HOR_RES + default 128 + +config LVGL_VER_RES + default 32 + +config LVGL_VDB_SIZE + default 64 + +config LVGL_DPI + default 148 + +config LVGL_BITS_PER_PIXEL + default 1 + +choice LVGL_COLOR_DEPTH + default LVGL_COLOR_DEPTH_1 +endchoice + +endif # LVGL + +endif diff --git a/app/boards/shields/lily58/lily58.dtsi b/app/boards/shields/lily58/lily58.dtsi index 5fd7341..8655d8c 100644 --- a/app/boards/shields/lily58/lily58.dtsi +++ b/app/boards/shields/lily58/lily58.dtsi @@ -44,7 +44,24 @@ RC(3,0) RC(3,1) RC(3,2) RC(3,3) RC(3,4) RC(3,5) RC(4,5) RC(4,6) RC(3,6) RC(3,7) ; }; - - // TODO: OLED node }; +&pro_micro_i2c { + status = "okay"; + + ssd1306@3c { + compatible = "solomon,ssd1306fb"; + reg = <0x3c>; + label = "DISPLAY"; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + }; +}; -- cgit v1.2.3 From c34472bf3fac36f11e2136ca2d3099adccfaa74f Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Fri, 24 Jul 2020 22:47:26 -0400 Subject: Fixes for loading without encoder drivers. * Build fixes. --- app/boards/shields/kyria/Kconfig.defconfig | 13 +------------ 1 file changed, 1 insertion(+), 12 deletions(-) (limited to 'app/boards/shields') diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index b7d6a43..1195a87 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -18,18 +18,7 @@ if SHIELD_KYRIA_LEFT || SHIELD_KYRIA_RIGHT config ZMK_SPLIT default y - -config EC11 - default y - -if EC11 - -choice EC11_TRIGGER - default EC11_TRIGGER_GLOBAL_THREAD -endchoice - -endif - + if ZMK_DISPLAY config I2C -- cgit v1.2.3 From 5e96c0014a2a2a97c7363df9c74f062d0e3b806b Mon Sep 17 00:00:00 2001 From: Pete Johanson Date: Sat, 25 Jul 2020 23:11:38 -0400 Subject: Default the reverse mode. --- app/boards/shields/kyria/Kconfig.defconfig | 3 +++ app/boards/shields/lily58/Kconfig.defconfig | 3 +++ 2 files changed, 6 insertions(+) (limited to 'app/boards/shields') diff --git a/app/boards/shields/kyria/Kconfig.defconfig b/app/boards/shields/kyria/Kconfig.defconfig index 1195a87..405377b 100644 --- a/app/boards/shields/kyria/Kconfig.defconfig +++ b/app/boards/shields/kyria/Kconfig.defconfig @@ -27,6 +27,9 @@ config I2C config SSD1306 default y +config SSD1306_REVERSE_MODE + default y + endif # ZMK_DISPLAY if LVGL diff --git a/app/boards/shields/lily58/Kconfig.defconfig b/app/boards/shields/lily58/Kconfig.defconfig index e4bd8da..89f217b 100644 --- a/app/boards/shields/lily58/Kconfig.defconfig +++ b/app/boards/shields/lily58/Kconfig.defconfig @@ -23,6 +23,9 @@ config I2C config SSD1306 default y +config SSD1306_REVERSE_MODE + default y + endif # ZMK_DISPLAY if LVGL -- cgit v1.2.3