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 MIPI DBI Driver Support #68426

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
19 changes: 18 additions & 1 deletion boards/renesas/da1469x_dk_pro/Kconfig.defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,25 @@

if BOARD_DA1469X_DK_PRO

if LVGL

config LV_Z_BITS_PER_PIXEL
default 16

# LCDC imposes display buffer's stride be word aligned
config LV_Z_AREA_X_ALIGNMENT_WIDTH
default 2
depends on LVGL

endif # LVGL

if INPUT

config INPUT_FT5336_INTERRUPT
default y

config LV_Z_POINTER_INPUT_MSGQ_COUNT
default 70

endif # INPUT

endif # BOARD_DA1469X_DK_PRO
49 changes: 44 additions & 5 deletions boards/renesas/da1469x_dk_pro/da1469x_dk_pro-pinctrl.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -26,20 +26,20 @@

i2c2_default: i2c2_default {
group1 {
pinmux = <SMARTBOND_PINMUX(I2C2_SDA, 0, 19)>,
<SMARTBOND_PINMUX(I2C2_SCL, 0, 18)>;
pinmux = <SMARTBOND_PINMUX(I2C2_SDA, 0, 28)>,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you split these pin control fixes into separate commits? It should be clear in the git history why these are needed

<SMARTBOND_PINMUX(I2C2_SCL, 0, 29)>;
bias-pull-up;
};
};

spi_controller: spi_controller {
group1 {
pinmux = < SMARTBOND_PINMUX(SPI_CLK, 0, 21) >,
<SMARTBOND_PINMUX(SPI_DO, 0, 26)>;
pinmux = <SMARTBOND_PINMUX(SPI_CLK, 0, 22)>,
<SMARTBOND_PINMUX(SPI_DO, 0, 23)>;
output-enable;
};
group2 {
pinmux = <SMARTBOND_PINMUX(SPI_DI, 0, 24)>;
pinmux = <SMARTBOND_PINMUX(SPI_DI, 0, 25)>;
input-enable;
};
};
Expand All @@ -55,4 +55,43 @@
input-enable;
};
};

/omit-if-no-ref/ mipi_dbi_default: mipi_dbi_default {
group1 {
pinmux = <SMARTBOND_PINMUX(LCD_SPI_DC, 0, 20)>,
<SMARTBOND_PINMUX(LCD_SPI_EN, 0, 21)>,
<SMARTBOND_PINMUX(LCD_SPI_DO, 0, 24)>,
<SMARTBOND_PINMUX(LCD_SPI_CLK, 0, 27)>;
};
group2 {
/* TE signal - mapped on fixed positions */
pinmux = <SMARTBOND_PINMUX(LCD, 1, 22)>;
};
};

/omit-if-no-ref/ mipi_dbi_sleep: mipi_dbi_sleep {
group1 {
pinmux = <SMARTBOND_PINMUX(GPIO, 0, 20)>,
<SMARTBOND_PINMUX(GPIO, 0, 21)>,
<SMARTBOND_PINMUX(GPIO, 0, 24)>,
<SMARTBOND_PINMUX(GPIO, 0, 27)>;
output-enable;
};
group2 {
pinmux = <SMARTBOND_PINMUX(GPIO, 1, 22)>;
input-enable;
};
};

/* Same signal can be multiplexed to multiple I/O pins */
/omit-if-no-ref/ mipi_dbi_read: mipi_dbi_read {
group1 {
pinmux = <SMARTBOND_PINMUX(SPI2_CLK, 0, 27)>;
output-enable;
};
group2 {
pinmux = <SMARTBOND_PINMUX(SPI2_DI, 0, 26)>;
input-enable;
};
};
};
7 changes: 7 additions & 0 deletions boards/renesas/da1469x_dk_pro/da1469x_dk_pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,10 @@ 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 @@ -19,4 +19,5 @@ supported:
- rtc
- crypto
- dma
- mipi_dbi
vendor: renesas
2 changes: 2 additions & 0 deletions drivers/mipi_dbi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,5 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_MIPI_DBI_SPI mipi_dbi_spi.c)

zephyr_sources_ifdef(CONFIG_MIPI_DBI_SMARTBOND mipi_dbi_smartbond.c)
2 changes: 2 additions & 0 deletions drivers/mipi_dbi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,6 @@ config MIPI_DBI_INIT_PRIORITY

source "drivers/mipi_dbi/Kconfig.spi"

source "drivers/mipi_dbi/Kconfig.smartbond"

endif
12 changes: 12 additions & 0 deletions drivers/mipi_dbi/Kconfig.smartbond
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Smartbond MIPI DBI host configuration options

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

config MIPI_DBI_SMARTBOND
bool "Smartbond MIPI DBI host controller driver"
depends on DT_HAS_RENESAS_SMARTBOND_MIPI_DBI_ENABLED
default y
select SPI
help
Enable Smartbond MIPI DBI host controller.
Loading
Loading