billtn
Posts: 4
Joined: Thu May 09, 2013 1:10 pm

DSI LCD

Mon May 13, 2013 9:19 pm

Hi evryone,

I want to connect an LCD to my RPI through DSI connection.
But don't know how to find an adapted LCD. I am ready to write a driver to support it.
Is there any list of adapted LCD screens with datasheets if any ?

Thank you ! :)

ghans
Posts: 7850
Joined: Mon Dec 12, 2011 8:30 pm
Location: Germany

Re: DSI LCD

Tue May 14, 2013 9:06 am

The foundation might relase a display and/or an adaptor
board at their own discretion.

No documentation is available , and no tools to write the
necessary GPU code are availble either. If your name isn't Apple
or Samsung , i doubt Broadcom will ever "give" any of this
to you.

ghans
• Don't like the board ? Missing features ? Change to the prosilver theme ! You can find it in your settings.
• Don't like to search the forum BEFORE posting 'cos it's useless ? Try googling : yoursearchtermshere site:raspberrypi.org

billtn
Posts: 4
Joined: Thu May 09, 2013 1:10 pm

Re: DSI LCD

Tue May 14, 2013 9:53 am

So for now, the cheapest solution is to have a HDMI to LVDS converter and use a regular screen ?

tummychow
Posts: 41
Joined: Wed Feb 20, 2013 6:36 am

Re: DSI LCD

Tue May 14, 2013 11:31 pm

you can find a TFT with open pins that can be wired via GPIO, and it will probably be cheaper than the LVDS/HDMI adapter (look on ebay - probably 20 dollars or less), but you'll have to make some driver code for the screen if it doesn't already exist. As ghans mentioned, the dsi connector is controlled by the GPU, and the code on the GPU is strictly closed, so it's not possible for us to write a driver for a dsi device.

billtn
Posts: 4
Joined: Thu May 09, 2013 1:10 pm

Re: DSI LCD

Thu May 16, 2013 1:33 pm

Hi tummychow,

thank you for your response, it is quite clear for me now.
though the TFT solution is not very clear for me because I am a newb in hardware.
Is there any link to learn more about it ? or a link to a "potential candidate".

tummychow
Posts: 41
Joined: Wed Feb 20, 2013 6:36 am

Re: DSI LCD

Fri May 17, 2013 11:55 pm

The screens and displays section of the forum probably spends about half its time discussing raw-pin TFT displays (the other half is spent discussing the kinds that plug in). http://www.github.com/notro/fbtft is a good place to start. The wiki on his github project lists a lot of the details if this is what you're after. A bit of kernel compilation and a bit of point to point wiring, and you should be on your way

billtn
Posts: 4
Joined: Thu May 09, 2013 1:10 pm

Re: DSI LCD

Sat May 18, 2013 11:44 am

Thank you !
this is exactly what I need. I will probably choose one of these TFT displays and try to make it work.

User avatar
elektrknight
Posts: 140
Joined: Sat Mar 02, 2013 1:25 pm

Re: DSI LCD

Fri May 24, 2013 1:51 pm

> I want to connect an LCD to my RPI through DSI connection.

Going back to the original idea. It seems that there is at least one potential
LCD DSI screen that would nicely complement Raspberry Pi.

I have been following Mike's iPod Nano LCD hacking efforts and in his latest
installment he discovered that the Gen 6 IPod LCD is using MIPI DSI.
The details are in the series of videos posted on his YouTube channel, look for :
"Reverse Engineering the iPod Nano 6 LCD interface"
http://www.youtube.com/watch?v=7TedIzmguP0 and
"Ipod Nano 6 LCD hack".

In his third video he shows a little board with a Chinese iPod LCD he got for something
like $5. He is driving it with Lattice FPGA from data in the SPI flash. However,
he makes it clear that this setup is a bit of an overkill an it would be possible to do it
even from SPI port on an 8-bit MCU with proper signaling for the LCD.
If 8-bitter can do it with 2MHz SPI then bcm2835 should be able to "blast"
this screen with data.

That little LCD is just begging to be connected to he DSI port on my RasPi!

Weekend is coming up and I would highly recommend watching his videos on the
LCD hacking and others too. Beats watching almost anything on "idiottube" ;-)

For the original info head to Mike's Electric Stuff page here:
http://www.electricstuff.co.uk/ipodlcd.html
Placek Malinowy to jest to!

tummychow
Posts: 41
Joined: Wed Feb 20, 2013 6:36 am

Re: DSI LCD

Sat May 25, 2013 1:16 am

It doesn't matter if you know how the hardware works. Again, you cannot actually write the driver. DSI is a physical interface, ie it simply refers to the way the connector is formed (plus a few standard instructions and pinouts, but the standard bits aren't enough to make a screen work, they're things like "turn off" and "turn on"). What the signals actually mean varies from device to device. Each new device requires new code to talk to. You cannot write the driver that teaches the Pi to talk in those signals, because the DSI port is controlled by the GPU and not the CPU. We can't write code for the GPU, whose binary blob is thoroughly closed source and inaccessible to us, the users.

Of course an FPGA would be able to do it. He figured out the interface, and you can teach the FPGA to say whatever the LCD needs to hear. But you can't teach the Pi to do that, not through DSI. You'd have to wire the ribbon up to GPIO, and at that point, the whole point of the interface (speed that you can only get from something close to the hardware, with many pins) is lost. Also, the screen doesn't talk SPI, his suggestion is to use shift registers - which sacrifice a lot of speed. Luckily the resolution is fairly low, so this is admittedly not a huge loss. But it's still not DSI; that's just regular GPIO wiring, and there are lots of screens that can do that already. (frankly, i'd rather use shift registers than DSI for this tiny little thing... if the foundation releases a DSI LCD, then that bus will be wasted on such a small screen)



Not to mention that, if the signal timing on the LCD is tight (DSI top speeds are pushing a gigahertz), then the Pi won't be able to keep up.Again, this screen is small, so it's not too bad, but not every screen will be so forgiving. An 8-bit MCU running at a reasonable clock speed is way better than the Pi for bitbanging an unknown protocol, because commands run in real time and the delays are rigorous and determinate. You know how many clock cycles will pass between each GPIO change and, with a suitable oscillator, you know how much time each of those cycles takes. You might have to write some nasty assembly, but the system will be able to keep up.

Once you put an operating system or interpreter into the picture, all of that goes away, because now the operating system is delegating tasks everywhere, and who's to say that your GPIO toggles are going to happen precisely when they're supposed to? Who can guarantee that your clock cycles won't be stolen by another process, causing the precarious timing to collapse? You can compensate with hardware features like DMA (I believe the software PWM libraries use this) but there's only so much you can do without reverting to a bare-metal real-time system. Microcontrollers are actually better at real-time control than the Pi can ever hope to be.

PS: This is also why the FPGA is such a good choice. At its heart, an FPGA is a huge pile of configurable logic gates. Once you set up the configuration, it can execute it with more precision and speed than a microcontroller (which has to fetch and process its instructions), which is why they're so appealing in digital signal processing environments... such as bitbanging an unknown high speed protocol or managing huge piles of digital IOs in a precise, repetitive way.

Chicagofred
Posts: 1
Joined: Thu Jan 15, 2015 2:27 am

Re: DSI LCD

Thu Jan 15, 2015 2:31 am

With all this discussion about the difficulty of connecting a DSI display to RPI.... the question begs to be asked, why have a DSI connector in the first place????

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: Korea

Re: DSI LCD

Thu Jan 15, 2015 5:14 am

Chicagofred wrote:With all this discussion about the difficulty of connecting a DSI display to RPI.... the question begs to be asked, why have a DSI connector in the first place????
It is for the as-yet-unreleased official Raspberry Pi display.

Much like the camera connector was for the as-yet-unreleased-at-the-time camera module.

tekkon
Posts: 2
Joined: Tue Mar 24, 2015 4:09 am

Re: DSI LCD

Tue Mar 31, 2015 10:34 pm

is there any updates for the implementation of DSI on the latest RPi?
still cannot access GPU and develop LCD drivers?

Thanks

rkn
Posts: 3
Joined: Thu Mar 31, 2016 12:06 pm

Re: DSI LCD

Wed Apr 27, 2016 9:04 pm

bump, same question:

is it still the case that we wouldn't be able to use DSI for another display other than the official one? or access the GPU?

I would like to add a small (~3") display without eating up any of the other GPIO on a Pi 3, and would like to be able to use the GPU to render the graphics.

DirkS
Posts: 9781
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: DSI LCD

Thu Apr 28, 2016 12:02 am

rkn wrote:bump, same question:
Same answer.

notro
Posts: 695
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: DSI LCD

Sat Apr 30, 2016 2:05 pm

I see that Eric Anholt has done some work on adding dsi support to his vc4 driver.
Development branch: https://github.com/anholt/linux/commits/drm-vc4-dsi

Return to “Interfacing (DSI, CSI, I2C, etc.)”