Skip to content

Commit

Permalink
boards: shields: st_b_lcd40_dsi1_mb1166: refactoring
Browse files Browse the repository at this point in the history
Minimize code duplication chances when multiple boards will be added
eventually as supporting this shield.

Signed-off-by: Abderrahmane Jarmouni <[email protected]>
  • Loading branch information
JarmouniA committed Sep 1, 2024
1 parent 7cf124b commit 0017107
Show file tree
Hide file tree
Showing 6 changed files with 89 additions and 71 deletions.

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -6,18 +6,6 @@

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

/ {
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft5336>;
invert-y;
};

chosen {
zephyr,display = &ltdc;
};
};

&sdram2 {
/* Frame buffer memory cache will cause screen flickering. */
zephyr,memory-attr = <( DT_MEM_ARM(ATTR_MPU_RAM_NOCACHE) )>;
Expand All @@ -26,12 +14,6 @@
&ltdc {
status = "okay";
ext-sdram = <&sdram2>;
width = <800>;
height = <480>;
def-back-color-red = <0>;
def-back-color-green = <0>;
def-back-color-blue = <0>;
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
};

/* ltdc uses pll3_r as pixel clock */
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,22 @@
* SPDX-License-Identifier: Apache-2.0
*/

&mipi_dsi {
#include <zephyr/dt-bindings/display/panel.h>

/ {
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft5336>;
invert-y;
};

chosen {
zephyr,display = &ltdc;
};
};

&zephyr_mipi_dsi {
status = "okay";
otm8009a: otm8009a@0 {
status = "okay";
compatible = "orisetech,otm8009a";
Expand All @@ -18,3 +33,27 @@
rotation = <90>;
};
};

&zephyr_ltdc {
status = "okay";
width = <800>;
height = <480>;
def-back-color-red = <0>;
def-back-color-green = <0>;
def-back-color-blue = <0>;
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
/* orisetech, otm8009a */
display-timings {
compatible = "zephyr,panel-timing";
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
hsync-len = <2>;
vsync-len = <1>;
hback-porch = <34>;
vback-porch = <15>;
hfront-porch = <34>;
vfront-porch = <16>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,25 @@
* SPDX-License-Identifier: Apache-2.0
*/

&mipi_dsi {
#include <zephyr/dt-bindings/display/panel.h>

/ {
lvgl_pointer {
compatible = "zephyr,lvgl-pointer-input";
input = <&ft5336>;
invert-y;
};

chosen {
zephyr,display = &ltdc;
};
};

&zephyr_mipi_dsi {
status = "okay";
loosely-packed;
largest-packet-size = <64>;
bta-ack-disable;
nt35510: nt35510@0 {
status = "okay";
compatible = "frida,nt35510";
Expand All @@ -18,3 +36,27 @@
rotation = <90>;
};
};

&zephyr_ltdc {
status = "okay";
width = <800>;
height = <480>;
def-back-color-red = <0>;
def-back-color-green = <0>;
def-back-color-blue = <0>;
pixel-format = <PANEL_PIXEL_FORMAT_RGB_888>;
/* frida, nt35510 */
display-timings {
compatible = "zephyr,panel-timing";
hsync-active = <0>;
vsync-active = <0>;
de-active = <0>;
pixelclk-active = <0>;
hsync-len = <2>;
vsync-len = <120>;
hback-porch = <34>;
vback-porch = <150>;
hfront-porch = <34>;
vfront-porch = <150>;
};
};
Original file line number Diff line number Diff line change
Expand Up @@ -278,3 +278,9 @@ zephyr_udc0: &usbotg_hs {
};

arduino_spi: &spi5 {};

/* alias used by display shields */
zephyr_mipi_dsi: &mipi_dsi {};

/* alias used by display shields */
zephyr_ltdc: &ltdc {};

0 comments on commit 0017107

Please sign in to comment.