Skip to content

Commit

Permalink
Craneboard ITBOK integrated with OMAP3EVM ITBOK
Browse files Browse the repository at this point in the history
  • Loading branch information
Srinath committed Nov 22, 2010
1 parent 881882a commit 73002b1
Show file tree
Hide file tree
Showing 20 changed files with 3,255 additions and 807 deletions.
15 changes: 9 additions & 6 deletions common/src/omap3530evm.c
Expand Up @@ -43,20 +43,23 @@ extern void register_battery_tests(void);
void register_diagnostics(void)
{
/* Register all test routines. */
register_ramtests();
#if defined(CONFIG_OMAP3_EVM) || defined(CONFIG_OMAP3_AM3517EVM) || defined(CONFIG_OMAP3_AM3517CRANE)
register_tvout_tests();
#endif

#ifdef CONFIG_OMAP3_EVM
register_lcd_tests();
register_uarttests();
register_ramtests();
register_lcd_tests();
register_audio_tests();
register_keypad_tests();
register_ts_tests();
register_tvout_tests();
register_svideo_tests();
register_battery_tests();
#endif

#ifdef CONFIG_OMAP3_AM3517CRANE
register_ramtests();
register_tvout_tests();
#endif

}

/* Converts the string to lower case. */
Expand Down
2 changes: 1 addition & 1 deletion device/inc/lcd_utils.h
Expand Up @@ -421,7 +421,7 @@ void set_csc_coff (U8 pipeline);
void set_format (U8 pipeline, U8 format);
void set_fifo_threshold (U8 pipeline);
void set_row_inc (U8 pipeline, U32 inc_val);
void set_pixel_inc (U8 pipeline, U32 inc_val);
void set_pixel_inc (U8 pipeline, int inc_val);
void enable_pipeline (U8 pipeline);
void configure_dss (U8 mode);
void display_lcd_image (void);
Expand Down
6 changes: 4 additions & 2 deletions device/src/lcd_utils.c
Expand Up @@ -45,6 +45,7 @@
#include "lcd_utils.h"
#include "dss.h"
#include "../../diagnostics/inc/mt9t111.h"
#include "../../diagnostics/inc/dg_videoin.h"

#define SD_FRAME_BUFFER 0x80377000

Expand Down Expand Up @@ -769,7 +770,7 @@ void set_row_inc(U8 pipeline, U32 inc_val)
}

/* Set pixel increment. */
void set_pixel_inc(U8 pipeline, U32 inc_val)
void set_pixel_inc(U8 pipeline, int inc_val)
{
inc_val &= PIXEL_INC_MASK;

Expand Down Expand Up @@ -884,8 +885,9 @@ void configure_dss(U8 mode)
/* Size of graphics window. */
set_window_size(GFX_PIPELINE, mode);

if (mt9t111_lcd == 1)
if ((mt9t111_lcd == 1) || (videoin_lcd == 1)) {
set_format(GFX_PIPELINE, RGB24);
}
else
set_format(GFX_PIPELINE, RGB16);

Expand Down
1 change: 0 additions & 1 deletion device/src/tvout.c
Expand Up @@ -122,7 +122,6 @@ S32 tv_config(U8 video_std, U8 image_cap_flag, U16 gfx_x, U16 gfx_y, U16 gfx_ppl
{
S32 ret_val = SUCCESS;
U32 i;

#ifdef CONFIG_OMAP3_EVM
enable_power(); /* Enable volages to VENC */
#endif
Expand Down
35 changes: 13 additions & 22 deletions diagnostics/Makefile
@@ -1,4 +1,4 @@
# Makefile - Makefile for building Diagnostic libarry
# Makefile - Makefile for building Diagnostic library
#
# Copyright Mistral software Pvt. Ltd.
#
Expand All @@ -11,34 +11,25 @@ LIB = libdiagnostic.a

ifdef CONFIG_OMAP3_EVM
COBJS = src/diag_core.o src/diag_support.o src/dg_memory.o src/dg_uart.o src/mac_evm.o \
src/dg_i2c.o src/dg_lcd.o src/eeprom.o src/dg_audio.o src/dg_battery.o src/dg_rtc.o ../common/src/omap3530evm.o \
../device/src/i2c_utils.o ../device/src/lcd_utils.o ../common/src/strtoint.o \
../device/src/triton2_utils.o ../device/src/mcbsp_utils.o \
../common/src/dg_gpio.o src/dg_dvi.o src/dg_keypad.o src/dg_mmc.o \
src/dg_touchscreen.o ../device/src/tsc2046_utils.o \
../device/src/mcspi_utils.o ../device/src/uart_utils.o \
src/dg_tvout.o src/dg_ram.o src/dg_flash_test.o src/dg_flash_test_onnd.o \
src/dg_svideo.o src/automation.o src/dg_otg.o src/mt9t111.o src/dg_camera.o
endif

ifdef CONFIG_OMAP3_AM3517EVM
COBJS = src/diag_core.o src/diag_support.o src/dg_memory.o \
src/dg_i2c.o src/dg_rtc.o ../common/src/omap3530evm.o \
../device/src/i2c_utils.o ../common/src/strtoint.o \
../device/src/triton2_utils.o ../common/src/dg_gpio.o\
src/dg_mmc.o src/dg_tvout.o src/dg_ram.o\
src/dg_flash_test.o src/dg_flash_test_onnd.o \
src/automation.o src/dg_otg.o src/dg_rtc.o
src/dg_i2c.o src/dg_lcd.o src/eeprom.o src/dg_audio.o src/dg_battery.o src/dg_rtc.o ../common/src/omap3530evm.o \
../device/src/i2c_utils.o ../device/src/lcd_utils.o ../common/src/strtoint.o \
../device/src/triton2_utils.o ../device/src/mcbsp_utils.o \
../common/src/dg_gpio.o src/dg_dvi.o src/dg_keypad.o src/dg_mmc.o \
src/dg_touchscreen.o ../device/src/tsc2046_utils.o \
../device/src/mcspi_utils.o ../device/src/uart_utils.o \
src/dg_tvout.o src/dg_ram.o src/dg_flash_test.o src/dg_flash_test_onnd.o \
src/dg_svideo.o src/automation.o src/dg_otg.o src/mt9t111.o src/dg_camera.o \
src/tvp5146.o src/videoin_isp.o src/dg_videoin.o
endif

ifdef CONFIG_OMAP3_AM3517CRANE
COBJS = src/diag_core.o src/diag_support.o src/dg_memory.o \
src/dg_i2c.o src/dg_rtc.o ../common/src/omap3530evm.o \
../device/src/i2c_utils.o ../common/src/strtoint.o \
../device/src/triton2_utils.o ../common/src/dg_gpio.o\
src/dg_mmc.o src/dg_tvout.o src/dg_ram.o\
../device/src/triton2_utils.o ../common/src/dg_gpio.o \
src/dg_mmc.o src/dg_tvout.o src/dg_ram.o \
src/dg_flash_test.o src/dg_flash_test_onnd.o \
src/automation.o src/dg_otg.o src/dg_rtc.o src/dg_gpio.o
src/automation.o src/dg_otg.o src/dg_gpio.o
endif

OBJS = $(AOBJS) $(COBJS)
Expand Down
15 changes: 14 additions & 1 deletion diagnostics/inc/dg_gpio.h
Expand Up @@ -38,6 +38,7 @@ extern "C" {
#endif


#define OMAP34XX_CTRL_BASE (0x48000000 + 0x2000)

/*
* IEN - Input Enable
Expand Down Expand Up @@ -458,7 +459,7 @@ extern "C" {
#define CRANE_STRBEN_DLY1 0x0224
#define CRANE_SYS_BOOT8 0x0226

#define PUT_MUX_VAL(OFFSET,VALUE)\
#define PUT_MUX_VAL(OFFSET, VALUE)\
crane_writel((VALUE), OMAP34XX_CTRL_BASE + (OFFSET));
#define GET_MUX_VAL(OFFSET)\
crane_readl(OMAP34XX_CTRL_BASE + (OFFSET));
Expand All @@ -469,4 +470,16 @@ extern "C" {
}
#endif

int set_dss_gpio(int);
int set_mmc_gpio(int);
int set_ccdc_gpio(int);
int set_i2c2_gpio(int);
void crane_gpio_clk_init(void);
int set_dss_mux(void);
int set_mmc_mux(void);
int set_ccdc_mux(void);
int set_i2c_mux(void);
int save_mux_val(void);
int restore_mux_val(void);

#endif /* __DIAG_GPIO_H__ */
134 changes: 134 additions & 0 deletions diagnostics/inc/dg_videoin.h
@@ -0,0 +1,134 @@
/*
* video input test file.
*
* (C) Copyright 2010
* Mistral Solutions Private Limited, <www.mistralsolutions.com>
*
* Author :
* Ganeshan <nganeshan@mistralsolutions.com>
*
* Derived from NA
*
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License as
* published by the Free Software Foundation; either version 2 of
* the License, or (at your option) any later version.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston,
* MA 02111-1307 USA
*/
/*
* modification history
* --------------------
* 14 Jul 2009 - Created
*/
#ifndef _DG_VIDEOIN_H
#define _DG_VIDEOIN_H

#define VIDEOIN_CVBS 0
#define VIDEOIN_SVIDEO 1

/*image formats*/
#define BITMAP1 0x0
#define BITMAP2 0x1
#define BITMAP4 0x2
#define BITMAP8 0x3
#define RGB12 0x4
#define RGB16 0x6
#define RGB24 0x8
#define YUV422 0xA
#define UYVY422 0xB
/***************pixel formats******************/

#define YUV422BE 0x0 //CC_CCPDFR[3:0]
//#define YUV422 0x1
#define YUV420 0x2
#define RGB444 0x4
#define RGB565 0x5
#define RGB888_NDE 0x6
#define RGB888_DE 0x7
#define RAW8_NDE 0x8
#define RAW8_DE 0x9
#define RAW10_NDE 0xA
#define RAW10_DE 0xB
#define RAW12_NDE 0xC
#define RAW12_DE 0xD
#define JPEG8_FSP 0xE
#define JPEG8 0xF
#define RGB666 0x10
#define RGB888 0x11

/*image types*/

#define SQCIF 0x0
#define QCIF 0x1
#define CIF 0x2
#define VGA 0x3
#define SVGA 0x4
#define XGA 0x5
#define SXGA 0x6
#define UXGA 0x7
#define QSIF 0x8
#define SIF 0x9
#define QVGA 0xA
#define HDMI 0xB
#define RFBI_QVGA 0xC
/*Specific to LCD*/
#define DVI 0xFF

#define LCD_QVGA 0x0
#define LCD_VGA 0x1
#define DVI_VGA 0x2
#define DVI_720P 0x3
/*standard resolution*/
#define LCD_HEIGHT_QVGA 320
#define LCD_WIDTH_QVGA 240
#define LCD_HEIGHT_VGA 640
#define LCD_WIDTH_VGA 480
/* lcd interface width */
#define LCD_WIDTH_18BIT 0x1
#define LCD_WIDTH_16BIT 0x2


extern unsigned int videoin_lcd;

/////////////////////////////////////////////////////////////////////////////////////////
/* Tokens for register write */
#define TOK_WRITE (0) /* token for write operation */
#define TOK_TERM (1) /* terminating token */
#define TOK_DELAY (2) /* delay token for reg list */
#define TOK_SKIP (3) /* token to skip a register */


/**
* struct tvp514x_reg - Structure for TVP5146/47 register initialization values
* @token - Token: TOK_WRITE, TOK_TERM etc..
* @reg - Register offset
* @val - Register Value for TOK_WRITE or delay in ms for TOK_DELAY
*/
struct tvp514x_reg {
U8 token;
U8 reg;
U32 val;
};

/**
* struct tvp514x_init_seq - Structure for TVP5146/47/46M2/47M1 power up
* Sequence.
* @ no_regs - Number of registers to write for power up sequence.
* @ init_reg_seq - Array of registers and respective value to write.
*/
struct tvp514x_init_seq {
unsigned int no_regs;
const struct tvp514x_reg *init_reg_seq;
};

#endif //_DG_SALOOPBACK_H

0 comments on commit 73002b1

Please sign in to comment.