diff --git a/boards/adi/max32672evkit/Kconfig.defconfig b/boards/adi/max32672evkit/Kconfig.defconfig new file mode 100644 index 00000000000..cb74c0282e7 --- /dev/null +++ b/boards/adi/max32672evkit/Kconfig.defconfig @@ -0,0 +1,29 @@ +# MAX32672EVKIT boards configuration + +# Copyright (c) 2024 Analog Devices, Inc. +# SPDX-License-Identifier: Apache-2.0 + +if BOARD_MAX32672EVKIT + +if DISPLAY + +config MIPI_DBI_SPI_3WIRE + default y + +if LVGL + +config LV_Z_BITS_PER_PIXEL + default 16 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_16 # 16 bit per pixel +endchoice + +config LV_COLOR_16_SWAP + default y + +endif # LVGL + +endif # DISPLAY + +endif # BOARD_MAX32672EVKIT diff --git a/boards/adi/max32672evkit/max32672evkit.dts b/boards/adi/max32672evkit/max32672evkit.dts index 69cc94b3c30..d1d97f78af2 100644 --- a/boards/adi/max32672evkit/max32672evkit.dts +++ b/boards/adi/max32672evkit/max32672evkit.dts @@ -10,6 +10,7 @@ #include #include #include +#include / { model = "Analog Devices MAX32672EVKIT"; @@ -20,6 +21,7 @@ zephyr,shell-uart = &uart0; zephyr,sram = &sram3; zephyr,flash = &flash0; + zephyr,display = &st7735; }; leds { @@ -50,6 +52,42 @@ sw0 = &pb1; watchdog0 = &wdt0; }; + + mipi_dbi { + compatible = "zephyr,mipi-dbi-spi"; + /* Enable D/C line for 4wire mode */ + /* dc-gpios = <&gpio0 19 (GPIO_ACTIVE_HIGH | MAX32_GPIO_VSEL_VDDIOH)>; */ + spi-dev = <&spi0>; + #address-cells = <1>; + #size-cells = <0>; + + status = "okay"; + + st7735: st7735@0 { + compatible = "sitronix,st7735r"; + mipi-max-frequency = ; + mipi-mode = ; + + reg = <0>; + width = <130>; + height = <132>; + x-offset = <0>; + y-offset = <0>; + madctl = <0xc0>; + colmod = <0x05>; + vmctr1 = <0x51>; + pwctr1 = [02 02]; + pwctr2 = [c5]; + pwctr3 = [0d 00]; + pwctr4 = [8d 1a]; + pwctr5 = [8d ee]; + frmctr1 = [02 35 36]; + frmctr2 = [02 35 36]; + frmctr3 = [02 35 36 02 35 36]; + gamctrp1 = [0a 1c 0c 14 33 2b 24 28 27 25 2c 39 00 05 03 0d]; + gamctrn1 = [0a 1c 0c 14 33 2b 24 28 27 25 2d 3a 00 05 03 0d]; + }; + }; }; &uart0 { @@ -96,3 +134,18 @@ pinctrl-0 = <&spi1a_mosi_p0_15 &spi1a_miso_p0_14 &spi1a_sck_p0_16 &spi1a_ss0_p0_17>; pinctrl-names = "default"; }; + +&spi0a_mosi_p0_3 { + power-source=; +}; + +&spi0a_sck_p0_4 { + power-source=; +}; + +&spi0 { + status = "okay"; + pinctrl-0 = <&spi0a_mosi_p0_3 &spi0a_miso_p0_2 &spi0a_sck_p0_4>; + pinctrl-names = "default"; + cs-gpios = <&gpio0 5 (GPIO_ACTIVE_LOW | MAX32_VSEL_VDDIOH)>; +};