boards: shields: rk043fn02h_ct: add shield for rk043fn02h_ct
Add a shield for the RK043FN02H-CT panel, a Rocktech display panel with an FT5336 touch controller. This panel uses a 40+6 FPC interface for parallel displays, which is supported by many NXP iMX RT EVKs. Signed-off-by: Daniel DeGrasse <daniel.degrasse@nxp.com>
This commit is contained in:
parent
98c82cea8f
commit
a98faf2567
4 changed files with 207 additions and 0 deletions
47
boards/shields/rk043fn02h_ct/Kconfig.defconfig
Normal file
47
boards/shields/rk043fn02h_ct/Kconfig.defconfig
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Copyright 2024 NXP
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SHIELD_RK043FN02H_CT
|
||||
|
||||
if LVGL
|
||||
|
||||
config INPUT
|
||||
default y
|
||||
|
||||
config INPUT_FT5336_INTERRUPT
|
||||
default y
|
||||
|
||||
# LVGL should allocate buffers equal to size of display
|
||||
config LV_Z_VDB_SIZE
|
||||
default 100
|
||||
|
||||
# Enable double buffering
|
||||
config LV_Z_DOUBLE_VDB
|
||||
default y
|
||||
|
||||
# Force full refresh. This prevents memory copy associated with partial
|
||||
# display refreshes, which is not necessary for the eLCDIF driver
|
||||
config LV_Z_FULL_REFRESH
|
||||
default y
|
||||
|
||||
config LV_Z_BITS_PER_PIXEL
|
||||
default 16
|
||||
|
||||
config LV_DPI_DEF
|
||||
default 128
|
||||
|
||||
# Use offloaded render thread
|
||||
config LV_Z_FLUSH_THREAD
|
||||
default y
|
||||
|
||||
choice LV_COLOR_DEPTH
|
||||
default LV_COLOR_DEPTH_16
|
||||
endchoice
|
||||
|
||||
# Force display buffers to be aligned to cache line size (32 bytes)
|
||||
config LV_Z_VDB_ALIGN
|
||||
default 32
|
||||
|
||||
endif # LVGL
|
||||
|
||||
endif # SHIELD_RK043FN02H_CT
|
5
boards/shields/rk043fn02h_ct/Kconfig.shield
Normal file
5
boards/shields/rk043fn02h_ct/Kconfig.shield
Normal file
|
@ -0,0 +1,5 @@
|
|||
# Copyright 2024 NXP
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SHIELD_RK043FN02H_CT
|
||||
def_bool $(shields_list_contains,rk043fn02h_ct)
|
105
boards/shields/rk043fn02h_ct/doc/index.rst
Normal file
105
boards/shields/rk043fn02h_ct/doc/index.rst
Normal file
|
@ -0,0 +1,105 @@
|
|||
.. _rk043fn02h_ct:
|
||||
|
||||
RK043FN02H-CT Parallel Display
|
||||
##############################
|
||||
|
||||
Overview
|
||||
********
|
||||
|
||||
RK043FN02H-CT is a 4.3 inch TFT 480*272 pixels with LED backlight and
|
||||
capacitive touch panel from Rocktech. This LCD panel can work with several i.MX
|
||||
RT EVKs and LPC MCUs for evaluation of applications with display.
|
||||
|
||||
More information about the shield can be found at the `RK043FN02H-CT product
|
||||
page`_.
|
||||
|
||||
This display uses a 40 pin parallel FPC interface plus 6 pin I2C interface,
|
||||
available on many NXP EVKs. Note that this parallel FPC interface is not
|
||||
compatible with the MIPI FPC interface present on other NXP EVKs.
|
||||
|
||||
Pins Assignment of the Rocktech RK043FN02H-CT Parallel Display
|
||||
==============================================================
|
||||
|
||||
+-----------------------+------------------------+
|
||||
| Parallel FPC Pin | Function |
|
||||
+=======================+========================+
|
||||
| 1 | LED backlight cathode |
|
||||
+-----------------------+------------------------+
|
||||
| 2 | LED backlight anode |
|
||||
+-----------------------+------------------------+
|
||||
| 3 | GND |
|
||||
+-----------------------+------------------------+
|
||||
| 4 | VDD (3v3) |
|
||||
+-----------------------+------------------------+
|
||||
| 5-7 | GND |
|
||||
+-----------------------+------------------------+
|
||||
| 8-12 | LCD D11-D15 |
|
||||
+-----------------------+------------------------+
|
||||
| 13-14 | GND |
|
||||
+-----------------------+------------------------+
|
||||
| 15-20 | LCD D5-D10 |
|
||||
+-----------------------+------------------------+
|
||||
| 21-23 | GND |
|
||||
+-----------------------+------------------------+
|
||||
| 24-28 | LCD D0-D4 |
|
||||
+-----------------------+------------------------+
|
||||
| 29 | GND |
|
||||
+-----------------------+------------------------+
|
||||
| 30 | LCD CLK |
|
||||
+-----------------------+------------------------+
|
||||
| 31 | LCD DISP |
|
||||
+-----------------------+------------------------+
|
||||
| 32 | LCD HSYNC |
|
||||
+-----------------------+------------------------+
|
||||
| 33 | LCD VSYNC |
|
||||
+-----------------------+------------------------+
|
||||
| 34 | LCD DE |
|
||||
+-----------------------+------------------------+
|
||||
| 35 | NC |
|
||||
+-----------------------+------------------------+
|
||||
| 36 | GND |
|
||||
+-----------------------+------------------------+
|
||||
| 37-40 | NC |
|
||||
+-----------------------+------------------------+
|
||||
|
||||
+-----------------------+------------------------+
|
||||
| I2C Connector Pin | Function |
|
||||
+=======================+========================+
|
||||
| 1 | VDD (3v3) |
|
||||
+-----------------------+------------------------+
|
||||
| 2 | LCD Touch Reset |
|
||||
+-----------------------+------------------------+
|
||||
| 3 | LCD Touch Interrupt |
|
||||
+-----------------------+------------------------+
|
||||
| 4 | LCD I2C SCL |
|
||||
+-----------------------+------------------------+
|
||||
| 5 | LCD I2C SDA |
|
||||
+-----------------------+------------------------+
|
||||
| 6 | GND |
|
||||
+-----------------------+------------------------+
|
||||
|
||||
Requirements
|
||||
************
|
||||
|
||||
This shield can only be used with a board which provides a configuration
|
||||
for the 40+6 pin parallel/I2C FPC interface
|
||||
|
||||
Programming
|
||||
***********
|
||||
|
||||
Set ``-DSHIELD=rk043fn02h_ct`` when you invoke ``west build``. For
|
||||
example:
|
||||
|
||||
.. zephyr-app-commands::
|
||||
:zephyr-app: samples/drivers/display
|
||||
:board: mimxrt1060_evk
|
||||
:shield: rk043fn02h_ct
|
||||
:goals: build
|
||||
|
||||
References
|
||||
**********
|
||||
|
||||
.. target-notes::
|
||||
|
||||
.. _RK043FN02H-CT product page:
|
||||
https://www.nxp.com/design/design-center/development-boards-and-designs/i-mx-evaluation-and-development-boards/4-3-lcd-panel:RK043FN02H-CT
|
50
boards/shields/rk043fn02h_ct/rk043fn02h_ct.overlay
Normal file
50
boards/shields/rk043fn02h_ct/rk043fn02h_ct.overlay
Normal file
|
@ -0,0 +1,50 @@
|
|||
/*
|
||||
* Copyright 2024, NXP
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#include <zephyr/dt-bindings/display/panel.h>
|
||||
|
||||
/{
|
||||
chosen {
|
||||
zephyr,display = &zephyr_lcdif;
|
||||
};
|
||||
|
||||
lvgl_pointer {
|
||||
compatible = "zephyr,lvgl-pointer-input";
|
||||
input = <&ft5336_rk043fn02h_ct>;
|
||||
};
|
||||
};
|
||||
|
||||
&nxp_touch_i2c {
|
||||
status = "okay";
|
||||
ft5336_rk043fn02h_ct: ft5336@38 {
|
||||
compatible = "focaltech,ft5336";
|
||||
reg = <0x38>;
|
||||
int-gpios = <&nxp_i2c_touch_fpc 2 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
&zephyr_lcdif {
|
||||
status = "okay";
|
||||
width = <480>;
|
||||
height = <272>;
|
||||
display-timings {
|
||||
compatible = "zephyr,panel-timing";
|
||||
hsync-len = <41>;
|
||||
hfront-porch = <4>;
|
||||
hback-porch = <8>;
|
||||
vsync-len = <10>;
|
||||
vfront-porch = <4>;
|
||||
vback-porch = <2>;
|
||||
de-active= <1>;
|
||||
pixelclk-active = <1>;
|
||||
hsync-active = <0>;
|
||||
vsync-active = <0>;
|
||||
clock-frequency = <9210240>;
|
||||
};
|
||||
pixel-format = <PANEL_PIXEL_FORMAT_BGR_565>;
|
||||
data-bus-width = "16-bit";
|
||||
backlight-gpios = <&nxp_parallel_lcd_connector 0 GPIO_ACTIVE_HIGH>;
|
||||
};
|
Loading…
Add table
Add a link
Reference in a new issue