boards: arm: stm32f746g_disco: add support for LTDC

Add LTDC config and pinctrl in board DTS
Modify defconfig so KSCAN and MEMC drivers are enabled if
display is enabled
Update board doc and yaml

Signed-off-by: Tomislav Milkovic <tomislav.milkovic95@gmail.com>
This commit is contained in:
Tomislav Milkovic 2022-05-10 14:27:42 +02:00 committed by Carles Cufí
commit ba90be0681
4 changed files with 59 additions and 2 deletions

View file

@ -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

View file

@ -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
============

View file

@ -20,6 +20,7 @@
zephyr,flash = &flash0;
zephyr,dtcm = &dtcm;
zephyr,flash-controller = &n25q128a1;
zephyr,display = &ltdc;
};
leds {
@ -233,3 +234,34 @@ zephyr_udc0: &usbotg_fs {
};
};
};
&ltdc {
pinctrl-0 = <&ltdc_r0_pi15 &ltdc_r1_pj0 &ltdc_r2_pj1 &ltdc_r3_pj2
&ltdc_r4_pj3 &ltdc_r5_pj4 &ltdc_r6_pj5 &ltdc_r7_pj6
&ltdc_g0_pj7 &ltdc_g1_pj8 &ltdc_g2_pj9 &ltdc_g3_pj10
&ltdc_g4_pj11 &ltdc_g5_pk0 &ltdc_g6_pk1 &ltdc_g7_pk2
&ltdc_b0_pe4 &ltdc_b1_pj13 &ltdc_b2_pj14 &ltdc_b3_pj15
&ltdc_b4_pg12 &ltdc_b5_pk4 &ltdc_b6_pk5 &ltdc_b7_pk6
&ltdc_de_pk7 &ltdc_clk_pi14 &ltdc_hsync_pi10 &ltdc_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 = <STM32_LTDC_HSPOL_ACTIVE_LOW>;
vsync-pol = <STM32_LTDC_VSPOL_ACTIVE_LOW>;
de-pol = <STM32_LTDC_DEPOL_ACTIVE_LOW>;
pclk-pol = <STM32_LTDC_PCPOL_ACTIVE_LOW>;
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>;
};

View file

@ -19,4 +19,5 @@ supported:
- sdhc
- usb_device
- kscan:touch
- display
- memc