mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-08 20:07:46 +09:00
screen:modify some screen config file for new screen framework
This commit is contained in:
@@ -1,90 +1,121 @@
|
||||
choice
|
||||
depends on FB_ROCKCHIP
|
||||
prompt "LCD Panel Select"
|
||||
|
||||
config LCD_NULL
|
||||
bool "NULL"
|
||||
|
||||
config LCD_RK2928
|
||||
bool "RK2928 LCD"
|
||||
depends on MACH_RK2928
|
||||
|
||||
config LCD_LG_LP097X02
|
||||
bool "RGB LCD_LG_LP097X02 1024X768"
|
||||
|
||||
config LCD_TD043MGEA1
|
||||
bool "RGB TD043MGEA1"
|
||||
|
||||
config LCD_HX8357
|
||||
bool "RGB HX8357"
|
||||
|
||||
config LCD_TJ048NC01CA
|
||||
bool "RGB TJ048NC01CA"
|
||||
bool "RGB TJ048NC01CA"
|
||||
|
||||
config LCD_HL070VM4AU
|
||||
bool "RGB_HL070VM4AU"
|
||||
bool "RGB_HL070VM4AU"
|
||||
|
||||
config LCD_HSD070IDW1
|
||||
bool "RGB Hannstar800x480"
|
||||
bool "RGB Hannstar800x480"
|
||||
|
||||
config LCD_RGB_TFT480800_25_E
|
||||
bool "RGB TFT480800_25_E"
|
||||
bool "RGB TFT480800_25_E"
|
||||
|
||||
config LCD_HSD100PXN
|
||||
bool "RGB Hannstar HSD100PXN(1024X768)"
|
||||
bool "RGB Hannstar HSD100PXN(1024X768)"
|
||||
|
||||
config LCD_BYD8688FTGF
|
||||
bool "RGB BYD 1024X600 8688FTGF"
|
||||
|
||||
config LCD_B101AW06
|
||||
bool "RGB Hannstar B101AW06(1024X600)"
|
||||
bool "RGB Hannstar B101AW06(1024X600)"
|
||||
|
||||
config LCD_RGB_TFT480800_25_E
|
||||
bool "RGB TFT480800_25_E(480X800)"
|
||||
bool "RGB TFT480800_25_E(480X800)"
|
||||
|
||||
config LCD_LS035Y8DX02A
|
||||
bool "RGB LS035Y8DX02A(480X800)"
|
||||
bool "RGB LS035Y8DX02A(480X800)"
|
||||
|
||||
config LCD_LS035Y8DX04A
|
||||
bool "RGB LS035Y8DX04A(480X800)"
|
||||
bool "RGB LS035Y8DX04A(480X800)"
|
||||
|
||||
config LCD_HSD100PXN_FOR_TDW851
|
||||
bool "RGB Hannstar HSD100PXN(800X480)"
|
||||
bool "RGB Hannstar HSD100PXN(800X480)"
|
||||
|
||||
config LCD_CPTCLAA038LA31XE
|
||||
bool "RGB LCD_CPTCLAA038LA31XE(480X800)"
|
||||
bool "RGB LCD_CPTCLAA038LA31XE(480X800)"
|
||||
|
||||
config LCD_A060SE02
|
||||
bool "MCU A060SE02"
|
||||
bool "MCU A060SE02"
|
||||
|
||||
config LCD_S1D13521
|
||||
bool "MCU S1D13521"
|
||||
bool "MCU S1D13521"
|
||||
|
||||
config LCD_NT35582
|
||||
bool "MCU NT35582"
|
||||
|
||||
config LCD_NT35580
|
||||
bool "MCU NT35580"
|
||||
|
||||
config LCD_IPS1P5680_V1_E
|
||||
bool "MCU IPS1P5680_V1_E"
|
||||
|
||||
config LCD_MCU_TFT480800_25_E
|
||||
bool "MCU TFT480800_25_E"
|
||||
|
||||
config LCD_NT35510
|
||||
bool "RGB lcd_nt35510"
|
||||
|
||||
config LCD_ILI9803_CPT4_3
|
||||
bool "RGB lcd_ILI9803_CPT4_3"
|
||||
|
||||
config LCD_IPS1P5680_V1_E
|
||||
bool "MCU IPS1P5680_V1_E"
|
||||
bool "MCU IPS1P5680_V1_E"
|
||||
|
||||
config LCD_MCU_TFT480800_25_E
|
||||
bool "MCU TFT480800_25_E"
|
||||
bool "MCU TFT480800_25_E"
|
||||
|
||||
config LCD_AT070TNA2
|
||||
bool "RGB AT070TNA2"
|
||||
|
||||
config LCD_AT070TN93
|
||||
bool "RGB AT070TN93"
|
||||
|
||||
config LCD_TX23D88VM
|
||||
bool "HITACHI LVDS TX23D88VM (1200x800)"
|
||||
|
||||
config LCD_A050VL01
|
||||
bool "RGB A050VL01"
|
||||
|
||||
config LCD_B101EW05
|
||||
bool "RGB lcd panel B101EW05"
|
||||
|
||||
config LCD_RK3168M_B101EW05
|
||||
bool "RGB lcd panel LCD_RK3168M_B101EW05"
|
||||
bool "RGB lcd panel LCD_RK3168M_B101EW05"
|
||||
|
||||
config LCD_HJ050NA_06A
|
||||
bool "RGB lcd panel HJ050NA-06A"
|
||||
|
||||
config LCD_HDMI_1366x768
|
||||
depends on MFD_RK610
|
||||
bool "RK610 LCD_HDMI_1366X768"
|
||||
---help---
|
||||
if support RK610, this setting can support dual screen output
|
||||
|
||||
config LCD_HDMI_1280x800
|
||||
depends on MFD_RK610
|
||||
bool "RGB Hannstar LCD_HDMI_1280X800"
|
||||
---help---
|
||||
if support RK610, this setting can support dual screen output
|
||||
|
||||
config LCD_HDMI_1024x768
|
||||
depends on MFD_RK610
|
||||
bool "RGB Hannstar LCD_HDMI_1024X768"
|
||||
---help---
|
||||
if support RK610, this setting can support dual screen output
|
||||
@@ -94,19 +125,22 @@ config LCD_HSD07PFW1
|
||||
bool "RGB Hannstar LCD_HDMI_1024X600"
|
||||
|
||||
config LCD_HDMI_800x480
|
||||
depends on MFD_RK610
|
||||
bool "RGB Hannstar LCD_HDMI_800x480"
|
||||
---help---
|
||||
if support RK610, this setting can support dual screen output
|
||||
|
||||
config LCD_HV070WSA100
|
||||
bool "HV070WSA-100 1024X600"
|
||||
|
||||
config LCD_COMMON
|
||||
bool "LCD COMMON"
|
||||
|
||||
config LCD_RK3168_AUO_A080SN03
|
||||
bool "RK3168 auo panel 800x480"
|
||||
|
||||
config LCD_RK2928_A720
|
||||
bool "RK2928 A720 panel 800x480"
|
||||
|
||||
config LCD_RK2926_V86
|
||||
bool "RK2926 v86 panel 800x480"
|
||||
|
||||
@@ -120,27 +154,32 @@ config LCD_HJ101NA
|
||||
bool "HJ101NA_4J 1280X800"
|
||||
|
||||
config LCD_AUTO
|
||||
bool "auto select lcd"
|
||||
bool "auto select lcd"
|
||||
|
||||
config LCD_HSD07PFW1
|
||||
depends on MFD_RK610
|
||||
bool "RGB lcd panel HSD07PFW1"
|
||||
|
||||
config LCD_I30_800X480
|
||||
bool "lcd I30"
|
||||
|
||||
config LCD_TL5001_MIPI
|
||||
bool "TL5001 720X1280"
|
||||
|
||||
config LCD_LP097QX1
|
||||
bool "Display Port screen LP097QX1"
|
||||
bool "Display Port screen LP097QX1"
|
||||
|
||||
config LCD_DS1006H
|
||||
bool "Lvds screen for ds1006h(RK3168)"
|
||||
bool "Lvds screen for ds1006h(RK3168)"
|
||||
|
||||
config LCD_B101UANO_1920x1200
|
||||
bool "Lvds screen B101UANO for u30gt2"
|
||||
bool "Lvds screen B101UANO for u30gt2"
|
||||
|
||||
config LCD_E242868_1024X600
|
||||
bool "RK3168 86v RGB 1024*600 "
|
||||
bool "RK3168 86v RGB 1024*600 "
|
||||
|
||||
config LCD_WY_800X480
|
||||
bool "lcd for 760"
|
||||
|
||||
config LCD_HH070D_LVDS
|
||||
bool "lcd lvds for 760"
|
||||
|
||||
|
||||
82
drivers/video/rockchip/screen/lcd_AT070TNA2.c
Normal file → Executable file
82
drivers/video/rockchip/screen/lcd_AT070TNA2.c
Normal file → Executable file
@@ -1,22 +1,13 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef _LCD_AT070TNA2__
|
||||
#define _LCD_AT070TNA2__
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
|
||||
#if defined(CONFIG_MACH_RK29SDK)||defined(CONFIG_MACH_RK29FIH)
|
||||
#define OUT_FACE OUT_D888_P666
|
||||
#else
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_D888_P666
|
||||
#endif
|
||||
#define OUT_CLK 58500000 // 65000000
|
||||
#define LCDC_ACLK 500000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 58500000 // 65000000
|
||||
#define LCDC_ACLK 500000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 10
|
||||
@@ -29,56 +20,17 @@
|
||||
#define V_VD 600
|
||||
#define V_FP 18
|
||||
|
||||
#define LCD_WIDTH 202
|
||||
#define LCD_HEIGHT 152
|
||||
#define LCD_WIDTH 202
|
||||
#define LCD_HEIGHT 152
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#if defined(CONFIG_MACH_RK29SDK)||defined(CONFIG_MACH_RK29FIH)
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#else
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = NULL;
|
||||
screen->standby = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
72
drivers/video/rockchip/screen/lcd_B101AW06.c
Normal file → Executable file
72
drivers/video/rockchip/screen/lcd_B101AW06.c
Normal file → Executable file
@@ -1,17 +1,13 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
#ifndef _LCD_B101AW06__
|
||||
#define _LCD_B101AW06__
|
||||
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_D888_P666
|
||||
#define OUT_CLK 45000000
|
||||
#define LCDC_ACLK 312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 45000000
|
||||
#define LCDC_ACLK 312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 10
|
||||
@@ -24,53 +20,17 @@
|
||||
#define V_VD 600
|
||||
#define V_FP 18
|
||||
|
||||
#define LCD_WIDTH 202
|
||||
#define LCD_HEIGHT 152
|
||||
#define LCD_WIDTH 202
|
||||
#define LCD_HEIGHT 152
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = NULL;
|
||||
screen->standby = NULL;
|
||||
}
|
||||
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
74
drivers/video/rockchip/screen/lcd_at070tn93.c
Normal file → Executable file
74
drivers/video/rockchip/screen/lcd_at070tn93.c
Normal file → Executable file
@@ -1,18 +1,12 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef _LCD_AT070NT_H_
|
||||
#define _LCD_AT070NT_H_
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P888
|
||||
#define OUT_CLK 46800000//33300000//50000000
|
||||
#define LCDC_ACLK 500000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 46800000//33300000//50000000
|
||||
#define LCDC_ACLK 500000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 10
|
||||
@@ -25,52 +19,16 @@
|
||||
#define V_VD 480
|
||||
#define V_FP 22
|
||||
|
||||
#define LCD_WIDTH 154
|
||||
#define LCD_HEIGHT 86
|
||||
#define LCD_WIDTH 154
|
||||
#define LCD_HEIGHT 86
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define SWAP_RB 0
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = NULL;
|
||||
screen->standby = NULL;
|
||||
}
|
||||
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
#endif
|
||||
|
||||
103
drivers/video/rockchip/screen/lcd_byd1024x600.c
Normal file → Executable file
103
drivers/video/rockchip/screen/lcd_byd1024x600.c
Normal file → Executable file
@@ -3,23 +3,15 @@
|
||||
* written by Michael Lin, 2010-06-18
|
||||
*/
|
||||
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef _LCD_BYD1024X600__
|
||||
#define _LCD_BYD1024X600__
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P888
|
||||
//tcl miaozh modify
|
||||
//#define OUT_CLK 50000000
|
||||
#define OUT_CLK 47000000
|
||||
//#define OUT_CLK 42000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 47000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 10
|
||||
@@ -33,79 +25,18 @@
|
||||
#define V_FP 9
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
|
||||
//tcl miaozh modify
|
||||
//#define LCD_WIDTH 1024 //need modify
|
||||
//#define LCD_HEIGHT 600
|
||||
#define LCD_WIDTH 153 //need modify
|
||||
#define LCD_HEIGHT 90
|
||||
|
||||
static struct rk29lcd_info *gLcd_info = NULL;
|
||||
|
||||
#define DRVDelayUs(i) udelay(i*2)
|
||||
|
||||
static int init(void);
|
||||
static int standby(u8 enable);
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
/*screen->init = init;*/
|
||||
screen->init = NULL;
|
||||
screen->standby = standby;
|
||||
}
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
static int standby(u8 enable)
|
||||
{
|
||||
printk(KERN_INFO "byd1024x600 lcd standby, enable=%d\n", enable);
|
||||
if (enable)
|
||||
{
|
||||
//rockchip_mux_api_set(LED_CON_IOMUX_PINNAME, LED_CON_IOMUX_PINDIR);
|
||||
//GPIOSetPinDirection(LED_CON_IOPIN,GPIO_OUT);
|
||||
//GPIOSetPinLevel(LED_CON_IOPIN,GPIO_HIGH);
|
||||
// gpio_set_value(LCD_DISP_ON_IOPIN, GPIO_LOW);
|
||||
}
|
||||
else
|
||||
{
|
||||
//rockchip_mux_api_set(LED_CON_IOMUX_PINNAME, 1);
|
||||
// gpio_set_value(LCD_DISP_ON_IOPIN, GPIO_HIGH);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
||||
#define LCD_WIDTH 153 //need modify
|
||||
#define LCD_HEIGHT 90
|
||||
|
||||
#endif
|
||||
|
||||
73
drivers/video/rockchip/screen/lcd_hh070d_lvds.c
Normal file → Executable file
73
drivers/video/rockchip/screen/lcd_hh070d_lvds.c
Normal file → Executable file
@@ -1,18 +1,13 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef _LCD_HH070D__
|
||||
#define _LCD_HH070D__
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_LVDS
|
||||
#define OUT_FORMAT 1//LVDS_8BIT_2
|
||||
#define SCREEN_TYPE SCREEN_LVDS
|
||||
#define LVDS_FORMAT LVDS_8BIT_2
|
||||
|
||||
#define OUT_FACE OUT_D888_P666
|
||||
#define OUT_CLK 60000000
|
||||
#define LCDC_ACLK 300000000//500000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 60000000
|
||||
#define LCDC_ACLK 300000000//500000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 100
|
||||
@@ -25,53 +20,17 @@
|
||||
#define V_VD 600
|
||||
#define V_FP 150
|
||||
|
||||
#define LCD_WIDTH 202
|
||||
#define LCD_HEIGHT 152
|
||||
#define LCD_WIDTH 202
|
||||
#define LCD_HEIGHT 152
|
||||
/* Other */
|
||||
#define DCLK_POL 1
|
||||
#define SWAP_RB 0
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
screen->hw_format = OUT_FORMAT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = NULL;
|
||||
screen->standby = NULL;
|
||||
}
|
||||
#define DCLK_POL 1
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
70
drivers/video/rockchip/screen/lcd_hj080na.c
Normal file → Executable file
70
drivers/video/rockchip/screen/lcd_hj080na.c
Normal file → Executable file
@@ -1,17 +1,11 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
#ifndef _LCD_HJ080NA__
|
||||
#define _LCD_HJ080NA__
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_2
|
||||
#define OUT_FACE OUT_P888
|
||||
#define OUT_CLK 65000000
|
||||
#define DCLK 65000000
|
||||
#define LCDC_ACLK 500000000//312000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
@@ -25,52 +19,16 @@
|
||||
#define V_VD 768
|
||||
#define V_FP 15
|
||||
|
||||
#define LCD_WIDTH 216
|
||||
#define LCD_HEIGHT 162
|
||||
#define LCD_WIDTH 216
|
||||
#define LCD_HEIGHT 162
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define SWAP_RB 0
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = NULL;
|
||||
screen->standby = NULL;
|
||||
}
|
||||
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
#endif
|
||||
|
||||
75
drivers/video/rockchip/screen/lcd_hl070vm4.c
Normal file → Executable file
75
drivers/video/rockchip/screen/lcd_hl070vm4.c
Normal file → Executable file
@@ -1,15 +1,17 @@
|
||||
|
||||
#ifndef _LCD_HL070VM_
|
||||
#define _LCD_HL070VM_
|
||||
#include <linux/delay.h>
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include <linux/rk_fb.h>
|
||||
|
||||
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P888
|
||||
#define OUT_CLK 27000000
|
||||
#define DCLK 27000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
@@ -28,8 +30,14 @@
|
||||
#define LCD_HEIGHT 480
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 1 ///0
|
||||
#define DCLK_POL 1
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
#define TXD_PORT gLcd_info->txd_pin
|
||||
#define CLK_PORT gLcd_info->clk_pin
|
||||
@@ -48,52 +56,9 @@
|
||||
static struct rk29lcd_info *gLcd_info = NULL;
|
||||
|
||||
#define DRVDelayUs(i) udelay(i*2)
|
||||
|
||||
int init(void);
|
||||
int standby(u8 enable);
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = init;
|
||||
screen->standby = standby;
|
||||
if(lcd_info)
|
||||
gLcd_info = lcd_info;
|
||||
}
|
||||
#define RK_SCREEN_INIT
|
||||
int rk_lcd_init(void);
|
||||
int rk_lcd_standby(u8 enable);
|
||||
|
||||
|
||||
//void spi_screenreg_set(uint32 Addr, uint32 Data)
|
||||
@@ -167,7 +132,7 @@ void spi_screenreg_set(u32 Data)
|
||||
}
|
||||
|
||||
|
||||
int init(void)
|
||||
int rk_lcd_init(void)
|
||||
{
|
||||
if(gLcd_info)
|
||||
gLcd_info->io_init();
|
||||
@@ -190,12 +155,12 @@ r5 01100001 11001110
|
||||
return 0;
|
||||
}
|
||||
|
||||
int standby(u8 enable)
|
||||
int rk_lcd_standby(u8 enable)
|
||||
{
|
||||
if(gLcd_info)
|
||||
gLcd_info->io_init();
|
||||
if(!enable) {
|
||||
init();
|
||||
rk_lcd_init();
|
||||
} //else {
|
||||
// spi_screenreg_set(0x03, 0x5f);
|
||||
// }
|
||||
@@ -203,4 +168,4 @@ int standby(u8 enable)
|
||||
gLcd_info->io_deinit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
79
drivers/video/rockchip/screen/lcd_hsd800x480.c
Normal file → Executable file
79
drivers/video/rockchip/screen/lcd_hsd800x480.c
Normal file → Executable file
@@ -1,18 +1,17 @@
|
||||
/* This Lcd Driver is HSD070IDW1 write by cst 2009.10.27 */
|
||||
#include <linux/fb.h>
|
||||
#ifndef __LCD_HSD800X480__
|
||||
#define __LCD_HSD800X480__
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P888
|
||||
#define OUT_CLK 33000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 33000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 8 //10
|
||||
@@ -26,8 +25,15 @@
|
||||
#define V_FP 32 //18
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
#define LCD_WIDTH 154 //need modify
|
||||
#define LCD_HEIGHT 85
|
||||
@@ -49,54 +55,9 @@
|
||||
static struct rk29lcd_info *gLcd_info = NULL;
|
||||
|
||||
#define DRVDelayUs(i) udelay(i*2)
|
||||
|
||||
int init(void);
|
||||
int standby(u8 enable);
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
/*screen->init = init;*/
|
||||
screen->init = NULL;
|
||||
screen->standby = standby;
|
||||
if(lcd_info)
|
||||
gLcd_info = lcd_info;
|
||||
}
|
||||
//cannot need init,so set screen->init = null at rk29_fb.c file
|
||||
#define RK_SCREEN_INIT
|
||||
int rk_lcd_init(void);
|
||||
int rk_lcd_standby(u8 enable);
|
||||
|
||||
void spi_screenreg_set(u32 Addr, u32 Data)
|
||||
{
|
||||
@@ -167,7 +128,7 @@ void spi_screenreg_set(u32 Addr, u32 Data)
|
||||
}
|
||||
|
||||
|
||||
int init(void)
|
||||
int rk_lcd_init(void)
|
||||
{
|
||||
if(gLcd_info)
|
||||
gLcd_info->io_init();
|
||||
@@ -213,7 +174,7 @@ int init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int standby(u8 enable)
|
||||
int rk_lcd_standby(u8 enable)
|
||||
{
|
||||
#if 1
|
||||
if(gLcd_info)
|
||||
@@ -243,4 +204,4 @@ int standby(u8 enable)
|
||||
#endif
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
75
drivers/video/rockchip/screen/lcd_hx8357.c
Normal file → Executable file
75
drivers/video/rockchip/screen/lcd_hx8357.c
Normal file → Executable file
@@ -1,17 +1,19 @@
|
||||
#include <linux/fb.h>
|
||||
#ifndef _LCD_HX8357_H_
|
||||
#define _LCD_HX8357_H_
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P666 /*OUT_P888*/
|
||||
#define OUT_CLK 10000000 //***27
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 10000000 //***27
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 8
|
||||
@@ -28,12 +30,19 @@
|
||||
#define LCD_HEIGHT 480
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
static struct rk29lcd_info *gLcd_info = NULL;
|
||||
int init(void);
|
||||
int standby(u8 enable);
|
||||
int rk_lcd_init(void);
|
||||
int rk_lcd_standby(u8 enable);
|
||||
|
||||
|
||||
#define TXD_PORT gLcd_info->txd_pin
|
||||
@@ -165,51 +174,9 @@ void spi_screenreg_set(u32 Addr, u32 Data)
|
||||
DRVDelayUs(2);
|
||||
}
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
//printk("lcd_hx8357 set_lcd_info \n");
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP; /*>2*/
|
||||
screen->right_margin = H_FP; /*>2*/
|
||||
screen->hsync_len = H_PW; /*>2*/ //***all > 326, 4<PW+BP<15,
|
||||
screen->upper_margin = V_BP; /*>2*/
|
||||
screen->lower_margin = V_FP; /*>2*/
|
||||
screen->vsync_len = V_PW; /*>6*/
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = init;
|
||||
screen->standby = standby;
|
||||
if(lcd_info)
|
||||
gLcd_info = lcd_info;
|
||||
}
|
||||
|
||||
int init(void)
|
||||
int rk_lcd_init(void)
|
||||
{
|
||||
|
||||
if(gLcd_info)
|
||||
@@ -345,7 +312,7 @@ int init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int standby(u8 enable) //***enable =1 means suspend, 0 means resume
|
||||
int rk_lcd_standby(u8 enable) //***enable =1 means suspend, 0 means resume
|
||||
{
|
||||
|
||||
if(gLcd_info)
|
||||
@@ -398,4 +365,4 @@ int standby(u8 enable) //***enable =1 means suspend, 0 means resume
|
||||
gLcd_info->io_deinit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
71
drivers/video/rockchip/screen/lcd_nt35580.c
Normal file → Executable file
71
drivers/video/rockchip/screen/lcd_nt35580.c
Normal file → Executable file
@@ -1,17 +1,18 @@
|
||||
#include <linux/fb.h>
|
||||
|
||||
#ifndef __LCD_NT35580_H__
|
||||
#define __LCD_NT35580_H__
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P888
|
||||
#define OUT_CLK 24000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 24000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 1
|
||||
@@ -28,8 +29,15 @@
|
||||
#define LCD_HEIGHT 800
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
#define TXD_PORT gLcd_info->txd_pin
|
||||
#define CLK_PORT gLcd_info->clk_pin
|
||||
@@ -304,7 +312,7 @@ void spi_screenreg_set(u32 Addr, u32 Data)
|
||||
|
||||
|
||||
|
||||
int lcd_init(void)
|
||||
int rk_lcd_init(void)
|
||||
{
|
||||
|
||||
#if 0
|
||||
@@ -420,53 +428,10 @@ int lcd_init(void)
|
||||
}
|
||||
|
||||
|
||||
int lcd_standby(u8 enable)
|
||||
int rk_lcd_standby(u8 enable)
|
||||
{
|
||||
return 0;
|
||||
}
|
||||
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk2918lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = lcd_init;
|
||||
screen->standby = lcd_standby;
|
||||
if(lcd_info)
|
||||
gLcd_info = lcd_info;
|
||||
}
|
||||
|
||||
|
||||
#endif
|
||||
|
||||
77
drivers/video/rockchip/screen/lcd_tj048nc01ca.c
Normal file → Executable file
77
drivers/video/rockchip/screen/lcd_tj048nc01ca.c
Normal file → Executable file
@@ -1,17 +1,15 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#ifndef LCD_TJ048NC01CA_H_
|
||||
#define LCD_TJ048NC01CA_H_
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
#include <linux/delay.h>
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P888
|
||||
#define OUT_CLK 23000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
#define DCLK 23000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
#define H_PW 1
|
||||
@@ -29,7 +27,14 @@
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 1
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
#define TXD_PORT gLcd_info->txd_pin
|
||||
#define CLK_PORT gLcd_info->clk_pin
|
||||
@@ -48,51 +53,9 @@
|
||||
#define DRVDelayUs(i) udelay(i*2)
|
||||
|
||||
static struct rk29lcd_info *gLcd_info = NULL;
|
||||
int lcd_init(void);
|
||||
int lcd_standby(u8 enable);
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = lcd_init;
|
||||
screen->standby = lcd_standby;
|
||||
if(lcd_info)
|
||||
gLcd_info = lcd_info;
|
||||
}
|
||||
#define RK_SCREEN_INIT
|
||||
int rk_lcd_init(void);
|
||||
int rk_lcd_standby(u8 enable);
|
||||
|
||||
void spi_screenreg_set(u32 Addr, u32 Data)
|
||||
{
|
||||
@@ -154,7 +117,7 @@ void spi_screenreg_set(u32 Addr, u32 Data)
|
||||
}
|
||||
|
||||
|
||||
int lcd_init(void)
|
||||
int rk_lcd_init(void)
|
||||
{
|
||||
if(gLcd_info)
|
||||
gLcd_info->io_init();
|
||||
@@ -193,7 +156,7 @@ int lcd_init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
int lcd_standby(u8 enable)
|
||||
int rk_lcd_standby(u8 enable)
|
||||
{
|
||||
if(gLcd_info)
|
||||
gLcd_info->io_init();
|
||||
@@ -206,5 +169,5 @@ int lcd_standby(u8 enable)
|
||||
gLcd_info->io_deinit();
|
||||
return 0;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
|
||||
66
drivers/video/rockchip/screen/lcd_tx23d88vm.c
Normal file → Executable file
66
drivers/video/rockchip/screen/lcd_tx23d88vm.c
Normal file → Executable file
@@ -1,20 +1,12 @@
|
||||
#include <linux/fb.h>
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
#ifndef _LCD_TX23D88VM_H_
|
||||
#define _LCD_TX23D88VM_H_
|
||||
|
||||
|
||||
/* Base */
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_D888_P666
|
||||
//#define OUT_FACE OUT_P888//modify by xhh
|
||||
|
||||
|
||||
#define OUT_CLK 66000000//64000000
|
||||
#define DCLK 66000000//64000000
|
||||
#define LCDC_ACLK 500000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
@@ -32,47 +24,13 @@
|
||||
#define LCD_HEIGHT 125
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
//#define DCLK_POL 1//xhh
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = NULL;
|
||||
screen->standby = NULL;
|
||||
}
|
||||
#endif
|
||||
|
||||
79
drivers/video/rockchip/screen/lcd_wy_800x480.c
Normal file → Executable file
79
drivers/video/rockchip/screen/lcd_wy_800x480.c
Normal file → Executable file
@@ -1,18 +1,20 @@
|
||||
#include <linux/fb.h>
|
||||
|
||||
#ifndef _LCD_WY__
|
||||
#define _LCD_WY__
|
||||
|
||||
#include <linux/delay.h>
|
||||
#include "../../rk29_fb.h"
|
||||
#include <mach/gpio.h>
|
||||
#include <mach/iomux.h>
|
||||
#include <mach/board.h>
|
||||
#include "screen.h"
|
||||
|
||||
/* Base */
|
||||
#define LCD_WIDTH 154 //need modify
|
||||
#define LCD_HEIGHT 85
|
||||
|
||||
#define OUT_TYPE SCREEN_RGB
|
||||
#define SCREEN_TYPE SCREEN_RGB
|
||||
#define LVDS_FORMAT LVDS_8BIT_1
|
||||
#define OUT_FACE OUT_P666
|
||||
#define OUT_CLK 33000000
|
||||
#define DCLK 33000000
|
||||
#define LCDC_ACLK 150000000 //29 lcdc axi DMA Ƶ<><C6B5>
|
||||
|
||||
/* Timing */
|
||||
@@ -27,12 +29,18 @@
|
||||
#define V_FP 22
|
||||
|
||||
/* Other */
|
||||
#define DCLK_POL 0
|
||||
#define SWAP_RB 0
|
||||
#define DCLK_POL 0
|
||||
#define DEN_POL 0
|
||||
#define VSYNC_POL 0
|
||||
#define HSYNC_POL 0
|
||||
|
||||
#define SWAP_RB 0
|
||||
#define SWAP_RG 0
|
||||
#define SWAP_GB 0
|
||||
|
||||
static struct rk29lcd_info *gLcd_info = NULL;
|
||||
|
||||
static int init(void)
|
||||
#define RK_SCREEN_INIT
|
||||
static int rk_lcd_init(void)
|
||||
{
|
||||
int ret = 0;
|
||||
|
||||
@@ -42,7 +50,7 @@ static int init(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int standby(u8 enable)
|
||||
static int rk_lcd_standby(u8 enable)
|
||||
{
|
||||
if(!enable)
|
||||
{
|
||||
@@ -57,53 +65,4 @@ static int standby(u8 enable)
|
||||
return 0;
|
||||
}
|
||||
|
||||
void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info )
|
||||
{
|
||||
/* screen type & face */
|
||||
screen->type = OUT_TYPE;
|
||||
screen->face = OUT_FACE;
|
||||
|
||||
/* Screen size */
|
||||
screen->x_res = H_VD;
|
||||
screen->y_res = V_VD;
|
||||
|
||||
screen->width = LCD_WIDTH;
|
||||
screen->height = LCD_HEIGHT;
|
||||
|
||||
/* Timing */
|
||||
screen->lcdc_aclk = LCDC_ACLK;
|
||||
screen->pixclock = OUT_CLK;
|
||||
screen->left_margin = H_BP;
|
||||
screen->right_margin = H_FP;
|
||||
screen->hsync_len = H_PW;
|
||||
screen->upper_margin = V_BP;
|
||||
screen->lower_margin = V_FP;
|
||||
screen->vsync_len = V_PW;
|
||||
|
||||
/* Pin polarity */
|
||||
screen->pin_hsync = 0;
|
||||
screen->pin_vsync = 0;
|
||||
screen->pin_den = 0;
|
||||
screen->pin_dclk = DCLK_POL;
|
||||
|
||||
/* Swap rule */
|
||||
screen->swap_rb = SWAP_RB;
|
||||
screen->swap_rg = 0;
|
||||
screen->swap_gb = 0;
|
||||
screen->swap_delta = 0;
|
||||
screen->swap_dumy = 0;
|
||||
|
||||
/* Operation function*/
|
||||
screen->init = init;
|
||||
screen->standby = standby;
|
||||
if(lcd_info)
|
||||
{
|
||||
gLcd_info = lcd_info;
|
||||
}
|
||||
else
|
||||
{
|
||||
printk("%s lcd_info==NULL\n", __func__);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
6
include/linux/rk_screen.h
Normal file → Executable file
6
include/linux/rk_screen.h
Normal file → Executable file
@@ -211,13 +211,9 @@ struct rk29fb_info {
|
||||
void (*set_screen_info)(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info );
|
||||
};
|
||||
|
||||
#ifndef CONFIG_DISPLAY_SUPPORT
|
||||
static inline void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info) {}
|
||||
static inline size_t get_fb_size(void) { return 0;}
|
||||
#else
|
||||
extern void set_lcd_info(struct rk29fb_screen *screen, struct rk29lcd_info *lcd_info);
|
||||
extern size_t get_fb_size(void);
|
||||
#endif
|
||||
|
||||
extern void set_tv_info(struct rk29fb_screen *screen);
|
||||
extern void set_hdmi_info(struct rk29fb_screen *screen);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user