diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig b/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig index 2fe69bcea0690..5c734b992f38a 100644 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig +++ b/boards/shields/st_b_lcd40_dsi1_mb1166/Kconfig.defconfig @@ -4,27 +4,13 @@ if SHIELD_ST_B_LCD40_DSI1_MB1166 || SHIELD_ST_B_LCD40_DSI1_MB1166_A09 -# Double frame buffer maintained by lvgl. -if LVGL +orsource "boards/*.defconfig" -config STM32_LTDC_FB_NUM - default 0 +if LVGL config INPUT default y -config LV_Z_VDB_SIZE - default 100 - -config LV_Z_DOUBLE_VDB - default y - -config LV_Z_VBD_CUSTOM_SECTION - default y - -config LV_Z_FULL_REFRESH - default y - config LV_Z_BITS_PER_PIXEL default 32 diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166/stm32h747i_disco_stm32h747xx_m7.overlay b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166/stm32h747i_disco_stm32h747xx_m7.overlay deleted file mode 100644 index 554e9777f1cb0..0000000000000 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166/stm32h747i_disco_stm32h747xx_m7.overlay +++ /dev/null @@ -1,21 +0,0 @@ -/* - * 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>; - }; -}; diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166_a09/stm32h747i_disco_stm32h747xx_m7.overlay b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166_a09/stm32h747i_disco_stm32h747xx_m7.overlay index 90ddb549d7ab6..3710329ee9ab4 100644 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166_a09/stm32h747i_disco_stm32h747xx_m7.overlay +++ b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/st_b_lcd40_dsi1_mb1166_a09/stm32h747i_disco_stm32h747xx_m7.overlay @@ -4,27 +4,9 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - -&mipi_dsi { +&zephyr_mipi_dsi { + status = "okay"; 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>; - }; -}; diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.defconfig b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.defconfig new file mode 100644 index 0000000000000..8a363e39a71b0 --- /dev/null +++ b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.defconfig @@ -0,0 +1,21 @@ +# Copyright (c) 2024 Linumiz +# SPDX-License-Identifier: Apache-2.0 + +if BOARD_STM32H747I_DISCO_STM32H747XX_M7 +if LVGL + +# Double frame buffer maintained by lvgl. +config STM32_LTDC_FB_NUM + default 0 + +config LV_Z_DOUBLE_VDB + default y + +config LV_Z_VBD_CUSTOM_SECTION + default y + +config LV_Z_FULL_REFRESH + default y + +endif #LVGL +endif # BOARD_STM32H747I_DISCO_STM32H747XX_M7 diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.overlay b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.overlay index 7a80559b8c992..7d96dd56e8dbd 100644 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.overlay +++ b/boards/shields/st_b_lcd40_dsi1_mb1166/boards/stm32h747i_disco_stm32h747xx_m7.overlay @@ -4,34 +4,17 @@ * SPDX-License-Identifier: Apache-2.0 */ -#include - -/ { - lvgl_pointer { - compatible = "zephyr,lvgl-pointer-input"; - input = <&ft5336>; - invert-y; - }; - - chosen { - zephyr,display = <dc; - }; -}; - &sdram2 { - /* Frame buffer memory cache will cause screen flickering. */ + /* Frame buffer memory when cached causes screen flickering. */ zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>; }; -<dc { +&zephyr_lcd_controller { status = "okay"; ext-sdram = <&sdram2>; - width = <800>; - height = <480>; def-back-color-red = <0>; def-back-color-green = <0>; def-back-color-blue = <0>; - pixel-format = ; }; /* ltdc uses pll3_r as pixel clock */ @@ -45,7 +28,7 @@ div-r = <24>; /* 27.5 MHz */ }; -&mipi_dsi { +&zephyr_mipi_dsi { status = "okay"; /* DSI HOST dedicated PLL @@ -61,15 +44,3 @@ hs-active-high; de-active-high; }; - -&i2c4 { - pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>; - pinctrl-names = "default"; - clock-frequency = ; - status = "okay"; - - ft5336: ft5336@38 { - compatible = "focaltech,ft5336"; - reg = <0x38>; - }; -}; diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166.overlay b/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166.overlay index f351cae9cdbf3..5e577214d2749 100644 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166.overlay +++ b/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166.overlay @@ -4,7 +4,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -&mipi_dsi { +#include + +/ { + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + invert-y; + }; + + chosen { + zephyr,display = &zephyr_lcd_controller; + }; +}; + +&zephyr_mipi_dsi { + status = "okay"; otm8009a: otm8009a@0 { status = "okay"; compatible = "orisetech,otm8009a"; @@ -18,3 +33,33 @@ rotation = <90>; }; }; + +&zephyr_lcd_controller { + status = "okay"; + width = <800>; + height = <480>; + pixel-format = ; + /* 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>; + }; +}; + +&qsh_030_i2c { + ft5336: ft5336@38 { + compatible = "focaltech,ft5336"; + reg = <0x38>; + int-gpios = <&dsi_lcd_qsh_030 4 0>; + status = "okay"; + }; +}; diff --git a/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166_a09.overlay b/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166_a09.overlay index 0201678d4d003..ddef9b74e0250 100644 --- a/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166_a09.overlay +++ b/boards/shields/st_b_lcd40_dsi1_mb1166/st_b_lcd40_dsi1_mb1166_a09.overlay @@ -4,7 +4,22 @@ * SPDX-License-Identifier: Apache-2.0 */ -&mipi_dsi { +#include + +/ { + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <&ft5336>; + invert-y; + }; + + chosen { + zephyr,display = &zephyr_lcd_controller; + }; +}; + +&zephyr_mipi_dsi { + status = "okay"; nt35510: nt35510@0 { status = "okay"; compatible = "frida,nt35510"; @@ -18,3 +33,33 @@ rotation = <90>; }; }; + +&zephyr_lcd_controller { + status = "okay"; + width = <800>; + height = <480>; + pixel-format = ; + /* 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>; + }; +}; + +&qsh_030_i2c { + ft5336: ft5336@38 { + compatible = "focaltech,ft5336"; + reg = <0x38>; + int-gpios = <&dsi_lcd_qsh_030 4 0>; + status = "okay"; + }; +}; diff --git a/boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7.dts b/boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7.dts index 9feb49e09877b..b5b0ee1cd88ac 100644 --- a/boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7.dts +++ b/boards/st/stm32h747i_disco/stm32h747i_disco_stm32h747xx_m7.dts @@ -278,3 +278,17 @@ zephyr_udc0: &usbotg_hs { }; arduino_spi: &spi5 {}; + +/* alias used by display shields with touch control */ +qsh_030_i2c: &i2c4 { + pinctrl-0 = <&i2c4_scl_pd12 &i2c4_sda_pd13>; + pinctrl-names = "default"; + clock-frequency = ; + status = "okay"; +}; + +/* alias used by display shields */ +zephyr_mipi_dsi: &mipi_dsi {}; + +/* alias used by LCD display shields */ +zephyr_lcd_controller: <dc {};