- Notifications
You must be signed in to change notification settings - Fork 8.2k
Labels
area: DisplaybugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug
Description
Describe the bug
I was testing samples/drivers/display on a 2.8" 240x320 TFT ILI9341 with a esp32s3_devkitc using the following devicetree:
#include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> / { chosen { zephyr,display = &ili9341; }; mipi_dbi { compatible = "zephyr,mipi-dbi-spi"; spi-dev = <&spi2>; dc-gpios = <&gpio1 39 GPIO_ACTIVE_HIGH>; reset-gpios = <&gpio1 40 GPIO_ACTIVE_LOW>; write-only; #address-cells = <1>; #size-cells = <0>; ili9341: ili9341@0 { compatible = "ilitek,ili9341"; mipi-max-frequency = <25000000>; reg = <0>; pixel-format = <1>; rotation = <0>; width = <320>; height = <240>; }; }; }; &spi2 { #address-cells = <1>; #size-cells = <0>; status = "okay"; pinctrl-0 = <&spim2_default>; pinctrl-names = "default"; /*cs-gpios = <&gpio0 10 GPIO_ACTIVE_HIGH>;*/ }; &pinctrl { spim2_default: spim2_default { group1 { pinmux = <SPIM2_MISO_GPIO37>, <SPIM2_SCLK_GPIO36>, <SPIM2_CSEL_GPIO7>; }; group2 { pinmux = <SPIM2_MOSI_GPIO35>; output-low; }; }; }; Doing the tests, I found some issues:
- The screen was showing the colors on this order:
- TOP LEFT: green
- TOP RIGHT: blue
- BOTTOM LEFT : red
- BOTTOM RIGHT: gray scale
NOTE: Same behavior on all 4 rotations (0, 90, 180, 270)
- The file
drivers/display/ili9xxx.hdeclaresILI9XXX_MADCTL_BGRconstant used to set BRG color sequence on the TFT driver. On the filedrivers/display/ili9xxx.cthis constant is set up as default, which means RGB cannot be set.
Regression
- This is a regression.
Steps to reproduce
cd ~/zephyrproject/samples/drivers/display/boards touch esp32s3_procpu.overlay I set up as overlay the same script above
cd .. west build -p always -b esp32s3_devkitc/esp32s3/procpu -- -DDTC_OVERLAY_FILE=boards/esp32s3_procpu.overlay NOTE: LED pin of TFT goes to 3.3v
Relevant log output
Impact
Functional Limitation – Some features not working as expected, but system usable.
Environment
- Zephyr: 4.2.99
- SDK: 0.17.4
Additional Context
I worked for a solution on this part. Please let me know when I can submit it on a PR
Metadata
Metadata
Assignees
Labels
area: DisplaybugThe issue is a bug, or the PR is fixing a bugThe issue is a bug, or the PR is fixing a bugpriority: lowLow impact/importance bugLow impact/importance bug