diff --git a/boards/shields/arduino_giga_display_shield/Kconfig.defconfig b/boards/shields/arduino_giga_display_shield/Kconfig.defconfig new file mode 100644 index 00000000000..67fc0f5a2f6 --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/Kconfig.defconfig @@ -0,0 +1,27 @@ +# Copyright (c) 2025 Arduino SA +# SPDX-License-Identifier: Apache-2.0 + +if SHIELD_ARDUINO_GIGA_DISPLAY_SHIELD + +if LVGL + +config INPUT + default y + +config LV_Z_BITS_PER_PIXEL + default 16 + +config LV_DPI_DEF + default 128 + +config LV_Z_FLUSH_THREAD + default y + +choice LV_COLOR_DEPTH + default LV_COLOR_DEPTH_16 + +endchoice + +endif # LVGL + +endif # SHIELD_ARDUINO_GIGA_DISPLAY_SHIELD diff --git a/boards/shields/arduino_giga_display_shield/Kconfig.shield b/boards/shields/arduino_giga_display_shield/Kconfig.shield new file mode 100644 index 00000000000..16714a397c9 --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/Kconfig.shield @@ -0,0 +1,5 @@ +# Copyright (c) 2025 Arduino SA +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_ARDUINO_GIGA_DISPLAY_SHIELD + def_bool $(shields_list_contains,arduino_giga_display_shield) diff --git a/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.conf b/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.conf new file mode 100644 index 00000000000..881770e9f68 --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.conf @@ -0,0 +1,9 @@ +# Copyright (c) 2025 Arduino SA +# SPDX-License-Identifier: Apache-2.0 + +CONFIG_MEMC=y +CONFIG_STM32_LTDC_RGB565=y +CONFIG_DISPLAY_INIT_PRIORITY=87 +CONFIG_STM32_LTDC_DISABLE_FMC_BANK1=y +CONFIG_INPUT_GT911_INTERRUPT=y +CONFIG_STM32_LTDC_FB_USE_SHARED_MULTI_HEAP=y diff --git a/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.defconfig b/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.defconfig new file mode 100644 index 00000000000..d3a6c64d367 --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.defconfig @@ -0,0 +1,22 @@ +# Copyright (c) 2025 Arduino SA +# SPDX-License-Identifier: Apache-2.0 + +if SHIELD_ARDUINO_GIGA_DISPLAY_SHIELD + +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_FULL_REFRESH + default y + +endchoice + +endif # LVGL + +endif # SHIELD_ARDUINO_GIGA_DISPLAY_SHIELD diff --git a/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.overlay b/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.overlay new file mode 100644 index 00000000000..72fe8031f71 --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/boards/arduino_giga_r1_m7.overlay @@ -0,0 +1,96 @@ +/* + * Copyright (c) 2025 Arduino SA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include + +/ { + lvgl_pointer { + compatible = "zephyr,lvgl-pointer-input"; + input = <>911>; + }; + + aliases { + accel0 = >911; + }; + + chosen { + zephyr,display = &zephyr_lcd_controller; + zephyr,touch = >911; + }; +}; + +&sdram1 { + /* Frame buffer memory cache will cause screen flickering. */ + zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>; +}; + +&zephyr_lcd_controller { + status = "okay"; + ext-sdram = <&sdram1>; + width = <480>; + height = <800>; + def-back-color-red = <0>; + def-back-color-green = <0>; + def-back-color-blue = <0>; + pixel-format = ; + + disp-on-gpios = <&gpioc 6 GPIO_ACTIVE_HIGH>; + bl-ctrl-gpios = <&gpiob 12 GPIO_ACTIVE_HIGH>; + + /* sitronix, st7701 */ + display-timings { + compatible = "zephyr,panel-timing"; + hsync-active = <1>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + hback-porch = <40>; + hsync-len = <32>; + hfront-porch = <8>; + vback-porch = <6>; + vsync-len = <8>; + vfront-porch = <9>; + }; +}; + +/* ltdc uses pll3_r as pixel clock */ +&pll3 { + status = "okay"; + clocks = <&clk_hse>; + div-m = <16>; + mul-n = <110>; + div-p = <2>; + div-q = <2>; + div-r = <4>; /* 27.5 MHz */ +}; + +&zephyr_mipi_dsi { + status = "okay"; + + pll-ndiv = <125>; + pll-idf = <4>; + pll-odf = <0>; + + de-active-high; + largest-packet-size = <0>; + + phy-timings = <35 35 35 35 0 10>; +}; + +&i2c4 { + pinctrl-0 = <&i2c4_scl_pb6 &i2c4_sda_ph12>; + pinctrl-names = "default"; + clock-frequency = ; + status = "okay"; + + gt911: gt911@5d { + compatible = "goodix,gt911"; + reg = <0x5d>; + alt-addr = <0x14>; + reset-gpios = <&gpioi 2 GPIO_ACTIVE_LOW>; + irq-gpios = <&gpioi 1 GPIO_ACTIVE_HIGH>; + }; +}; diff --git a/boards/shields/arduino_giga_display_shield/doc/img/ASX00039_00.default_1000x750.webp b/boards/shields/arduino_giga_display_shield/doc/img/ASX00039_00.default_1000x750.webp new file mode 100644 index 00000000000..b149f1535ce Binary files /dev/null and b/boards/shields/arduino_giga_display_shield/doc/img/ASX00039_00.default_1000x750.webp differ diff --git a/boards/shields/arduino_giga_display_shield/doc/index.rst b/boards/shields/arduino_giga_display_shield/doc/index.rst new file mode 100644 index 00000000000..b2834b23520 --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/doc/index.rst @@ -0,0 +1,53 @@ +.. _arduino_giga_display_shield: + +Arduino GIGA Display Shield +########################### + +Overview +******** + +The Arduino GIGA Display Shield is an extension for the Arduino GIGA R1 WiFi board. +It provides a convenient way to add a display to your projects by offering connectors +for various display modules, including DSI and DPI interfaces. +Additionally, it exposes connectors for the camera interface and includes a microSD card slot. + +The front of the shield is equipped with the KD040WVFID026-01-C025A panel, a 3.97-inch +TFT display with a resolution of 480*800 pixels. The panel also features a capacitive +multi-touch screen with a GT911 controller accessible over I2C. + +The shield can be connected to the Arduino GIGA R1 WiFi board via the high-density connectors. + +More information about the shield can be found at `Arduino GIGA Display Shield website`_. + +.. figure:: img/ASX00039_00.default_1000x750.webp + :align: center + + Arduino GIGA Display Shield + +Requirements +************ + +This shield can only be used with the Arduino GIGA R1 WiFi board, which provides the +necessary connectors and interfaces for display and camera modules. +The board must define node aliases for the required peripherals (e.g., I2C, SPI, DSI) +to properly interface with the shield. + +Programming +*********** + +Include ``--shield arduino_giga_display_shield`` when you invoke ``west build`` +for projects utilizing this shield. For example: + +.. zephyr-app-commands:: + :zephyr-app: samples/subsys/display/lvgl + :board: arduino_giga_r1_wifi + :shield: arduino_giga_display_shield + :goals: build + +References +********** + +.. target-notes:: + +.. _Arduino GIGA Display Shield website: + https://docs.arduino.cc/hardware/giga-display-shield/ diff --git a/boards/shields/arduino_giga_display_shield/giga_display_shield.overlay b/boards/shields/arduino_giga_display_shield/giga_display_shield.overlay new file mode 100644 index 00000000000..5da125332db --- /dev/null +++ b/boards/shields/arduino_giga_display_shield/giga_display_shield.overlay @@ -0,0 +1,47 @@ +/* + * Copyright (c) 2025 Arduino SA + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&zephyr_mipi_dsi { + st7701: st7701@0 { + status = "okay"; + compatible = "sitronix,st7701"; + reg = <0x0>; + height = <800>; + width = <480>; + data-lanes = <2>; + pixel-format = ; + rotation = <0>; + gip-e0 = [E0 00 00 02]; + gip-e1 = [E1 08 00 0A 00 07 00 09 00 00 33 33]; + gip-e2 = [E2 00 00 00 00 00 00 00 00 00 00 00 00 00]; + gip-e3 = [E3 00 00 33 33]; + gip-e4 = [E4 44 44]; + gip-e5 = [E5 0E 60 A0 A0 10 60 A0 A0 0A 60 A0 A0 0C 60 A0 A0]; + gip-e6 = [E6 00 00 33 33]; + gip-e7 = [E7 44 44]; + gip-e8 = [E8 0D 60 A0 A0 0F 60 A0 A0 09 60 A0 A0 0B 60 A0 A0]; + gip-eb = [EB 02 01 E4 E4 44 00 40]; + gip-ec = [EC 02 01]; + gip-ed = [ED AB 89 76 54 01 FF FF FF FF FF FF 10 45 67 98 BA]; + gip-ed = [ED AB 89 76 54 01 FF FF FF FF FF FF 10 45 67 98 BA]; + pvgamctrl = [B0 40 C9 91 0D 12 07 02 09 09 1F 04 50 0F E4 29 DF]; + nvgamctrl = [B1 40 CB D0 11 92 07 00 08 07 1C 06 53 12 63 EB DF]; + + display-timings { + compatible = "zephyr,panel-timing"; + hsync-active = <1>; + vsync-active = <0>; + de-active = <0>; + pixelclk-active = <0>; + hback-porch = <40>; + hsync-len = <32>; + hfront-porch = <8>; + vback-porch = <6>; + vsync-len = <8>; + vfront-porch = <9>; + }; + }; +};