add oppo P91 config

This commit is contained in:
zyw 2011-08-10 15:41:51 +08:00
parent b6d1a303ec
commit cd6122c33d
13 changed files with 7470 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@ -58,6 +58,13 @@ config MACH_RK29_newton
bool "ROCKCHIP Board Rk29 For project newton"
help
Support for the ROCKCHIP Board For project newton.
config MACH_RK29_P91
depends on ARCH_RK29
bool "ROCKCHIP Board Rk29 For P91"
help
Support for the ROCKCHIP Board For Rk29 P91.
endchoice
choice DDR_TYPE

View File

@ -14,6 +14,7 @@ obj-$(CONFIG_RK29_VPU_SERVICE) += vpu_service.o
obj-$(CONFIG_RK29_VPU_OLD) += vpu.o
obj-$(CONFIG_RK29_PWM_INSRAM) += pwm_sram.o
obj-$(CONFIG_MACH_RK29SDK) += board-rk29sdk.o board-rk29sdk-key.o board-rk29sdk-rfkill.o board-rk29sdk-power.o
obj-$(CONFIG_MACH_RK29_P91) += board-rk29-p91.o board-rk29-p91-key.o board-rk29sdk-rfkill.o board-rk29sdk-power.o
obj-$(CONFIG_MACH_RK29SDK_DDR3) += board-rk29-ddr3sdk.o board-rk29sdk-key.o board-rk29sdk-rfkill.o board-rk29sdk-power.o
obj-$(CONFIG_MACH_RK29WINACCORD) += board-rk29-winaccord.o board-rk29sdk-key.o
obj-$(CONFIG_MACH_RK29_MALATA) += board-malata.o board-rk29malata-key.o board-rk29sdk-rfkill.o

View File

@ -0,0 +1,120 @@
#include <mach/key.h>
#include <mach/gpio.h>
#include <mach/board.h>
#define EV_ENCALL KEY_F4
#define EV_MENU KEY_F1
#define PRESS_LEV_LOW 1
#define PRESS_LEV_HIGH 0
static struct rk29_keys_button key_button[] = {
{
.desc = "vol-",
.code = KEY_VOLUMEDOWN,
//.gpio = RK29_PIN6_PA0,
.gpio = RK29_PIN6_PA1,//modify by xhh
.active_low = PRESS_LEV_LOW,
},
{
.desc = "menu",
.code = EV_MENU,
//.gpio = RK29_PIN6_PA1,
.gpio = RK29_PIN6_PA0,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "home",
.code = KEY_HOME,
//.gpio = RK29_PIN6_PA2,
.gpio = RK29_PIN6_PA3,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "vol+",
.code = KEY_VOLUMEUP,
//.gpio = RK29_PIN6_PA3,
.gpio = RK29_PIN6_PA2,//modify by xhh
.active_low = PRESS_LEV_LOW,
},
#if 0
{
.desc = "search",
.code = KEY_SEARCH,
.gpio = RK29_PIN6_PA4,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "esc",
.code = KEY_BACK,
.gpio = RK29_PIN6_PA5,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "sensor",
.code = KEY_CAMERA,
.gpio = RK29_PIN6_PA6,
.active_low = PRESS_LEV_LOW,
},
#endif
{
.desc = "play",
.code = KEY_POWER,
.gpio = RK29_PIN6_PA7,
.active_low = PRESS_LEV_LOW,
//.code_long_press = EV_ENCALL,
.wakeup = 1,
},
#if 0
{
.desc = "vol+",
.code = KEY_VOLUMEDOWN,
.adc_value = 95,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "vol-",
.code = KEY_VOLUMEUP,
.adc_value = 249,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "menu",
.code = EV_MENU,
.adc_value = 406,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "home",
.code = KEY_HOME,
.code_long_press = KEY_F4,
.adc_value = 561,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "esc",
.code = KEY_ESC,
.adc_value = 726,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
{
.desc = "adkey6",
.code = KEY_BACK,
.code_long_press = EV_ENCALL,
.adc_value = 899,
.gpio = INVALID_GPIO,
.active_low = PRESS_LEV_LOW,
},
#endif
};
struct rk29_keys_platform_data rk29_keys_pdata = {
.buttons = key_button,
.nbuttons = ARRAY_SIZE(key_button),
.chn = -1, //chn: 0-7, if do not use ADC,set 'chn' -1
};

File diff suppressed because it is too large Load Diff

View File

@ -192,6 +192,16 @@ struct eeti_egalax_platform_data{
int disp_on_value;
};
//added by zyw
struct atmel_1386_platform_data {
u8 numtouch; /* Number of touches to report */
int (*init_platform_hw)(struct device *dev);
void (*exit_platform_hw)(struct device *dev);
int max_x; /* The default reported X range */
int max_y; /* The default reported Y range */
u8 (*valid_interrupt) (void);
u8 (*read_chg) (void);
};
/*sintex touch*/
struct sintek_platform_data {

View File

@ -761,4 +761,33 @@ config TOUCHSCREEN_FT5406
in its table of I2C devices.
If unsure, say N(but it's safe to say "Y").
config ATMEL_MXT1386
tristate "ATMEL_MXT1386 touchscreen panel support"
depends on I2C
help
Say Y here to enable support for I2C connected ATMEL_MXT1386 touch panels.
To compile this driver as a module, choose M here: the
module will be called atmel_mxt1386_ts.
config ATMEL_MXT1386_MAX_X
int "ATMEL_MXT1386_MAX_X"
depends on ATMEL_MXT1386
default 4095
help
RK29 ATMEL_MXT1386 touch max X size
config ATMEL_MXT1386_MAX_Y
int "ATMEL_MXT1386_MAX_Y"
depends on ATMEL_MXT1386
default 4095
help
RK29 ATMEL_MXT1386 touch max Y size
config ATMEL_MXT1386_DEBUG
bool "ATMEL_MXT1386 debug"
depends on ATMEL_MXT1386
default n
help
RK29 ATMEL_MXT1386 touch debug
endif

View File

@ -53,6 +53,7 @@ obj-$(CONFIG_TOUCHSCREEN_IT7260) += it7260_ts.o
obj-$(CONFIG_SINTEK_3FA16) += sintek_3FA16.o
obj-$(CONFIG_EETI_EGALAX) += eeti_egalax_i2c.o
obj-$(CONFIG_ATMEL_MXT224) += atmel_maxtouch.o
obj-$(CONFIG_ATMEL_MXT1386) += atmel_mxt1386.o
obj-$(CONFIG_TOUCHSCREEN_GT801_IIC) += gt801_ts.o
obj-$(CONFIG_TOUCHSCREEN_GT818_IIC) += gt818_ts.o
obj-$(CONFIG_TOUCHSCREEN_ILI2102_IIC) += ili2102_ts.o

File diff suppressed because it is too large Load Diff

View File

@ -0,0 +1,295 @@
/*
* Atmel maXTouch header file
*
* Copyright (c) 2010 Atmel Corporation
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 or 3 as
* published by the Free Software Foundation.
* See the file "COPYING" in the main directory of this archive
* for more details.
*
*/
#include <linux/device.h>
#define MXT224_I2C_ADDR1 0x4A
#define MXT224_I2C_ADDR2 0x4B
#define MXT1386_I2C_ADDR1 0x4C
#define MXT1386_I2C_ADDR2 0x4D
#define MXT1386_I2C_ADDR3 0x5A
#define MXT1386_I2C_ADDR4 0x5B
/*
* Select this address from above depending on what maXTouch
* chip you have and how it's address pins are configured;
* see datasheet.
*/
#define MXT_I2C_ADDRESS MXT1386_I2C_ADDR1
#define MXT_BL_ADDRESS 0x25
#define MXT224_FAMILYID 0x80
#define MXT1386_FAMILYID 0xA0
#define MXT224_CAL_VARIANTID 0x01
#define MXT224_UNCAL_VARIANTID 0x00
#define MXT1386_CAL_VARIANTID 0x00
#define MXT_MAX_REPORTED_WIDTH 255
#define MXT_MAX_REPORTED_PRESSURE 255
#define MXT_MAX_TOUCH_SIZE 255
#define MXT_MAX_NUM_TOUCHES 10
/* Fixed addresses inside maXTouch device */
#define MXT_ADDR_INFO_BLOCK 0
#define MXT_ADDR_OBJECT_TABLE 7
#define MXT_ID_BLOCK_SIZE 7
#define MXT_OBJECT_TABLE_ELEMENT_SIZE 6
/* Object types */
#define MXT_DEBUG_DELTAS_T2 2
#define MXT_DEBUG_REFERENCES_T3 3
#define MXT_GEN_MESSAGEPROCESSOR_T5 5
#define MXT_GEN_COMMANDPROCESSOR_T6 6
#define MXT_GEN_POWERCONFIG_T7 7
#define MXT_GEN_ACQUIRECONFIG_T8 8
#define MXT_TOUCH_MULTITOUCHSCREEN_T9 9
#define MXT_TOUCH_SINGLETOUCHSCREEN_T10 10
#define MXT_TOUCH_XSLIDER_T11 11
#define MXT_TOUCH_YSLIDER_T12 12
#define MXT_TOUCH_XWHEEL_T13 13
#define MXT_TOUCH_YWHEEL_T14 14
#define MXT_TOUCH_KEYARRAY_T15 15
#define MXT_SPT_COMMSCONFIG_T18 18
#define MXT_SPT_GPIOPWM_T19 19
#define MXT_PROCI_GRIPFACESUPPRESSION_T20 20
#define MXT_PROCG_NOISESUPPRESSION_T22 22
#define MXT_TOUCH_PROXIMITY_T23 23
#define MXT_PROCI_ONETOUCHGESTUREPROCESSOR_T24 24
#define MXT_SPT_SELFTEST_T25 25
#define MXT_DEBUG_CTERANGE_T26 26
#define MXT_PROCI_TWOTOUCHGESTUREPROCESSOR_T27 27
#define MXT_SPT_CTECONFIG_T28 28
#define MXT_TOUCH_KEYSET_T31 31
#define MXT_TOUCH_XSLIDERSET_T32 32
#define MXT_DEBUG_DIAGNOSTIC_T37 37
#define MXT_USER_INFO_T38 38
#define MXT_PROCI_GRIPSUPPRESSION_T40 40
#define MXT_PROCI_PALMSUPPRESSION_T41 41
#define MXT_SPT_DIGITIZER_T43 43
/*
* If a message is read from mXT when there's no new messages available,
* the report ID of the message will be 0xFF.
*/
#define MXT_END_OF_MESSAGES 0xFF
/* GEN_COMMANDPROCESSOR_T6 Register offsets from T6 base address */
#define MXT_ADR_T6_RESET 0x00
#define MXT_ADR_T6_BACKUPNV 0x01
#define MXT_ADR_T6_CALIBRATE 0x02
#define MXT_ADR_T6_REPORTALL 0x03
#define MXT_ADR_T6_RESERVED 0x04
#define MXT_ADR_T6_DIAGNOSTIC 0x05
/* T6 Debug Diagnostics Commands */
#define MXT_CMD_T6_PAGE_UP 0x01
#define MXT_CMD_T6_PAGE_DOWN 0x02
#define MXT_CMD_T6_DELTAS_MODE 0x10
#define MXT_CMD_T6_REFERENCES_MODE 0x11
#define MXT_CMD_T6_CTE_MODE 0x31
/* T6 Backup Command */
#define MXT_CMD_T6_BACKUP 0x55
/* SPT_DEBUG_DIAGNOSTIC_T37 Register offsets from T37 base address */
#define MXT_ADR_T37_PAGE 0x01
#define MXT_ADR_T37_DATA 0x02
/************************************************************************
* MESSAGE OBJECTS ADDRESS FIELDS
*
************************************************************************/
#define MXT_MSG_REPORTID 0x00
/* MXT_GEN_MESSAGEPROCESSOR_T5 Message address definitions */
#define MXT_MSG_T5_REPORTID 0x00
#define MXT_MSG_T5_MESSAGE 0x01
#define MXT_MSG_T5_CHECKSUM 0x08
/* MXT_GEN_COMMANDPROCESSOR_T6 Message address definitions */
#define MXT_MSG_T6_STATUS 0x01
#define MXT_MSGB_T6_COMSERR 0x04
#define MXT_MSGB_T6_CFGERR 0x08
#define MXT_MSGB_T6_CAL 0x10
#define MXT_MSGB_T6_SIGERR 0x20
#define MXT_MSGB_T6_OFL 0x40
#define MXT_MSGB_T6_RESET 0x80
/* Three bytes */
#define MXT_MSG_T6_CHECKSUM 0x02
/* MXT_GEN_POWERCONFIG_T7 NO Message address definitions */
/* MXT_GEN_ACQUIRECONFIG_T8 Message address definitions */
/* MXT_TOUCH_MULTITOUCHSCREEN_T9 Message address definitions */
#define MXT_MSG_T9_STATUS 0x01
/* Status bit field */
#define MXT_MSGB_T9_SUPPRESS 0x02
#define MXT_MSGB_T9_AMP 0x04
#define MXT_MSGB_T9_VECTOR 0x08
#define MXT_MSGB_T9_MOVE 0x10
#define MXT_MSGB_T9_RELEASE 0x20
#define MXT_MSGB_T9_PRESS 0x40
#define MXT_MSGB_T9_DETECT 0x80
#define MXT_MSG_T9_XPOSMSB 0x02
#define MXT_MSG_T9_YPOSMSB 0x03
#define MXT_MSG_T9_XYPOSLSB 0x04
#define MXT_MSG_T9_TCHAREA 0x05
#define MXT_MSG_T9_TCHAMPLITUDE 0x06
#define MXT_MSG_T9_TCHVECTOR 0x07
/* MXT_SPT_GPIOPWM_T19 Message address definitions */
#define MXT_MSG_T19_STATUS 0x01
/* MXT_PROCI_GRIPFACESUPPRESSION_T20 Message address definitions */
#define MXT_MSG_T20_STATUS 0x01
#define MXT_MSGB_T20_FACE_SUPPRESS 0x01
/* MXT_PROCG_NOISESUPPRESSION_T22 Message address definitions */
#define MXT_MSG_T22_STATUS 0x01
#define MXT_MSGB_T22_FHCHG 0x01
#define MXT_MSGB_T22_GCAFERR 0x04
#define MXT_MSGB_T22_FHERR 0x08
#define MXT_MSG_T22_GCAFDEPTH 0x02
/* MXT_TOUCH_PROXIMITY_T23 Message address definitions */
#define MXT_MSG_T23_STATUS 0x01
#define MXT_MSGB_T23_FALL 0x20
#define MXT_MSGB_T23_RISE 0x40
#define MXT_MSGB_T23_DETECT 0x80
/* 16 bit */
#define MXT_MSG_T23_PROXDELTA 0x02
/* MXT_PROCI_ONETOUCHGESTUREPROCESSOR_T24 Message address definitions */
#define MXT_MSG_T24_STATUS 0x01
#define MXT_MSG_T24_XPOSMSB 0x02
#define MXT_MSG_T24_YPOSMSB 0x03
#define MXT_MSG_T24_XYPOSLSB 0x04
#define MXT_MSG_T24_DIR 0x05
/* 16 bit */
#define MXT_MSG_T24_DIST 0x06
/* MXT_SPT_SELFTEST_T25 Message address definitions */
#define MXT_MSG_T25_STATUS 0x01
/* 5 Bytes */
#define MXT_MSGR_T25_OK 0xFE
#define MXT_MSGR_T25_INVALID_TEST 0xFD
#define MXT_MSGR_T25_PIN_FAULT 0x11
#define MXT_MSGR_T25_SIGNAL_LIMIT_FAULT 0x17
#define MXT_MSGR_T25_GAIN_ERROR 0x20
#define MXT_MSG_T25_INFO 0x02
/* MXT_PROCI_TWOTOUCHGESTUREPROCESSOR_T27 Message address definitions */
#define MXT_MSG_T27_STATUS 0x01
#define MXT_MSGB_T27_ROTATEDIR 0x10
#define MXT_MSGB_T27_PINCH 0x20
#define MXT_MSGB_T27_ROTATE 0x40
#define MXT_MSGB_T27_STRETCH 0x80
#define MXT_MSG_T27_XPOSMSB 0x02
#define MXT_MSG_T27_YPOSMSB 0x03
#define MXT_MSG_T27_XYPOSLSB 0x04
#define MXT_MSG_T27_ANGLE 0x05
/* 16 bit */
#define MXT_MSG_T27_SEPARATION 0x06
/* MXT_SPT_CTECONFIG_T28 Message address definitions */
#define MXT_MSG_T28_STATUS 0x01
#define MXT_MSGB_T28_CHKERR 0x01
/* One Touch Events */
#define MXT_GESTURE_RESERVED 0x00
#define MXT_GESTURE_PRESS 0x01
#define MXT_GESTURE_RELEASE 0x02
#define MXT_GESTURE_TAP 0x03
#define MXT_GESTURE_DOUBLE_TAP 0x04
#define MXT_GESTURE_FLICK 0x05
#define MXT_GESTURE_DRAG 0x06
#define MXT_GESTURE_SHORT_PRESS 0x07
#define MXT_GESTURE_LONG_PRESS 0x08
#define MXT_GESTURE_REPEAT_PRESS 0x09
#define MXT_GESTURE_TAP_AND_PRESS 0x0a
#define MXT_GESTURE_THROW 0x0b
/* Two-touch events */
#define MXT_GESTURE_STRETCH (1 << 7)
#define MXT_GESTURE_ROTATE (1 << 6)
#define MXT_GESTURE_PINCH (1 << 5)
#define MXT_GESTURE_ROTATEDIR (1 << 4)
/* Bootloader states */
#define WAITING_BOOTLOAD_COMMAND 0xC0
#define WAITING_FRAME_DATA 0x80
#define APP_CRC_FAIL 0x40
#define FRAME_CRC_CHECK 0x02
#define FRAME_CRC_PASS 0x04
#define FRAME_CRC_FAIL 0x03
#define MXT_MAX_FRAME_SIZE 276
/* Debug levels */
#define DEBUG_INFO 1
#define DEBUG_VERBOSE 2
#define DEBUG_MESSAGES 5
#define DEBUG_RAW 8
#define DEBUG_TRACE 10
/* IOCTL commands */
/* TODO: get correct numbers! */
#define MXT_SET_ADDRESS_IOCTL ('x' + 1) /* Sets the internal address pointer */
#define MXT_RESET_IOCTL ('x' + 2) /* Resets the device */
#define MXT_CALIBRATE_IOCTL ('x' + 3) /* Calibrates the device */
#define MXT_BACKUP_IOCTL ('x' + 4) /* Backups the current state of registers to
NVM */
#define MXT_NONTOUCH_MSG_IOCTL ('x' + 5) /* Only non-touch messages can be read from
the message buffer (/dev/maXTouch_messages)*/
#define MXT_ALL_MSG_IOCTL ('x' + 6) /* All messages can be read from the message
buffer */
/* Message buffer size. This is a ring buffer, and when full, the oldest entry
will be overwritten. */
#define MXT_MESSAGE_BUFFER_SIZE 128
/*-------------- following added by acgzx 2011.03.30 --------------*/
/* Read dummy message to make high CHG pin of minimumvalue */
#define MXT_MAKE_HIGH_CHG_SIZE_MIN 10
#define MXT_ACK_BUFFER_SIZE 16
/**
* struct mxt_platform_data - includes platform specific informatio
* related to Atmel maXTouch touchscreen controller.
*
* @numtouch: Number of simultaneous touches supported
* @init_platform_hw(): Initialization function, which can for example
* trigger a hardware reset by toggling a GPIO pin
* @exit_platform_hw(): Function to run when the driver is unloaded.
* @valid_interrupt(): Function that checks the validity of the interrupt -
* function that check the validity of a interrupt (by
* reading the changeline interrupt pin and checking that
* it really is low for example).
* @max_x: Reported X range
* @max_y: Reported Y range
*/

View File

@ -58,6 +58,8 @@ config LCD_AT070TNA2
bool "RGB AT070TNA2"
config LCD_AT070TN93
bool "RGB AT070TN93"
config LCD_TX23D88VM
bool "HITACHI LVDS TX23D88VM (1200x800)"
endchoice

View File

@ -29,4 +29,5 @@ obj-$(CONFIG_LCD_LS035Y8DX02A) += lcd_ls035y8dx02a.o
obj-$(CONFIG_LCD_IPS1P5680_V1_E) += lcd_ips1p5680_v1_e.o
obj-$(CONFIG_LCD_MCU_TFT480800_25_E) += lcd_mcu_tft480800_25_e.o
obj-$(CONFIG_LCD_AT070TNA2) += lcd_AT070TNA2.o
obj-$(CONFIG_LCD_TX23D88VM) += lcd_tx23d88vm.o
obj-$(CONFIG_LCD_AT070TN93) += lcd_at070tn93.o

View File

@ -0,0 +1,78 @@
#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"
/* Base */
#define OUT_TYPE SCREEN_RGB
//#define OUT_FACE OUT_D888_P666
#define OUT_FACE OUT_P888//modify by xhh
#define OUT_CLK 66000000//64000000
#define LCDC_ACLK 500000000 //29 lcdc axi DMA ƵÂÊ
/* Timing */
#define H_PW 10
#define H_BP 20
#define H_VD 1200
#define H_FP 70
#define V_PW 2
#define V_BP 4
#define V_VD 800
#define V_FP 14
#define LCD_WIDTH 188
#define LCD_HEIGHT 125
/* Other */
#define DCLK_POL 0
//#define DCLK_POL 1//xhh
#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;
}