Skip to content

Commit 4dcb1f8

Browse files
tmilkovic51mbolivar-nordic
authored andcommitted
boards: arm: stm32h7b3i_dk: add support for display
Update board device tree with LTDC node Update board documentation - display support and RGB pinout Update board defconfig - if display is used, then external SDRAM must be enabled in order to fit the frame buffer in memory Signed-off-by: Tomislav Milkovic <[email protected]>
1 parent fb857bf commit 4dcb1f8

File tree

4 files changed

+52
-0
lines changed

4 files changed

+52
-0
lines changed

boards/arm/stm32h7b3i_dk/Kconfig.defconfig

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,21 @@ if BOARD_STM32H7B3I_DK
88
config BOARD
99
default "stm32h7b3i_dk"
1010

11+
config KSCAN
12+
default y if DISPLAY
13+
1114
config I2C
1215
default y if KSCAN
1316

1417
config KSCAN_FT5336
1518
default y if KSCAN
1619

20+
config KSCAN_FT5336_INTERRUPT
21+
default y if KSCAN_FT5336
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 if DISPLAY
27+
1728
endif # BOARD_STM32H7B3I_DK

boards/arm/stm32h7b3i_dk/doc/index.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,8 @@ The current Zephyr stm32h7b3i_dk board configuration supports the following hard
6262
+-----------+------------+-------------------------------------+
6363
| FMC | on-chip | memc (SDRAM) |
6464
+-----------+------------+-------------------------------------+
65+
| LTDC | on-chip | display |
66+
+-----------+------------+-------------------------------------+
6567

6668

6769
Other hardware features have not been enabled yet for this board.
@@ -92,6 +94,11 @@ Default Zephyr Peripheral Mapping:
9294
- SDNRAS/SDNCAS : PF11/PG15
9395
- NBL0/NBL1 : PE0/PE1
9496
- SDCLK/SDNWE/SDCKE1/SDNE1 : PG8/PH5/PH7/PH6
97+
- LTDC :
98+
- R0-R7 : PI15/PJ0/PJ1/PJ2/PJ3/PJ4/PJ5/PJ6
99+
- G0-G7 : PJ7/PJ8/PJ9/PJ10/PJ11/PK0/PK1/PK2
100+
- B0-B7 : PJ12/PK13/PJ14/PJ15/PK3/PK4/PK5/PK6
101+
- DE/CLK/HSYNC/VSYNC : PK7/PI14/PI12/PI13
95102

96103

97104
System Clock

boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.dts

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88
#include <st/h7/stm32h7b3Xi.dtsi>
99
#include <st/h7/stm32h7b3lihxq-pinctrl.dtsi>
10+
#include <dt-bindings/display/stm32_ltdc.h>
1011
#include "arduino_r3_connector.dtsi"
1112

1213
/ {
@@ -18,6 +19,7 @@
1819
zephyr,shell-uart = &usart1;
1920
zephyr,sram = &sram0;
2021
zephyr,flash = &flash0;
22+
zephyr,display = &ltdc;
2123
};
2224

2325
leds {
@@ -170,3 +172,34 @@
170172
cd-gpios = <&gpioi 8 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
171173
status = "okay";
172174
};
175+
176+
&ltdc {
177+
pinctrl-0 = <&ltdc_r0_pi15 &ltdc_r1_pj0 &ltdc_r2_pj1 &ltdc_r3_pj2
178+
&ltdc_r4_pj3 &ltdc_r5_pj4 &ltdc_r6_pj5 &ltdc_r7_pj6
179+
&ltdc_g0_pj7 &ltdc_g1_pj8 &ltdc_g2_pj9 &ltdc_g3_pj10
180+
&ltdc_g4_pj11 &ltdc_g5_pk0 &ltdc_g6_pk1 &ltdc_g7_pk2
181+
&ltdc_b0_pj12 &ltdc_b1_pj13 &ltdc_b2_pj14 &ltdc_b3_pj15
182+
&ltdc_b4_pk3 &ltdc_b5_pk4 &ltdc_b6_pk5 &ltdc_b7_pk6
183+
&ltdc_de_pk7 &ltdc_clk_pi14 &ltdc_hsync_pi12 &ltdc_vsync_pi13>;
184+
pinctrl-names = "default";
185+
disp-on-gpios = <&gpioa 2 GPIO_ACTIVE_HIGH>;
186+
bl-ctrl-gpios = <&gpioa 1 GPIO_ACTIVE_HIGH>;
187+
ext-sdram = <&sdram2>;
188+
status = "okay";
189+
190+
width = <480>;
191+
height = <272>;
192+
hsync-pol = <STM32_LTDC_HSPOL_ACTIVE_LOW>;
193+
vsync-pol = <STM32_LTDC_VSPOL_ACTIVE_LOW>;
194+
de-pol = <STM32_LTDC_DEPOL_ACTIVE_LOW>;
195+
pclk-pol = <STM32_LTDC_PCPOL_ACTIVE_LOW>;
196+
hsync-duration = <1>;
197+
vsync-duration = <10>;
198+
hbp-duration = <43>;
199+
vbp-duration = <12>;
200+
hfp-duration = <8>;
201+
vfp-duration = <4>;
202+
def-back-color-red = <0xFF>;
203+
def-back-color-green = <0xFF>;
204+
def-back-color-blue = <0xFF>;
205+
};

boards/arm/stm32h7b3i_dk/stm32h7b3i_dk.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,3 +16,4 @@ supported:
1616
- kscan:touch
1717
- memc
1818
- backup_sram
19+
- display

0 commit comments

Comments
 (0)