Skip to content

Commit

Permalink
boards: renesas: dts: Add overlay files to support LCDC
Browse files Browse the repository at this point in the history
In order to avoid defining almost the same overlays for different
sample codes and/or applications a common overlay file per
display interface is defined under the boards dts folder.
In doing so, an application/sample code will only have to
define another overlay explicitly under application's board
folder if more blocks are to be enabled. In either case, users
should explicitly invoke the requested overfiles at 'west build'
invokation by using the DTC_OVERLAY_FILE system variable.

(cherry picked from commit 6afea7c)

Original-Signed-off-by: Ioannis Karachalios <ioannis.karachalios.px@renesas.com>
GitOrigin-RevId: 6afea7c
Change-Id: I9c8d1712cf9b72b5380d710ba7e08648c957a94b
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5356059
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
Reviewed-by: Tristan Honscheid <honscheid@google.com>
Commit-Queue: Tristan Honscheid <honscheid@google.com>
Tested-by: Tristan Honscheid <honscheid@google.com>
  • Loading branch information
ioannis-karachalios authored and Chromeos LUCI committed Mar 9, 2024
1 parent cb07932 commit 55d22c4
Show file tree
Hide file tree
Showing 5 changed files with 75 additions and 41 deletions.
7 changes: 0 additions & 7 deletions boards/renesas/da1469x_dk_pro/da1469x_dk_pro.dts
Original file line number Diff line number Diff line change
Expand Up @@ -172,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";
};
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
31 changes: 0 additions & 31 deletions samples/drivers/display/boards/da1469x_dk_pro_mipi_dbi.overlay

This file was deleted.

2 changes: 1 addition & 1 deletion samples/drivers/display/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,7 @@ tests:
sample.display.mipi_dbi:
platform_allow:
- da1469x_dk_pro
extra_args: DTC_OVERLAY_FILE="boards/da1469x_dk_pro_mipi_dbi.overlay"
extra_args: DTC_OVERLAY_FILE="da1469x_dk_pro_mipi_dbi.overlay"
tags:
- display
- mipi_dbi
Expand Down

0 comments on commit 55d22c4

Please sign in to comment.