zephyrproject-rtos / zephyr

Primary Git Repository for the Zephyr Project. Zephyr is a new generation, scalable, optimized, secure RTOS for multiple hardware architectures.
https://docs.zephyrproject.org
Apache License 2.0
9.83k stars 6.06k forks source link

Add LCD Support on NXP MCXN947 over FlexIO #71406

Open mmahadevan108 opened 1 month ago

mmahadevan108 commented 1 month ago

This PR enables FlexIO support and adds support for the LCD-PAR-S035 NXP display over the FlexIO.

Depends on https://github.com/zephyrproject-rtos/zephyr/pull/70583 for some updates to the MIPI DBI implementation

zephyrbot commented 1 month ago

The following west manifest projects have been modified in this Pull Request:

Name Old Revision New Revision Diff

Note: This message is automatically posted and updated by the Manifest GitHub Action.

mmahadevan108 commented 1 month ago

cc @jasonNXP

danieldegrasse commented 1 month ago

Depends on https://github.com/zephyrproject-rtos/zephyr/pull/70583 for some updates to the MIPI DBI implementation

@mmahadevan108 As requested, I've split the shared commits from that PR into a new one: https://github.com/zephyrproject-rtos/zephyr/pull/71454

mmahadevan108 commented 1 month ago

cc @zejiang0jason

zejiang0jason commented 1 month ago

From the samples/drivers/display's description, the rectangle color is: in clockwise order, from top left corner: red, green, blue, grey https://github.com/zephyrproject-rtos/zephyr/blob/69c5c6d5117ff9b045e1b74d40b29d86ad1fe550/samples/drivers/display/README.rst?plain=1#L13

But the result is: image

Doesn't match.

danieldegrasse commented 1 month ago

From the samples/drivers/display's description, the rectangle color is: in clockwise order, from top left corner: red, green, blue, grey

@mmahadevan108 have you tested this enablement with any of the LVGL samples? Generally I find those useful to make sure color data is not swapped, as @zejiang0jason suggests it is

mmahadevan108 commented 3 weeks ago

From the samples/drivers/display's description, the rectangle color is: in clockwise order, from top left corner: red, green, blue, grey

https://github.com/zephyrproject-rtos/zephyr/blob/69c5c6d5117ff9b045e1b74d40b29d86ad1fe550/samples/drivers/display/README.rst?plain=1#L13

But the result is: image

Doesn't match.

@zejiang0jason , @danieldegrasse, thank you for spotting this. I have added a change to the display driver.

mmahadevan108 commented 3 weeks ago

From the samples/drivers/display's description, the rectangle color is: in clockwise order, from top left corner: red, green, blue, grey

@mmahadevan108 have you tested this enablement with any of the LVGL samples? Generally I find those useful to make sure color data is not swapped, as @zejiang0jason suggests it is

I have tested with zephyr/samples/subsys/display/lvgl

mmahadevan108 commented 3 weeks ago

@danieldegrasse @decsny, kindly re-review

mmahadevan108 commented 2 weeks ago

Changes look good to me- if you'd like (just a suggestion, not a requirement), adding the following input codes to the buttons on this board will also allow us to run the LVGL demos (samples/modules/lvgl/demos)

diff --git a/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi b/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi
index 3154af9d591..6ed05d512cb 100644
--- a/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi
+++ b/boards/nxp/frdm_mcxn947/frdm_mcxn947.dtsi
@@ -6,6 +6,7 @@

 #include "frdm_mcxn947-pinctrl.dtsi"
 #include <zephyr/dt-bindings/i2c/i2c.h>
+#include <zephyr/dt-bindings/input/input-event-codes.h>

 / {
        aliases{
@@ -40,11 +41,13 @@
                user_button_2: button_0 {
                        label = "User SW2";
                        gpios = <&gpio0 23 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       zephyr,code = <INPUT_KEY_0>;
                        status = "disabled";
                };
                user_button_3: button_1 {
                        label = "User SW3";
                        gpios = <&gpio0 6 (GPIO_ACTIVE_LOW | GPIO_PULL_UP)>;
+                       zephyr,code = <INPUT_KEY_1>;
                        status = "disabled";
                };
        };

This is something @zejiang0jason is working on as part of his PR which he plans to submit once this support is merged in.

mmahadevan108 commented 2 weeks ago

@zejiang0jason @decsny @dleach02 could you kindly re-review

danieldegrasse commented 2 weeks ago

I'll add that I tested this PR using the samples/drivers/display and samples/subsys/display/lvgl samples and can confirm both work correctly for me as well