Raspberry Pi LCD DSI Display Connector

The Raspberry Pi connector S2 is a display serial interface (DSI) for connecting a liquid crystal display (LCD) panel using a 15-pin ribbon cable. The mobile industry processor interface (MIPI) inside the Broadcom BCM2835 IC feeds graphics data directly to the display panel through this connector. This article looks at the connector pinout, and some of the display panels compatible with the port.

If you look at the BCM2835 Block Diagram, you will see that it has internal circuitry to drive a colour LCD display panel. The S2 connector provides a fast high-resolution display interface dedicated for the purposes of sending video data directly from the GPU to a compatible display.

DSI Connector

DSI Connector

Here is an image showing the DSI connector on the Raspberry Pi 1 Model B. As you can see, there is a yellow tape over it to protect the contacts from dust. After seeing this connector, I realised that it was pointless to interface a colour LCD via the GPIO pins, because the performance will not be as good as the fast serial connection provided by this DSI port. However, it is great fun to interface those cool dot-matrix displays via the GPIO. I had a go with a couple and was very pleased with the results. You can get those liquid crystal displays from places such as Farnell and RS cheaply.

In order to connect an LCD panel, three things are required; the connector pinout showing the electrical connections, a DSI compatible display, and a display driver for the GPU.

DSI Connector Pinout

Socket S2 PinFunction
2Data Lane 1 N
3Data Lane 1 P
5Clock N
6Clock P
8Data Lane 0 N
9Data Lane 0 P
14+3.3 V
15+3.3 V

The connector pinout is very simple and each connection consists of a pair of pins that carry the positive and negative parts of the signal, known as differential signalling. The voltage is usually in the order of 200 mV, which is extremely small, and therefore the term low voltage differential signalling (LVDS) reflects this.

Pin 8 and pin 9 pairs form data lane 0, pin 2 and pin 3 form data lane 1, and finally pin 5 and pin 6 pairs are for the clock pulse. The data usually travels in one direction from the processor to the display panel. There is no provision for a resistive touch screen layer in this interface.

LCD Display

A typical modern display operates in both command mode and video mode. In command mode, the multimedia processor BCM2835 sends commands, which can either read or write to registers in the LCD controller IC. The processor can read the status and contents of various registers and write parameters to them. Therefore, command mode requires bidirectional communication and data lane 0, which is the first lane, is usually bidirectional, whilst data lane 1 is unidirectional (one way).

In video mode, the processor sends a stream of pixel data to the display controller in high speed to avoid flicker

Communication Protocol

In a dual lane system such as that on the Raspberry Pi, a stream of bytes divides between the lanes, therefore byte 0 goes through lane 0 and byte 1 through lane 1, alternating in this manner.

After a little hacking, I could see that the data structure is in the form of packets, which starts and ends with transmission markers. There is a header in the packet, which contains the data type, the number of bytes sent, and the ECC checksum. Immediately following the header are the data bytes.

Finding a Panel

I decided to look for some display panels, however nearly all the modern LCD panels have four to eight data lanes due to higher resolutions that are required of them. I also had a look at some of the iPhone display panels; however, the ones I saw had four data lanes, and therefore could not be used.

Display panels with two data lanes were in mobile phones manufactured around 2008. They had a WVGA resolution of approximately 360 pixels × 640 pixels, so I decided to look at some old phones, and managed to find one panel that had a chance of working. Although the DSI connector pinout may change from one product to another, the MIPI communication protocols and electrical signals are a standard. If the next model of Raspberry Pi, perhaps Raspberry Pi 2, or Raspberry Pi 3, uses a similar Broadcom processor, then one still has a basis in MIPI to guess the pinouts.

This Article Continues...

Raspberry Pi LCD DSI Display Connector
Raspberry Pi DSI Connector Spec