Skip to content

Commit 9791111

Browse files
committed
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 fcb4056 commit 9791111

File tree

2 files changed

+64
-0
lines changed

2 files changed

+64
-0
lines changed

boards/st/stm32n6570_dk/Kconfig.defconfig

+9
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

+55
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";
@@ -288,3 +306,40 @@ zephyr_udc0: &usbotg_hs1 {
288306
reg = <0x0>;
289307
};
290308
};
309+
310+
&ltdc {
311+
pinctrl-0 = <&ltdc_r0_pg0 &ltdc_r1_pd9 &ltdc_r2_pd15 &ltdc_r3_pb4
312+
&ltdc_r4_ph4 &ltdc_r5_pa15 &ltdc_r6_pg11 &ltdc_r7_pd8
313+
&ltdc_g0_pg12 &ltdc_g1_pg1 &ltdc_g2_pa1 &ltdc_g3_pa0
314+
&ltdc_g4_pb15 &ltdc_g5_pb12 &ltdc_g6_pb11 &ltdc_g7_pg8
315+
&ltdc_b0_pg15 &ltdc_b1_pa7 &ltdc_b2_pb2 &ltdc_b3_pg6
316+
&ltdc_b4_ph3 &ltdc_b5_ph6 &ltdc_b6_pa8 &ltdc_b7_pa2
317+
&ltdc_de_pg13 &ltdc_clk_pb13 &ltdc_hsync_pb14 &ltdc_vsync_pe11>;
318+
pinctrl-names = "default";
319+
disp-on-gpios = <&gpioq 3 GPIO_ACTIVE_HIGH>;
320+
bl-ctrl-gpios = <&gpioq 6 GPIO_ACTIVE_HIGH>;
321+
322+
ext-sdram = <&psram>;
323+
324+
status = "okay";
325+
326+
width = <800>;
327+
height = <480>;
328+
pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;
329+
display-timings {
330+
compatible = "zephyr,panel-timing";
331+
de-active = <0>;
332+
pixelclk-active = <0>;
333+
hsync-active = <0>;
334+
vsync-active = <0>;
335+
hsync-len = <4>;
336+
vsync-len = <4>;
337+
hback-porch = <8>;
338+
vback-porch = <8>;
339+
hfront-porch = <8>;
340+
vfront-porch = <8>;
341+
};
342+
def-back-color-red = <0xFF>;
343+
def-back-color-green = <0xFF>;
344+
def-back-color-blue = <0xFF>;
345+
};

0 commit comments

Comments
 (0)