|
1 | 1 | /*
|
2 |
| - * Copyright 2024 NXP |
| 2 | + * Copyright 2024,2025 NXP |
3 | 3 | *
|
4 | 4 | * SPDX-License-Identifier: Apache-2.0
|
5 | 5 | */
|
|
110 | 110 | #define MIPI_DBI_MODE_8080_BUS_9_BIT 0x7
|
111 | 111 | #define MIPI_DBI_MODE_8080_BUS_8_BIT 0x8
|
112 | 112 |
|
| 113 | +/** Color coding for MIPI DBI Type A or Type B interface. */ |
| 114 | +/** |
| 115 | + * For 8-bit data bus width, 1 pixel is sent in 1 cycle. For 16-bit data bus width, |
| 116 | + * 2 pixels are sent in 1 cycle. |
| 117 | + */ |
| 118 | +#define MIPI_DBI_MODE_RGB332 (0x1 << 4U) |
| 119 | +/** |
| 120 | + * For 8-bit data bus width, 2 pixels are sent in 3 cycles. For 16-bit data bus width, |
| 121 | + * 1 pixel is sent in 1 cycle, the high 4 bits are not used. |
| 122 | + */ |
| 123 | +#define MIPI_DBI_MODE_RGB444 (0x2 << 4U) |
| 124 | +/** |
| 125 | + * For 8-bit data bus width, 1 pixel is sent in 2 cycles. For 16-bit data bus width, |
| 126 | + * 1 pixel is sent in 1 cycle. |
| 127 | + */ |
| 128 | +#define MIPI_DBI_MODE_RGB565 (0x3 << 4U) |
| 129 | +/** |
| 130 | + * For 8-bit data bus width, MIPI_DBI_MODE_RGB666_1 and MIPI_DBI_MODE_RGB666_2 |
| 131 | + * are the same. 1 pixel is sent in 3 cycles, R component first, and the low 2 |
| 132 | + * bits are not used. |
| 133 | + * For 9-bit data bus width, MIPI_DBI_MODE_RGB666_1 and MIPI_DBI_MODE_RGB666_2 |
| 134 | + * are the same. 1 pixel is sent in 2 cycles. |
| 135 | + * For 16-bit data bus width, MIPI_DBI_MODE_RGB666_1 is option 1, |
| 136 | + * 2 pixels are sent in 3 cycles. The first pixel's R/G/B components are sent in |
| 137 | + * cycle 1 bits 10-15, cycle 1 bits 2-7 and cycle 2 bits 10-15. |
| 138 | + * The second pixel's R/G/B components are sent in cycle 2 bits 2-7, cycle 3 bits |
| 139 | + * 10-15 and cycle 3 bits 2-7. |
| 140 | + * MIPI_DBI_MODE_RGB666_2 is option 2, 1 pixel is sent in 2 cycles. The pixel's |
| 141 | + * R/G/B components are sent in cycle 1 bits 2-7, cycle 2 bits 10-15 and cycle 2 |
| 142 | + * bits 2-7. |
| 143 | + */ |
| 144 | +#define MIPI_DBI_MODE_RGB666_1 (0x4 << 4U) |
| 145 | +#define MIPI_DBI_MODE_RGB666_2 (0x5 << 4U) |
| 146 | +/** |
| 147 | + * For 8-bit data bus width, MIPI_DBI_MODE_RGB666_1 and MIPI_DBI_MODE_RGB666_2 |
| 148 | + * are the same. 1 pixel is sent in 3 cycles, R component first. |
| 149 | + * For 16-bit data bus width, MIPI_DBI_MODE_RGB666_1 is option 1, |
| 150 | + * 2 pixels are sent in 3 cycles. The first pixel's R/G/B components are sent in |
| 151 | + * cycle 1 bits 8-15, cycle 1 bits 0-7 and cycle 2 bits 0-15. |
| 152 | + * The second pixel's R/G/B components are sent in cycle 2 bits 0-7, cycle 3 bits |
| 153 | + * 8-15 and cycle 3 bits 0-7. |
| 154 | + * MIPI_DBI_MODE_RGB666_2 is option 2, 1 pixel is sent in 2 cycles. The pixel's |
| 155 | + * R/G/B components are sent in cycle 1 bits 0-7, cycle 2 bits 8-15 and cycle 2 |
| 156 | + * bits 0-7. |
| 157 | + */ |
| 158 | +#define MIPI_DBI_MODE_RGB888_1 (0x6 << 4U) |
| 159 | +#define MIPI_DBI_MODE_RGB888_2 (0x7 << 4U) |
| 160 | + |
113 | 161 | /** MIPI DBI tearing enable synchronization is disabled. */
|
114 | 162 | #define MIPI_DBI_TE_NO_EDGE 0x0
|
115 | 163 |
|
|
0 commit comments