Skip to content

Conversation

@NickIOT72
Copy link
Contributor

Overview

This PR adds some features on zephyr/driver/display files related with ili9xxx header

Features Implemented

  • modification on display_ili9xxx.c and display_ili9xxx.h files

  • add condition to select BGR/RGB color order depending on pixel format

  • change CMD_SET for ILI9341

Files Modified/Added

zephyr/drivers/display/display_ili9xxx.c - changes made on MADCTL register

zephyr/drivers/display/display_ili9xxx.h - Comment modified

zephyr/dts/bindings/display/ilitek,ili9xxx-common.yaml - Added BGR565 value on enum

zephyr/include/zephyr/dt-bindings/display/ili9xxx.h - added ILI9XXX_PIXEL_FORMAT_BGR565 on pixel format

Fixes #99134

@NickIOT72 NickIOT72 changed the title drivers: display: issue with configuration on ILI9341 drivers: display: features for ILI9341 driver Nov 12, 2025
@JarmouniA JarmouniA self-assigned this Nov 12, 2025
enum madctl_cmd_set {
CMD_SET_1, /* Default for most of ILI9xxx display controllers */
CMD_SET_2, /* Used by ILI9342c */
CMD_SET_2, /* Used by ILI9342c & ILI9341 */
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Have you verified that display orientation works with this change? Assuming that is why it was made

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Using CMD_SET_2 the display orientation works as described on the documentation . To verify it, I set a small delay between the squares rendering, comment the display_blanking_off and put it at the beginning. It was shown how each square was appearing according with the order set up on the script, showing the behaviour described on the document: clockwise, from TOP_LEFT(RED) to BOTTOM_LEFT(GRAY SCALE). I used RGB888 for the example

test_de

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we should add the delay between the squares in the sample, seems useful.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do that on this PR? or is better left it for another PR?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we do that on this PR? or is better left it for another PR?

Out-of-scope for this one

@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch from b56244b to 26a3faf Compare November 14, 2025 17:18
@zephyrbot zephyrbot added platform: STM32 ST Micro STM32 area: Shields Shields (add-on boards) area: Tests Issues related to a particular existing or missing test platform: Renesas SmartBond Renesas Electronics Corporation, SmartBond platform: Seeed Studio Seeed Studio platforms labels Nov 14, 2025
@NickIOT72 NickIOT72 requested a review from JarmouniA November 14, 2025 17:20
@JarmouniA JarmouniA dismissed their stale review November 20, 2025 14:24

addressed. CI failures to be fixed.

@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch 2 times, most recently from 57da9df to 4515947 Compare November 26, 2025 00:43
@zephyrbot zephyrbot requested a review from rerickson1 November 26, 2025 00:45
@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch 7 times, most recently from d61b23e to f2934f8 Compare November 26, 2025 22:37
@NickIOT72
Copy link
Contributor Author

@JarmouniA All checks have passed

mipi-max-frequency = <30000000>;
reg = <0>;
pixel-format = <ILI9XXX_PIXEL_FORMAT_RGB565>;
pixel-format = <0x20>;
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not use the macros PANEL_PIXEL_FORMAT_...?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

When I used the macro, all the of the boards with this macro didn't compile, that was causing the CI failures. All of these files had the panel.h header but the macro wasn't recognized. That's why I used the hardcoded hex value

Copy link
Contributor

@JarmouniA JarmouniA Nov 28, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All of these files had the panel.h header but the macro wasn't recognized.

That's strange. Push a commit on top with the macros and I will have a look at the errors in CI.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The errors in Twister Build 2 are unrelated to the PR https://github.com/zephyrproject-rtos/zephyr/actions/runs/19791231302/job/56721806874?pr=99267

arch.arm.interrupt.no_optimizations on bl5340_dvk/nrf5340/cpuapp error (Build failure - collect2: error: ld returned 1 exit status)
INFO    - 2) arch.arm.swap.common.fpu_sharing.no_optimizations on bl5340_dvk/nrf5340/cpuapp error (Build failure - collect2: error: ld returned 1 exit status)
INFO    - 3) arch.arm.swap.common.no_optimizations on bl5340_dvk/nrf5340/cpuapp error (Build failure - collect2: error: ld returned 1 exit status)
INFO    - 4) arch.arm.interrupt.no_optimizations on bl5340_dvk/nrf5340/cpunet error (Build failure - collect2: error: ld returned 1 exit status)

The same for Build 3 https://github.com/zephyrproject-rtos/zephyr/actions/runs/19791231302/job/56721806879?pr=99267

arch.arm.swap.common.no_optimizations on bl5340_dvk/nrf5340/cpunet error (Build failure - collect2: error: ld returned 1 exit status)

The way forward is to check if there are already open issues regarding these failures, and comment on them to notify the people involved that the issues are CI Blocker so they get prioritized.
Otherwise create new bug issues for each test failure and I will mark them as CI blockers.

@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch from f2934f8 to 7f69175 Compare November 28, 2025 21:14
@zephyrbot zephyrbot requested a review from JarmouniA November 28, 2025 21:16
@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch 3 times, most recently from ff4ccbc to 7c7a41c Compare December 1, 2025 17:58
@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch from 7c7a41c to b0f5090 Compare December 8, 2025 13:58
ILI9341 is not deploying correctly the display sample.
The screen looks mirrored vertically and the color
doesn't match with the sequence expected. To fix it,
change the Memory Access Control configuration data.

Signed-off-by: Nicolas Moreno <[email protected]>
Replaced display-controller.yaml with lcd-controller.yaml
Deleted pixel format property, replacing it with the
property on lcd-controller.yaml. Replace ILI9XXX RGB macro
with PANEL RGB macro. Also, added condition to verify pixel
format is RGB565, BRG565 or RGB888, otherwise it will show error
Replaced <zephyr/dt-bindings/display/ili9xxx.h> with
<zephyr/dt-bindings/display/panel.h> and
ILI9XXX_PIXEL with PANEL_PIXEL in some Devicetrees
and files that contained both elements. Fixed some
script sintax. Deleted drivers/display/display_ili9xxx.c

Signed-off-by: Nicolas Moreno <[email protected]>
Added documentation for doc/releases/migration-guide-4.4.rst
in reference with the changes on ili9xxx and ili9341
controllers

Signed-off-by: Nicolas Moreno <[email protected]>
@NickIOT72 NickIOT72 force-pushed the changes_display_ili9xxx_h branch from b0f5090 to 293722a Compare December 12, 2025 15:30
@NickIOT72
Copy link
Contributor Author

I'm currently having issues locally trying to compile

west build -p -b bl5340_dvk/nrf5340/cpuapp/ns tests/subsys/debug/assert_custom_header -T debug.assert_custom_header
and
west build -p -b m5stack_core2/esp32/appcpu tests/subsys/secure_storage/psa/its -T secure_storage.psa.its.secure_storage.store.settings.64-bit_uids

These are failing on the CI. I pushed the code to see if these issues persists. In that case, Should I add another commit or create another PR to fix them?

@sonarqubecloud
Copy link

@JarmouniA
Copy link
Contributor

I'm currently having issues locally trying to compile

west build -p -b bl5340_dvk/nrf5340/cpuapp/ns tests/subsys/debug/assert_custom_header -T debug.assert_custom_header and west build -p -b m5stack_core2/esp32/appcpu tests/subsys/secure_storage/psa/its -T secure_storage.psa.its.secure_storage.store.settings.64-bit_uids

These are failing on the CI. I pushed the code to see if these issues persists. In that case, Should I add another commit or create another PR to fix them?

See #99267 (comment)

the Assert failure is already addressed in main I believe #100769, and the PSA one as well #100835

@NickIOT72
Copy link
Contributor Author

@JarmouniA it worked, all checks have passed

Copy link
Contributor

@JarmouniA JarmouniA left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area: Boards/SoCs area: Devicetree Bindings area: Display area: Shields Shields (add-on boards) area: Tests Issues related to a particular existing or missing test platform: Renesas SmartBond Renesas Electronics Corporation, SmartBond platform: Seeed Studio Seeed Studio platforms platform: STM32 ST Micro STM32 Release Notes To be mentioned in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

driver: display: issues with ili9341 configuration

4 participants