Forum Menu




 


Log in Problems?
New User? Sign Up!
AVR Freaks Forum Index

Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Author Message
eokerson
PostPosted: Jun 24, 2008 - 08:40 AM
Wannabe


Joined: Jul 26, 2003
Posts: 54


I am attempting to get an OPTREX TFT model T-55149GD030J-MLW-AJN working on an NGW100.

Spec sheets here:
http://www.optrex.com/products/partdeta ... 0J-MLW-AJN

In setup.c I have:
Code:

static struct fb_videomode avr32_tft_modes[] = {
        {
                .name           = "T-55149GD030J-MLW-AJN @ 60",
                .refresh        = 60,
                .xres           = 240,
                .yres           = 400,
                .pixclock       = KHZ2PICOS(5555),

                .left_margin    = 17,           .right_margin   = 33,
                .upper_margin   = 4,            .lower_margin   = 2,
                .hsync_len      = 16,            .vsync_len      = 6,

                .sync           = 0,
                .vmode          = FB_VMODE_NONINTERLACED,
        },
};

static struct fb_monspecs avr32fb_default_tft_monspecs = {
        .manufacturer   = "OPT",
        .monitor        = "55149GD030J",
        .modedb         = avr32_tft_modes,
        .modedb_len     = ARRAY_SIZE(avr32_tft_modes),
        .hfmin          = 15000,
        .hfmax          = 64000,
        .vfmin          = 60,
        .vfmax          = 90,
        .dclkmax                = 30000000,
};

#define AT32AP7000_DEFAULT_TFT_LCDCON2 \
                                        ( ATMEL_LCDC_DISTYPE_TFT        \
                                        | ATMEL_LCDC_INVCLK             \
                                        | ATMEL_LCDC_CLKMOD_ALWAYSACTIVE \
                                        | ATMEL_LCDC_MEMOR_BIG )

static struct atmel_lcdfb_info __initdata ek_lcdc_data = {
        .default_bpp                    = 24,
        .default_dmacon                 = ATMEL_LCDC_DMAEN | ATMEL_LCDC_DMA2DEN,
        .default_lcdcon2                = AT32AP7000_DEFAULT_TFT_LCDCON2,
        .default_monspecs               = &avr32fb_default_tft_monspecs,
        .guard_time                     = 2,
};



The appropriate pins are set in at32ap700x.c

Code:

        case 0:
                pdev = &atmel_lcdfb0_device;
                select_peripheral(PC(20), PERIPH_A, 0); /* HSYNC */
                select_peripheral(PC(21), PERIPH_A, 0); /* PCLK */
                select_peripheral(PC(22), PERIPH_A, 0); /* VSYNC */
                select_peripheral(PE(1), PERIPH_B, 0); /* DVAL */
                select_peripheral(PE(3), PERIPH_B, 0); /* DATA0 */
                select_peripheral(PE(4), PERIPH_B, 0); /* DATA1 */
                select_peripheral(PE(5), PERIPH_B, 0); /* DATA2 */
                select_peripheral(PE(6), PERIPH_B, 0); /* DATA3 */
                select_peripheral(PE(7), PERIPH_B, 0); /* DATA4 */
                select_peripheral(PC(31), PERIPH_A, 0); /* DATA5 */
                select_peripheral(PD(0), PERIPH_A, 0); /* DATA6 */
                select_peripheral(PD(1), PERIPH_A, 0); /* DATA7 */
                select_peripheral(PE(8), PERIPH_B, 0); /* DATA8 */
                select_peripheral(PE(9), PERIPH_B, 0); /* DATA9 */
                select_peripheral(PE(10), PERIPH_B, 0); /* DATA10 */
                select_peripheral(PE(11), PERIPH_B, 0); /* DATA11 */
                select_peripheral(PE(12), PERIPH_B, 0); /* DATA12 */
                select_peripheral(PD(7), PERIPH_A, 0); /* DATA13 */
                select_peripheral(PD(8), PERIPH_A, 0); /* DATA14 */
                select_peripheral(PD(9), PERIPH_A, 0); /* DATA15 */
                select_peripheral(PE(13), PERIPH_B, 0); /* DATA16 */
                select_peripheral(PE(14), PERIPH_B, 0); /* DATA17 */
                select_peripheral(PE(15), PERIPH_B, 0); /* DATA18 */
                select_peripheral(PE(16), PERIPH_B, 0); /* DATA19 */
                select_peripheral(PE(17), PERIPH_B, 0); /* DATA20 */
                select_peripheral(PE(18), PERIPH_B, 0); /* DATA21 */
                select_peripheral(PD(16), PERIPH_A, 0); /* DATA22 */
                select_peripheral(PD(17), PERIPH_A, 0); /* DATA23 */

                clk_set_parent(&atmel_lcdfb0_pixclk, &pll0);
                clk_set_rate(&atmel_lcdfb0_pixclk, clk_get_rate(&pll0));
                break;


I have added a power driver that sets all the R61509 registers via SPI based on the ltv350qv driver. But cannot get anything on the display. I have verified with an o-scope that the signals are all present and of the correct polarity and voltage level (going through level shifters as this is a 1.8v display). Does anyone have any ideas what I missed?
 
 View user's profile Send private message  
Reply with quote Back to top
nkinar
PostPosted: Nov 07, 2010 - 06:55 PM
Hangaround


Joined: Jul 18, 2007
Posts: 391
Location: Canada

Have you managed to access the R61509 registers over SPI, or was the implementation very challenging? I've been looking at the R61509 datasheet and the Rockbox examples. This documentation and code can be found by perusing the links below:

http://www.optrex.com/SiteImages/PartLi ... 071126.pdf

http://www.koders.com/c/fid8F18536D452E ... aspx?s=mp3

http://www.koders.com/c/fid530DBD4CD7E1 ... r61509#L24
 
 View user's profile Send private message  
Reply with quote Back to top
eokerson
PostPosted: Nov 07, 2010 - 09:10 PM
Wannabe


Joined: Jul 26, 2003
Posts: 54


I was able to access the registers over SPI and have the board working now.
 
 View user's profile Send private message  
Reply with quote Back to top
nkinar
PostPosted: Nov 07, 2010 - 09:58 PM
Hangaround


Joined: Jul 18, 2007
Posts: 391
Location: Canada

Thanks, eokerson; this is greatly appreciated, and thank you very much for confirming that you were able to work with the display.

What was the initial problem, and what did you do to be able to access the display?

To follow up:

(1) Did you use the code posted above to setup the display?

(2) What sequence of commands did you use to be able to turn on the display?

Was it as simple as just connecting the display to the connector, or did you have to send some commands over SPI to be able to turn on the display?

Are these commands listed in an application note (i.e. the datasheet of the display), or did you have to find your own solution to turning on the display?
 
 View user's profile Send private message  
Reply with quote Back to top
eokerson
PostPosted: Nov 07, 2010 - 10:16 PM
Wannabe


Joined: Jul 26, 2003
Posts: 54


I did not use the code you referenced, as it was written a year after I did mine. Smile

I will have to dig back to find the exact commands, but as I recall it took a bit of tuning to get things to run. I started with some sample code from Optrex and an existing LCD SPI driver that was in the kernel and eventually got it all working. The display must be configured via SPI to get any output at all. As I recall the problem I had ended up being some routing issues on the PCB we were building, the LCD simply wasn't connected properly. We have new boards now and they work fine.
 
 View user's profile Send private message  
Reply with quote Back to top
nkinar
PostPosted: Nov 07, 2010 - 11:30 PM
Hangaround


Joined: Jul 18, 2007
Posts: 391
Location: Canada

Thank you very much for your response, eokerson! If you could post just the registers and commands that were accessed to turn the display on this would help to solve a major mystery. IMHO, there is not much documentation in the datasheet with respect to turning on the display.

I assume that you wired up the display using the four standard signals:

Code:

HSYNC
VSYNC
Data-Enable
PIXCLOCK


I also assume that the 18-bit RGB data bus interface was used as well; or did you use the 16-bit RGB data bus?

I am thinking of using the same display on one of my research systems. Now that I know you have been successful with using it, I feel more confident with using it in my application.
 
 View user's profile Send private message  
Reply with quote Back to top
Display posts from previous:     
Jump to:  
All times are GMT + 1 Hour
Post new topic   Reply to topic
View previous topic Printable version Log in to check your private messages View next topic
Powered by PNphpBB2 © 2003-2006 The PNphpBB Group
Credits