Rockbox.org home
Downloads
Release release
Dev builds dev builds
Extras extras
themes themes
Documentation
Manual manual
Wiki wiki
Device Status device status
Support
Forums forums
Mailing lists mailing lists
IRC IRC
Development
Bugs bugs
Patches patches
Dev Guide dev guide
Search



Donate

Rockbox Technical Forums


Login with username, password and session length
Home Help Search Staff List Login Register
News:

Rockbox Ports are now being developed for various digital audio players!

+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Clip+: Looking for display driver information
« previous next »
  • Print
Pages: [1]

Author Topic: Clip+: Looking for display driver information  (Read 2257 times)

Offline popcornisgood

  • Member
  • *
  • Posts: 4
Clip+: Looking for display driver information
« on: June 05, 2012, 12:55:14 PM »
Ultimately I'm trying to find out what display driver the Clip+ uses.

The Sansa Clip page on the wiki mentions that there are two variants of the Clip+ that have slightly different display drivers, but it doesn't give much more detail. The model number on the back of the display in my Clip+ is PG-2864HMBC. I've been trying to find a datasheet or manufacturer's website for it, but all I can seem to find is information for DD-2864 or UG-2864. These screens look nearly identical, so I made the assumption that they have the same display drivers (SSD1305 I believe). However the ribbon cable coming off of my screen only connects to 12 out of the 30 display pins, and assuming it has the same display driver as the others, the connected pins make no sense (SCK tied to SDI).

Hope that wasn't too much info or unclear. I realize this isn't strictly Rockbox related, but I thought someone here might know what I'm looking for off-hand. Any help is appreciated!
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Clip+: Looking for display driver information
« Reply #1 on: June 05, 2012, 01:48:16 PM »
Quote from: popcornisgood on June 05, 2012, 12:55:14 PM
Ultimately I'm trying to find out what display driver the Clip+ uses.

Its config file says this:

#define CONFIG_LCD LCD_SSD1303

The source for that driver is here:

http://git.rockbox.org/?p=rockbox.git;a=blob;f=firmware/target/arm/as3525/lcd-ssd1303.c;h=a00398a998d30d9d1329b1c12010e04fb007703e;hb=HEAD
Logged

Offline popcornisgood

  • Member
  • *
  • Posts: 4
Re: Clip+: Looking for display driver information
« Reply #2 on: June 05, 2012, 02:06:30 PM »
Thanks for the quick response, this is helpful!

On line 149 the driver calls a function lcd_hw_init(). Do you know where this function is defined?
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Clip+: Looking for display driver information
« Reply #3 on: June 05, 2012, 02:08:56 PM »
Its in lcd-clipplus.c in this folder:

http://git.rockbox.org/?p=rockbox.git;a=tree;f=firmware/target/arm/as3525/sansa-clipplus;h=48611be5561338bf813bb19af0013212d6ba5f76;hb=HEAD

FWIW, you may want to check out the code so that you can use grep to find functions.
Logged

Offline popcornisgood

  • Member
  • *
  • Posts: 4
Re: Clip+: Looking for display driver information
« Reply #4 on: June 05, 2012, 02:21:25 PM »
Good call. I'm still fairly new to revision control and large software projects in general, so I appreciate your patience.
Logged

Offline saratoga

  • Developer
  • Member
  • *
  • Posts: 8974
Re: Clip+: Looking for display driver information
« Reply #5 on: June 05, 2012, 02:30:50 PM »
Then I should probably be more specific.  Our wiki shows how to get the source using git, and we have a linux VM image you can download with git and all the tools installed already if you don't have a unix-like setup on your local machine.

Once you have the code:

grep -Ir lcd_hw_init firmware

will search the "firmware" folder in the rockbox source and return this:


firmware/target/arm/as3525/lcd-ssd1303.c:    variant = lcd_hw_init();
firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c:static int lcd_hw_init(void)
firmware/target/arm/as3525/sansa-clipzip/lcd-clipzip.c:    lcd_type = lcd_hw_init();
firmware/target/arm/as3525/sansa-clipv2/lcd-clipv2.c:int lcd_hw_init(void)
firmware/target/arm/as3525/sansa-clip/lcd-clip.c:int lcd_hw_init(void)
firmware/target/arm/as3525/sansa-clipplus/lcd-clip-plus.c:int lcd_hw_init(void)
firmware/target/arm/as3525/lcd-clip.h:int lcd_hw_init(void) INIT_ATTR;

Where you can see that the bolded instance is the function declaration, and the others are just parts of the code that call that function. 
Logged

Offline bertrik

  • Developer
  • Member
  • *
  • Posts: 171
    • Homepage Bertrik Sikken
Re: Clip+: Looking for display driver information
« Reply #6 on: June 05, 2012, 03:14:12 PM »
The idea is that lcd-clip-plus.c provides functions to *access* the display on the clip+ specifically. So lcd-ssd1303.c contains generic code for the ssd1303 and lcd-clip-plus provides the low-level access functions specific to the clip+. Function lcd_hw_init sets up the SoC for communication with the ssd1303 and detects the exact display type (by reading a GPIO).
Logged
Meizu M6SP, Samsung YP-S3, iPod nano 1g, Sansa c200, Sansa e200, Sansa Clip, Sansa Clip+, Sansa Clip Zip
 

Offline popcornisgood

  • Member
  • *
  • Posts: 4
Re: Clip+: Looking for display driver information
« Reply #7 on: June 07, 2012, 04:58:49 AM »
Thanks for the help! I think I finally figured out that my display has an SSD1306, which communicates the same way, but has a different pinout. Having example code will definitely help with implementation though, and this bit of experience with git and grep will surely be useful in the future!
Logged

Offline bertrik

  • Developer
  • Member
  • *
  • Posts: 171
    • Homepage Bertrik Sikken
Re: Clip+: Looking for display driver information
« Reply #8 on: June 07, 2012, 05:57:59 AM »
For the clip+ with the newer display type, we didn't exactly copy the initialisation sequence from the original firmware, but just minimally tweaked the existing initialisation routine from the old display type until it worked for the newer display type too. I can probably help to figure out the exact initialisation sequence that the original firmware uses.
Logged
Meizu M6SP, Samsung YP-S3, iPod nano 1g, Sansa c200, Sansa e200, Sansa Clip, Sansa Clip+, Sansa Clip Zip
 

  • Print
Pages: [1]
« previous next »
+  Rockbox Technical Forums
|-+  Support and General Use
| |-+  Hardware
| | |-+  Clip+: Looking for display driver information
 

  • SMF 2.0.17 | SMF © 2019, Simple Machines
  • Rockbox Privacy Policy
  • XHTML
  • RSS
  • WAP2

Page created in 0.074 seconds with 15 queries.