Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renesas: Smartbond: Add Display Driver Support #67649

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions boards/renesas/da1469x_dk_pro/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,14 @@ config LV_Z_BITS_PER_PIXEL
config LV_Z_AREA_X_ALIGNMENT_WIDTH
default 2

config LV_Z_FLUSH_THREAD
default y

# Use double buffering to avoid visual artifacts as long as
# the DMA is copying data into driver's frame buffer.
config LV_Z_DOUBLE_VDB
default y

endif # LVGL

if INPUT
Expand Down
15 changes: 15 additions & 0 deletions boards/renesas/da1469x_dk_pro/da1469x_dk_pro-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,21 @@
};
};

display_controller_default: display_controller_default {
group1 {
pinmux = <SMARTBOND_PINMUX(LCD, 1, 2)>,
<SMARTBOND_PINMUX(LCD, 1, 3)>,
<SMARTBOND_PINMUX(LCD, 1, 4)>,
<SMARTBOND_PINMUX(LCD, 1, 5)>,
<SMARTBOND_PINMUX(LCD, 1, 7)>,
<SMARTBOND_PINMUX(LCD, 1, 8)>,
<SMARTBOND_PINMUX(LCD, 0, 27)>,
<SMARTBOND_PINMUX(LCD, 0, 28)>,
<SMARTBOND_PINMUX(LCD, 0, 29)>,
<SMARTBOND_PINMUX(LCD, 0, 30)>;
};
};

spi_controller: spi_controller {
group1 {
pinmux = <SMARTBOND_PINMUX(SPI_CLK, 0, 22)>,
Expand Down
11 changes: 4 additions & 7 deletions boards/renesas/da1469x_dk_pro/da1469x_dk_pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,10 @@
zephyr,code-partition = &slot0_partition;
};

lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
};

leds {
compatible = "gpio-leds";
red_led: led_0 {
Expand Down Expand Up @@ -168,10 +172,3 @@ zephyr_udc0: &usbd {
pinctrl-0 = <&spi2_controller>;
pinctrl-names = "default";
};

&mipi_dbi {
pinctrl-0 = <&mipi_dbi_default>;
pinctrl-1 = <&mipi_dbi_read>;
pinctrl-2 = <&mipi_dbi_sleep>;
pinctrl-names = "default", "read", "sleep";
};
1 change: 1 addition & 0 deletions boards/renesas/da1469x_dk_pro/da1469x_dk_pro.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,5 @@ supported:
- crypto
- dma
- mipi_dbi
- display
vendor: renesas
65 changes: 65 additions & 0 deletions boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_lcdc.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
/*
* Copyright (c) 2023 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

#include <zephyr/dt-bindings/gpio/gpio.h>
#include <zephyr/dt-bindings/display/panel.h>

/ {
chosen {
zephyr,display = &lcdc;
};

lvgl_pointer {
input = <&display_touch>;
status = "okay";
swap-xy;
};
};

&dma {
status = "okay";
};

&i2c2 {
clock-frequency = <400000>;

display_touch: ft6206@38 {
compatible = "focaltech,ft5336";
status = "okay";
reg = <0x38>;
int-gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
};
};

&lcdc {
status = "okay";
pinctrl-0 = <&display_controller_default>;
pinctrl-names = "default";
width = <480>;
height = <272>;
disp-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
pixel-format = <PANEL_PIXEL_FORMAT_RGB_565>;

/*
* Panel settings for the NHD-4.3-480272EF-ASXP-CTP
* display panel model which integrates the SC7283
* driver IC.
*/
display-timings {
compatible = "zephyr,panel-timing";
hsync-len = <2>;
hfront-porch = <2>;
hback-porch = <3>;
vsync-len = <2>;
vfront-porch = <2>;
vback-porch = <2>;
hsync-active = <0>;
vsync-active = <0>;
de-active = <1>;
pixelclk-active = <1>;
clock-frequency = <12000000>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,17 @@
};
};

&mipi_dbi {
reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
&lcdc {
compatible = "renesas,smartbond-mipi-dbi";
status = "okay";
reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>;
spi-dev = <&spi2>;
pinctrl-0 = <&mipi_dbi_default>;
pinctrl-1 = <&mipi_dbi_read>;
pinctrl-2 = <&mipi_dbi_sleep>;
pinctrl-names = "default", "read", "sleep";
#address-cells = <1>;
#size-cells = <0>;

ili9340: ili9340@0 {
compatible = "ilitek,ili9340";
Expand Down
1 change: 1 addition & 0 deletions drivers/display/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ zephyr_library_sources_ifdef(CONFIG_RM67162 display_rm67162.c)
zephyr_library_sources_ifdef(CONFIG_HX8394 display_hx8394.c)
zephyr_library_sources_ifdef(CONFIG_GC9X01X display_gc9x01x.c)
zephyr_library_sources_ifdef(CONFIG_LED_STRIP_MATRIX display_led_strip_matrix.c)
zephyr_library_sources_ifdef(CONFIG_DISPLAY_RENESAS_LCDC display_renesas_lcdc.c)

zephyr_library_sources_ifdef(CONFIG_MICROBIT_DISPLAY
mb_display.c
Expand Down
1 change: 1 addition & 0 deletions drivers/display/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -42,5 +42,6 @@ source "drivers/display/Kconfig.otm8009a"
source "drivers/display/Kconfig.hx8394"
source "drivers/display/Kconfig.gc9x01x"
source "drivers/display/Kconfig.led_strip_matrix"
source "drivers/display/Kconfig.renesas_lcdc"

endif # DISPLAY
19 changes: 19 additions & 0 deletions drivers/display/Kconfig.renesas_lcdc
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
# Smartbond display controller configuration options

# Copyright (c) 2023 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config DISPLAY_RENESAS_LCDC
bool "Smartbond display controller driver"
depends on DT_HAS_RENESAS_SMARTBOND_DISPLAY_ENABLED
select DMA
default y
help
Enable Smartbond display controller.

config DISPLAY_RENESAS_LCDC_BUFFER_PSRAM
bool "Allocate the display buffer into PSRAM"
depends on DISPLAY_RENESAS_LCDC
select MEMC
help
Allocate the display buffer into PSRAM
Loading
Loading