Skip to content

Commit 3bb3a96

Browse files
thenguyenyfjhedberg
authored andcommitted
boards: shields: add support for rtkmipilcdb00000be shield
First commit to support rtkmipilcdb00000be display shield Signed-off-by: The Nguyen <[email protected]>
1 parent 1d6a453 commit 3bb3a96

File tree

10 files changed

+365
-33
lines changed

10 files changed

+365
-33
lines changed

boards/renesas/ek_ra8d1/Kconfig.defconfig

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,4 +10,18 @@ config NET_L2_ETHERNET
1010

1111
endif # NETWORKING
1212

13+
if SHIELD_RTKMIPILCDB00000BE
14+
15+
config MEMC
16+
default y
17+
18+
if LVGL
19+
20+
config LV_Z_VBD_CUSTOM_SECTION
21+
default y
22+
23+
endif # LVGL
24+
25+
endif # SHIELD_RTKMIPILCDB00000BE
26+
1327
endif # BOARD_EK_RA8D1

boards/renesas/ek_ra8d1/doc/index.rst

Lines changed: 36 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -85,39 +85,42 @@ Supported Features
8585

8686
The below features are currently supported on Zephyr OS for EK-RA8D1 board:
8787

88-
+--------------+------------+------------------+
89-
| Interface | Controller | Driver/Component |
90-
+==============+============+==================+
91-
| GPIO | on-chip | gpio |
92-
+--------------+------------+------------------+
93-
| MPU | on-chip | arch/arm |
94-
+--------------+------------+------------------+
95-
| NVIC | on-chip | arch/arm |
96-
+--------------+------------+------------------+
97-
| UART | on-chip | serial |
98-
+--------------+------------+------------------+
99-
| CLOCK | on-chip | clock control |
100-
+--------------+------------+------------------+
101-
| ENTROPY | on-chip | entropy |
102-
+--------------+------------+------------------+
103-
| SPI | on-chip | spi |
104-
+--------------+------------+------------------+
105-
| FLASH | on-chip | flash |
106-
+--------------+------------+------------------+
107-
| PWM | on-chip | pwm |
108-
+--------------+------------+------------------+
109-
| COUNTER | on-chip | counter |
110-
+--------------+------------+------------------+
111-
| CAN | on-chip | canfd |
112-
+--------------+------------+------------------+
113-
| I2C | on-chip | i2c |
114-
+--------------+------------+------------------+
115-
| USBHS | on-chip | udc |
116-
+--------------+------------+------------------+
117-
| ETHERNET | on-chip | ethernet |
118-
+--------------+------------+------------------+
119-
| ADC | on-chip | adc |
120-
+--------------+------------+------------------+
88+
+--------------+------------+-----------------------------------+
89+
| Interface | Controller | Driver/Component |
90+
+==============+============+===================================+
91+
| GPIO | on-chip | gpio |
92+
+--------------+------------+-----------------------------------+
93+
| MPU | on-chip | arch/arm |
94+
+--------------+------------+-----------------------------------+
95+
| NVIC | on-chip | arch/arm |
96+
+--------------+------------+-----------------------------------+
97+
| UART | on-chip | serial |
98+
+--------------+------------+-----------------------------------+
99+
| CLOCK | on-chip | clock control |
100+
+--------------+------------+-----------------------------------+
101+
| ENTROPY | on-chip | entropy |
102+
+--------------+------------+-----------------------------------+
103+
| SPI | on-chip | spi |
104+
+--------------+------------+-----------------------------------+
105+
| FLASH | on-chip | flash |
106+
+--------------+------------+-----------------------------------+
107+
| PWM | on-chip | pwm |
108+
+--------------+------------+-----------------------------------+
109+
| COUNTER | on-chip | counter |
110+
+--------------+------------+-----------------------------------+
111+
| CAN | on-chip | canfd |
112+
+--------------+------------+-----------------------------------+
113+
| I2C | on-chip | i2c |
114+
+--------------+------------+-----------------------------------+
115+
| USBHS | on-chip | udc |
116+
+--------------+------------+-----------------------------------+
117+
| DISPLAY | on-chip | LCDIF; MIPI-DSI. Tested with |
118+
| | | :ref:`rtkmipilcdb00000be` shields |
119+
+--------------+------------+-----------------------------------+
120+
| ETHERNET | on-chip | ethernet |
121+
+--------------+------------+-----------------------------------+
122+
| ADC | on-chip | adc |
123+
+--------------+------------+-----------------------------------+
121124

122125
**Note:** for using Ethernet on RA8D1 board please set switch SW1 as following configuration:
123126

boards/renesas/ek_ra8d1/ek_ra8d1-pinctrl.dtsi

Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,4 +178,69 @@
178178
<RA_PSEL(RA_PSEL_BUS, 10, 10)>;
179179
};
180180
};
181+
182+
glcdc_default: glcdc_default {
183+
group1 {
184+
/* LCDC_TCON0 */
185+
psels = <RA_PSEL(RA_PSEL_GLCDC, 8, 5)>,
186+
/* LCDC_TCON1 */
187+
<RA_PSEL(RA_PSEL_GLCDC, 8, 7)>,
188+
/* LCDC_TCON2 */
189+
<RA_PSEL(RA_PSEL_GLCDC, 5, 13)>,
190+
/* LCDC_TCON3 */
191+
<RA_PSEL(RA_PSEL_GLCDC, 5, 15)>,
192+
/* LCDC_DATA00 */
193+
<RA_PSEL(RA_PSEL_GLCDC, 9, 14)>,
194+
/* LCDC_DATA01 */
195+
<RA_PSEL(RA_PSEL_GLCDC, 9, 15)>,
196+
/* LCDC_DATA02 */
197+
<RA_PSEL(RA_PSEL_GLCDC, 9, 10)>,
198+
/* LCDC_DATA03 */
199+
<RA_PSEL(RA_PSEL_GLCDC, 9, 11)>,
200+
/* LCDC_DATA04 */
201+
<RA_PSEL(RA_PSEL_GLCDC, 9, 12)>,
202+
/* LCDC_DATA05 */
203+
<RA_PSEL(RA_PSEL_GLCDC, 9, 13)>,
204+
/* LCDC_DATA06 */
205+
<RA_PSEL(RA_PSEL_GLCDC, 9, 4)>,
206+
/* LCDC_DATA07 */
207+
<RA_PSEL(RA_PSEL_GLCDC, 9, 3)>,
208+
/* LCDC_DATA08 */
209+
<RA_PSEL(RA_PSEL_GLCDC, 9, 2)>,
210+
/* LCDC_DATA09 */
211+
<RA_PSEL(RA_PSEL_GLCDC, 2, 7)>,
212+
/* LCDC_DATA10 */
213+
<RA_PSEL(RA_PSEL_GLCDC, 7, 11)>,
214+
/* LCDC_DATA11 */
215+
<RA_PSEL(RA_PSEL_GLCDC, 7, 12)>,
216+
/* LCDC_DATA12 */
217+
<RA_PSEL(RA_PSEL_GLCDC, 7, 13)>,
218+
/* LCDC_DATA13 */
219+
<RA_PSEL(RA_PSEL_GLCDC, 7, 14)>,
220+
/* LCDC_DATA14 */
221+
<RA_PSEL(RA_PSEL_GLCDC, 7, 15)>,
222+
/* LCDC_DATA15 */
223+
<RA_PSEL(RA_PSEL_GLCDC, 11, 7)>,
224+
/* LCDC_DATA16 */
225+
<RA_PSEL(RA_PSEL_GLCDC, 11, 6)>,
226+
/* LCDC_DATA17 */
227+
<RA_PSEL(RA_PSEL_GLCDC, 11, 5)>,
228+
/* LCDC_DATA18 */
229+
<RA_PSEL(RA_PSEL_GLCDC, 11, 1)>,
230+
/* LCDC_DATA19 */
231+
<RA_PSEL(RA_PSEL_GLCDC, 11, 4)>,
232+
/* LCDC_DATA20 */
233+
<RA_PSEL(RA_PSEL_GLCDC, 11, 3)>,
234+
/* LCDC_DATA21 */
235+
<RA_PSEL(RA_PSEL_GLCDC, 11, 2)>,
236+
/* LCDC_DATA22 */
237+
<RA_PSEL(RA_PSEL_GLCDC, 11, 0)>,
238+
/* LCDC_DATA23 */
239+
<RA_PSEL(RA_PSEL_GLCDC, 7, 7)>,
240+
/* LCDC_CLK */
241+
<RA_PSEL(RA_PSEL_GLCDC, 8, 6)>,
242+
/* LCDC_EXTCLK */
243+
<RA_PSEL(RA_PSEL_GLCDC, 5, 14)>;
244+
};
245+
};
181246
};

boards/renesas/ek_ra8d1/ek_ra8d1.dts

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,10 +65,23 @@
6565
status = "okay";
6666
};
6767

68+
renesas_mipi_connector: mipi-connector {
69+
compatible = "renesas,ra-gpio-mipi-header";
70+
#gpio-cells = <2>;
71+
gpio-map-mask = <0xffffffff 0xffffffc0>;
72+
gpio-map-pass-thru = <0 0x3f>;
73+
gpio-map = <14 0 &ioport5 11 0>, /* IIC_SDA */
74+
<15 0 &ioport4 4 0>, /* DISP_BLEN */
75+
<16 0 &ioport5 12 0>, /* IIC_SCL */
76+
<17 0 &ioport5 10 0>, /* DISP_INT */
77+
<18 0 &ioporta 1 0>; /* DISP_RST */
78+
};
79+
6880
aliases {
6981
led0 = &led1;
7082
sw0 = &button0;
7183
sw1 = &button1;
84+
mipi-dsi = &mipi_dsi;
7285
};
7386
};
7487

@@ -111,6 +124,12 @@
111124
status = "okay";
112125
};
113126

127+
&lcdclk {
128+
clocks = <&pll>;
129+
div = <2>;
130+
status = "okay";
131+
};
132+
114133
&ioport0 {
115134
status = "okay";
116135
};
@@ -123,10 +142,18 @@
123142
status = "okay";
124143
};
125144

145+
&ioport5 {
146+
status = "okay";
147+
};
148+
126149
&ioport6 {
127150
status = "okay";
128151
};
129152

153+
&ioporta {
154+
status = "okay";
155+
};
156+
130157
&sci0 {
131158
/* sci0 and spi0 cannot be enabled together */
132159
pinctrl-0 = <&sci9_default>;
@@ -262,3 +289,12 @@
262289
SDRAM_TREFW_8CYCLES>;
263290
};
264291
};
292+
293+
zephyr_lcdif: &lcdif {
294+
pinctrl-0 = <&glcdc_default>;
295+
pinctrl-names = "default";
296+
};
297+
298+
zephyr_mipi_dsi: &mipi_dsi {};
299+
300+
renesas_mipi_i2c: &iic1{};

boards/renesas/ek_ra8d1/sdram.ld

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ SECTION_DATA_PROLOGUE(.sdram,(NOLOAD),)
1010
{
1111
__SDRAM_Start = .;
1212
KEEP(*(.sdram*))
13+
#ifdef CONFIG_LVGL
14+
KEEP(*(.lvgl_buf*))
15+
#endif
1316
__SDRAM_End = .;
1417
} GROUP_LINK_IN(SDRAM)
1518

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
if SHIELD_RTKMIPILCDB00000BE
5+
if DISPLAY
6+
7+
# Enable MIPI DSI, as this display controller requires it.
8+
9+
config MIPI_DSI
10+
default y
11+
12+
endif # DISPLAY
13+
14+
if LVGL
15+
16+
# Configure LVGL to use touchscreen with input API
17+
18+
config INPUT
19+
default y
20+
21+
if INPUT
22+
23+
# GT911 driver drives reset pin low, GT911 and ILI9806E_DSI driver share a reset line,
24+
# so it needs to initialize before the display_ili9806e_dsi driver but after the MIPI DSI driver
25+
26+
config INPUT_INIT_PRIORITY
27+
default 89
28+
29+
endif # INPUT
30+
31+
# LVGL should allocate buffers equal to size of display
32+
config LV_Z_VDB_SIZE
33+
default 100
34+
35+
# Enable double buffering
36+
config LV_Z_DOUBLE_VDB
37+
default y
38+
39+
# Force full refresh. This prevents memory copy associated with partial
40+
# display refreshes, which is not necessary for the GLCDC driver
41+
config LV_Z_FULL_REFRESH
42+
default y
43+
44+
config LV_Z_BITS_PER_PIXEL
45+
default 32
46+
47+
# Use offloaded render thread
48+
config LV_Z_FLUSH_THREAD
49+
default y
50+
51+
choice LV_COLOR_DEPTH
52+
default LV_COLOR_DEPTH_32
53+
endchoice
54+
55+
endif # LVGL
56+
57+
endif # SHIELD_RTKMIPILCDB00000BE
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_RTKMIPILCDB00000BE
5+
def_bool $(shields_list_contains,rtkmipilcdb00000be)
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
/*
2+
* Copyright (c) 2024 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
iic1_default: iic1_default {
9+
group1 {
10+
/* SCL1 SDA1 */
11+
psels = <RA_PSEL(RA_PSEL_I2C, 5, 12)>,
12+
<RA_PSEL(RA_PSEL_I2C, 5, 11)>;
13+
drive-strength = "medium";
14+
};
15+
};
16+
};
17+
18+
&iic1 {
19+
status = "okay";
20+
#address-cells = <1>;
21+
#size-cells = <0>;
22+
clock-frequency = <DT_FREQ_K(100)>;
23+
pinctrl-0 = <&iic1_default>;
24+
pinctrl-names = "default";
25+
};
Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
.. _rtkmipilcdb00000be:
2+
3+
RTKMIPILCDB00000BE MIPI Display
4+
###############################
5+
6+
Overview
7+
********
8+
9+
The Focus LCDs RTKMIPILCDB00000BE MIPI Display is a 4.5 inch TFT 480x854 pixels
10+
capacitive touch panel, and a backlight unit.
11+
12+
This display uses a 26 pin connector header.
13+
14+
Pins Assignment of the Renesas RTKMIPILCDB00000BE MIPI Display
15+
==============================================================
16+
17+
+-----------------------+------------------------+
18+
| Connector Pin | Function |
19+
+=======================+========================+
20+
| 14 | Touch ctrl I2C SDA |
21+
+-----------------------+------------------------+
22+
| 15 | Display backlight enable|
23+
+-----------------------+------------------------+
24+
| 16 | Touch ctrl I2C SCL |
25+
+-----------------------+------------------------+
26+
| 17 | External interrupt |
27+
+-----------------------+------------------------+
28+
| 18 | Display reset |
29+
+-----------------------+------------------------+
30+
31+
Hardware Requirements:
32+
**********************
33+
34+
Supported Renesas RA boards: EK-RA8D1
35+
- 1 x RA Board
36+
- 1 x Micro USB cable
37+
38+
Hardware Configuration:
39+
***********************
40+
41+
The MIPI Graphics Expansion Port (J58) connects the EK-RA8D1 board to the MIPI Graphics Expansion Board
42+
supplied as part of the kit.
43+
44+
Set the configuration switches (SW1) as below to avoid potential failures.
45+
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
46+
| SW1-1 PMOD1 | SW1-2 TRACE | SW1-3 CAMERA | SW1-4 ETHA | SW1-5 ETHB | SW1-6 GLCD | SW1-7 SDRAM | SW1-8 I3C |
47+
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
48+
| OFF | OFF | OFF | OFF | OFF | ON | ON | OFF |
49+
+-------------+-------------+--------------+------------+------------+------------+-------------+-----------+
50+
51+
Programming
52+
***********
53+
54+
Set ``--shield=rtkmipilcdb00000be`` when you invoke ``west build``. For
55+
example:
56+
57+
.. zephyr-app-commands::
58+
:zephyr-app: tests/drivers/display/display_read_write
59+
:board: ek_ra8d1
60+
:shield: rtkmipilcdb00000be
61+
:goals: build

0 commit comments

Comments
 (0)