Skip to content

Commit f88aa82

Browse files
hfruchet-stkartben
authored andcommitted
boards: st: stm32n6570_dk: add display support
Add support of Rockchip RK050HR18C 800x480 RGB 24bits panel connected on LTDC display parallel interface of STM32N6570-DK board. Signed-off-by: Hugues Fruchet <[email protected]>
1 parent 240737e commit f88aa82

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed

boards/st/stm32n6570_dk/Kconfig.defconfig

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,13 @@ config NET_L2_ETHERNET
1212

1313
endif # NETWORKING
1414

15+
if DISPLAY
16+
17+
# MEMC needs to be enabled in order to store
18+
# display frame buffer to external PSRAM
19+
config MEMC
20+
default y
21+
22+
endif # DISPLAY
23+
1524
endif # BOARD_STM32N6570_DK

boards/st/stm32n6570_dk/stm32n6570_dk_common.dtsi

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,10 @@
66

77
#include <st/n6/stm32n657X0.dtsi>
88
#include <st/n6/stm32n657x0hxq-pinctrl.dtsi>
9+
#include "zephyr/dt-bindings/display/panel.h"
910
#include <zephyr/dt-bindings/flash_controller/xspi.h>
1011
#include <zephyr/dt-bindings/input/input-event-codes.h>
12+
#include <zephyr/dt-bindings/video/video-interfaces.h>
1113
#include "arduino_r3_connector.dtsi"
1214

1315
/ {
@@ -16,6 +18,7 @@
1618
zephyr,shell-uart = &usart1;
1719
zephyr,sram = &axisram2;
1820
zephyr,canbus = &fdcan1;
21+
zephyr,display = &ltdc;
1922
spi-flash0 = &mx66uw1g45g;
2023
};
2124

@@ -74,6 +77,15 @@
7477
status = "okay";
7578
};
7679

80+
&pll4 {
81+
clocks = <&clk_hsi>;
82+
div-m = <4>;
83+
mul-n = <75>;
84+
div-p1 = <1>;
85+
div-p2 = <1>;
86+
status = "okay";
87+
};
88+
7789
&ic1 {
7890
pll-src = <1>;
7991
ic-div = <2>;
@@ -104,6 +116,12 @@
104116
status = "okay";
105117
};
106118

119+
&ic16 {
120+
pll-src = <4>;
121+
ic-div = <60>;
122+
status = "okay";
123+
};
124+
107125
&perck {
108126
clocks = <&rcc STM32_SRC_HSI PER_SEL(0)>;
109127
status = "okay";
@@ -289,3 +307,42 @@ zephyr_udc0: &usbotg_hs1 {
289307
reg = <0x0>;
290308
};
291309
};
310+
311+
&ltdc {
312+
clocks = <&rcc STM32_CLOCK(APB5, 1)>,
313+
<&rcc STM32_SRC_IC16 LTDC_SEL(2)>;
314+
pinctrl-0 = <&ltdc_r0_pg0 &ltdc_r1_pd9 &ltdc_r2_pd15 &ltdc_r3_pb4
315+
&ltdc_r4_ph4 &ltdc_r5_pa15 &ltdc_r6_pg11 &ltdc_r7_pd8
316+
&ltdc_g0_pg12 &ltdc_g1_pg1 &ltdc_g2_pa1 &ltdc_g3_pa0
317+
&ltdc_g4_pb15 &ltdc_g5_pb12 &ltdc_g6_pb11 &ltdc_g7_pg8
318+
&ltdc_b0_pg15 &ltdc_b1_pa7 &ltdc_b2_pb2 &ltdc_b3_pg6
319+
&ltdc_b4_ph3 &ltdc_b5_ph6 &ltdc_b6_pa8 &ltdc_b7_pa2
320+
&ltdc_de_pg13 &ltdc_clk_pb13 &ltdc_hsync_pb14 &ltdc_vsync_pe11>;
321+
pinctrl-names = "default";
322+
disp-on-gpios = <&gpioq 3 GPIO_ACTIVE_HIGH>;
323+
bl-ctrl-gpios = <&gpioq 6 GPIO_ACTIVE_HIGH>;
324+
325+
ext-sdram = <&psram>;
326+
327+
status = "okay";
328+
329+
width = <800>;
330+
height = <480>;
331+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;
332+
display-timings {
333+
compatible = "zephyr,panel-timing";
334+
de-active = <0>;
335+
pixelclk-active = <0>;
336+
hsync-active = <0>;
337+
vsync-active = <0>;
338+
hsync-len = <4>;
339+
vsync-len = <4>;
340+
hback-porch = <8>;
341+
vback-porch = <8>;
342+
hfront-porch = <8>;
343+
vfront-porch = <8>;
344+
};
345+
def-back-color-red = <0xFF>;
346+
def-back-color-green = <0xFF>;
347+
def-back-color-blue = <0xFF>;
348+
};

0 commit comments

Comments
 (0)