Skip to content

Commit 737f6dc

Browse files
committed
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 <[email protected]>
1 parent e0ab439 commit 737f6dc

File tree

4 files changed

+59
-2
lines changed

4 files changed

+59
-2
lines changed

boards/arm/stm32f746g_disco/Kconfig.defconfig

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,29 @@ config NET_L2_ETHERNET
1515

1616
endif # NETWORKING
1717

18-
config I2C
19-
default y if KSCAN
18+
if DISPLAY
19+
20+
config KSCAN
21+
default y
22+
23+
# MEMC needs to be enabled in order to store
24+
# display buffer to external SDRAM connected to FMC
25+
config MEMC
26+
default y
27+
28+
endif # DISPLAY
2029

2130
if KSCAN
2231

32+
config I2C
33+
default y
34+
2335
config KSCAN_FT5336
2436
default y
2537

38+
config KSCAN_FT5336_INTERRUPT
39+
default y
40+
2641
endif # KSCAN
2742

2843
config DISK_DRIVER_SDMMC

boards/arm/stm32f746g_disco/doc/index.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ The Zephyr stm32f746g_disco board configuration supports the following hardware
118118
+-----------+------------+-------------------------------------+
119119
| FMC | on-chip | memc (SDRAM) |
120120
+-----------+------------+-------------------------------------+
121+
| LTDC | on-chip | display |
122+
+-----------+------------+-------------------------------------+
121123

122124
Other hardware features are not yet supported on Zephyr porting.
123125

@@ -158,6 +160,13 @@ configured as follows
158160
- NBL0/NBL1 : PE0/PE1
159161
- SDCLK/SDNWE/SDCKE0/SDNE0 : PG8/PH5/PC3/PH3
160162

163+
- LTDC :
164+
165+
- R0-R7 : PI15/PJ0/PJ1/PJ2/PJ3/PJ4/PJ5/PJ6
166+
- G0-G7 : PJ7/PJ8/PJ9/PJ10/PJ11/PK0/PK1/PK2
167+
- B0-B7 : PJ12/PK13/PJ14/PJ15/PK3/PK4/PK5/PK6
168+
- DE/CLK/HSYNC/VSYNC : PK7/PI14/PI12/PI13
169+
161170

162171
System Clock
163172
============

boards/arm/stm32f746g_disco/stm32f746g_disco.dts

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
zephyr,flash = &flash0;
2121
zephyr,dtcm = &dtcm;
2222
zephyr,flash-controller = &n25q128a1;
23+
zephyr,display = &ltdc;
2324
};
2425

2526
leds {
@@ -233,3 +234,34 @@ zephyr_udc0: &usbotg_fs {
233234
};
234235
};
235236
};
237+
238+
&ltdc {
239+
pinctrl-0 = <&ltdc_r0_pi15 &ltdc_r1_pj0 &ltdc_r2_pj1 &ltdc_r3_pj2
240+
&ltdc_r4_pj3 &ltdc_r5_pj4 &ltdc_r6_pj5 &ltdc_r7_pj6
241+
&ltdc_g0_pj7 &ltdc_g1_pj8 &ltdc_g2_pj9 &ltdc_g3_pj10
242+
&ltdc_g4_pj11 &ltdc_g5_pk0 &ltdc_g6_pk1 &ltdc_g7_pk2
243+
&ltdc_b0_pe4 &ltdc_b1_pj13 &ltdc_b2_pj14 &ltdc_b3_pj15
244+
&ltdc_b4_pg12 &ltdc_b5_pk4 &ltdc_b6_pk5 &ltdc_b7_pk6
245+
&ltdc_de_pk7 &ltdc_clk_pi14 &ltdc_hsync_pi10 &ltdc_vsync_pi9>;
246+
pinctrl-names = "default";
247+
disp-on-gpios = <&gpioi 12 GPIO_ACTIVE_HIGH>;
248+
bl-ctrl-gpios = <&gpiok 3 GPIO_ACTIVE_HIGH>;
249+
ext-sdram = <&sdram1>;
250+
status = "okay";
251+
252+
width = <480>;
253+
height = <272>;
254+
hsync-pol = <STM32_LTDC_HSPOL_ACTIVE_LOW>;
255+
vsync-pol = <STM32_LTDC_VSPOL_ACTIVE_LOW>;
256+
de-pol = <STM32_LTDC_DEPOL_ACTIVE_LOW>;
257+
pclk-pol = <STM32_LTDC_PCPOL_ACTIVE_LOW>;
258+
hsync-duration = <1>;
259+
vsync-duration = <10>;
260+
hbp-duration = <43>;
261+
vbp-duration = <12>;
262+
hfp-duration = <8>;
263+
vfp-duration = <4>;
264+
def-back-color-red = <0xFF>;
265+
def-back-color-green = <0xFF>;
266+
def-back-color-blue = <0xFF>;
267+
};

boards/arm/stm32f746g_disco/stm32f746g_disco.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,4 +19,5 @@ supported:
1919
- sdhc
2020
- usb_device
2121
- kscan:touch
22+
- display
2223
- memc

0 commit comments

Comments
 (0)