Skip to content

Commit b442b0b

Browse files
KATE-WANG-NXPkartben
authored andcommitted
drivers: mipi_dbi: Add defines for color coding
Add defines for color coding of DBI Type A(Motorola 6800) and B(Intel 8080) bus. This is to comply with the MIPI Alliance Standard for Display Bus Interface v2.0. Signed-off-by: Kate Wang <[email protected]>
1 parent 058a162 commit b442b0b

File tree

1 file changed

+49
-1
lines changed

1 file changed

+49
-1
lines changed

include/zephyr/dt-bindings/mipi_dbi/mipi_dbi.h

Lines changed: 49 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/*
2-
* Copyright 2024 NXP
2+
* Copyright 2024,2025 NXP
33
*
44
* SPDX-License-Identifier: Apache-2.0
55
*/
@@ -110,6 +110,54 @@
110110
#define MIPI_DBI_MODE_8080_BUS_9_BIT 0x7
111111
#define MIPI_DBI_MODE_8080_BUS_8_BIT 0x8
112112

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+
113161
/** MIPI DBI tearing enable synchronization is disabled. */
114162
#define MIPI_DBI_TE_NO_EDGE 0x0
115163

0 commit comments

Comments
 (0)