-
Notifications
You must be signed in to change notification settings - Fork 8.3k
drivers: mipi_dbi: nxp_lcdic: add support for 8080 mode #77577
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
fabiobaltieri
merged 6 commits into
zephyrproject-rtos:main
from
nxp-upstream:feature/rw612-8080
Oct 4, 2024
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
062564d
shields: lcd_par_s035: rename nxp_flexio_lcd to zephyr_mipi_dbi_parallel
danieldegrasse e6e42df
drivers: display: st7796s: respect rgb_is_inverted in 8080 8 bit mode
danieldegrasse d38a58a
drivers: mipi_dbi: nxp_lcdic: add support for 8080 mode
danieldegrasse b6c071d
boards: shields: lcd_par_s035: enable reset gpio within input module
danieldegrasse dbf8359
boards: nxp: rd_rw612_bga: enable with LCD_PAR_S035 shield
danieldegrasse 7a3586c
boards: nxp: rd_rw612_bga: add display support documentation
danieldegrasse File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,95 @@ | ||
| /* | ||
| * Copyright 2024 NXP | ||
| * | ||
| * SPDX-License-Identifier: Apache-2.0 | ||
| */ | ||
|
|
||
| #include <zephyr/dt-bindings/mipi_dbi/mipi_dbi.h> | ||
|
|
||
| /* | ||
| * To use this board with this display, perform the following modifications: | ||
| * - Depopulate resistors R78, R604, R598, R15, R245, R243, R11, R20, R237, | ||
| * R235, R431, R447, R420, R459, R485, and R486 | ||
| * - Populate resistors R286, R19, R246, R242, R123, R239, R124, R125, R236, | ||
| * R233, and R12 | ||
| * - Remove jumper JP30 | ||
| * - Set jumper JP40 to postion 1-2, JP38 to 1-2, and JP16 to position 2-3 | ||
| */ | ||
|
|
||
| /* | ||
| * To connect the display configure SW1 on the display to | ||
| * ON-ON-OFF (8 bit 8080 mode), and connect the following pins | ||
| * | Board Pin | Display Pin | Function | | ||
| * |-----------|-------------|----------| | ||
| * | HD2.8 | D0 | D[0] | | ||
| * | HD2.16 | D1 | D[1] | | ||
| * | J5.2 | TE | TE | | ||
| * | J5.4 | D2 | D[2] | | ||
| * | J5.1 | D3 | D[3] | | ||
| * | J5.6 | RD | RDX | | ||
| * | J5.3 | D4 | D[4] | | ||
| * | HD2.7 | D5 | D[5] | | ||
| * | HD2.6 | D6 | D[6] | | ||
| * | HD2.1 | D7 | D[7] | | ||
| * | HD2.2 | WR | WR | | ||
| * | HD8.1 | CS | CS | | ||
| * | HD8.2 | D/C | DC | | ||
| * | J13.8 | GND | GND | | ||
| * | J13.7 | VDD | 3V3 | | ||
| * | J5.10 | SCL | IC2_SCL | | ||
| * | J5.9 | SDA | IC2_SDA | | ||
| * | HD2.4 | INT | INT | | ||
| * | HD2.5 | RST | RESET | | ||
| */ | ||
|
|
||
| /* Expand the LCDIC pinmux to cover all 8080 mode pins */ | ||
| &pinmux_lcdic { | ||
| group0 { | ||
| pinmux = <IO_MUX_LCD_8080_IO42>, | ||
| <IO_MUX_LCD_8080_IO43>, | ||
| <IO_MUX_LCD_8080_IO44>, | ||
| <IO_MUX_LCD_8080_IO45>, | ||
| <IO_MUX_LCD_8080_IO46>, | ||
| <IO_MUX_LCD_8080_IO47>, | ||
| <IO_MUX_LCD_8080_IO48>, | ||
| <IO_MUX_LCD_8080_IO49>, | ||
| <IO_MUX_LCD_8080_IO51>, | ||
| <IO_MUX_LCD_8080_IO52>, | ||
| <IO_MUX_LCD_8080_IO53>, | ||
| <IO_MUX_LCD_8080_IO54>, | ||
| <IO_MUX_LCD_8080_IO56>, | ||
| <IO_MUX_LCD_8080_IO57>; | ||
| slew-rate = "ultra"; | ||
| }; | ||
| }; | ||
|
|
||
| &st7796s { | ||
| mipi-mode = <MIPI_DBI_MODE_8080_BUS_8_BIT>; | ||
| /* | ||
| * Display supports minimum write cycle time of 66ns. This | ||
| * means we can clock the LCDIC module at 30MHz, as | ||
| * the minimum write duration will be 2x the module | ||
| * clock. Note that this frequency is too fast for reading | ||
| * from the display module | ||
| */ | ||
| mipi-max-frequency = <30000000>; | ||
| /* | ||
| * Note that this display is *not* buggy- we use rgb-is-inverted | ||
| * as a workaround here to get the display to report an inverted | ||
| * color format. This is because the "nxp,swap-bytes" setting | ||
| * on the LCDIC will apply byte swapping in hardware, so the | ||
| * display should report an inverted color format to account | ||
| * for this. This results in better performance for applications | ||
| * like LVGL, which would otherwise have to swap RGB565 data in | ||
| * software | ||
| */ | ||
| rgb-is-inverted; | ||
| }; | ||
|
|
||
| &lcdic { | ||
| /* Enable byte swapping */ | ||
| nxp,swap-bytes; | ||
| /* Set pulse width for write active and write inactive to min value */ | ||
| nxp,write-active-cycles = <1>; | ||
| nxp,write-inactive-cycles = <1>; | ||
| }; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -3,7 +3,7 @@ | |
|
|
||
| description: | | ||
| NXP LCDIC Controller. This controller implements 8080 and SPI mode MIPI-DBI | ||
| compliant transfers. Only SPI mode is currently supported. | ||
| compliant transfers. | ||
| compatible: "nxp,lcdic" | ||
|
|
||
| include: ["mipi-dbi-controller.yaml", "pinctrl-device.yaml"] | ||
|
|
@@ -23,3 +23,26 @@ properties: | |
| description: | | ||
| Swap bytes while transferring on LCDIC. When set, the LCDIC will send | ||
| the most significant byte first when using multibyte pixel formats. | ||
|
|
||
|
||
| reset-gpios: | ||
| type: phandle-array | ||
| description: | | ||
| Reset GPIO pin. The controller will set this pin to logic high to reset | ||
| the display. If not provided, the LCDIC module's reset pin will be used | ||
| to reset attached displays. | ||
|
|
||
| nxp,write-inactive-cycles: | ||
| type: int | ||
| default: 6 | ||
| description: | | ||
| Set minimum count of write inactive cycles, as a multiple of the module | ||
| clock frequency. This controls the length of the inactive period of the | ||
| WRX signal. Default is IP reset value. Only valid in 8080 mode. | ||
|
|
||
| nxp,write-active-cycles: | ||
| type: int | ||
| default: 6 | ||
| description: | | ||
| Set minimum count of write active cycles, as a multiple of the module | ||
| clock frequency. This controls the length of the active period of the | ||
| WRX signal. Default is IP reset value. Only valid in 8080 mode. | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why is this deleted? might want to mention in commit message
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've added a blurb in the commit message. For anyone interested, the best I can tell this was working because the FRDM-MCXN947 board (previously the only in tree board using this display) was configuring the INT pin for the display in the MIPI-DBI pincontrol node. The pin control setting was such that when the RESET pin for the display (and touch screen) controller is toggled low, the touch screen controller will select the 0x14 alternate I2C address. This workaround wasn't working on the RW612 board, so I opted to properly set initialization order, thereby making sure the GT911 driver is able to pull the reset pin low and set the INT pin properly as needed to get the GT911 IC to select the standard 0x5D I2C address.