diff --git a/boards/arm/mimxrt1170_evk/doc/index.rst b/boards/arm/mimxrt1170_evk/doc/index.rst index 55a281a9a045641..2d9c430e6ffbbf9 100644 --- a/boards/arm/mimxrt1170_evk/doc/index.rst +++ b/boards/arm/mimxrt1170_evk/doc/index.rst @@ -136,7 +136,8 @@ configuration supports the following hardware features: | FLEXSPI | on-chip | flash programming | +-----------+------------+-------------------------------------+ | DISPLAY | on-chip | eLCDIF; MIPI-DSI. Tested with | -| | | :ref:`rk055hdmipi4m` shield | +| | | :ref:`rk055hdmipi4m` and | +| | | :ref:`g1120b0mipi` display shields | +-----------+------------+-------------------------------------+ The default configuration can be found in the defconfig file: diff --git a/boards/arm/mimxrt595_evk/doc/index.rst b/boards/arm/mimxrt595_evk/doc/index.rst index 173081866fc0546..45ef7a6510d4a92 100644 --- a/boards/arm/mimxrt595_evk/doc/index.rst +++ b/boards/arm/mimxrt595_evk/doc/index.rst @@ -106,7 +106,8 @@ already supported, which can also be re-used on this mimxrt595_evk board: | SDHC | on-chip | disk access (works with eMMC & SD) | +-----------+------------+-------------------------------------+ | DISPLAY | on-chip | LCDIF; MIPI-DSI. Tested with | -| | | :ref:`rk055hdmipi4m` shield | +| | | :ref:`rk055hdmipi4m` and | +| | | :ref:`g1120b0mipi` display shields | +-----------+------------+-------------------------------------+ The default configuration can be found in the defconfig file: diff --git a/boards/shields/g1120b0mipi/Kconfig.defconfig b/boards/shields/g1120b0mipi/Kconfig.defconfig new file mode 100644 index 000000000000000..52b1c5e9569d03c --- /dev/null +++ b/boards/shields/g1120b0mipi/Kconfig.defconfig @@ -0,0 +1,51 @@ +# Copyright 2023 NXP +# SPDX-License-Identifier: Apache-2.0 + +if SHIELD_G1120B0MIPI + +config DISPLAY + default y + +config MIPI_DSI + default y + +# Enable input subsystem for FT5336 driver +config INPUT + default y + +config INPUT_FT5336_INTERRUPT + default y + +# KSCAN subsystem must be enabled for KSCAN input shim driver +config KSCAN + default y + +if LVGL + +# Configure LVGL to use touchscreen with KSCAN API +config LV_Z_POINTER_KSCAN + default y + +# Y coordinates need to be inverted for this controller. Note that +# the RM67162 display driver also reports the display orientation as rotated +# by 90 degrees, so LVGL will read coordinates correctly. +config LV_Z_POINTER_KSCAN_INVERT_Y + default y + +# Swap 16 bit color setting for LVGL, to send high byte first +config LV_COLOR_16_SWAP + default y + +config LV_Z_VDB_SIZE + default 16 + +config LV_Z_DPI + default 128 + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_16 +endchoice + +endif # LVGL + +endif # SHIELD_G1120B0MIPI diff --git a/boards/shields/g1120b0mipi/Kconfig.shield b/boards/shields/g1120b0mipi/Kconfig.shield new file mode 100644 index 000000000000000..4c15ae49f826036 --- /dev/null +++ b/boards/shields/g1120b0mipi/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright 2023 NXP +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_G1120B0MIPI + def_bool $(shields_list_contains,g1120b0mipi) diff --git a/boards/shields/g1120b0mipi/boards/mimxrt1170_evk_cm7.overlay b/boards/shields/g1120b0mipi/boards/mimxrt1170_evk_cm7.overlay new file mode 100644 index 000000000000000..9ac1918436d6aa0 --- /dev/null +++ b/boards/shields/g1120b0mipi/boards/mimxrt1170_evk_cm7.overlay @@ -0,0 +1,12 @@ +/* + * Copyright 2023, NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&rm67162 { + /* R414 is not populated on this board, so LPTE signal is not + * connected. remove the property from the display. + */ + /delete-property/ te-gpios; +}; diff --git a/boards/shields/g1120b0mipi/doc/index.rst b/boards/shields/g1120b0mipi/doc/index.rst new file mode 100644 index 000000000000000..61988e4ff587844 --- /dev/null +++ b/boards/shields/g1120b0mipi/doc/index.rst @@ -0,0 +1,68 @@ +.. _g1120b0mipi: + +G1120B0MIPI MIPI Display +########################## + +Overview +******** + +The G1120B0MIPI is a 1.2 inch circular AMOLED display, 390x390 pixels, with a +1-lane MIPI interface. This display connects to the i.MX RT595 Evaluation Kit. + + +More information about the shield can be found +at the `g1120b0mipi_prod_page`_. + +This display uses a 40 pin FPC interface, which is available on many +NXP EVKs. + +Pins Assignment of the G1120B0MIPI MIPI Display +========================================================== + ++-----------------------+------------------------+ +| FPC Connector Pin | Function | ++=======================+========================+ +| 1 | LED backlight cathode | ++-----------------------+------------------------+ +| 21 | Controller reset | ++-----------------------+------------------------+ +| 22 | Controller LPTE | ++-----------------------+------------------------+ +| 26 | Touch ctrl I2C SDA | ++-----------------------+------------------------+ +| 27 | Touch ctrl I2C SCL | ++-----------------------+------------------------+ +| 28 | Touch ctrl reset | ++-----------------------+------------------------+ +| 29 | Touch ctrl interrupt | ++-----------------------+------------------------+ +| 32 | LCD power enable | ++-----------------------+------------------------+ +| 34 | Backlight power enable | ++-----------------------+------------------------+ + +Requirements +************ + +This shield can only be used with a board which provides a configuration +for the 40 pin FPC interface + +Programming +*********** + +Set ``-DSHIELD=g1120b0mipi`` when you invoke ``west build``. For +example: + +.. zephyr-app-commands:: + :zephyr-app: samples/drivers/display + :board: mimxrt595_evk_cm33 + :shield: g1120b0mipi + :goals: build + +References +********** + +.. target-notes:: + +.. __g1120b0mipi_prod_page: + https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/1-2-wearable-display-g1120b0mipi:G1120B0MIPI diff --git a/boards/shields/g1120b0mipi/g1120b0mipi.overlay b/boards/shields/g1120b0mipi/g1120b0mipi.overlay new file mode 100644 index 000000000000000..1462cdd8955303b --- /dev/null +++ b/boards/shields/g1120b0mipi/g1120b0mipi.overlay @@ -0,0 +1,58 @@ +/* + * Copyright 2023, NXP + * + * SPDX-License-Identifier: Apache-2.0 + */ + +/{ + aliases { + kscan0 = &kscan_input; + }; + + chosen { + zephyr,display = &rm67162; + zephyr,keyboard-scan = &kscan_input; + }; + + en_mipi_display: enable-mipi-display { + compatible = "regulator-fixed"; + regulator-name = "en_mipi_display"; + enable-gpios = <&mipi_connector 32 GPIO_ACTIVE_HIGH>; + regulator-boot-on; + }; +}; + +&mipi_i2c { + status = "okay"; + ft3267: ft3267@38 { + /* + * Note- the actual controller present on this IC is a FT3267, + * but the FT35336 driver in Zephyr supports this IC. + */ + compatible = "focaltech,ft5336"; + reg = <0x38>; + int-gpios = <&mipi_connector 29 GPIO_ACTIVE_LOW>; + reset-gpios = <&mipi_connector 28 GPIO_ACTIVE_HIGH>; + kscan_input: kscan-input { + compatible = "zephyr,kscan-input"; + }; + }; +}; + +&mipi_dsi { + status = "okay"; + autoinsert-eotp; + phy-clock = <316800000>; + rm67162: rm67162@0 { + status = "okay"; + compatible = "raydium,rm67162"; + reg = <0x0>; + reset-gpios = <&mipi_connector 21 GPIO_ACTIVE_HIGH>; + bl-gpios = <&mipi_connector 0 GPIO_ACTIVE_HIGH>; + te-gpios = <&mipi_connector 22 GPIO_ACTIVE_HIGH>; + data-lanes = <1>; + width = <400>; + height = <392>; + pixel-format = ; + }; +};