Skip to content

boards: nxp: mimxrt1040: add display support #72178

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/nxp/mimxrt1040_evk/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@
# SPDX-License-Identifier: Apache-2.0
#

if (CONFIG_DISPLAY)
message(WARNING "
CONFIG_DISPLAY: Running this firmware on a board without a display may damage the board
")
endif()

if(CONFIG_NXP_IMXRT_BOOT_HEADER)
zephyr_library()
Expand Down
4 changes: 4 additions & 0 deletions boards/nxp/mimxrt1040_evk/doc/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ already supported, which can also be re-used on this mimxrt1040_evk board:
+-----------+------------+-------------------------------------+
| I2C | on-chip | i2c |
+-----------+------------+-------------------------------------+
| DISPLAY | on-chip | eLCDIF. Tested with |
| | | :ref:`rk043fn02h_ct`, and |
| | | :ref:`rk043fn66hs_ctg` shields |
+-----------+------------+-------------------------------------+

The default configuration can be found in
:zephyr_file:`boards/nxp/mimxrt1040_evk/mimxrt1040_evk_defconfig`
Expand Down
30 changes: 30 additions & 0 deletions boards/nxp/mimxrt1040_evk/mimxrt1040_evk-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -94,5 +94,35 @@
};
};

pinmux_lcdif: pinmux_lcdif {
group0 {
pinmux = <&iomuxc_gpio_b0_00_lcdif_clk>,
<&iomuxc_gpio_b0_01_lcdif_enable>,
<&iomuxc_gpio_b0_02_lcdif_hsync>,
<&iomuxc_gpio_b0_03_lcdif_vsync>,
<&iomuxc_gpio_b0_04_lcdif_data00>,
<&iomuxc_gpio_b0_05_lcdif_data01>,
<&iomuxc_gpio_b0_06_lcdif_data02>,
<&iomuxc_gpio_b0_07_lcdif_data03>,
<&iomuxc_gpio_b0_08_lcdif_data04>,
<&iomuxc_gpio_b0_09_lcdif_data05>,
<&iomuxc_gpio_b0_10_lcdif_data06>,
<&iomuxc_gpio_b0_11_lcdif_data07>,
<&iomuxc_gpio_b0_12_lcdif_data08>,
<&iomuxc_gpio_b0_13_lcdif_data09>,
<&iomuxc_gpio_b0_14_lcdif_data10>,
<&iomuxc_gpio_b0_15_lcdif_data11>,
<&iomuxc_gpio_b1_00_lcdif_data12>,
<&iomuxc_gpio_b1_01_lcdif_data13>,
<&iomuxc_gpio_b1_02_lcdif_data14>,
<&iomuxc_gpio_b1_03_lcdif_data15>;
drive-strength = "r0-6";
input-schmitt-enable;
bias-pull-up;
bias-pull-up-value = "100k";
slew-rate = "slow";
nxp,speed = "100-mhz";
};
};
};

34 changes: 34 additions & 0 deletions boards/nxp/mimxrt1040_evk/mimxrt1040_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,33 @@
reg = <0x80000000 DT_SIZE_M(32)>;
};

/*
* This node describes the GPIO pins of the parallel FPC interface,
* This interface is standard to several NXP EVKs, and is used with
* several parallel LCD displays (available as zephyr shields)
*/
nxp_parallel_lcd_connector: parallel-connector {
compatible = "nxp,parallel-lcd-connector";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <0 0 &gpio2 31 0>; /* Pin 1, BL+ */
};

/*
* This node describes the GPIO pins of the I2C display FPC interface,
* This interface is standard to several NXP EVKs, and is used with
* several parallel LCD displays (available as zephyr shields)
*/
nxp_i2c_touch_fpc: i2c-touch-connector {
compatible = "nxp,i2c-tsc-fpc";
#gpio-cells = <2>;
gpio-map-mask = <0xffffffff 0xffffffc0>;
gpio-map-pass-thru = <0 0x3f>;
gpio-map = <1 0 &gpio1 19 0>, /* Pin 2, LCD touch RST */
<2 0 &gpio1 11 0>; /* Pin 3, LCD touch INT */
};

leds {
compatible = "gpio-leds";
green_led: led_0 {
Expand Down Expand Up @@ -163,6 +190,13 @@
pinctrl-names = "default";
};

nxp_touch_i2c: &lpi2c1 {};

zephyr_lcdif: &lcdif {
pinctrl-0 = <&pinmux_lcdif>;
pinctrl-names = "default";
};

/* Leave LPI2C3 disabled by default, since it conflicts with LPSPI1 pins */
&lpi2c3 {
pinctrl-0 = <&pinmux_lpi2c3>;
Expand Down
2 changes: 2 additions & 0 deletions samples/drivers/display/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ tests:
platform_allow:
- mimxrt1060_evk
- mimxrt1050_evk
- mimxrt1040_evk
tags: display
harness: console
extra_args: SHIELD=rk043fn66hs_ctg
Expand All @@ -182,6 +183,7 @@ tests:
platform_allow:
- mimxrt1060_evk
- mimxrt1050_evk
- mimxrt1040_evk
tags: display
harness: console
extra_args: SHIELD=rk043fn02h_ct
Expand Down
2 changes: 2 additions & 0 deletions samples/subsys/display/lvgl/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ tests:
platform_allow:
- mimxrt1060_evk
- mimxrt1050_evk
- mimxrt1040_evk
tags: display
harness: console
extra_args: SHIELD=rk043fn66hs_ctg
Expand All @@ -83,6 +84,7 @@ tests:
platform_allow:
- mimxrt1060_evk
- mimxrt1050_evk
- mimxrt1040_evk
tags: display
harness: console
extra_args: SHIELD=rk043fn02h_ct
Expand Down
Loading