From 19571e8db73b65420d940e85dcabfd859af2d27d Mon Sep 17 00:00:00 2001 From: Sadik Ozer Date: Mon, 12 Feb 2024 12:05:39 +0300 Subject: [PATCH] boards: arm: adi: Enable display for MAX32672FTHR board MAX32672FTHR board has CFAL12832C-0091B display which is Monochrome 128x32 I2C OLED graphic display. This commit enables LVGL stack for MAX32672FTHR board Signed-off-by: Sadik Ozer --- boards/adi/max32672fthr/Kconfig.defconfig | 36 +++++++++++++++++++++++ boards/adi/max32672fthr/max32672fthr.dts | 24 +++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 boards/adi/max32672fthr/Kconfig.defconfig diff --git a/boards/adi/max32672fthr/Kconfig.defconfig b/boards/adi/max32672fthr/Kconfig.defconfig new file mode 100644 index 00000000000..71aa092864b --- /dev/null +++ b/boards/adi/max32672fthr/Kconfig.defconfig @@ -0,0 +1,36 @@ +# MAX32672FTHR boards configuration + +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +if BOARD_MAX32672FTHR + +if DISPLAY + +if LVGL + +# LVGL should allocate buffers equal to size of display +config LV_Z_VDB_SIZE + default 64 + +# Default Dot Per Inch. [px/inch] +# Used to initialize default sizes such as widgets sized, style paddings. +config LV_DPI_DEF + default 128 + +config LV_Z_BITS_PER_PIXEL + default 1 + +# Use offloaded render thread +config LV_Z_FLUSH_THREAD + default y + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_1 # 1 byte per pixel +endchoice + +endif # LVGL + +endif # DISPLAY + +endif # BOARD_MAX32672FTHR diff --git a/boards/adi/max32672fthr/max32672fthr.dts b/boards/adi/max32672fthr/max32672fthr.dts index 16531ffe10c..67b28fc56ce 100644 --- a/boards/adi/max32672fthr/max32672fthr.dts +++ b/boards/adi/max32672fthr/max32672fthr.dts @@ -20,6 +20,7 @@ zephyr,shell-uart = &uart0; zephyr,sram = &sram3; zephyr,flash = &flash0; + zephyr,display = &ssd1306; }; leds { @@ -109,3 +110,26 @@ &trng { status = "okay"; }; + +&i2c2 { + pinctrl-0 = <&i2c2a_scl_p0_18 &i2c2a_sda_p0_19>; + pinctrl-names = "default"; + clock-frequency = ; + status = "okay"; + + ssd1306: ssd1306@3d { + compatible = "solomon,ssd1306fb"; + reg = <0x3d>; + width = <128>; + height = <32>; + segment-offset = <0>; + page-offset = <0>; + display-offset = <0>; + multiplex-ratio = <31>; + segment-remap; + com-invdir; + com-sequential; + prechargep = <0x22>; + inversion-on; + }; +};