Timeline
Timeline
2026-02-17
init
This article introduces the basic hardware knowledge related to Linux LCD driver development, outlines the principles of liquid crystal displays and their differences from CRT and OLED, compares in detail the characteristics and application scenarios of LCD panel technologies such as TFT, TN, IPS, VA, and SLCD, and explains the basic concepts of pixels and resolution.
Linux Driver Notes
| Table of Contents | Links |
|---|---|
| 1. Linux Driver Framework | |
| 2. Linux Driver Loading Logic | |
| 3. Character Device Basics | |
| 4. Concurrency and Competition | |
| 5. Advanced Character Device Progression | |
| 6. Interrupts | |
| 7. Platform Bus | |
| 8. Device Tree | |
| 9. Device Model | |
| 10. Hot Plug | |
| 11. pinctrl Subsystem | |
| 12. gpio Subsystem | |
| 13. Input Subsystem | |
| 14. Single Bus | |
| 15. I2C | |
| 16. SPI | |
| 17. UART | |
| 18. PWM | |
| 19. RTC | |
| 20. Watchdog | |
| 21. CAN | |
| 22. Network Device | |
| 23. ADC | |
| 24. IIO | |
| 25. USB | |
| 26. LCD |
Introduction to LCD
Overview of LCD
LCD stands for Liquid Crystal Display.
Liquid crystal is a special substance between solid and liquid. Under the influence of an electric field, the arrangement of liquid crystal molecules changes, thereby affecting its optical properties.
LCD is also one of the commonly used peripherals. It can display images and interfaces, and with touch or a mouse, it enables human-computer interaction. For example, common computer screens and phone screens in daily life all feature LCD.
Before the popularity of LCD monitors, CRT monitors were the mainstream display devices, commonly known as ‘big-head’ monitors.
This type of monitor is rarely seen today. CRT stands for ‘Cathode Ray Tube’, which uses cathode ray tube technology to display images.
A CRT monitor mainly consists of five key components:
- Electron Gun for emitting electron beams
- Deflection Coils for controlling the direction of the electron beam
- Shadow Mask for precisely focusing the electron beam
- Graphite electrode providing high-voltage support
- And the phosphor layer coated on the inner wall of the screen and the glass shell.
These components work together to convert electronic signals into visible images.
In addition to LCD, more advanced OLED screens have emerged today. For example, many flagship phones now use OLED screens.
OLED stands for ‘Organic Light-Emitting Diode,’ and its display principle differs from traditional LCD:
OLED does not require a backlight; instead, it uses a very thin coating of organic materials and a glass substrate (or flexible substrate). When current passes through, these organic materials emit light on their own.
LCD Panel
LCD can be subdivided into TFT, TN, IPS, VA, and SLCD, each representing different liquid crystal panel technologies. These technologies have their own unique characteristics and application scenarios. The specific description of each technology is as follows:
| Technology Name | Full Name | Description |
|---|---|---|
| TFT | Thin Film Transistor | TFT displays are the mainstream display devices for various laptops and desktop computers. Each liquid crystal pixel is driven by a thin-film transistor integrated behind the pixel, making it an active matrix liquid crystal display device. TFT displays offer advantages such as high responsiveness, high brightness, and high contrast, with display quality close to that of CRT monitors, making them one of the high-end products among LCD color displays. |
| TN | Twisted Nematic | TN panels are entry-level liquid crystal panels, widely used in mid-to-low-end LCD monitors due to their low production cost. Although their performance is basic, their low cost makes them one of the mainstream choices in the market. |
| IPS | In-Plane Switching | IPS technology, developed by Hitachi in 1996, is a wide-viewing-angle liquid crystal display technology. Compared to TN screens, IPS effectively improves color shift issues when viewing from different angles and is widely used in the manufacturing of LCD TVs and tablet computers, providing superior display quality. |
| VA | Vertical Alignment | VA panels are a liquid crystal panel technology that balances the advantages of TN and IPS, offering high contrast and good color performance at a moderate price. Their drawback is slower response time, and they are typically used in mid-to-high-end monitors and scenarios with certain image quality requirements, such as home theater displays. |
| SLCD | Splice Liquid Crystal Display | SLCD is a high-end derivative of LCD, using industrial-grade liquid crystal panels with a lifespan of up to 60,000 hours. It can be used as a standalone display or spliced into a large screen, serving as a complete splicing display unit suitable for high-end display needs. |
IPS, VA, and TN panels each have their own advantages and disadvantages.
- In terms of color and color accuracy, IPS performs best, followed by VA, and then TN;
- In terms of response time, TN panels are the fastest, followed by IPS, with VA being the slowest;
- In terms of viewing angles, IPS performs best, followed by VA, with TN being the worst;
- In terms of contrast, VA panels are the strongest, IPS is in the middle, and TN is the weakest.
Overall, different panel types have their own characteristics across various indicators, and the appropriate panel can be chosen based on needs.
Pixel
Using the control principle of liquid crystals, a display structure can be designed to adjust the output intensity of the three colors: red, green, and blue. Combining these three display structures into a single display unit, by precisely controlling the brightness of each color, the unit can present different colors. Such a display unit is called a ‘pixel’.
Therefore, a pixel can be likened to a small RGB light, and since RGB are the three primary colors of light, they can be mixed to produce any color.
Resolution
If a screen has a resolution of 1920x1080, then there are 1920x1080=2,073,600 pixels in total. So resolution is the number of pixels that make up the screen.
Generally speaking, the higher the resolution, the better the display effect, but resolution is not the only criterion. Screen brightness, color accuracy, and viewing angle are also important parameters that affect the display quality.

For example, in the image above, the horizontal axis is X and the vertical axis is Y. If it represents a 1920x1080 resolution screen, then there are 1920 pixels in the X-axis direction and 1080 pixels in the Y-axis direction. It can be seen that the higher the resolution, the better the screen display effect. It is an important parameter for measuring screen display quality.
Pixel Format
A pixel is similar to a small RGB light, and RGB are the three primary colors of light that can form any color. So by controlling the brightness of these three colors, any color can be displayed. How then do we control the brightness of the RGB colors?
The three RGB colors generally use 8-bit data each, so a pixel is 8 bits x 3 = 24 bits. This pixel format is called RGB888. It can displaycolors.
Besides the RGB888 pixel format, there are also RGB565, RGB666, etc. Namely:
- RGB565: R-5bit, G-6bit, B-5bit, can displaycolors.
- RGB555: R-5bit, G-5bit, B-5bit, can displaycolors.
Does that mean a screen with a larger pixel format is better?
Suppose there is a screen with a resolution of 1920x1080. If a 24-bit pixel format is used, the required bandwidth is 1920x1080x24, but if a 16-bit pixel format is used, the required bandwidth is 1920x1080x16. It can be seen that:
The larger the pixel format, the greater the required bandwidth, so the choice of pixel format is limited by interface bandwidth, processor capability, etc.
PPI
PPI stands for Pixels Per Inch, indicating the number of pixels per inch. The PPI calculation formula is as follows:
From the calculation formula, it can be seen that when calculating screen PPI, the diagonal length in inches is used as the unit of measurement.
For example, a 10-inch screen with a resolution of 2400x1080 has a calculated PPI of 263, while a screen with the same resolution but 8 inches in size has a calculated PPI of 329, so the latter naturally has better display detail.
Types of LCD Interfaces
There are many types of LCD interfaces. Common ones in embedded systems include RGB, MIPI, LVDS, and eDP interfaces, while common ones in monitors include DP, HDMI, VGA, etc. A brief introduction to each interface is as follows:
| Interface Name | Description |
|---|---|
| RGB | Parallel digital interface, uses TTL level to transmit red, green, and blue signals, commonly used in early LCD screens and embedded displays. |
| MIPI | High-speed serial digital interface, designed specifically for mobile devices (such as phones/tablets), uses differential signal transmission, features low power consumption, and supports high resolution. |
| LVDS | Low-voltage differential serial digital interface with strong anti-interference capability, widely used in mid-to-high-end screens such as laptops and monitors. |
| EDP | Embedded DisplayPort interface, based on high-speed serial digital transmission with rates far exceeding LVDS, suitable for high-resolution laptops, tablets, and professional monitors. |
| VGA | Analog signal interface, transmitting via RGBHV signals, with strong compatibility but limited resolution, gradually being replaced by digital interfaces. |
| HDMI | Fully digital audio/video interface, supporting high resolution and synchronized audio transmission, widely used in TVs, monitors, and consumer electronics. |
DBI, DPI, and DSI interface categories
DBI, DPI, and DSI interfaces are another classification of screen interfaces by the MIPI Alliance’s Display Working Group (DWG), and they do not conflict with the previously mentioned RGB, MIPI, LVDS, eDP, etc., interfaces.
The DBI interface, also known as MCU interface or 8080 interface, stands for Display Bus Interface. It can transmit control commands and data via a parallel interface, and refresh the screen by updating data in the LCD module’s built-in GRAM.
DPI stands for Display Pixel Interface, which is a parallel interface. For example, the previously mentioned RGB interface can be classified as a DPI interface.
DSI stands for Display Serial Interface, which is a serial interface for image output defined by the MIPI Alliance.
LCD touch screen composition
In embedded development, commonly used LCD screens mostly come with touch functionality, enabling human-machine interaction through touch operations. Note that the LCD and touch screen are two independent components with different functions. The LCD screen is primarily responsible for displaying images and content, while the touch part focuses on detecting user touch input and implementing interactive control.
The LCD screen part is as follows:

LCD touch component:

Some LCDs are a single piece, not composed of two parts as explained above. This is because the LCD and touch panel are bonded together to form a module that can both display content and support touch operations.
Depending on the bonding method, common processes are divided into full lamination and air bonding:
- Full lamination is typically used in consumer products, with the advantage of a thinner module;
- Air bonding, on the other hand, is more often used in industrial scenarios, offering higher reliability and durability.
LCD screens usually require an adapter board to connect to the development board. It is important to note that in the embedded field, there is no unified standard for LCD screen interfaces, and pin assignments may vary between manufacturers. Therefore, when connecting the screen, carefully verify the pin assignments to avoid the risk of damaging the screen, development board, or core board due to mismatched wiring.
Display Controller
Basic Concept of Display Controller
A display controller, also known as LCDC (short for LCD Controller), is primarily responsible for transferring image data from memory to the display device.
With continuous technological development, the functions of display controllers have been enhanced, enabling them to handle simple image operations such as scaling, rotation, and image composition.
The role of a display controller in a processor is similar to that of a graphics card in a computer. When a processor integrates a display controller, it is equivalent to having a built-in graphics module that can directly drive the display to output image signals.
For example, high-performance SoCs such as RK3399, RK3588, and RK3568 all have built-in display controllers, enabling video output without additional hardware.
The framework diagram of a processor with an integrated display controller is as follows:

In the embedded field, some low-power microcontrollers (such as the STM32 series) typically do not integrate a display controller. If such processors need to output images, they must be connected to an external display module with GRAM to handle graphics processing and display functions.
Framework Diagram of a Processor Without Integrated Display Controller:

Processor architectures without integrated display controllers typically have the following characteristics:
- Graphics processing capability is limited, relying on computing resources provided by external display modules.
- System power consumption and hardware costs are relatively low, suitable for scenarios with high requirements for energy efficiency and economy.
- Mainly applied in fields with basic display needs such as industrial control and sensor panels.
Introduction to VOP
In Rockchip’s series of SoCs, the display controller is called VOP (Video Output Processor). Currently, there are two VOP architectures in Rockchip processors: VOP1 and VOP2.
The difference between the two is mainly reflected in the way they support multi-screen display. Typically, a single VOP can only drive one screen for independent display at a time. To achieve multi-screen display, multiple VOPs need to work together.
VOP1
VOP1 adopts this traditional approach to support multi-screen display (a single VOP can only drive one screen for independent display at a time). The functional diagram of the VOP1 architecture is shown below:

For example, the display controller built into the RK3399 processor is of type VOP1. The description of VOP in the RK3399 processor’s TRM manual is as follows:
In the RK3399 processor, two VOP modules are integrated, called VOP_BIG and VOP_LIT. Therefore, the RK3399 can support up to two screens displaying simultaneously.
VOP2
In contrast, the VOP2 architecture includes only one VOP module in the processor, but designs multiple independent VP (Video Port) output interfaces at its backend. These VP interfaces can work independently at the same time, enabling multiple display outputs. That is,The display capability of VOP2 depends on the number of VPsThe number of VPs determines how many simultaneous displays (same or different content) can be supported. The functional diagram of the VOP2 architecture is shown below:

Taking the RK3568 processor as an example, its Technical Reference Manual (TRM) describes VOP2 as follows:

VOP2 is a display interface module that connects the memory frame buffer to the display device. It connects to the AHB bus via an AHB Slave interface for register configuration, and to the AXI bus via an AXI Master interface for reading display frame data.
Therefore, the RK3568 processor supports up to 3 screens with same or different content. Each VP of the RK3568 processor supports LCD screens with different interfaces, as shown in the following diagram:

Among them, VP0 and VP1 both support output via MIPI0, MIPI1, eDP, and HDMI interfaces, while VP2 supports output via LVDS and RGB interfaces. This diverse interface configuration enables the RK3568 to adapt to various display devices, fully demonstrating its flexibility in LCD interface design.
It should be noted that each VP can only support one display interface output at a time. For example, if VP1 is configured for LVDS output, it cannot be used for HDMI output simultaneously. Additionally, the maximum resolution capabilities of different VP interfaces vary. The maximum resolution support for each VP interface is as follows:
| VOP Channel | Max Resolution @ Refresh Rate | Supported Interfaces and Corresponding Resolutions @ Refresh Rate |
|---|---|---|
| VP0 | 4096×2304@60Hz | - HDMI: 4096×2160@60Hz - eDP: 2560×1600@60Hz - MIPI: 1920×1080@60Hz (Single Channel) - MIPI: 2048×1536@60Hz (Dual Channel) |
| VP1 | 1920×1080@60Hz | - HDMI: 1920×1080@60Hz - eDP: 1920×1080@60Hz - MIPI: 1920×1080@60Hz (Single Channel) - LVDS: 1280×800@60Hz |
| VP2 | 1920×1080@60Hz | - LVDS: 1280×800@60Hz - RGB: 1920×1080@60Hz |
Connector-mirror Technology
The RK3568 chip has three independent video processing units (VPs), so under the most basic conditions, the RK3568 supports three display outputs. If more simultaneous outputs are needed, expansion can be achieved using connector-mirror technology.
For example, the RK3588, based on four VOPs and combined with connector-mirror technology, can achieve application scenarios with seven simultaneous display signal outputs.

The diagram above uses connector-mirror technology to connect two HDMI/eDP channels to VP0, two DP channels to VP1, two MIPI DSI channels to VP2, and VP3 outputs via BT656 and BT1120, thus achieving seven simultaneous outputs.
With the above configuration, the system can output up to 7 display signals simultaneously, but these signals are actually realized through 4 independent display paths. It should be noted thatthe display timing and content output by each group (i.e., two display interfaces on the same Video Port) are exactly the same。
In this application mode, the maximum resolution of each display pathis limited by the maximum resolution support capability of the corresponding Video Port and the connected display interface. This feature can be enabled through DTS (Device Tree Source) configuration. In the DTS file, simply mount two display interfaces under the same Video Port to complete the configuration.
Currently, this feature is only supported in the NVR SDK, while Android does not yet support it.
VOP-split technology
The VOP-Split function is a technology similar to MIPI dual-channel mode, which can split the output of one Video Port horizontally into left and right parts, thereby driving two display interfaces simultaneously. In this mode, the display timing of the two interfaces remains consistent, but they can output independent content.
It should be noted that this function currently only supports hardware platforms based on the VOP2 architecture. By using the VOP-Split function, more efficient display expansion capabilities can be achieved. The application diagram for expansion using the VOP-Split function is shown below:

After enabling Split mode on VP0, the output of VP0 can simultaneously drive two display interfaces (e.g., HDMI0/1, eDP0/1, or other display interfaces connected to VP0). The content displayed on these two interfaces is the result of horizontally splitting the VP0 output image into left and right halves.
For example, if VP0 outputs at a resolution of 3840x1080, each display interface will show a 1920x1080 image respectively.
It should be noted that in Split mode, the two display interfaces involved in output on the same VP must maintain the same display timing and frame rate.
Glossary
| Term | Explanation |
|---|---|
| Encoder | An encoder that converts the image signal output by the display controller into a digital signal, such as HDMI, MIPI, etc. |
| Connector | A connector that transmits the signal output by the encoder to the display and establishes a connection with the display. |
| Bridge | A bridge device, generally referring to a conversion chip, such as RGB to HDMI. |
| Panel | Generally refers to a specific display screen. |
| Plane | Layer, the output image is composed of multiple layers superimposed, such as a main layer, cursor layer, etc. |
| GEM | Full name is generic DRM memory-management, which manages the video memory used by DRM, including dumb, prime, fence. |
| Framebuffer | Frame buffer, which is a cache (memory) after Linux abstracts the video memory. The purpose is to provide a set of interfaces at the application layer to directly operate the screen without caring about the specific details such as the location of the physical video memory and the page swapping mechanism. The Framebuffer device file is generally/dev/fb*。 |
LCD Timing
Glossary
| Signal | Full Name | Function |
|---|---|---|
| HSYNC | Horizontal Sync | Controls the horizontal scanning synchronization signal to ensure correct alignment of each row of pixels. |
| HPW | Horizontal Low Pulse Width | Defines the electronic pulse width of the horizontal synchronization signal. |
| HSA | Horizontal Sync Active | Indicates the time period during which the horizontal synchronization signal is in an active state. |
| HSS | Horizontal Sync Start | Indicates the start position of the horizontal synchronization signal. |
| HSE | Horizontal Sync End | Indicates the end position of the horizontal synchronization signal. |
| HBP | Horizontal Back Porch | The blanking interval between the end of the horizontal synchronization signal and the start of the active pixel area. |
| HFP | Horizontal Front Porch | The blanking interval between the end of the active pixel area and the start of the next horizontal synchronization signal. |
| HACT | Horizontal Active | Defines the width of the active pixel area in the horizontal direction of the screen. |
| VSYNC | Vertical Sync | Controls the vertical scanning synchronization signal to ensure correct alignment of each frame. |
| VPW | Vertical Low Pulse Width | Defines the low-level pulse width of the vertical synchronization signal. |
| VSA | Vertical Sync Active | Indicates the time period during which the vertical synchronization signal is in an active state. |
| VSS | Vertical Sync Start | Indicates the start position of the vertical synchronization signal. |
| VSE | Vertical Sync End | Indicates the end position of the vertical synchronization signal. |
| VBP | Vertical Back Porch | The blank interval from the end of the vertical sync signal to the start of the active pixel area. |
| VACT | Vertical Active | Defines the height of the active pixel area in the vertical direction of the screen. |
| VFP | Vertical Front Porch | The blank interval from the end of the active pixel area to the start of the next vertical sync signal. |
In some materials, certain terms have alternative names:
| Full Name | Alternative Names |
|---|---|
| HBP (Horizontal Back Porch) | left_margin |
| HFP (Horizontal Front Porch) | right_margin |
| VBP (Vertical Back Porch) | upper_margin |
| VFP (Vertical Front Porch) | lower_margin |
| HPW (HSYNC pulse width) | hsync_len |
| VPW (VSYNC pulse width) | vsync_len |
Timing
Linux abstracts the timing parameters of LCD, i.e., the timing. In the kernel source code:Documentation/fb/framebuffer.rstYou can find the abstract diagram of Linux’s LCD timing, as shown in the figure below.
1 | +----------+---------------------------------------------+----------+-------+ |
The figure shows a physical device where the ‘electron gun’ draws each pixel row by row and pixel by pixel in order from left to right and top to bottom. The entire frame is fully displayed only after the last pixel is drawn. This process is illustrated in the figure below:

The process of the ‘electron gun’ drawing a frame is completed by scanning line by line in a zigzag pattern. Each line is drawn from left to right, then returns to the start of the next line until the entire frame is drawn.
During this process:
- HSYNC (Horizontal Sync Signal) is used to indicate the start of drawing a new line, so it appears at the far right of each line;
- VSYNC (Vertical Sync Signal) indicates the start of a new frame and appears at the bottom of the entire frame.
- In the abstract diagram, the Hactive and Vactive areas represent the actual image display region, while the surrounding HFP (Horizontal Front Porch), HBP (Horizontal Back Porch), VFP (Vertical Front Porch), and VBP (Vertical Back Porch) together form the so-called “black borders.” Their purpose is to allow time for signal switching and electron gun retrace.
The specific explanations are as follows:
- HFP (Horizontal Front Porch): After the current line is drawn, the electron gun turns off and waits for the time before the next HSYNC signal is generated.
- HSYNC: Indicates the start of horizontal retrace, where the electron gun jumps back to the beginning of the next line.
- HBP (Horizontal Back Porch): The waiting time from the end of the HSYNC signal to when the electron gun turns back on to start drawing a new line.
- VFP (Vertical Front Porch): After the entire frame is drawn, the electron gun turns off and waits for the time before the VSYNC signal is generated.
- VSYNC: Indicates the start of vertical retrace, where the electron gun returns to the top-left corner of the screen to prepare for drawing a new frame.
- VBP (Vertical Back Porch): The waiting time from the end of the VSYNC signal to when the electron gun turns back on to start drawing a new frame.
Although these “black border” areas do not participate in actual image display, they are crucial for maintaining image stability and synchronization. The abstract diagram is shown below:

The “electron gun” was common in CRT monitors, but CRT monitors are now obsolete. LCDs do not have an “electron gun.” Instead, chips are used to replace the “electron gun” to control the timing of the LCD.
LCD Timing Example
Here, the LCD timing diagram from the 4412 processor datasheet is used as an example for parameter analysis.

HSYNC: Horizontal scanning synchronization signal, also called line sync signal. This signal indicates the start of scanning a new line. In the diagram above, the HSYNC signal is active high.
HSPW: HSYNC signal width. Also called thp in some LCD datasheets.
HBP/HBPD: The time from the end of the HSYNC signal to the start of the next valid data. Also called thb in some LCD datasheets, and referred to as the horizontal sync back porch by some engineers.
HFP/HFPD: The waiting time from the end of one line of valid data to the generation of the HSYNC signal. Also called thf in some LCD datasheets, and referred to as the horizontal sync front porch by some engineers.
VCLK: Pixel clock, also called PCLK. The frequency of the pixel clock signal is related to the LCD resolution; the higher the resolution, the higher the pixel clock frequency.
VDEN: Data enable signal, also called DE signal, indicating valid data. In the figure above, it is active high.
HOZVAL: Indicates the time required to scan one line. Also called thd in some LCD datasheets.
VSYNC: Vertical sync signal, also called frame sync signal. This signal indicates the start of a new frame. In the figure above, the HSYNC signal is active high.
VSPW: VSYNC signal width, also called tvp in some LCD datasheets. VBP/VBPD: The time from the end of the VSYNC signal to the start of a new frame. Also called tvb in some LCD datasheets, and referred to as the vertical sync back porch by some engineers.
VFP/VFPD: The time from the end of one frame scan to the generation of the VSYNC signal. Also called tvf in some LCD datasheets, and referred to as the vertical sync front porch by some engineers.
FRAME: The time required to display one frame.
When lighting up the screen, we need to determine the values of these parameters. This can be done by referring to the screen’s datasheet or by consulting the FAE personnel from the screen supplier. Below is a description of these parameters in an LCD screen datasheet.
| Item | Symbol | Min. | Typ. | Max. | Unit | Remark |
|---|---|---|---|---|---|---|
| Horizontal Display Area | thd | - | 1024 | - | DCLK | |
| DCLK Frequency | fclk | 40.8 | 51.2 | 67.2 | MHz | |
| One Horizontal Line | th | 1114 | 1344 | 1400 | DCLK | |
| HS pulse width | thpw | 1 | - | 40 | DCLK | |
| HS Blanking | thb | 160 | 160 | 160 | DCLK | |
| HS Front Porch | thfp | 16 | 160 | 216 | DCLK | |
| Vertical Display Area | tvd | - | 600 | - | TH | |
| VS period time | tv | 624 | 635 | 750 | TH | |
| VS pulse width | tvpw | 1 | - | 20 | TH | |
| VS Blanking | tvb | 23 | 23 | 23 | TH | |
| VS Front Porch | tvfp | 1 | 12 | 127 | TH |
RGB Screen Porting
RGB Interface Introduction
The iTOP-RK3568 core board supports the RGB interface and can connect to an RGB LCD. Note that the base board multiplexes the RGB interface for other functions.
The RGB interface resources of the iTOP-RK3568 core board and their multiplexed functions on the base board are as follows:
| RGB Signal | Corresponding GPIO | Net Label | Baseboard Multiplexing Function |
|---|---|---|---|
| LCDC_D0 | GPIO2_D0_d | PCIE20_CLKREQn_M1 | PCIE2.0 Reference Clock Request |
| LCDC_D1 | GPIO2_D1_d | PCIE20_WAKEn_M1 | PCIE2.0 Wake |
| LCDC_D2 | GPIO2_D2_d | PCIE30X1_CLKREQn_M1/SPI0_CS0_M1 | PCIE3.0 Reference Clock Request / SPI0 CS0 Pin |
| LCDC_D3 | GPIO2_D3_d | PCIE30X1_WAKEn_M1/SPI0_CLK_M1 | PCIE3.0 Wake / SPI CLK Pin |
| LCDC_D4 | GPIO2_D4_d | PCIE30X2_CLKREQn_M1 | PCIE3.0 Reference Clock Request |
| LCDC_D5 | GPIO2_D5_d | PCIE30X2_WAKEn_M1 | PCIE3.0 Wake |
| LCDC_D6 | GPIO2_D6_d | PCIE30X2_PERSTn_M1 | PCIE3.0 Reset |
| LCDC_D7 | GPIO2_D7_d | PCIE30X2_PRSNT_L_GPIO2_D7 | PCIE3.0 Insertion Detection |
| LCDC_CLK | GPIO3_A0_d | PCIE30X1_PRSNT_L_GPIO3_A0/PCIE20_PRSNT_L_GPIO3_A0 | PCIE3.0 Insertion Detection / PCIE2.0 Reset |
| LCDC_D8 | GPIO3_A1_d | PCIE30X1_PERSTn_M1 | PCIE3.0 Reset |
| LCDC_D9 | GPIO3_A2_d | I2S3_MCLK_M0 | I2S3 MCLK Pin |
| LCDC_D10 | GPIO3_A3_d | I2S3_SCLK_M0 | I2S3 SCLK Pin |
| LCDC_D11 | GPIO3_A4_d | I2S3_LRCK_M0 | I2S3 LRCK Pin |
| LCDC_D12 | GPIO3_A5_d | I2S3_SDO_M0/TP_INT_L_GPIO3_A5 | I2S3 SDO Pin / Touch INT Pin |
| LCDC_D13 | GPIO3_A6_d | I2S3_SDI_M0/USB_OTG_PWREN_H_GPIO3_A6 | I2S3 SDI Pin / USB OTG Power Enable Pin |
| LCDC_D14 | GPIO3_A7_d | GMAC1_INT/PMEB_GPIO3_A7 | GMAC1 INT and PMEB Functions |
| LCDC_D15 | GPIO3_B0_d | GMAC1_RSTn_GPIO3_B0 | GMAC1 Reset Pin |
| LCDC_D16 | GPIO3_B1_d | UART4_RX_M1 | UART4 RX Pin |
| LCDC_D17 | GPIO3_B2_d | UART4_TX_M1 | UART4 TX Pin |
| LCDC_D18 | GPIO3_B3_d | I2C5_SCL_M0 | I2C5 SCL Pin |
| LCDC_D19 | GPIO3_B4_d | I2C5_SDA_M0 | I2C5 SDA Pin |
| LCDC_D20 | GPIO3_B5_d | RS485_DIR_GPIO3_B5 | RS485 Input/Output Control Pin |
| LCDC_D21 | GPIO3_B6_d | GPIO3_B6_d | GPIO3_B6 Pin |
| LCDC_D22 | GPIO3_B7_d | GPIO3_B7_d | GPIO3_B7 Pin |
| LCDC_D23 | GPIO3_C0_d | GPIO3_C0_d | GPIO3_C0 Pin |
| LCDC_HSYNC | GPIO3_C1_d | PCIE20_PERSTn_M1 | PCIE2.0 Reset |
| LCDC_VSYNC | GPIO3_C2_d | HP_DET_L_GPIO3_C2 | Headphone plug detection pin |
| LCDC_DEN | GPIO3_C3_d | SPK_CTL_H_GPIO3_C3/5G_RESET | Amplifier control pin / 5G reset pin |
The RGB interface typically requires 28 signal lines, which explains why in baseboard designs, the pins for RGB signals are often multiplexed for other functions. The reason is that if all RGB interface pins are brought out, they would occupy 28 pins, leading to excessive resource consumption.
Among these 28 signal lines, 24 are used to transmit color data, corresponding to the three color signals of red ®, green (G), and blue (B). The specific signal lines are LCD_D0 ~ LCD_D23. The other 4 are control signal lines, including the horizontal sync signal (LCDC_HSYNC), vertical sync signal (LCDC_VSYNC), data enable signal (LCDC_DEN) and pixel clock signal (LCDC_CLK). The specific allocation is shown in the table below:
| Signal line | Function |
|---|---|
| R[7:0] | Red color data line |
| G[7:0] | Green color data line |
| B[7:0] | Blue color data line |
| LCDC_HSYNC | Horizontal sync data line |
| LCDC_VSYNC | Vertical sync data line |
| LCDC_DEN | Data enable data line |
| LCDC_CLK | Pixel clock data line |
In the RGB interface, the 24 color pins correspond to the three colors R, G, and B respectively, with the corresponding signal lines being LCD_D0~LCD_D23. Among these 24 color pins, the 8 pins corresponding to R, the 8 pins corresponding to G, and the 8 pins corresponding to B are described as follows, taking the iTOP-RK3568 core board as an example, according to Rockchip official documentation:

In the RGB interface, the connection method of the signal lines depends on the color format used.
For RGB888 format:
- The core board’s
D0 ~ D7corresponds to the blue channelB0 ~ B7 D8 ~ D15corresponds to the green channelG0 ~ G7D16 ~ D23corresponds to the red channelR0 ~ R7。
- The core board’s
In RGB666 format:
- The lower two bits of the blue, green, and red channels (
B0 ~ B1、G0 ~ G1、R0 ~R1) are not connected, and the remaining signal lines are still connected according to the RGB888 mapping rules.
- The lower two bits of the blue, green, and red channels (
For RGB565 format:
- The lower bits of the blue, green, and red channels (
B0 ~ B2、G0 ~ G1、R0 ~ R2) are not connected, and the remaining signal lines are connected according to the RGB888 mapping rules.
- The lower bits of the blue, green, and red channels (
This flexible connection method can adapt to different color format requirements while optimizing the use of pin resources.
Synchronization Mode
From the previous LCD timing analysis, it is known that the row timing includes HFP (Horizontal Front Porch), HBP (Horizontal Back Porch), and HSYNC (Horizontal Sync Signal), while the column timing includes VFP (Vertical Front Porch), VBP (Vertical Back Porch), and VSYNC (Vertical Sync Signal).
These timing parts do not contain displayable data, so a mechanism is needed between the LCD and the processor to achieve synchronization.
The core function of synchronization isto enable the LCD to recognize the signal state currently sent by the processor, for example, when sending non-display timing such as HFP, the LCD will not display it as valid data; or to notify the LCD that starting from a certain time point, the subsequently transmitted data is valid display data that can be used for screen display.
To achieve this synchronization purpose, there are currently two main methods:
- DE Mode
- HV Mode
DE Mode
Use the DE data line to indicate the start and end of valid data, such as the LCDC_DEN signal line.

When the DE signal goes high, it indicates the start of valid data; when the DE signal goes low, it indicates the end of valid data. Therefore, in DE mode, signal lines such as HSYNC and VSYNC are not needed, making it simpler to use.
HV Mode
In HV mode, the LCD timing is determined by HSYNC (horizontal sync signal) and VSYNC (vertical sync signal), without using the DE (data enable) signal line. Synchronization is entirely accomplished through the HSYNC and VSYNC signals.

Currently, most LCD screens support both HV mode and DE mode. For example, the following screen is compatible with both modes and selects the specific working mode through its 8th pin:
When the 8th pin is at a high level, the screen operates in DE mode;
When the 8th pin is at a low level, it switches to HV mode.
This design provides developers with greater flexibility to choose the appropriate synchronization method based on actual needs.

Hardware Schematic Analysis
The iTOP-RK3568 core board itself brings out the RGB interface, but in the standard baseboard, this interface has been multiplexed for other functions. Therefore, if you need to use the RGB display function, you need to design and manufacture a compatible baseboard yourself.
The following uses the “iTOP-RK3568 core board + Xunwei Electronics 5-inch RGB screen” as an example for explanation. When designing the baseboard, you can refer to the schematic provided below for drawing and connections.

| Function | Pin Number | Function | Pin Number |
|---|---|---|---|
| LCDC_D0 | SPI0_MISO_M1 | LCDC_D14 | GMAC1_INT/PMEB_GPIO3_A7 |
| LCDC_D1 | SPI0_MOSI_M1 | LCDC_D15 | GMAC1_RSTn_GPIO3_B0 |
| LCDC_D2 | SPI0_CS0_M1 | LCDC_D16 | UART4_RX_M1 |
| LCDC_D3 | SPI0_CLK_M1 | LCDC_D17 | UART4_TX_M1 |
| LCDC_D4 | PCIE30X2_CLKREQn_M1 | LCDC_D18 | I2C5_SCL_M0 |
| LCDC_D5 | PCIE30X2_WAKEn_M1 | LCDC_D19 | I2C5_SDA_M0 |
| LCDC_D6 | PCIE30X2_PERSTn_M1 | LCDC_D20 | GPIO3_B5 |
| LCDC_D7 | PCIE30X2_PRSNT_L_GPIO2_D7 | LCDC_D21 | GPIO3_B6 |
| LCDC_D8 | PCIE30X1_PERSTn_M1 | LCDC_D22 | GMAC0_RSTn_GPIO3_B7 |
| LCDC_D9 | I2S3_MCLK_M0 | LCDC_D23 | GMAC0_INT/PMEB_GPIO3_C0 |
| LCDC_D10 | I2S3_SCLK_M0 | LCDC_CLK | PCIE20_PRSNT_L_GPIO3_A0 |
| LCDC_D11 | I2S3_LRCK_M0 | LCDC_HSYNC | PCIE20_PERSTn_M1 |
| LCDC_D12 | TP_INT_L_GPIO3_A5 | LCDC_VSYNC | HP_DET_L_GPIO3_C2 |
| LCDC_D13 | USB_OTG_PWREN_H_GPIO3_A6 | LCDC_DEN | 5G_RESET |
From the table, it can be seen that using the RGB interface involves many pin multiplexing conflicts. Topeet has placed the device tree with configured multiplexing relationships under the path.
Adaptation Steps
To use the RGB interface, VP2 needs to be enabled in the device tree. Since the front end of VP2 is VOP, VOP must be enabled first, then VP2 is enabled to set the RGB display path. The specific configuration steps are as follows:
Configure RGB Display Path
arch/arm64/boot/dts/rockchip/rk3568.dtsi
1 | vop: vop@fe040000 { |
compatibleattribute value isrockchip,rk3568-vop, indicating thatgpu/drm/rockchip/rockchip_vop2_reg.cthis driver.statusThe attribute value is disabled, indicating that this node is disabled, so this node needs to be enabled.- VP0 can support DSI0, DSI1, eDP, and HDMI interfaces.
- VP1 can support DSI0, DSI1, eDP, HDMI, and LVDS interfaces.
- VP1 and VP2 can support LVDS and RGB interfaces.
Then, in thearch/arm64/boot/dts/rockchip/topeet-rk3568-linux.dtsidevice tree, enable the VOP node by appending.
1 | &vop { |
The clock and parent clock topology of VP0, VP1, and VP2 is as follows:
1 | PMUCRU |
After enabling VOP, next set the RGB interface to use the display path output by VP2. Open therk3568.dtsidevice tree file, find the RGB node, the specific content is as follows:
1 | grf: syscon@fdc60000 { |
compatibleThe attribute value isrockchip,rk3568-rgb, indicating that it will usegpu/drm/rockchip/rockchip_rgb.cthis driver.
statusThe attribute value is disabled, indicating that the RGB node is disabled, so we need to enable the RGB node.
rgb_in_vp2Indicates that the RGB interface is connected to VP2,statusThe attribute value disabled indicates that using VP2 to output RGB is prohibited. (The VP port corresponding to the RGB interface, for the RK3568’s RGB interface, needs to use VP2 for output.)
pinctrl-0 = <&lcdc_ctl>;Use the pinctrl subsystem to set the RGB pin multiplexing.lcdc_ctlThe node is in therk3568-pinctrl.dtsidevice tree file. The specific content is as follows:
1 | lcdc { |
topeet_rk3568_lcds.dtsiIn the device tree file, use the following code to set the RGB display path.
1 | &rgb { |
Thus, the display path from VOP to VP2 to the RGB screen is set up.
Set screen information
topeet_rk3568_lcds.dtsiAdd
1 | rgb_panel: panel { |
compatibleThe attribute value issimple-panel, indicating that thegpu/drm/panel/panel-simple.cdriver will be used, which is the generic display driver.
statusThe attribute value is disabled, indicating that the RGB screen represented by this node is prohibited. This attribute needs to be set to okay.
backlightThe attribute indicates the use of&backlightbacklight control node.
power-supply: Optional attribute, indicating the power supply used by the screen.
enable-delay-ms: Optional attribute, the delay from power enable to panel startup.
prepare-delay-ms: Optional attribute, the delay before the panel receives image data.
unprepare-delay-ms: Optional attribute, the waiting time before turning off the panel.
disable-delay-ms: Optional attribute, the delay before panel power-off.
width-mm: Optional attribute, the physical width of the screen
height-mm: Optional attribute, the physical height of the screen
bus-format: Attribute used to configure the pixel format, the attribute value is MEDIA_BUS_FMT_RGB565_1X16 indicates the use of RGB565 format. Attribute value MEDIA_BUS_FMT_RGB666_1X18 indicates the use of RGB666 format. Attribute value MEDIA_BUS_FMT_RGB888_1X24 indicates the use of RGB888 format.
display-timingsNode: This is the LCD timing parameter. For details, please refer to the LCD Timing chapter.
ports: This is the ports node of the screen, where line 40 sets the remote endpoint of the screen torgb_out_panel。
In this way, the RGB interface of the RK3568 is associated with the screen.
Furthermore, becausergb_panelthe node is disabled by default, it is also necessary torgb_panelenable the node. In thetopeet_rk3568_lcds.dtsidevice tree file, add the following code.
1 | &rgb_panel{ |
Setting Backlight
In thergb_panelnode, use thebacklightattribute to reference the backlight control node. The device tree is as follows:
1 | // arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dts |
compatibleThe attribute value ispwm-backlight, indicating the use ofvideo/backlight/pwm_bl.cthis driver.
pwmsThe attribute indicates the PWM channel and frequency used. For example,pwms = <&pwm4 0 2500 0 0>indicates using PWM4 channel 0 with a frequency of 40KHZ (25000 is the period in ns, converted to a frequency of 40KHZ), the last 0 indicates polarity, 0 corresponds to PWM_POLARITY_NORMAL polarity, 1 corresponds to PWM_POLARITY_INVERTED indicates inverted polarity.
brightness-levelsindicates the brightness level, ranging from 0 to 255, where 0 means PWM duty cycle is 0%, and 255 means PWM duty cycle is 100%.
default-brightness-levelThe attribute indicates the default brightness level, which is 220 in this node.
To control the PWM backlight node’s on/off status and PWM frequency, you can add the following code in thearch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file. Modify it by appending.
1 | &backlight { |
Setting up touch
Taking the Xunwei RGB interface 5-inch screen as an example, this screen uses the FT5X touch chip and communicates via I2C5. Open thearch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file and add the following code:
1 | &i2c5 { |
compatibleThe attribute value isedt,edt-ft5306, indicating the use ofinput/touchscreen/edt-ft5x06.cDriver.
regThe attribute value is 0x38, indicating the slave address is 0x38.
touch-gpioThe attribute indicates using GPIO3_B1 pin as the touch interrupt pin. IRQ_TYPE_EDGE_RISING indicates rising edge trigger.
interrupt-parentThe interrupt parent node attribute is gpio3.
interruptsThe attribute indicates using the B1 pin of GPIO, with the trigger mode changed to low-level trigger.
reset-gpioThe attribute indicates using the GPIO3_B2 pin as the reset pin.
touchscreen-size-xIndicates the resolution on the x-axis
touchscreen-size-yIndicates the resolution on the y-axis.
touch_typeThe attribute indicates the touch type
If touch is needed, you can add the following code in thearch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file, by appending
to control the enabling and disabling of the touch node.
1 | &ft5x063 { |
Set screen LOGO
If you need to display the logo during the uboot and kernel stages, you need to enableroute_rgbnode. Note that if the logo is not enabled during the uboot stage, it cannot be displayed during the kernel stage either.
Open therk3568.dtsidevice tree file,route_rgbthe node is defined as follows
1 | display_subsystem: display-subsystem { |
statusattribute is set to disabled, indicating that logo display is prohibited. If you need to display the logo, change the attribute value of this status to okay.
logo,uboot,logo,kernel: Corresponding to the uboot and kernel logos respectively, the logo image format is BMP. When the attribute is left empty or the specified image is not found, the logo will not be displayed.
logo,modeandcharge_logo,modeindicate the logo mode. Two modes are supported: center means centered, and fullscreen means full screen.
connectattribute is used to specify the specific display path.connect = <&vp2_out_rgb>Indicates that RGB uses vp2 output.
If you need to use the logo, you can add the following code inarch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsto enable theroute_rgbnode by appending.
1 | &route_rgb { |
Set the macro switch
The work of lighting up the screen is all focused on configuring the device tree, so the nodes to be operated can be placed in code blocks controlled by conditional compilation to control the opening and closing of a specific screen.
1 |
|
LVDS Screen Porting
Interface Introduction
LVDS stands for Low-Voltage Differential Signaling. LVDS features low power consumption, low bit error rate, low crosstalk, low jitter, low radiation, and good signal integrity. It is widely used in display applications, such as laptop screens and medical device monitors.
In 1994, led by National Semiconductor (NS, now TI), the ANS/TIA/EIA-644 standard was introduced. In 1996, the IEEE 1596.3 standard was also introduced. However, IEEE 1596.3 is rarely used now, and the ANS/TIA/EIA-644 standard is the mainstream. The LVDS interface of the RK3568 processor also adopts this standard, and the relevant content in the datasheet is as follows:

LVDS uses differential signals for data transmission, and its basic working principle is as follows:

There is a current source at the transmitter end that can provide 3.5mA of current. At the receiver input, there is a 100-ohm resistor. Since the internal resistance of the receiver is very high, the current flows back to the transmitter through the 100-ohm resistor, resulting in a 350mV voltage across the termination resistor. By changing the direction of the current, the receiver can determine whether the input signal is positive or negative based on the ±350mV.
The RK3568 processor has one LVDS interface, supporting a maximum resolution of 1280x800@60Hz. The LVDS pins are as follows
| Pin Number | Function |
|---|---|
| MIPI_DSI_TX0_D0P/LVDS_TX0_D0P | MIPI_DSI_TX0_D0P or LVDS_TX0_D0P Pin |
| MIPI_DSI_TX0_D0N/LVDS_TX0_D0N | MIPI_DSI_TX0_D0N or LVDS_TX0_D0N Pin |
| MIPI_DSI_TX0_D1P/LVDS_TX0_D1P | MIPI_DSI_TX0_D1P or LVDS_TX0_D1P Pin |
| MIPI_DSI_TX0_D1N/LVDS_TX0_D1N | MIPI_DSI_TX0_D1N or LVDS_TX0_D1N Pin |
| MIPI_DSI_TX0_D2P/LVDS_TX0_D2P | MIPI_DSI_TX0_D2P or LVDS_TX0_D2P Pin |
| MIPI_DSI_TX0_D2N/LVDS_TX0_D2N | MIPI_DSI_TX0_D2N or LVDS_TX0_D2N Pin |
| MIPI_DSI_TX0_D3P/LVDS_TX0_D3P | MIPI_DSI_TX0_D3P or LVDS_TX0_D3P pin |
| MIPI_DSI_TX0_D3N/LVDS_TX0_D3N | MIPI_DSI_TX0_D3N or LVDS_TX0_D3N pin |
| MIPI_DSI_TX0_CLKP/LVDS_TX0_CLKP | MIPI_DSI_TX0_CLKP or LVDS_TX0_CLKP pin |
| MIPI_DSI_TX0_CLKN/LVDS_TX0_CLKN | MIPI_DSI_TX0_CLKN or LVDS_TX0_CLKN pin |
The LVDS pins can also be multiplexed into one MIPI DSI channel, but on the development board they are multiplexed as LVDS pins.
Introduction to LVDS screens
When selecting an LVDS screen, single 6, single 8, dual 6, and dual 8 indicate different LVDS screen interface methods.
| Type | Transmission method and data bit description |
|---|---|
| Single 6-bit LVDS | Transmits in single-channel mode, with 6-bit data for each primary color signal, totaling 18-bit RGB data. |
| Single 8-bit LVDS | Transmitted in single-channel mode, each primary color signal uses 8-bit data, totaling 24-bit RGB data. |
| Dual 6-bit LVDS | Transmitted in dual-channel mode, each primary color signal uses 6-bit data, with odd-channel data being 18 bits and even-channel data being 18 bits, totaling 36-bit RGB data. |
| Dual 8-bit LVDS | Transmitted in dual-channel mode, each primary color signal uses 8-bit data, with odd-channel data being 24 bits and even-channel data being 24 bits, totaling 48-bit RGB data. |
Comparison of 6-bit and 8-bit LVDS interfaces (taking single-channel as an example)):
| Type | Total number of differential signal lines | Number of data line pairs | Number of clock line pairs | Data line pin names | Clock line pin names |
|---|---|---|---|---|---|
| 6-bit LVDS | 4 pairs | 3 pairs | 1 pair | LVDS_TX0_D0P/D0NLVDS_TX0_D1P/D1NLVDS_TX0_D2P/D2N | LVDS_TX0_CLKP/CLKN |
| 8-bit LVDS | 5 pairs | 4 pairs | 1 pair | LVDS_TX0_D0P/D0NLVDS_TX0_D1P/D1NLVDS_TX0_D2P/D2NLVDS_TX0_D3P/D3N | LVDS_TX0_CLKP/CLKN |
Among them, 6-bit uses 4 pairs of differential signal lines, of which 3 pairs are data lines and 1 pair is a clock line. 8-bit uses 5 pairs of differential signal lines, of which 4 pairs are data lines and 1 pair is a clock line. It is easy to distinguish between 6-bit and 8-bit by the number of differential signal lines. After distinguishing between 6-bit and 8-bit, it is necessary to distinguish between single-channel and dual-channel.
Comparison of Single-Channel and Dual-Channel LVDS:
Single-channel can be understood as having only one LVDS interface, while dual-channel has two LVDS interfaces. Therefore, when distinguishing between 6-bit and 8-bit, the single-channel is taken as an example, because dual-channel only needs to multiply the original by 2.
As the screen resolution increases, the pixel clock also becomes higher. However, the pixel clock cannot increase indefinitely, so the pixels to be output are divided into odd and even pixels in order. Odd pixels are transmitted using one LVDS channel, and even pixels are transmitted using another LVDS channel. Therefore, theoretically, dual-channel LVDS supports higher resolutions.
Case Analysis
10.1-inch LVDS screen interface definition, as shown in the figure below:
| Pin No. | Symbol | I/O | Function | Remark |
|---|---|---|---|---|
| 1 | NC | – | No connection | |
| 2 | VDD | P | Power supply | |
| 3 | VDD | P | Power supply | |
| 4 | NC | – | No connection | |
| 5 | NC | – | No connection | |
| 6 | NC | – | No connection | |
| 7 | GND | P | Power Ground | |
| 8 | Rxin0N | I | -LVDS differential data | |
| 9 | Rxin0P | I | +LVDS differential data | |
| 10 | GND | P | Ground | |
| 11 | Rxin1N | I | -LVDS differential data | |
| 12 | Rxin1P | I | +LVDS differential data | |
| 13 | GND | P | Ground | |
| 14 | Rxin2N | I | -LVDS differential data | |
| 15 | Rxin2P | I | +LVDS differential data | |
| 16 | GND | P | Ground | |
| 17 | RCLKN | I | -LVDS differential clock input | |
| 18 | RCLKP | I | +LVDS differential clock input | |
| 19 | GND | P | Ground | |
| 20 | Rxin3N | I | -LVDS differential data | |
| 21 | Rxin3P | I | +LVDS differential data | |
| 22 | GND | P | Ground | |
| 23 | NC | – | No connection | |
| 24 | NC | – | No connection | |
| 25 | GND | P | Power Ground |
There are a total of five pairs of differential lines: Rxin0N, Rxin0P; Rxin1N, Rxin1P; Rxin2N, Rxin2P; Rxin3N, Rxin3P; RCLKN, RCLKP. Among them, four pairs are data lines and one pair is a clock line, and there is only one LVDS interface, so it is a single 8-bit interface mode.
In addition to the difference in channel count and bit count, LVDS displays have two signal formats: the VESA standard and the JEIDA standard, among which:
VESA: Full name is Video Electronics Standards Association. This organization has established many standards related to video and display peripheral functions.
JEIDA: Full name is Japan Electronic Industry Development Association.
Therefore, when debugging the screen, pay attention to whether the default data format of the LVDS screen uses the VESA standard or the JEIDA standard, so as to determine whether the driver outputs using the VESA standard or the JEIDA standard.
Hardware Schematic Analysis
The iTOP-RK3568 development board has an LVDS interface, and the interface schematic is as follows:

TP_RST_L_GPIO0_B6 is the touch reset pin.
I2C2_SCL_M1 is the I2C2 SCL pin, used for I2C communication with the touch chip._SDA_M1 is the I2C2 SDA pin, used for I2C communication with the touch chip.
TP_INT_L_GPIO3_A5 is the touch interrupt pin.
LCD0_BL_PWM4 is the PWM pin, used to adjust the screen backlight.
MIPI_DSI_TX0_D3N/LVDS_TX0_D3N、MIPI_DSI_TX0_D3P/LVDS_TX0_D3P、MIPI_DSI_TX0_D0N/LVDS_TX0_D0N、MIPI_DSI_TX0_D0P/LVDS_TX0_D0P、MIPI_DSI_TX0_D1N/LVDS_TX0_D1N、MIPI_DSI_TX0_D1P/LVDS_TX0_D1P、
MIPI_DSI_TX0_D2N/LVDS_TX0_D2N、MIPI_DSI_TX0_D2P/LVDS_TX0_D2P、MIPI_DSI_TX0_CLKN/LVDS_TX0_CLKN、MIPI_DSI_TX0_CLKP/LVDS_TX0_CLKP is an LVDS interface pin, directly connected one-to-one to the processor’s LVDS interface.J38 is a jumper cap socket, used to prevent burning the screen and CPU due to incorrect screen connection. After checking the hardware connections, use a jumper cap to connect the power.
Adaptation Steps
Setting the LVDS Display Path
When using the LVDS interface, you can choose VP1 or VP2. VP1 supports not only LVDS output but also MIPI, eDP, and HDMI output. VP2 only supports LVDS and RGB output. If VP1 is used for LVDS signal output, other signals such as MIPI, eDP, and HDMI cannot be used. Therefore, the development board selects VP2, which supports fewer signals, for LVDS output, leaving VP1, which supports more signals, for other options.
Connection relationship between RK3568 VP and each display interface:

Before setting VP2 as the LVDS display path, the VOP node must be enabled first.rk3568.dtsiis defined as follows:
1 | vop: vop@fe040000 { |
After enabling VOP, next set the LVDS interface to use VP2 output for the display path. Open therk3568.dtsidevice tree file and locate the LVDS node.
1 | grf: syscon@fdc60000 { |
compatibleThe attribute value isrockchip,rk3568-lvds, indicating that thegpu/drm/rockchip/rockchip_lvds.cdriver will be used.
phys = <&video_phy0>;: usesvideo_phy0, so we need to enable thevideo_phy0node.
statusThe attribute value isdisabled, indicating that the LVDS node is disabled, so we need to enable the LVDS node.
portsAttribute node: indicates the VP port corresponding to the LVDS interface. For the RK3568 LVDS interface, VP2 must be used for output.
lvds_in_vp2indicates that the LVDS interface is connected to VP2, and the status attribute value of disabled means that using VP2 to output LVDS is prohibited.
You can add the following code in thearch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file to set up the LVDS display path.
1 | &lvds { |
Note that VP1 must be disabled and VP2 enabled to output LVDS.
video_phy0The node is shown in the figure:
1 |
|
Set screen information.
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file.
1 | /{ |
bus-formatThe attribute is used to configure the output format, which must correspond to the format supported by the LVDS screen, where:
- Attribute value MEDIA_BUS_FMT_RGB666_1X7X3_SPWG indicates using JEIDA_6BIT
- Attribute value MEDIA_BUS_FMT_RGB888_1X7X4_SPWG indicates using VESA_8BIT
- Attribute value MEDIA_BUS_FMT_RGB888_1X7X4_JEIDA indicates using JEIDA_8BIT
Set backlight and touch
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsAdd the following code to the device tree file:
1 | / { |
Set screen LOGO
1 | &route_lvds{ |
Set macro switch
1 |
|
MIPI screen porting
MIPI interface introduction
The MIPI Alliance was founded in 2003, jointly initiated by companies such as ARM, Nokia, ST (STMicroelectronics), and TI (Texas Instruments).
MIPI interface, full name isMobile Industry Processor Interface(Mobile Industry Processor Interface) is a series of open standards and specifications developed by the MIPI Alliance. These standards aim to provide a unified interface solution for mobile application processors, standardizing various internal interfaces in mobile phones (such as camera, display, RF/baseband interfaces, etc.), thereby reducing the complexity of phone design.
It should be noted that MIPI does not refer to a single interface or protocol, but rather a system that includes multiple interface standards.
For example:
- MIPI DSI: Used for Display Serial Interface.
- MIPI CSI: Used for Camera Serial Interface.
- MIPI I3C: Used for serial communication interface (improved version of I2C).
- MIPI RFFE: Used for RF Front-End Control Interface.
- MIPI SPMI: Used for System Power Management Interface.
In this chapter, we will focus on MIPI DSI and will not cover other interfaces for now. The schematic diagram of MIPI-related interface usage in mobile devices is shown below.

Introduction to the MIPI DSI interface of the RK3568 processor in the datasheet:

- Supports MIPI v1.2 version
- Supports dual-channel DSI
- Each channel supports 4 data lanes
- Supports a maximum data rate of 2.5Gbps per lane
- Single MIPI mode supports display output up to 1920x1080@60Hz, and dual MIPI mode supports display output up to 2560x1440@60Hz.
- Each color channel supports up to 8-bit depth
For a single-channel MIPI screen, one MIPI interface is sufficient. Connection diagram:

A dual-channel MIPI screen requires two MIPI interfaces. Connection diagram:

RK3568 core board MIPI DSI interface pins
MIPI DSI0 interface:
| Pin | Function |
|---|---|
| MIPI_DSI_TX0_D0P/LVDS_TX0_D0P | MIPI DSI TX0 D0P pin or LVDS TX0 D0P pin |
| MIPI_DSI_TX0_D0N/LVDS_TX0_D0N | MIPI DSI TX0 D0N pin or LVDS TX0 D0N pin |
| MIPI_DSI_TX0_D1P/LVDS_TX0_D1P | MIPI DSI TX0 D1P pin or LVDS TX0 D1P pin |
| MIPI_DSI_TX0_D1N/LVDS_TX0_D1N | MIPI DSI TX0 D1N pin or LVDS TX0 D1N pin |
| MIPI_DSI_TX0_D2P/LVDS_TX0_D2P | MIPI DSI TX0 D2P pin or LVDS TX0 D2P pin |
| MIPI_DSI_TX0_D2N/LVDS_TX0_D2N | MIPI DSI TX0 D2N pin or LVDS TX0 D2N pin |
| MIPI_DSI_TX0_D3P/LVDS_TX0_D3P | MIPI DSI TX0 D3P pin or LVDS TX0 D3P pin |
| MIPI_DSI_TX0_D3N/LVDS_TX0_D3N | MIPI DSI TX0 D3N pin or LVDS TX0 D3N pin |
| MIPI_DSI_TX0_CLKP/LVDS_TX0_CLKP | MIPI DSI TX0 CLKP pin or LVDS TX0 CLKP pin |
| MIPI_DSI_TX0_CLKN/LVDS_TX0_CLKN | MIPI DSI TX0 CLKN pin or LVDS TX0 CLKN pin |
The MIPI DSI0 interface and LVDS0 interface share a multiplexing relationship. On the iTOP-RK3568 development board, this interface is multiplexed as an LVDS interface.
MIPI DSI1 interface:
| Pin | Function |
|---|---|
| MIPI_DSI_TX1_D0P | MIPI DSI TX1 D0P pin |
| MIPI_DSI_TX1_D0N | MIPI DSI TX1 D0N pin |
| MIPI_DSI_TX1_D1P | MIPI DSI TX1 D1P pin |
| MIPI_DSI_TX1_D1N | MIPI DSI TX1 D1N pin |
| MIPI_DSI_TX1_D2P | MIPI DSI TX1 D2P pin |
| MIPI_DSI_TX1_D2N | MIPI DSI TX1 D2N pin |
| MIPI_DSI_TX1_D3P | MIPI DSI TX1 D3P pin |
| MIPI_DSI_TX1_D3N | MIPI DSI TX1 D3N Pin |
| MIPI_DSI_TX1_CLKP | MIPI DSI TX1 CLKP Pin |
| MIPI_DSI_TX1_CLKN | MIPI DSI TX1 CLKN Pin |
Introduction to MIPI Protocol
lane
In the hardware connection block diagram of the MIPI protocol specification, the term ‘lane’ is mentioned. Lane can be understood as a channel. For example, 2 lanes can be understood as 2 channels, each channel having 2 differential data lines. For instance, MIPI_DSI_TX1_D0P and MIPI_DSI_TX1_A pair of data pins, D0N, can be considered as 1 lane, i.e., 1 channel. In the MIPI chapter, lane and channel are not distinguished and have the same meaning.

The above block diagram tells us that we can use 1/2/3/4 lanes and a pair of clock lines for data transmission. For the MIPI interface of the RK3568 core board, 4 lanes are used for data transmission.
The above figure also tells us that in LP (Low-Power) mode, only Lane0 is used for transmission, and bidirectional transmission is possible. In HS (High-Speed) mode, only unidirectional transmission is possible.
Let’s look at the framework diagram of a single lane:

A channel may contain an HS-TX, an HS-RX, or both.
In a single channel, HS-TX and HS-RX are not enabled simultaneously during normal operation, so for HS (High-Speed) mode, it is unidirectional transmission.
If the High-Speed function in a channel is not enabled, this function should be placed in a high-impedance state.
The Low-Power Contention Detector (LP-CD) function is only used for bidirectional operation. The Low-Power Contention Detector function is enabled when the low-power transmitter drives a low-power state to detect contention.
Signal Level
In LP (Low-Power) mode, only Lane0 is used for transmission, employing single-ended signals with a signal level ranging from 0 to 1.2V.
In HS (High-Speed) mode, differential signals are used for transmission. When P is higher than N, it is defined as 1; when P is lower than N, it is defined as 0. The typical voltage on the differential line is 200mV differential.

In the figure above, the blue solid line represents the signal waveform in LP (Low-Power) mode, and the red solid line represents the signal waveform in HS (High-Speed) mode.
Channel State
In HS (High-Speed) mode, differential signals are used. When P is higher than N, it is defined as 1, called HS-1; when P is lower than N, it is defined as 0, called HS-0. Therefore, in HS (High-Speed) mode, there are two states: HS-1 and HS-0.
In LP (Low-Power) mode, single-ended signals are used, so there are four states: 00, 01, 10, and 11, respectively called LP-00, LP-01, LP-10, and LP-11.

Three Operating Modes
The lanes are:
- Control Mode
- High-Speed Mode
- Escape Mode
There are three operating modes: High-Speed mode operates in HS (High-Speed) mode, while Control mode and Escape mode operate in LP (Low-Power) mode.
These three working modes can be switched between each other. The control mode operates in LP (Low-Power) mode, so there are four states: LP-00, LP-01, LP-10, and LP-11. In the MIPI protocol, different timings composed of the four states of the control mode are used to represent entering or exiting a certain mode. For example, LP11-LP01-LP00 indicates entering high-speed mode.
According to the MIPI protocol specification, the process of entering and exiting different modes is as follows:
- Each mode must start from the Stop State (LP-11).
- Direct switching between High-speed mode and Escape mode is not allowed; it must be mediated through Control mode, i.e.:
- High-speed mode ↔ Control Mode ↔ Escape mode.
- Process of entering and exiting Escape mode:
- Request:LP-11→LP-10→LP-00→LP-01→LP-00
- Exit:LP-10→LP-11
- Process of entering and exiting High-Speed mode:
- Request:LP-11→LP-01→LP-00
- Exit:EOT →LP-11
- Process of entering and exiting Control mode:
- Request:LP-11→LP-10→LP-00→LP-10→LP-00
- Exit:LP-00→LP-10→LP-11
Escape mode is a special mode of the data lane in the LP (Low-Power) state. In this mode, there are functions such as LPDT (Low-Power Data Transmission mode), ULPS (Ultra-Low Power State), and Trigger. Once entering Escape mode, the transmitter must send an 8-bit command to respond to the requested action. The commands are as follows:
| Escape Mode Action | Command Type | Entry Command Pattern (first bit transmitted to last bit transmitted) |
|---|---|---|
| Low-Power Data Transmission | mode | 11100001 |
| Ultra-Low Power State | mode | 00011110 |
| Undefined-1 | mode | 10011111 |
| Undefined-2 | mode | 11011110 |
| Reset-Trigger [Remote Application] | Trigger | 01100010 |
| Entry sequence for HS Test Mode | Trigger | 01011101 |
| Unknown-4 | Trigger | 00100001 |
| Unknown-5 | Trigger | 10100000 |
If not in High-speed mode or Escape mode, the data lane should remain in Control mode.
Introduction to MIPI D-PHY
In addition to D-PHY, MIPI also has C-PHY and M-PHY. PHY refers to the physical layer. For example, D-PHY can be used for camera and display peripherals, C-PHY can also be used for camera and display peripherals, and M-PHY can be used for camera and storage peripherals.

The D in D-PHY refers to the Roman numeral 500 (the original design target was 500 Mbits/s), not Display, while C and M represent the Roman numerals 100 and 1000, respectively.
MIPI DSI
The PHY mentioned in the previous section belongs to the physical layer, so for MIPI DSI, it is a layered structure. The structure diagram is as follows:

As can be seen from the figure above, there are a total of 4 layers, from bottom to top as follows:
- PHY Layer
- Channel Management Layer
- Protocol Layer
- Application Layer
PHY Layer
The physical layer is at the bottom of the entire layered structure. It specifies related electrical properties, such as transmission medium, electrical characteristics, IO circuits, and synchronization mechanisms.
The physical layer also specifies the mechanisms for Start of Transmission (SoT) and End of Transmission (EoT), as well as other ‘out-of-band’ information that can be transmitted between the transmitting and receiving physical layers.
The physical layer supports HS (High-Speed) mode and LP (Low-Power) mode. HS mode can be used to transmit high-speed data, such as screen data. LP mode is generally used for control, such as configuration commands.
Channel Management Layer
The number of data signal pairs may be 1, 2, 3, or 4, depending on the bandwidth requirements of the application. At the transmitting end of the interface, the data stream is distributed to one or more channels, functioning as a ‘distributor’. At the receiving end, the interface collects bytes from the channels and merges them into a reassembled data stream to restore the original stream sequence, functioning as a ‘merger’.
Let’s look at these two figures from the MIPI protocol specification:
Transmitting end:

The left side of the figure above shows the transmission method using 1 pair of data lines. When only 1 pair of data lines is used, transmission can only be done in serial order.
The right side of the figure above shows the transmission method using 4 data lane pairs. The transmitter evenly distributes the serial data to the 4 data lane pairs for parallel transmission. This is the “distributor” function.
Receiver:

The left side of the figure above shows the reception method using 1 data lane pair. When only 1 data lane pair is used, reception can only be done in serial order.
The right side of the figure above shows the reception method using 4 data lane pairs. The receiver merges the parallel data into serial data. This is the “merger” function.
When the transmitter uses 4 data lane pairs, it can evenly distribute as Byte0 to Lane0, Byte1 to Lane1, Byte2 to Lane2, Byte3 to Lane4, but if 3 data lane pairs are used, even distribution is not possible. In the MIPI protocol specification, it is explained as follows: for non-integer multiple transmissions (integer multiples of 2 data lane pairs), the following mode is adopted:

As can be seen from the figure above, if transmission is not done in integer multiples (i.e., all lanes ending together), whichever lane finishes transmission first will enter Eot mode first.
Protocol layer
The protocol layer mainly organizes bytes into predefined units, which are called packets. That is, the packing operation. Data is packed intolong packetsandshort packetstwo formats.
Short packet format

From the figure above, the short packet occupies a total of 4 bytes, including 1 byte for DI, 2 bytes for data, and 1 byte for ECC
- Data Identifier (DI): Contains virtual channel identifier and data type information. The data type indicates the format/content of application-specific payload data. Used by the application layer.
- Packet data: Fixed length of two bytes, with no value restrictions on the data.
- 8-bit ECC in the packet header: Used to correct single-bit errors and detect double-bit errors.
Here, the DI part is highlighted. The DI part consists of two components: the virtual channel and the payload data type.

Bits 6 to 7 represent the virtual channel. The DSI protocol allows up to four virtual channels, enabling multiple peripherals to share a common DSI link.
Bits 0 to 5 represent the payload data type to be sent. The payload data types are:
| Data Type (hex) | Data Type (binary) | Description | Packet Size |
|---|---|---|---|
| 0x01 | 00 0001 | Sync Event, V Sync Start | Short |
| 0x11 | 01 0001 | Sync Event, V Sync End | Short |
| 0x21 | 10 0001 | Sync Event, H Sync Start | Short |
| 0x31 | 11 0001 | Sync Event, H Sync End | Short |
| 0x08 | 00 1000 | End of Transmission packet (EoTp) | Short |
| 0x02 | 00 0010 | Color Mode (CM) Off Command | Short |
| 0x12 | 01 0010 | Color Mode (CM) On Command | Short |
| 0x22 | 10 0010 | Shut Down Peripheral Command | Short |
| 0x32 | 11 0010 | Turn On Peripheral Command | Short |
| 0x03 | 00 0011 | Generic Short WRITE, no parameters | Short |
| 0x13 | 01 0011 | Generic Short WRITE, 1 parameter | Short |
| 0x23 | 10 0011 | Generic Short WRITE, 2 parameters | Short |
| 0x04 | 00 0100 | Generic READ, no parameters | Short |
| 0x14 | 01 0100 | Generic READ, 1 parameter | Short |
| 0x24 | 10 0100 | Generic READ, 2 parameters | Short |
| 0x05 | 00 0101 | DCS Short WRITE, no parameters | Short |
| 0x15 | 01 0101 | DCS Short WRITE, 1 parameter | Short |
| 0x06 | 00 0110 | DCS READ, no parameters | Short |
| 0x37 | 00 1111 | Set Maximum Return Packet Size | Short |
| 0x09 | 00 1001 | Null Packet, no data | Long |
| 0x19 | 01 1001 | Blanking Packet, no data | Long |
| 0x29 | 10 1001 | Generic Long Write | Long |
| 0x39 | 11 1001 | DCS Long Write/write_LUT Command Packet | Long |
| 0x0C | 00 1100 | Loosely Packed Pixel Stream, 20-bit YCbCr, 4:2:2 Format | Long |
| 0x1C | 01 1100 | Packed Pixel Stream, 24-bit YCbCr, 4:2:2 Format | Long |
| 0x2C | 10 1100 | Packed Pixel Stream, 16-bit YCbCr, 4:2:2 Format | Long |
| 0x0D | 00 1101 | Packed Pixel Stream, 30-bit RGB, 10-10-10 Format | Long |
| 0x1D | 01 1101 | Packed Pixel Stream, 36-bit RGB, 12-12-12 Format | Long |
Long packet format

A long packet consists of three parts: a 32-bit packet header (PH), an application-specific data payload with a variable number of bytes, and a 16-bit packet footer (PF).
The packet header (PH) further consists of three parts: an 8-bit data identifier (DI), a 16-bit word count, and an 8-bit error correction code (ECC).
Packet transmission method
In MIPI DSI data transmission, the packed data packets are sent via data lanes. In its simplest transmission method, a single transmission may contain only one data packet. If multiple data packets need to be transmitted, and they are transmitted individually (e.g., one packet per transmission), frequent switching between LPS (Low Power State) and HS (High-Speed) modes is required, and the resulting overhead severely limits bandwidth. The transmission process is as follows:

Why is it necessary to frequently switch between LPS (Low Power State) and HS (High-Speed) modes?
As shown in the figure above, after the SP (Short Packet) transmission is completed, an EoT (End of Transmission) signal is generated to exit the HS (High-Speed) mode. If not in HS (High-Speed) mode or Escape mode, the data lane should remain in control mode. Control mode operates in LP (Low-Power) mode, which is the LPS (Low Power State). For the next transmission, it is necessary to re-enter HS (High-Speed) mode for transmission. Therefore, frequent switching is required.
Therefore, the MIPI DSI protocol allows multiple packets to be concatenated for transmission, with long packets and short packets appearing in any order, which can significantly improve effective bandwidth. This approach is very useful for events such as peripheral initialization, because during system startup, many registers may need to be loaded using separate write commands.
The transmission process is as follows:

At the physical layer (PHY layer), there are two data transmission modes: HS (High-Speed) transmission mode and LP (Low-Power) transmission mode. Before the start of HS (High-Speed) transmission, the transmitter’s physical layer sends an SoT (Start of Transmission) sequence to the receiver. After that, data or command packets can be transmitted in high-speed mode. A single HS (High-Speed) transmission may contain multiple packets, and the end of transmission is always signaled at the physical layer using a dedicated EoT (End of Transmission) sequence.
To enhance the overall robustness of the system, DSI defines a dedicated EoT packet (EoTp) at the protocol layer to indicate the end of HS (High-Speed) transmission. For backward compatibility with earlier DSI, the EoTp function can be enabled or disabled. The method for enabling or disabling this function is beyond the scope of this document.
The figure below shows the HS (High-Speed) transmission process when using EoTp.

In the figure above, the EoT short packet is highlighted in red. The transmission process in the figure indicates that the host intends to use two separate transmissions to send one short packet each, followed by sending one long packet. In this transmission process, an additional EoT short packet is generated before the end of each transmission to signal the end of that transmission.
Of course, using the EoT short packet, multiple packets can also be concatenated for transmission. The transmission process is as follows:

- Packet Transmission Strategy
The MIPI specification stipulates that when transmitting multiple bytes, the low byte is transmitted first, followed by the high byte. The bits within each byte are transmitted in order of least significant bit first, most significant bit last, as shown in the figure below.

- Application Layer
High-level encoding and parsing of data streams
Video Mode and Command Mode
MIPI DSI has two modes: video mode and command mode. Which mode to use depends on the architecture and capabilities of the peripheral. Generally, a peripheral only needs to support one of these modes. However, some devices that support video mode also support some basic command mode functions.
Video Mode
Video mode is mainly used for LCD screens without a framebuffer. Regardless of whether the current display has data updates, the DSI host continuously sends data to the screen (requiring constant data refresh).

Three Transmission Methods of Video Mode

Non-Burst Mode with Sync Pulses
Enables the peripheral to accurately reconstruct the original video timing, including sync pulse widths. Precise timing reconstruction means that after DSI transmission, the data can be accurately restored to DPI timing at the receiving end. The timing diagram for this mode is as follows:

The Non-Burst Mode with Sync Pulses method requires accurate reconstruction of the original video timing, so signals such as VSYNC, HSYNC, HBP, and HFP can be seen in the timing diagram.
Non-Burst Mode with Sync Events

Similar to the Non-Burst Mode with Sync Pulses method, but it does not support accurate reconstruction of sync pulse widths. Therefore, signals such as VSE and HSE are not present in this timing diagram.
Burst Mode

In this mode, the RGB pixel time is compressed, leaving more time during line scanning for low-power modes or multiplexing other transmissions onto the DSI link. As shown in the timing diagram, RGB pixel data is transmitted as quickly as possible, then enters BLLP mode to save power.
Command Mode
Command mode is mainly used forLCD screens with a framebufferoperations, where the DSI host sends data to the screen only when the image needs to change.

In command mode, there is an important TE control signal, whose function is as follows:
If the LCD has its own timing controller and GRAM, to prevent tearing effects, it must actively notify the host. MIPI DSI defines a standard TE trigger message; upon receiving this message, pixel data is automatically sent.
Hardware Schematic Analysis
The iTOP-RK3568 development board has a MIPI interface, and the interface schematic is as follows:

- TP_RST_L_GPIO0_B6 is the touch reset pin.
- TP_INT_L_GPIO3_A5 is the touch interrupt pin.
- I2C1_SCL_TP is I2C1 SCL_TP pin. Used for I2C communication with the touch chip. I2C1_SDA_TP is I2C1_SDA pin. Used for I2C communication with the touch chip.
- LCD_EN_H_GPIO3_C6 is the screen enable pin
- LCD_RST_L_GPIO3_C7 is the screen reset pin
- LCD1_BL_PWM5 is the PWM pin, used to adjust the screen backlight.
- MIPI_DSI_TX1_D3N、MIPI_DSI_TX1_D3P、MIPI_DSI_TX1_D2N、MIPI_DSI_TX1_D2P、MIPI_DSI_TX1_CLKN、MIPI_DSI_TX1_CLKP、MIPI_DSI_TX1_D1N、MIPI_DSI_TX1_D1P、MIPI_DSI_TX1_D0N、MIPI_DSI_TX1_D0P is the MIPI1 interface pin. It is directly connected one-to-one to the processor’s MIPI1 interface, which is a 4-lane interface.
J37 is a jumper cap socket, used to prevent burning the screen and CPU due to incorrect screen connection. After checking the hardware connections, use a jumper cap to connect the power.
Adaptation Steps
Set MIPI Display Path
When using the MIPI interface, you can choose VP0 or VP1. Both VP0 and VP1 support MIPI0 and MIPI1. Since MIPI0 and LVDS interfaces are multiplexed on the development board and used for the LVDS interface, the MIPI interface on the development board uses MIPI1. The development board selects VP1 to output MIPI signals because VP0 can support a maximum resolution of up to 4K, which can be reserved for HDMI use.
Connection relationship between RK3568 VP and each display interface:

Before setting VP1 as the MIPI display path, you need to enable the VOP node first.rk3568.dtsiis defined as follows:
1 | vop: vop@fe040000 { |
After enabling VOP, next set the MIPI1 interface to use the display path output by VP1. Openrk3568.dtsiIn the device tree file, find the MIPI1 node.
1 | dsi0: dsi@fe060000 { |
compatibleThe attribute value isrockchip,rk3568-mipi-dsi, indicating thatgpu/drm/rockchip/dw-mipi-dsi.cthis driver will be used.
portsThe node represents the VP port corresponding to the MIPI interface.dsi1_in_vp0indicates that the MIPI1 interface is connected to VP0,dsi1_in_vp1indicates that the MIPI1 interface is connected to VP1.
You can add the following code in thearch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file to configure the MIPI display path.
1 | &dsi1{ |
video_phy1node in therk3568.dtsidevice tree file:
1 | video_phy1: phy@fe860000 { |
Set screen information
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsAdd the following code:
1 | &dsi1 { |
Line 2statusThe attribute value is disabled, indicating that the dsi1 node is off by default. The dsi1 node has been enabled in the chapter on setting up the MIPI display path.
Line 3rockchip,lane-rateThis attribute is only relevant when using Dual-link mode. It is used to specify the data lane rate, in mbps/lane.
Lines 4 to 109 are used to set MIPI screen information, where:
Line 5statusThe attribute value is disabled, indicating that the dsi1_panel node is off by default.
Line 7regThe attribute value is 0, indicating virtual channel 0. Generally, virtual channels are not involved, so keeping the default value of 0 is sufficient.
The attributes in lines 8 to 13 have been explained in the RGB screen porting section, so they will not be repeated here.
Line 14dsi,flagsThe attribute indicates the mode. Where:
- The attribute value is MIPI_DSI_MODE_VIDEO,MIPI_DSI_MODE_VIDEO_BURST indicates Video Burst Mode.
- The attribute value is MIPI_DSI_MODE_LPM indicates that the initialization sequence is sent in LP mode by default.
- The attribute value is MIPI_DSI_MODE_EOT_PACKET indicates that the EOTP feature is disabled.
Line 16dsi,formatattribute indicates the pixel format. The attribute value MIPI_DSI_FMT_RGB888 indicates using the RGB888 pixel format.
Line 17dsi,lanesattribute indicates the number of lanes. The attribute value ranges from 1 to 8, with values greater than 4 indicating a Dual-channel MIPI-DSI screen. Here, a 4-lane MIPI screen from Xunwei is used, so the attribute value is 4.
Lines 18 to 86panel-init-sequenceattribute indicates the power-on initialization sequence of the MIPI screen.
Lines 88 to 91panel-exit-sequenceattribute indicates the power-off initialization sequence of the MIPI screen. Filling in the power-on and power-off initialization sequences is important and is explained in a separate section; please refer to the MIPI Initialization Sequence chapter.
Lines 111 to 134 set the ports node of the screen.
Becausedsi1_panelthe node is disabled by default, so the dsi1_panel node needs to be enabled. In thearch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsdevice tree file, add the following code:
1 | &dsi1_panel |
MIPI Initialization Sequence
When we obtain a MIPI screen, the manufacturer provides a set of parameters like this. Taking the Xunwei 7-inch MIPI screen as an example:
1 | SSD_SEND(0x01,0xE0,0xAB,0xBA); |
The driver does not recognize the code provided by the supplier; we need to convert it into a format the driver understands. This format is the MIPI initialization sequence, which corresponds to thepanel-init-sequenceandpanel-exit-sequenceattribute values.
panel-init-sequenceThe first line in the attribute, which is line 19 of the device tree, contains the data 29 00 03 E0 AB BA. We will parse the data 29 00 03 E0 AB BA.

From the parsing, it can be seen that the data E0 AB BA is the initialization sequence sent to MIPI, corresponding to the code SSD_SEND(0x01,0xE0,0xAB,0xBA) provided by the screen supplier.
0x29 is the Generic Long Write command. Other Generic Write commands include:
| Data Type (hex) | Data Type (binary) | Description | Packet Size |
|---|---|---|---|
| 0x03 | 00 0011 | Generic Short WRITE, no parameters | Short |
| 0x13 | 01 0011 | Generic Short WRITE, 1 parameter | Short |
| 0x23 | 10 0011 | Generic Short WRITE, 2 parameters | Short |
| 0x29 | 10 1001 | Generic Long Write | Long |
If n < 3, the payload will be packed as a Short Packet. n is the number of parameters. Among them:
- n = 0 means no parameters, command selects 0x03.
- n = 1 means one parameter, command selects 0x13.
- n = 2, indicating 2 parameters, command selection 0x23.
- n >= 3, the payload will be packed in the form of a Long Packet, indicating n parameters, command selection 0x29.
In addition to the Generic Write command, there is also the DCS Write command.
| Data Type (hex) | Data Type (binary) | Description | Packet Size |
|---|---|---|---|
| 0x05 | 00 0101 | DCS Short WRITE, no parameters | Short |
| 0x15 | 01 0101 | DCS Short WRITE, 1 parameter | Short |
| 0x39 | 11 1001 | DCS Long Write/write_LUT Command Packet | Long |
If n < 2, n is the number of parameters. The data to be sent will be packed in the form of a Short Packet.
- n = 0, indicating no parameters, command selection 0x05.
- n = 1, indicating one parameter, command selection 0x15.
- n >= 2, the data to be sent will be packed in the form of a Long Packet. At this point, send the dcs command with n parameters, command selection 0x39.
panel-init-sequenceandpanel-exit-sequenceThe analysis method for other initialization sequences corresponding to the attributes is consistent with this example, and you can analyze them on your own.
Set backlight and touch
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsAdd the following code:
1 | &pwm5{ |
Set screen LOGO
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsAdd the following code:
1 | &route_dsi1{ |
HDMI screen porting
HDMI interface introduction
Background of Birth
In 1998, computer industry giants such as Intel, IBM, HP, Fujitsu, and Compaq jointly launched the DVI (Digital Visual Interface) interface. The DVI interface is based on TMDS (Transition Minimized Differential Signaling) technology to transmit digital signals. Through an encoding algorithm, 8-bit data (each primary color signal of R, G, B) is encoded into 10-bit data (including horizontal and vertical synchronization information, clock information, data DE, error correction, etc.), and differential signals are used for data transmission.
The DVI interface is widely used in devices such as PCs, DVDs, HDTVs, and high-definition projectors. It can support resolutions up to 2K@60Hz and 1080P@120Hz. However, with the popularization of HDTV in the early 21st century, consumer demand for audio-video integration surged. TV manufacturers (such as Sony, Panasonic, Hitachi, etc.) believed that DVI could not meet the following requirements:
- TV and home theater equipment are trending towards thinness and lightness, requiring more compact interfaces to achieve device miniaturization. However, the DVI interface is bulky and inconvenient to plug and unplug, making it difficult to adapt to thin and light devices.
- Digital audio and video need to be transmitted through a single interface to achieve audio-video integration, but the DVI interface has a single function, only supporting video transmission, requiring additional cables for audio transmission.
- The problem of high-definition content piracy is severe, and the demand for encryption technology is increasing. However, the DVI interface does not integrate content encryption technology (such as HDCP).
- Higher bandwidth is needed to support emerging resolutions such as 4K and 8K. The DVI interface has limited bandwidth, making it difficult to meet the growing resolution demands.
In 2002, TV manufacturers such as Sony, Panasonic, Hitachi, Toshiba, and Philips jointly established the HDMI Alliance, with the goal of designing a next-generation interface to replace DVI, namely the HDMI interface. HDMI stands for High Definition Multimedia Interface. In 2003, the HDMI 1.0 standard was officially released, with core features including:
- High bandwidth: 5Gbps transmission rate, supporting 1080P@60Hz and uncompressed 8-channel audio.
- Miniaturized interface: Volume reduced by about 50% compared to DVI, making plugging and unplugging more convenient.
- Audio-video integration: Single cable transmits digital video and audio signals.
- Compatibility: Backward compatible with DVI interface via adapters.
- Content protection: Integrated HDCP encryption technology to prevent illegal copying.
Development History of HDMI
HDMI 1.2 (2005): Supports display color depth expansion (8/10/12bit), compatible with SACD audio.
HDMI 1.3 (2006): Bandwidth increased to 10.2Gbps, introducing Deep Color and xvYCC wide color gamut.
HDMI 1.4 (2009): Bandwidth 10.2Gbps, new features: support for 4K@30Hz, 1080P@144Hz, 3D video. Added Ethernet channel (HEC) and Audio Return Channel (ARC).
HDMI 2.0a/b (2013-2016): Bandwidth 18Gbps, supports 4K@60Hz, 1080P@240Hz, introduced static HDR (High Dynamic Range).
HDMI 2.1 (2017): Bandwidth jumped to 48Gbps, core upgrades: resolution and refresh rate: 8K@60Hz, 4K@120Hz (uncompressed), supports dynamic HDR (Dolby Vision); gaming optimization: Variable Refresh Rate (VRR), Auto Low Latency Mode (ALLM); enhanced audio: eARC (Enhanced Audio Return Channel).
HDMI interface pin definitions
There are five HDMI interface types from A to E.
- The HDMI-A interface, also called the standard interface, is the most widely used.

Pin definitions:
| Pin number | Function | Pin number | Function |
|---|---|---|---|
| 1 | TMDS Data 2+ | 10 | TMDS Clock + |
| 2 | TMDS Data Shield | 11 | TMDS Clock Shield |
| 3 | TMDS Data 2- | 12 | TMDS Clock - |
| 4 | TMDS Data 1+ | 13 | CEC |
| 5 | TMDS Data 1 Shield | 14 | Reserved |
| 6 | TMDS Data 1- | 15 | SCL(DDC CLOCK) |
| 7 | TMDS Data 0+ | 16 | SDA(DDC DATA) |
| 8 | TMDS Data 0 Shield | 17 | GND |
| 9 | TMDS Data 0- | 18 | +5V Power |
| 19 | HPD Hot Plug Detect |
- The HDMI-B interface is rarely seen in daily use. Its data transmission capability is nearly twice as fast as HDMI-A, and it is generally used in more professional scenarios.

- HDMI-C, also known as Mini HDMI, is about one-third smaller than HDMI-A and is mainly used in small devices such as game consoles and digital cameras.

Pin Definitions:
| Pin Number | Function | Pin Number | Function |
|---|---|---|---|
| 1 | TMDS Data 2 Shield | 10 | TMDS Clock Shield |
| 2 | TMDS Data 2+ | 11 | TMDS Clock + |
| 3 | TMDS Data 2- | 12 | TMDS Clock - |
| 4 | TMDS Data 1 Shield | 13 | CEC/DDC Ground |
| 5 | TMDS Data 1+ | 14 | CEC |
| 6 | TMDS Data 1- | 15 | SCL(DDC CLOCK) |
| 7 | TMDS Data 0 Shield | 16 | SDA(DDC DATA) |
| 8 | TMDS Data 0+ | 17 | HEC+ |
| 9 | TMDS Data 0- | 18 | +5V Power |
| 19 | HPD Hot Plug Detect / HEC- |
- The HDMI-D interface is also called Micro HDMI or Mini HDMI interface. Micro HDMI is relatively small and mainly used in small mobile devices, such as tablets, portable in-vehicle devices, etc.

Pin Definition:
- The HDMI-E interface is mainly used in automotive systems. Due to the unstable environment inside the vehicle, the HDMI-E interface adopts a mechanical locking design on the physical connector to ensure reliable contact.

| Pin Number | Function | Pin Number | Function |
|---|---|---|---|
| 1 | HPD Hot Plug Detect / HEC- | 10 | TMDS Data 0 Shield |
| 2 | Utility/HEAC+ | 11 | TMDS Data 0- |
| 3 | TMDS Data 2+ | 12 | TMDS Clock + |
| 4 | TMDS Data 2 Shield | 13 | TMDS Clock Shield |
| 5 | TMDS Data 2- | 14 | TMDS Clock - |
| 6 | TMDS Data 1+ | 15 | CEC |
| 7 | TMDS Data 1 Shield | 16 | DDC/CEC/HEAC |
| 8 | TMDS Data 1- | 17 | SCL (DDC CLOCK) |
| 9 | TMDS Data 0+ | 18 | SDA (DDC DATA) |
| 19 | +5V Power |
RK3568 HDMI Interface
The RK3568 processor supports one HDMI interface, which can support both versions 1.4a and 2.0a. It supports a maximum resolution of 4K@60Hz.

Bandwidth calculation
When selecting an HDMI screen, how do you determine whether the processor can support a screen of that resolution? This involves HDMI bandwidth calculation. Take the RK3568 processor as an example.
The RK3568 processor supports up to HDMI 2.0, where the TMDS clock is 600MHz. Therefore, the bandwidth under HDMI 2.0 is: 600000000 x 10 x 3 = 18Gbps.
The effective bandwidth is 18 x (10/8) = 14.4Gbps.
Why multiply the effective bandwidth by 10/8? Because in HDMI transmission, 8 bits are converted to 10 bits. Then we calculate the bandwidth required by the HDMI screen. If the required bandwidth of the HDMI screen is less than the processor’s HDMI bandwidth, the screen is supported.
Formula for calculating HDMI screen bandwidth:Htotal x Vtotal x refresh rate x encoding method x bit depth
Here, Htotal equals Hsync + Hfront + Hactive + Hback, and Vtotal equals Vsync + Vfront + Vactive + Vback. Htotal x Vtotal represents the number of pixels per frame.
The number of pixels per frame multiplied by the monitor’s refresh rate gives the number of pixels the monitor processes per second, i.e., Htotal x Vtotal x refresh rate. If the encoding method is yuv444, the encoding value is 1; if yuv422, the value is 2/3; if yuv420, the value is 1/2.
For example: a screen with 3920 (Htotal) x 2222 (Vtotal) @60Hz, using yuv444 encoding and a bit depth of 8, requires a bandwidth of 3920 x 2222 x 60 x 1 x 8 x 3, approximately 12.543Gbps.
If you prefer not to calculate, you can also determine this by referring to a table. From the table below, it can be seen that HDMI 2.0 supports a maximum resolution of 4K@120Hz.

Introduction to TMDS differential signaling
Earlier we mentioned that the DVI interface uses TMDS differential signals, while the HDMI interface was developed to replace the DVI interface.
In fact, HDMI originates from DVI interface technology, and the HDMI interface also centers on the TMDS signal transmission technology of Silicon Image, Inc. HDMI is pin-compatible with DVI, but uses a different package. Therefore, HDMI and DVI interfaces can be converted to each other through adapters. In principle, HDMI is backward compatible with DVI.
Therefore, this chapter focuses on introducing TMDS differential signals. We start with the connection framework diagram in the HDMI specification.

As can be seen from the diagram, TMDS transmission is divided into two parts: the source (transmitter) and the sink (receiver). The TMDS link includes three data transmission channels (Channel 0, 1, 2) and one clock signal transmission channel (Clock Channel).
Taking the source on the left as an example, there are three data channels in total, each using parallel transmission with a width of 8 bits. Among them:
- D[7:0]: Represents the actual 8-bit image data.
- D[1:0]: In Channel 0, it represents the HSYNC and VSYNC signals; in Channel 1 and Channel 2, it represents the four control signals CTL0 to CTL3.
- D[3:0]: Used to represent some additional auxiliary data, such as audio data, etc.
Why does this 8-bit data D[7:0] already transmit image data, yet D[1:0] also transmits other signals?

In the HDMI transmission overview diagram, transmission is divided into three phases: dark gray represents the video data period, dark blue represents the data island period, and light gray represents the control period.

- Control Period
When there is no need to transmit video, audio, or auxiliary data, the control period is used. There must be a control period between any two non-control periods, using CTL encoding to convert 2-bit data into 10-bit data.
Before each Video Data Period or Data Island Period, a preamble is sent through the control period. The preamble is a sequence consisting of eight identical control characters, used to indicate whether the following data period is a video data period or a data island period.

The values of CTL0, CTL1, CTL2, and CTL3 indicate the type of the subsequent data period, and other control signals (HSYNC and VSYNC) may also change.

- Data Island Period
During this phase, audio and other additional data are transmitted using TERC4 encoding, which converts 4-bit data into 10-bit data. The Data Island Period consists of three parts: the leading guard band, the data header and packet, and the trailing guard band.

- Video Data Period
During this phase, actual image data is transmitted using video data encoding, which converts 8-bit data into 10-bit data. The Video Data Period has a leading guard band but no trailing guard band.

Thus, D[7:0] does not transmit these data simultaneously but in stages.
TMDS is a differential signal, and LVDS is also a differential signal. What is the difference between them?
For the working principle of LVDS differential signals, refer to the LVDS interface introduction chapter.
TMDS differential signals use two differential lines to transmit signals, where signals 0 and 1 are determined by the voltage difference between the two pins:
When the TMDS differential line+ is at a high level,
and the differential line- is at a low level, it represents 1;
When the differential pair + is low and the differential pair - is high, it represents 0.
The TMDS receiver determines whether a 1 or 0 is sent by judging the voltage difference between + and -.
EDID Introduction
Different types and brands of monitors have different resolutions and timings. The HDMI interface must be compatible, so if the processor outputs fixed resolution and timing parameters, it cannot properly drive all monitors.
EDID stands for Extended Display Identification Data. It contains monitor-related parameters such as resolution and timing information, as well as manufacturer information, product ID, production date, etc. For example, address 08h in the EDID structure diagram below occupies 2 bytes and is used to indicate the manufacturer name, using the ISA 3-character ID code. Other addresses follow the same logic, and you can read the EDID structure diagram for details.
The EDID for HDMI is typically 256 bytes, divided into 2 blocks: Block 0 (corresponding to addresses 00h-36h in the EDID structure diagram below) and Block 1 (corresponding to addresses 36h-7fh). Block 0 is mandatory, while Block 1 is optional.
EDID v1.4 Structure:
| Address | Bytes | Description | Format |
|---|---|---|---|
| 00h | 8 | Header: = (00 FF FF FF FF FF FF 00h) | See Section 3.3 |
| 08h | 10 | Vendor & Product Identification: | See Section 3.4 |
| 08h | 2 | ID Manufacturer Name | ISA 3-character ID Code |
| 0Ah | 2 | ID Product Code | Vendor assigned code |
| 0Ch | 4 | ID Serial Number | 32-bit serial number |
| 10h | 1 | Week of Manufacture | Week number or Model Year Flag |
| 11h | 1 | Year of Manufacture or Model Year | Manufacture Year or Model Year |
| 12h | 2 | EDID Structure Version & Revision: | See Section 3.5 |
| 12h | 1 | Version Number: = 01h | Binary |
| 13h | 1 | Revision Number: = 04h | Binary |
| 14h | 5 | Basic Display Parameters & Features: | See Section 3.6 |
| 14h | 1 | Video Input Definition | See Section 3.6.1 |
| 15h | 1 | Horizontal Screen Size or Aspect Ratio | Listed in cm. → Aspect Ratio — Landscape |
| 16h | 1 | Vertical Screen Size or Aspect Ratio | Listed in cm. → Aspect Ratio — Portrait |
| 17h | 1 | Display Transfer Characteristic (Gamma) | Binary — Factory Default Value |
| 18h | 1 | Feature Support | See Section 3.6.4 |
| 19h | 10 | Color Characteristics: | See Section 3.7 |
| 19h | 1 | Red/Green: Low Order Bits | Rx0 Rx1 Ry0 Ry1 Gx0 Gx1 Gy0 Gy1 |
| 1Ah | 1 | Blue/White: Low Order Bits | Bx0 Bx1 By0 By1 Wx0 Wx1 Wy0 Wy1 |
| 1Bh | 1 | Red-x: High Order Bits | Red-x Bits 9 → 2 |
| 1Ch | 1 | Red-y: High Order Bits | Red-y Bits 9 → 2 |
| 1Dh | 1 | Green-x: High Order Bits | Green-x Bits 9 → 2 |
| 1Eh | 1 | Green-y: High Order Bits | Green-y Bits 9 → 2 |
| 1Fh | 1 | Blue-x: High Order Bits | Blue-x Bits 9 → 2 |
| 20h | 1 | Blue-y: High Order Bits | Blue-y Bits 9 → 2 |
| 21h | 1 | White-x: High Order Bits | White-x Bits 9 → 2 |
| 22h | 1 | White-y: High Order Bits | White-y Bits 9 → 2 |
| 23h | 3 | Established Timings | See Section 3.8 |
| 23h | 1 | Established Timings I | |
| 24h | 1 | Established Timings II | |
| 25h | 1 | Manufacturer’s Reserved Timings | |
| 26h | 16 | Standard Timings: Identification 1 → 8 | See Section 3.9 |
| 36h | 72 | 18 Byte Data Blocks | See Section 3.10 |
| 36h | 18 | Preferred Timing Mode | |
| 48h | 18 | Detailed Timing #2 or Display Descriptor | |
| 5Ah | 18 | Detailed Timing #3 or Display Descriptor | |
| 6Ch | 18 | Detailed Timing #4 or Display Descriptor | |
| 7Eh | 1 | Extension Block Count N | Number of (optional) 128-byte EDID EXTENSION blocks to follow – if Block Maps are used then 00h ≤ N ≤ FEh and FFh is invalid.Maps are used then 254 is the maximum value of ‘N’. If Block Maps are not used then 255 is the maximum value of ‘N’. 00h ≤ N ≤ FFh. |
| 7Fh | 1 | Checksum C | 00h ≤ C ≤ FFhThe 1-byte sum of all 128 bytes in this EDID block shall equal zero |
Thus, by reading the EDID information, appropriate screen parameters can be output to be compatible with HDMI monitors from different manufacturers and brands. In some materials, you may also encounter E-EDID, which stands for Enhanced Extended Display Identification Data. E-EDID and EDID are just different versions in the development of this technology, and E-EDID is forward-compatible with EDID, so they can be treated as the same.
Currently, the DRM driver supports most resolution timings, but in some special scenarios, certain resolutions may not be supported. You candrivers\gpu\drm\drm_edid.cin thedrm_dmt_modesat the end of the file to add screen information.
1 | { DRM_MODE("4096x2160", DRM_MODE_TYPE_DRIVER, 556188, 4096, 4104, |
| Parameter | Description |
|---|---|
| “4096x2160” | mode name, which is the resolution’s hdisplay × vdisplay |
| DRM_MODE_TYPE_DRIVER | mode type, configured as DRM_MODE_TYPE_DRIVER |
| 556188 | Pixel Clock (unit: kHz) |
| 4096 | Horizontal Active Pixels (hdisplay) |
| 4104 | Horizontal Sync Start (hsync_start) |
| 4136 | Horizontal Sync End (hsync_end) |
| 4176 | Total Horizontal Pixels (htotal) |
| 0 | hskew, usually 0 |
| 2160 | Vertical Active Lines (vdisplay) |
| 2208 | Vertical Sync Start (vsync_start) |
| 2216 | Vertical Sync End (vsync_end) |
| 2222 | Total Vertical Lines (vtotal) |
| 0 | vscan, usually 0 |
| vrefresh | Display Device Frame Rate |
| DRM_MODE_FLAG_PHSYNC | HSYNC and VSYNC polarity, flags defined as follows: DRM_MODE_FLAG_PHSYNC (1<<0)DRM_MODE_FLAG_NHSYNC (1<<1)DRM_MODE_FLAG_PVSYNC (1<<2)DRM_MODE_FLAG_NVSYNC (1<<3)DRM_MODE_FLAG_INTERLACE (1<<4) |
Hardware Schematic Analysis
The iTOP-RK3568 development board has an HDMI interface, and the interface schematic is as follows:

- HDMI_TX2P_PORT/HDMI_TX2N_PORT、HDMI_TX1P_PORT/HDMI_TX1N_PORT、HDMI_TX0P_PORT/HDMI_TX0N_PORT、HDMI_TXCLKP_PORT/HDMI_TXCLKN_PORT consists of 3 pairs of data pins and 1 pair of clock pins.
- HDMI_TX_CEC_PORT, CEC pin.
- HDMI_TXDDC_SCL_PORT/HDMI_TXDDC_SDA_PORT. DDC channel pins, communicating via I2C, mainly used to read EDID information.
- HDMI_TX_HPD_PORT hot-plug detection pin.
Adaptation Steps
rk3568.dtsiThe hdmi node is as follows:
1 | hdmi: hdmi@fe0a0000 { |
compatibleThe attribute value isrockchip,rk3568-dw-hdmi, indicating thatgpu/drm/rockchip/dw_hdmi-rockchip.c this driver will be used.
pinctrl-0 = <&hdmitx_scl &hdmitx_sda &hdmitxm0_cec>;: Use pinctrl to set the multiplexing of scl, sda, and cec pins.
statusThe attribute value is disabled, indicating that this node is disabled; since HDMI is to be used, the node needs to be enabled later.
portsThe node represents the VP port corresponding to the HDMI interface. hdmi_in_vp0 indicates that the HDMI interface is connected to VP0. hdmi_in_vp1 indicates that the HDMI interface is connected to VP1.statusThe attribute value disabled indicates that using VP0/1 to output HDMI is prohibited.
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsAs follows
1 |
|
eDP Screen Porting
Introduction to eDP Interface
eDP stands for Embedded DisplayPort, an embedded display interface founded by the Video Electronics Standards Association (VESA). The eDP protocol is an extension of the DP (DisplayPort) architecture and protocol for embedded applications, so it is fully compatible with the DP protocol. It has been widely used in laptops, tablets, and other fields.
The RK3568 supports one eDP interface. Its features are as follows:
- Supports one eDP 1.3 interface
- Up to 4 physical lanes, each supporting 2.7 Gbps
- Supports Panel Self Refresh (PSR)
- Supports a maximum resolution of 2560x1600 @ 60Hz
- Supports RGB format (up to 10-bit color depth)
The iTOP-RK3568 development board will bring out one eDP interface, with the schematic diagram as follows:

- EDP_TX_D0N/EDP_TX_D0P、EDP_TX_D1N/EDP_TX_D1P、EDP_TX_D2N/EDP_TX_D2P、EDP_TX_D3N/EDP_TX_D3P. It consists of 4 differential pairs used to transmit audio and video data. Note that the specific LCD screen requires as many differential pairs as needed; connect 2 pairs if 2 are needed, and 4 pairs if 4 are needed.
- EDPAUXN/EDPAUXP auxiliary channel.
- EDP_HPDIN_M1 hot-plug pin, not used in the schematic. That is, this pin is optional.
- I2C1_SCL_TP、I2C1_SDA_TP、TP_INT_L_GPIO3_A5、TP_RST_L_GPIO0_B6, touch I2C communication, interrupt, and reset pins.
- LCD0_BL_PWM4 screen backlight pin.
Adaptation steps
rk3568.dtsiThe edp node in it is as follows:
1 | edp: edp@fe0c0000 { |
compatibleThe attribute value isrockchip,rk3568-edp, indicating thatgpu/drm/rockchip/analogix_dp-rockchip.cthis driver will be used.
phys = <&edp_phy>;Using edp_phy, so we need to enable the edp_phy node.
statusThe attribute value is disabled, indicating that the eDP node is disabled, so we need to enable the eDP node.
portsThe node represents the VP port corresponding to the eDP interface. edp_in_vp0 indicates that the eDP interface is connected to VP0,edp_in_vp1indicates that the eDP interface is connected to VP1, and the status attribute value is disabled, meaning the eDP output is disabled.
arch/arm64/boot/dts/rockchip/topeet-screen-lcds.dtsAs follows
1 |
|
VGA Screen Porting
VGA Interface Introduction
VGA stands for Video Graphics Array, which is a video graphics array. VGA is a protocol that uses analog signals for video transmission, introduced by IBM in 1987. Initially, due to its high resolution, fast display speed, and rich colors, it was very common in desktop computer applications. However, the VGA interface is relatively large in size, and as portable laptops become increasingly popular, it has gradually been phased out in the pursuit of thin and light notebooks.
VGA interfaces are divided into male and female connectors. When transmitting images between them, the VGA image transmission standard is used.

| Pin Number | Name | Direction | Function Description |
|---|---|---|---|
| 1 | RED | → | Red Video Signal |
| 2 | GREEN | → | Green Video Signal |
| 3 | BLUE | → | Blue Video Signal |
| 4 | RES | – | Reserved |
| 5 | GND | → | Ground |
| 6 | RGND | → | Red Ground |
| 7 | GGND | → | Green ground wire |
| 8 | BGND | → | Blue ground wire |
| 9 | +5V | → | +5V DC power supply |
| 10 | SGND | → | Sync ground wire |
| 11 | ID0 | → | Monitor ID bit 0 (optional) |
| 12 | SDA | → | DDC serial data line |
| 13 | HSYNC or CSYNC | → | Horizontal sync signal (or composite sync signal) |
| 14 | VSYNC | → | Vertical sync signal |
| 15 | SCL | → | DDC data clock line |
The RK3568 processor itself does not have a VGA interface; the VGA interface on the iTOP-RK3568 development board is converted from the eDP interface.
Hardware schematic analysis

The schematic for the eDP to VGA interface is very simple, using an RTD2166 conversion chip. The input of the conversion chip is the eDP signal. After passing through the conversion chip, it outputs the VGA signal.
Among them, EDP_TX_D0P/EDP_TX_D0N、EDP_TX_D1P/EDP_TX_D1N、EDP_TX_AUXP/EDP_TX_AUXN. Two pairs of differential lines are used to transmit audio and video data. EDPAUXN/EDPAUXP are auxiliary channels. VGA_HPDIN_GPIO0_C0 is the hot-plug pin. I2C5_SDA_M0/I2C5_SCL_M0 is the control pin of the conversion chip.
VGA_R、VGA_G、VGA_B、VGA_HSYNC、VGA_VSYNC、VGA_DDC_SDA、VGA_DDC_SCL is the output pin of the conversion chip, which is the converted VGA signal; simply connect it to the VGA connector.
Adaptation Steps
1 |
|

