diff --git a/boards/arm/stm32f746g_disco/Kconfig.defconfig b/boards/arm/stm32f746g_disco/Kconfig.defconfig index 0e7cd38b557..c77beb992e6 100644 --- a/boards/arm/stm32f746g_disco/Kconfig.defconfig +++ b/boards/arm/stm32f746g_disco/Kconfig.defconfig @@ -15,14 +15,29 @@ config NET_L2_ETHERNET endif # NETWORKING -config I2C - default y if KSCAN +if DISPLAY + +config KSCAN + default y + +# MEMC needs to be enabled in order to store +# display buffer to external SDRAM connected to FMC +config MEMC + default y + +endif # DISPLAY if KSCAN +config I2C + default y + config KSCAN_FT5336 default y +config KSCAN_FT5336_INTERRUPT + default y + endif # KSCAN config DISK_DRIVER_SDMMC diff --git a/boards/arm/stm32f746g_disco/doc/index.rst b/boards/arm/stm32f746g_disco/doc/index.rst index 24d545afde6..508426a1323 100644 --- a/boards/arm/stm32f746g_disco/doc/index.rst +++ b/boards/arm/stm32f746g_disco/doc/index.rst @@ -118,6 +118,8 @@ The Zephyr stm32f746g_disco board configuration supports the following hardware +-----------+------------+-------------------------------------+ | FMC | on-chip | memc (SDRAM) | +-----------+------------+-------------------------------------+ +| LTDC | on-chip | display | ++-----------+------------+-------------------------------------+ Other hardware features are not yet supported on Zephyr porting. @@ -158,6 +160,13 @@ configured as follows - NBL0/NBL1 : PE0/PE1 - SDCLK/SDNWE/SDCKE0/SDNE0 : PG8/PH5/PC3/PH3 +- LTDC : + + - R0-R7 : PI15/PJ0/PJ1/PJ2/PJ3/PJ4/PJ5/PJ6 + - G0-G7 : PJ7/PJ8/PJ9/PJ10/PJ11/PK0/PK1/PK2 + - B0-B7 : PJ12/PK13/PJ14/PJ15/PK3/PK4/PK5/PK6 + - DE/CLK/HSYNC/VSYNC : PK7/PI14/PI12/PI13 + System Clock ============ diff --git a/boards/arm/stm32f746g_disco/stm32f746g_disco.dts b/boards/arm/stm32f746g_disco/stm32f746g_disco.dts index df0839168b8..9d5d063b9f0 100644 --- a/boards/arm/stm32f746g_disco/stm32f746g_disco.dts +++ b/boards/arm/stm32f746g_disco/stm32f746g_disco.dts @@ -20,6 +20,7 @@ zephyr,flash = &flash0; zephyr,dtcm = &dtcm; zephyr,flash-controller = &n25q128a1; + zephyr,display = <dc; }; leds { @@ -233,3 +234,34 @@ zephyr_udc0: &usbotg_fs { }; }; }; + +<dc { + pinctrl-0 = <<dc_r0_pi15 <dc_r1_pj0 <dc_r2_pj1 <dc_r3_pj2 + <dc_r4_pj3 <dc_r5_pj4 <dc_r6_pj5 <dc_r7_pj6 + <dc_g0_pj7 <dc_g1_pj8 <dc_g2_pj9 <dc_g3_pj10 + <dc_g4_pj11 <dc_g5_pk0 <dc_g6_pk1 <dc_g7_pk2 + <dc_b0_pe4 <dc_b1_pj13 <dc_b2_pj14 <dc_b3_pj15 + <dc_b4_pg12 <dc_b5_pk4 <dc_b6_pk5 <dc_b7_pk6 + <dc_de_pk7 <dc_clk_pi14 <dc_hsync_pi10 <dc_vsync_pi9>; + pinctrl-names = "default"; + disp-on-gpios = <&gpioi 12 GPIO_ACTIVE_HIGH>; + bl-ctrl-gpios = <&gpiok 3 GPIO_ACTIVE_HIGH>; + ext-sdram = <&sdram1>; + status = "okay"; + + width = <480>; + height = <272>; + hsync-pol = ; + vsync-pol = ; + de-pol = ; + pclk-pol = ; + hsync-duration = <1>; + vsync-duration = <10>; + hbp-duration = <43>; + vbp-duration = <12>; + hfp-duration = <8>; + vfp-duration = <4>; + def-back-color-red = <0xFF>; + def-back-color-green = <0xFF>; + def-back-color-blue = <0xFF>; +}; diff --git a/boards/arm/stm32f746g_disco/stm32f746g_disco.yaml b/boards/arm/stm32f746g_disco/stm32f746g_disco.yaml index 06e17c6abf8..9c2d49a17b9 100644 --- a/boards/arm/stm32f746g_disco/stm32f746g_disco.yaml +++ b/boards/arm/stm32f746g_disco/stm32f746g_disco.yaml @@ -19,4 +19,5 @@ supported: - sdhc - usb_device - kscan:touch + - display - memc