board: shield: st_b_lcd40_dsi1_mb1166 A09 support
Add support for the A09 version of MB1166 which have a NT35510 panel controller instead of an OTM8009a as in prior versions Fixes #60888 Signed-off-by: Erik Andersson <erian747@gmail.com>
This commit is contained in:
parent
72503ab386
commit
8dd3aff158
11 changed files with 100 additions and 29 deletions
|
@ -1,7 +1,8 @@
|
||||||
# Copyright (c) 2023 BrainCo Inc.
|
# Copyright (c) 2023 BrainCo Inc.
|
||||||
|
# Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
if SHIELD_ST_B_LCD40_DSI1_MB1166
|
if SHIELD_ST_B_LCD40_DSI1_MB1166 || SHIELD_ST_B_LCD40_DSI1_MB1166_A09
|
||||||
|
|
||||||
# Double frame buffer maintained by lvgl.
|
# Double frame buffer maintained by lvgl.
|
||||||
if LVGL
|
if LVGL
|
||||||
|
@ -39,4 +40,4 @@ endchoice
|
||||||
|
|
||||||
endif # LVGL
|
endif # LVGL
|
||||||
|
|
||||||
endif # SHIELD_ST_B_LCD40_DSI1_MB1166
|
endif # SHIELD_ST_B_LCD40_DSI1_MB1166 || SHIELD_ST_B_LCD40_DSI1_MB1166_A09
|
||||||
|
|
|
@ -1,5 +1,10 @@
|
||||||
# Copyright (c) 2023 bytes at work AG
|
# Copyright (c) 2023 bytes at work AG
|
||||||
|
# Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
|
||||||
|
|
||||||
# SPDX-License-Identifier: Apache-2.0
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
config SHIELD_ST_B_LCD40_DSI1_MB1166
|
config SHIELD_ST_B_LCD40_DSI1_MB1166
|
||||||
def_bool $(shields_list_contains,st_b_lcd40_dsi1_mb1166)
|
def_bool $(shields_list_contains,st_b_lcd40_dsi1_mb1166)
|
||||||
|
|
||||||
|
config SHIELD_ST_B_LCD40_DSI1_MB1166_A09
|
||||||
|
def_bool $(shields_list_contains,st_b_lcd40_dsi1_mb1166_a09)
|
||||||
|
|
|
@ -0,0 +1,6 @@
|
||||||
|
# Copyright (c) 2023 bytes at work AG
|
||||||
|
# Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Initialize after LTDC and MIPI-DSI
|
||||||
|
CONFIG_DISPLAY_OTM8009A_INIT_PRIORITY=87
|
|
@ -0,0 +1,21 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2023 bytes at work AG
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
<dc {
|
||||||
|
/* orisetech, otm8009a */
|
||||||
|
display-timings {
|
||||||
|
compatible = "zephyr,panel-timing";
|
||||||
|
hsync-active = <0>;
|
||||||
|
vsync-active = <0>;
|
||||||
|
de-active = <0>;
|
||||||
|
pixelclk-active = <0>;
|
||||||
|
hsync-len = <2>;
|
||||||
|
vsync-len = <1>;
|
||||||
|
hback-porch = <34>;
|
||||||
|
vback-porch = <15>;
|
||||||
|
hfront-porch = <34>;
|
||||||
|
vfront-porch = <16>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -0,0 +1,5 @@
|
||||||
|
# Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
|
||||||
|
# Initialize after LTDC and MIPI-DSI
|
||||||
|
CONFIG_DISPLAY_NT35510_INIT_PRIORITY=87
|
|
@ -0,0 +1,30 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
#include <zephyr/dt-bindings/display/panel.h>
|
||||||
|
|
||||||
|
&mipi_dsi {
|
||||||
|
loosely-packed;
|
||||||
|
largest-packet-size = <64>;
|
||||||
|
bta-ack-disable;
|
||||||
|
};
|
||||||
|
|
||||||
|
<dc {
|
||||||
|
/* frida, nt35510 */
|
||||||
|
display-timings {
|
||||||
|
compatible = "zephyr,panel-timing";
|
||||||
|
hsync-active = <0>;
|
||||||
|
vsync-active = <0>;
|
||||||
|
de-active = <0>;
|
||||||
|
pixelclk-active = <0>;
|
||||||
|
hsync-len = <2>;
|
||||||
|
vsync-len = <120>;
|
||||||
|
hback-porch = <34>;
|
||||||
|
vback-porch = <150>;
|
||||||
|
hfront-porch = <34>;
|
||||||
|
vfront-porch = <150>;
|
||||||
|
};
|
||||||
|
};
|
|
@ -4,5 +4,3 @@
|
||||||
CONFIG_MEMC=y
|
CONFIG_MEMC=y
|
||||||
CONFIG_STM32_LTDC_RGB888=y
|
CONFIG_STM32_LTDC_RGB888=y
|
||||||
CONFIG_HEAP_MEM_POOL_SIZE=65536
|
CONFIG_HEAP_MEM_POOL_SIZE=65536
|
||||||
# Initialize after LTDC and MIPI-DSI
|
|
||||||
CONFIG_DISPLAY_OTM8009A_INIT_PRIORITY=87
|
|
||||||
|
|
|
@ -26,24 +26,8 @@
|
||||||
<dc {
|
<dc {
|
||||||
status = "okay";
|
status = "okay";
|
||||||
ext-sdram = <&sdram2>;
|
ext-sdram = <&sdram2>;
|
||||||
|
|
||||||
/* orisetech, otm8009a */
|
|
||||||
width = <800>;
|
width = <800>;
|
||||||
height = <480>;
|
height = <480>;
|
||||||
display-timings {
|
|
||||||
compatible = "zephyr,panel-timing";
|
|
||||||
hsync-active = <0>;
|
|
||||||
vsync-active = <0>;
|
|
||||||
de-active = <0>;
|
|
||||||
pixelclk-active = <0>;
|
|
||||||
hsync-len = <2>;
|
|
||||||
vsync-len = <1>;
|
|
||||||
hback-porch = <34>;
|
|
||||||
vback-porch = <15>;
|
|
||||||
hfront-porch = <34>;
|
|
||||||
vfront-porch = <16>;
|
|
||||||
};
|
|
||||||
|
|
||||||
def-back-color-red = <0>;
|
def-back-color-red = <0>;
|
||||||
def-back-color-green = <0>;
|
def-back-color-green = <0>;
|
||||||
def-back-color-blue = <0>;
|
def-back-color-blue = <0>;
|
||||||
|
@ -78,12 +62,6 @@
|
||||||
de-active-high;
|
de-active-high;
|
||||||
};
|
};
|
||||||
|
|
||||||
&otm8009a {
|
|
||||||
data-lanes = <2>;
|
|
||||||
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
|
|
||||||
rotation = <90>;
|
|
||||||
};
|
|
||||||
|
|
||||||
&i2c4 {
|
&i2c4 {
|
||||||
pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>;
|
pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>;
|
||||||
pinctrl-names = "default";
|
pinctrl-names = "default";
|
||||||
|
|
|
@ -10,8 +10,11 @@ The B-LCD40-DSI1 shield provides a 4-inch WVGA TFT LCD with MIPI DSI interface
|
||||||
and capacitive touch screen.
|
and capacitive touch screen.
|
||||||
|
|
||||||
.. note::
|
.. note::
|
||||||
Currently only the older version MB1166-A03 is supported by Zephyr.
|
The shield comes in different hardware revisions, the MB1166-A09
|
||||||
The newer version MB1166-A09 does not get initialized correctly (see :github:`60888`).
|
is utilizing a NT35510 panel controller and shall specifically
|
||||||
|
use ``st_b_lcd40_dsi1_mb1166_a09`` as SHIELD when building
|
||||||
|
Prior versions are utilizing an OTM8009a controller and shall
|
||||||
|
use shield name without postfix, that is: ``st_b_lcd40_dsi1_mb1166``
|
||||||
|
|
||||||
.. figure:: image.jpg
|
.. figure:: image.jpg
|
||||||
:alt: B-LCD40-DSI1 MB1166 Image
|
:alt: B-LCD40-DSI1 MB1166 Image
|
||||||
|
@ -101,7 +104,8 @@ Usage
|
||||||
*****
|
*****
|
||||||
|
|
||||||
The shield can be used in any application by setting ``SHIELD`` to
|
The shield can be used in any application by setting ``SHIELD`` to
|
||||||
``st_b_lcd40_dsi1_mb1166`` and adding the necessary device tree properties.
|
``st_b_lcd40_dsi1_mb1166`` or ``st_b_lcd40_dsi1_mb1166_a09`` and adding
|
||||||
|
the necessary device tree properties.
|
||||||
|
|
||||||
Set ``-DSHIELD="st_b_lcd40_dsi1_mb1166"`` when you invoke ``west build``. For example:
|
Set ``-DSHIELD="st_b_lcd40_dsi1_mb1166"`` when you invoke ``west build``. For example:
|
||||||
|
|
||||||
|
|
|
@ -13,5 +13,8 @@
|
||||||
width = <480>;
|
width = <480>;
|
||||||
reset-gpios = <&dsi_lcd_qsh_030 57 GPIO_ACTIVE_HIGH>;
|
reset-gpios = <&dsi_lcd_qsh_030 57 GPIO_ACTIVE_HIGH>;
|
||||||
bl-gpios = <&dsi_lcd_qsh_030 53 GPIO_ACTIVE_HIGH>;
|
bl-gpios = <&dsi_lcd_qsh_030 53 GPIO_ACTIVE_HIGH>;
|
||||||
|
data-lanes = <2>;
|
||||||
|
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
|
||||||
|
rotation = <90>;
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
|
@ -0,0 +1,20 @@
|
||||||
|
/*
|
||||||
|
* Copyright (c) 2024 Erik Andersson <erian747@gmail.com>
|
||||||
|
*
|
||||||
|
* SPDX-License-Identifier: Apache-2.0
|
||||||
|
*/
|
||||||
|
|
||||||
|
&mipi_dsi {
|
||||||
|
nt35510: nt35510@0 {
|
||||||
|
status = "okay";
|
||||||
|
compatible = "frida,nt35510";
|
||||||
|
reg = <0x0>;
|
||||||
|
height = <800>;
|
||||||
|
width = <480>;
|
||||||
|
reset-gpios = <&dsi_lcd_qsh_030 57 GPIO_ACTIVE_HIGH>;
|
||||||
|
bl-gpios = <&dsi_lcd_qsh_030 53 GPIO_ACTIVE_HIGH>;
|
||||||
|
data-lanes = <2>;
|
||||||
|
pixel-format = <MIPI_DSI_PIXFMT_RGB888>;
|
||||||
|
rotation = <90>;
|
||||||
|
};
|
||||||
|
};
|
Loading…
Add table
Add a link
Reference in a new issue