Skip to content

Conversation

soburi
Copy link
Owner

@soburi soburi commented Sep 20, 2025

Summary

  • register the ili9342c panel under a zephyr,mipi-dbi-spi controller and advertise half-duplex three-wire operation
  • wire the display alias to the panel and add the required MIPI DBI and SPI binding includes
  • enable CONFIG_MIPI_DBI_SPI_3WIRE in the CoreS3 defconfig so the driver builds with three-wire support

Testing

  • cmake -B build/m5stack_lvgl -S samples/subsys/display/lvgl -DBOARD=m5stack_cores3/esp32s3/procpu (fails: Zephyr SDK not installed in container)

https://chatgpt.com/codex/tasks/task_e_68ce4f98bbc083229f56753a621368ac

Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

Codex Review: Here are some suggestions.

Reply with @codex fix comments to fix any unresolved comments.

About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you open a pull request for review, mark a draft as ready, or comment "@codex review". If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex fix this CI failure" or "@codex address that feedback".

Comment on lines 47 to 61
mipi_dbi {
compatible = "zephyr,mipi-dbi-spi";
spi-dev = <&spi2>;
write-only;
status = "okay";
#address-cells = <1>;
#size-cells = <0>;

ili9342c: ili9342c@0 {
compatible = "ilitek,ili9342c";
reg = <0>;
status = "okay";
mipi-max-frequency = <20000000>;
duplex = <SPI_HALF_DUPLEX>;
mipi-mode = "MIPI_DBI_MODE_SPI_3WIRE";

Choose a reason for hiding this comment

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

[P1] Configure 3-wire DBI SPI to use 9-bit words

The new ili9342c panel is registered in three-wire MIPI DBI mode, but no SPI word-size change accompanies it. drivers/mipi_dbi/mipi_dbi_spi.c explicitly rejects 3‑wire transfers unless the SPI config uses 9-bit words (SPI_WORD_SET(9)), otherwise mipi_dbi_spi_write_helper_3wire() returns -ENOTSUP and the display never initializes. The ILI9xxx driver hard-codes SPI_WORD_SET(8) when building the configuration, so this DTS addition will always hit that failure path. The node needs to specify a 9-bit SPI operation (e.g., via a custom driver configuration or board override) before enabling 3-wire mode.

Useful? React with 👍 / 👎.

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

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant