File tree Expand file tree Collapse file tree 3 files changed +99
-0
lines changed
samples/subsys/display/lvgl/boards Expand file tree Collapse file tree 3 files changed +99
-0
lines changed Original file line number Diff line number Diff line change 1+ # MAX32662EVKIT boards configuration
2+
3+ # Copyright (c) 2024 Analog Devices, Inc.
4+ # SPDX-License-Identifier: Apache-2.0
5+
6+ if BOARD_MAX32662EVKIT
7+
8+ if DISPLAY
9+
10+ config MIPI_DBI_SPI_3WIRE
11+ default y
12+
13+ if LVGL
14+
15+ config LV_Z_BITS_PER_PIXEL
16+ default 16
17+
18+ choice LV_COLOR_DEPTH
19+ default LV_COLOR_DEPTH_16 # 16 bit per pixel
20+ endchoice
21+
22+ config LV_COLOR_16_SWAP
23+ default y
24+
25+ endif # LVGL
26+
27+ endif # DISPLAY
28+
29+ endif # BOARD_MAX32662EVKIT
Original file line number Diff line number Diff line change 1111#include <zephyr/dt-bindings/gpio/adi-max32-gpio.h>
1212#include <zephyr/dt-bindings/input/input-event-codes.h>
1313#include <zephyr/dt-bindings/dma/max32662_dma.h>
14+ #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h>
1415
1516/ {
1617 model = "Analog Devices MAX32662EVKIT";
2122 zephyr,shell-uart = &uart0;
2223 zephyr,sram = &sram2;
2324 zephyr,flash = &flash0;
25+ zephyr,display = &st7735;
2426 };
2527
2628 leds {
4749 sw0 = &pb1;
4850 watchdog0 = &wdt0;
4951 };
52+
53+ mipi_dbi {
54+ compatible = "zephyr,mipi-dbi-spi";
55+ spi-dev = <&spi1>;
56+ #address-cells = <1>;
57+ #size-cells = <0>;
58+
59+ status = "okay";
60+
61+ st7735: st7735@0 {
62+ compatible = "sitronix,st7735r";
63+ mipi-max-frequency = <DT_FREQ_M(6)>;
64+ mipi-mode = <MIPI_DBI_MODE_SPI_3WIRE>;
65+
66+ reg = <0>;
67+ width = <130>;
68+ height = <132>;
69+ x-offset = <0>;
70+ y-offset = <0>;
71+ madctl = <0xc0>;
72+ colmod = <0x05>;
73+ vmctr1 = <0x51>;
74+ pwctr1 = [02 02];
75+ pwctr2 = [c5];
76+ pwctr3 = [0d 00];
77+ pwctr4 = [8d 1a];
78+ pwctr5 = [8d ee];
79+ frmctr1 = [02 35 36];
80+ frmctr2 = [02 35 36];
81+ frmctr3 = [02 35 36 02 35 36];
82+ gamctrp1 = [0a 1c 0c 14 33 2b 24 28 27 25 2c 39 00 05 03 0d];
83+ gamctrn1 = [0a 1c 0c 14 33 2b 24 28 27 25 2d 3a 00 05 03 0d];
84+ };
85+ };
5086};
5187
5288&uart0 {
89125 pinctrl-0 = <&spi0a_copi_p0_3 &spi0a_cito_p0_2 &spi0a_sck_p0_4 &spi0a_ts0_p0_5>;
90126 pinctrl-names = "default";
91127};
128+
129+ &spi1a_mosi_p0_8 {
130+ power-source=<MAX32_VSEL_VDDIOH>;
131+ };
132+
133+ &spi1a_sck_p0_17 {
134+ power-source=<MAX32_VSEL_VDDIOH>;
135+ };
136+
137+ &spi1 {
138+ status = "okay";
139+ pinctrl-0 = <&spi1a_mosi_p0_8 &spi1a_sck_p0_17>;
140+ pinctrl-names = "default";
141+ cs-gpios = <&gpio0 18 (GPIO_ACTIVE_LOW | MAX32_VSEL_VDDIOH)>;
142+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2024, Analog Devices, Inc.
3+ *
4+ * SPDX-License-Identifier: Apache-2.0
5+ */
6+
7+ / {
8+ chosen {
9+ zephyr,sram = &sram0;
10+ };
11+ };
12+
13+ /*
14+ * Concatenate SRAM0(16KB), SRAM1(16KB) and SRAM2(16KB)
15+ * to lvgl example work
16+ */
17+ &sram0 {
18+ reg = <0x20000000 DT_SIZE_K(48)>;
19+ };
You can’t perform that action at this time.
0 commit comments