boards: arm: adi: Enable display for MAX32680EVKIT board
MAX32680EVKIT board has CFAF128128B1-0145T display which is 128x128 graphic display. This commit enables mpi dbi display support with LVGL graphic library Pin connection of display is 3wire mode Signed-off-by: Sadik Ozer <sadik.ozer@analog.com>
This commit is contained in:
parent
390a6be08c
commit
3b4ba70d10
2 changed files with 82 additions and 0 deletions
29
boards/adi/max32680evkit/Kconfig.defconfig
Normal file
29
boards/adi/max32680evkit/Kconfig.defconfig
Normal file
|
@ -0,0 +1,29 @@
|
|||
# MAX32680EVKIT boards configuration
|
||||
|
||||
# Copyright (c) 2024 Analog Devices, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if BOARD_MAX32680EVKIT
|
||||
|
||||
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_MAX32680EVKIT
|
|
@ -10,6 +10,7 @@
|
|||
#include <adi/max32/max32680-pinctrl.dtsi>
|
||||
#include <zephyr/dt-bindings/gpio/adi-max32-gpio.h>
|
||||
#include <zephyr/dt-bindings/input/input-event-codes.h>
|
||||
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
|
||||
|
||||
/ {
|
||||
model = "Analog Devices MAX32680EVKIT";
|
||||
|
@ -20,6 +21,7 @@
|
|||
zephyr,shell-uart = &uart1;
|
||||
zephyr,sram = &sram2;
|
||||
zephyr,flash = &flash0;
|
||||
zephyr,display = &st7735;
|
||||
};
|
||||
|
||||
leds {
|
||||
|
@ -56,6 +58,42 @@
|
|||
sw1 = &pb2;
|
||||
watchdog0 = &wdt0;
|
||||
};
|
||||
|
||||
mipi_dbi {
|
||||
compatible = "zephyr,mipi-dbi-spi";
|
||||
/* Enable D/C line for 4wire mode */
|
||||
/* dc-gpios = <&gpio1 7 (GPIO_ACTIVE_LOW | MAX32_GPIO_VSEL_VDDIOH)>; */
|
||||
spi-dev = <&spi0>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
status = "okay";
|
||||
|
||||
st7735: st7735@0 {
|
||||
compatible = "sitronix,st7735r";
|
||||
mipi-max-frequency = <DT_FREQ_M(6)>;
|
||||
mipi-mode = <MIPI_DBI_MODE_SPI_3WIRE>;
|
||||
|
||||
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];
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&uart1 {
|
||||
|
@ -112,3 +150,18 @@
|
|||
pinctrl-0 = <&spi0a_mosi_p0_5 &spi0a_miso_p0_6 &spi0a_sck_p0_7 &spi0a_ss0_p0_4>;
|
||||
pinctrl-names = "default";
|
||||
};
|
||||
|
||||
&spi0a_mosi_p0_5 {
|
||||
power-source=<MAX32_VSEL_VDDIOH>;
|
||||
};
|
||||
|
||||
&spi0a_sck_p0_7 {
|
||||
power-source=<MAX32_VSEL_VDDIOH>;
|
||||
};
|
||||
|
||||
&spi0 {
|
||||
status = "okay";
|
||||
pinctrl-0 = <&spi0a_mosi_p0_5 &spi0a_miso_p0_6 &spi0a_sck_p0_7>;
|
||||
pinctrl-names = "default";
|
||||
cs-gpios = <&gpio0 4 (GPIO_ACTIVE_LOW | MAX32_VSEL_VDDIOH)>;
|
||||
};
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue