From c97a6f42de852a2927b48595d07274a9dd94960c Mon Sep 17 00:00:00 2001 From: Ioannis Karachalios Date: Wed, 6 Mar 2024 18:33:27 +0200 Subject: [PATCH] bords: renesas: dts: Add overlay files to support LCDC 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. Signed-off-by: Ioannis Karachalios --- .../dts/da1469x_dk_pro_lcdc.overlay | 63 +++++++++++++++++++ .../dts}/da1469x_dk_pro_mipi_dbi.overlay | 0 .../boards/da1469x_dk_pro_mipi_dbi.overlay | 31 --------- 3 files changed, 63 insertions(+), 31 deletions(-) create mode 100644 boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_lcdc.overlay rename {samples/modules/lvgl/demos/boards => boards/renesas/da1469x_dk_pro/dts}/da1469x_dk_pro_mipi_dbi.overlay (100%) delete mode 100644 samples/drivers/display/boards/da1469x_dk_pro_mipi_dbi.overlay diff --git a/boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_lcdc.overlay b/boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_lcdc.overlay new file mode 100644 index 000000000000000..4eaba2b9520a980 --- /dev/null +++ b/boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_lcdc.overlay @@ -0,0 +1,63 @@ +/* + * Copyright (c) 2023 Renesas Electronics Corporation + * + * SPDX-License-Identifier: Apache-2.0 + */ + + #include + #include + +/ { + chosen { + zephyr,display = &display; + }; + + 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>; + }; +}; + +&display { + disp-gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>; + status = "okay"; + width = <480>; + height = <272>; + pixel-format = ; + + /* + * 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>; + }; +}; diff --git a/samples/modules/lvgl/demos/boards/da1469x_dk_pro_mipi_dbi.overlay b/boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_mipi_dbi.overlay similarity index 100% rename from samples/modules/lvgl/demos/boards/da1469x_dk_pro_mipi_dbi.overlay rename to boards/renesas/da1469x_dk_pro/dts/da1469x_dk_pro_mipi_dbi.overlay diff --git a/samples/drivers/display/boards/da1469x_dk_pro_mipi_dbi.overlay b/samples/drivers/display/boards/da1469x_dk_pro_mipi_dbi.overlay deleted file mode 100644 index 81a4bdd8645d7f6..000000000000000 --- a/samples/drivers/display/boards/da1469x_dk_pro_mipi_dbi.overlay +++ /dev/null @@ -1,31 +0,0 @@ -/* - * Copyright (c) 2023 Renesas Electronics Corporation - * - * SPDX-License-Identifier: Apache-2.0 - */ - - #include - #include - - / { - chosen { - zephyr,display = &ili9340; - }; - }; - - &mipi_dbi { - reset-gpios = <&gpio0 12 GPIO_ACTIVE_LOW>; - status = "okay"; - spi-dev = <&spi2>; - - ili9340: ili9340@0 { - compatible = "ilitek,ili9340"; - mipi-max-frequency = <48000000>; - status = "okay"; - reg = <0>; - width = <240>; - height = <320>; - pixel-format = ; - rotation = <0>; - }; -};