Skip to content

Commit 6a92551

Browse files
danieldegrassecarlescufi
authored andcommitted
boards: arm: mimxrt595_evk: add configuration for RM68200 display
Add configuration for RM68200 MIPI display. This display controller drives a 1280x720 LCD display. Signed-off-by: Daniel DeGrasse <[email protected]>
1 parent 676278c commit 6a92551

File tree

3 files changed

+110
-2
lines changed

3 files changed

+110
-2
lines changed

boards/arm/mimxrt595_evk/Kconfig.defconfig

Lines changed: 41 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# MIMXRT595-EVK board
22

3-
# Copyright (c) 2022, NXP
3+
# Copyright 2022-2023, NXP
44
# SPDX-License-Identifier: Apache-2.0
55

66
if BOARD_MIMXRT595_EVK
@@ -29,4 +29,44 @@ config HEAP_MEM_POOL_SIZE
2929

3030
endif # DMA_MCUX_LPC
3131

32+
if DISPLAY
33+
34+
# Enable MIPI display driver
35+
36+
config MIPI_DSI
37+
default y
38+
39+
# Use external framebuffer memory for the LCDIF framebuffer
40+
config MCUX_DCNANO_LCDIF_EXTERNAL_FB_MEM
41+
default y
42+
# Use FlexSPI2 base address for framebuffer (pSRAM is present on this bus)
43+
config MCUX_DCNANO_LCDIF_EXTERNAL_FB_ADDR
44+
default 0x38000000
45+
# M33 core and LCDIF both access FlexSPI2 through the same cache,
46+
# so coherency does not need to be managed.
47+
config MCUX_DCNANO_LCDIF_MAINTAIN_CACHE
48+
depends on !MCUX_DCNANO_LCDIF_EXTERNAL_FB_MEM
49+
50+
endif # DISPLAY
51+
52+
config KSCAN
53+
default y if LVGL
54+
55+
if LVGL
56+
57+
config LV_Z_POINTER_KSCAN
58+
default y
59+
60+
config LV_Z_VDB_SIZE
61+
default 16
62+
63+
config LV_Z_DPI
64+
default 128
65+
66+
choice LV_COLOR_DEPTH
67+
default LV_COLOR_DEPTH_16
68+
endchoice
69+
70+
endif # LVGL
71+
3272
endif # BOARD_MIMXRT595_EVK

boards/arm/mimxrt595_evk/doc/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,10 @@ already supported, which can also be re-used on this mimxrt595_evk board:
105105
+-----------+------------+-------------------------------------+
106106
| SDHC | on-chip | disk access (works with eMMC & SD) |
107107
+-----------+------------+-------------------------------------+
108+
| DISPLAY | on-chip | LCDIF; MIPI-DSI. Tested with RM68200|
109+
| | | based MIPI display |
110+
| | | (`RK055HDMIPI4M`_) |
111+
+-----------+------------+-------------------------------------+
108112

109113
The default configuration can be found in the defconfig file:
110114

@@ -293,3 +297,6 @@ steps:
293297

294298
.. _i.MX RT595 Reference Manual:
295299
https://www.nxp.com/webapp/Download?colCode=IMXRT500RM
300+
301+
.. _RK055HDMIPI4M:
302+
https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/5-5-lcd-panel:RK055HDMIPI4M

boards/arm/mimxrt595_evk/mimxrt595_evk_cm33.dts

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2022, NXP
2+
* Copyright 2022-2023, NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -25,6 +25,7 @@
2525
magn0 = &fxos8700;
2626
accel0 = &fxos8700;
2727
sdhc0 = &usdhc0;
28+
kscan0 = &touch_controller;
2829
};
2930

3031
chosen {
@@ -34,6 +35,8 @@
3435
zephyr,sram = &sram0;
3536
zephyr,console = &flexcomm0;
3637
zephyr,shell-uart = &flexcomm0;
38+
zephyr,display = &lcdif;
39+
zephyr,keyboard-scan = &touch_controller;
3740
};
3841

3942
gpio_keys {
@@ -123,6 +126,13 @@
123126
* this state.
124127
*/
125128
};
129+
130+
en_mipi_display: enable-mipi-display {
131+
compatible = "regulator-fixed";
132+
regulator-name = "en_mipi_display";
133+
enable-gpios = <&gpio3 15 GPIO_ACTIVE_HIGH>;
134+
regulator-boot-on;
135+
};
126136
};
127137

128138
&cpu0 {
@@ -142,6 +152,45 @@
142152
status = "okay";
143153
};
144154

155+
&lcdif {
156+
status = "okay";
157+
width = <720>;
158+
height = <1280>;
159+
clk-div = <7>;
160+
polarity = <12>;
161+
hsync = <8>;
162+
hfp = <32>;
163+
hbp = <32>;
164+
vsync = <2>;
165+
vfp = <16>;
166+
vbp = <14>;
167+
backlight-gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
168+
data-bus-width = "24-bit";
169+
pixel-format = "rgb-565";
170+
};
171+
172+
&mipi_dsi {
173+
status = "okay";
174+
nxp,lcdif = <&lcdif>;
175+
dpi-color-coding = "24-bit";
176+
dpi-pixel-packet = "24-bit";
177+
dpi-video-mode = "burst";
178+
dpi-bllp-mode = "low-power";
179+
autoinsert-eotp;
180+
dphy-clk-div = <12>;
181+
182+
rm68200@0 {
183+
status = "okay";
184+
compatible = "raydium,rm68200";
185+
reg = <0x0>;
186+
reset-gpios = <&gpio3 21 GPIO_ACTIVE_HIGH>;
187+
data-lanes = <2>;
188+
width = <720>;
189+
height = <1280>;
190+
pixel-format = <MIPI_DSI_PIXFMT_RGB565>;
191+
};
192+
};
193+
145194
&flexcomm0 {
146195
compatible = "nxp,lpc-usart";
147196
status = "okay";
@@ -165,6 +214,13 @@ arduino_i2c: &flexcomm4 {
165214
int1-gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
166215
reset-gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
167216
};
217+
218+
touch_controller: gt911@5d {
219+
compatible = "goodix,gt911";
220+
reg = <0x5d>;
221+
irq-gpios = <&gpio3 19 GPIO_ACTIVE_LOW>;
222+
reset-gpios = <&gpio4 4 GPIO_ACTIVE_HIGH>;
223+
};
168224
};
169225

170226
hs_spi1: &hs_lspi1 {
@@ -380,6 +436,10 @@ zephyr_udc0: &usbhs {
380436
};
381437
};
382438

439+
/*
440+
* Configure FlexSPI2 to use 1KB of AHB RX buffer for GPU/Display master.
441+
* This will improve performance when using external pSRAM with the LCDIF.
442+
*/
383443
&flexspi2 {
384444
status = "okay";
385445
pinctrl-0 = <&pinmux_flexspi2>;
@@ -389,6 +449,7 @@ zephyr_udc0: &usbhs {
389449
ahb-bufferable;
390450
ahb-cacheable;
391451
ahb-read-addr-opt;
452+
rx-buffer-config = <1 7 11 1024>;
392453
aps6408l: aps6408l@0 {
393454
compatible = "nxp,imx-flexspi-aps6408l";
394455
/* APS6408L is 8MB, 64MBit pSRAM */

0 commit comments

Comments
 (0)