# CONFIG_DDR_TEST is not set
CONFIG_CLK_SWITCH_TO_32K=y
CONFIG_SOC_RK3168=y
-CONFIG_MACH_RK_FAC=y
+CONFIG_MACH_RK3168_FAC=y
CONFIG_FIQ_DEBUGGER=y
CONFIG_FIQ_DEBUGGER_NO_SLEEP=y
CONFIG_FIQ_DEBUGGER_CONSOLE=y
CONFIG_MFD_TPS65910=y
CONFIG_MFD_WM831X_I2C=y
CONFIG_MFD_RK616=y
-CONFIG_RK616_USE_MCLK_12M=y
CONFIG_REGULATOR=y
CONFIG_REGULATOR_TPS65910=y
CONFIG_REGULATOR_WM831X=y
CONFIG_RK_TRSM=y
CONFIG_RK616_LVDS=y
CONFIG_RK_HDMI=y
-CONFIG_HDMI_RK616=y
CONFIG_HDMI_SOURCE_LCDC1=y
CONFIG_RGA_RK30=y
CONFIG_LOGO=y
config MACH_RK3168_86V_OLD
bool "RK3168 86V Old Board"
- config MACH_RK_FAC
+
+config MACH_RK3168_FAC
bool "RK3168 Board for factory"
+ select MACH_RK_FAC
+
endchoice
choice
board-$(CONFIG_MACH_RK3168_DS1006H) += board-rk3168-ds1006h.o
board-$(CONFIG_MACH_RK3168_86V) += board-rk3168-86v.o
board-$(CONFIG_MACH_RK3168_86V_OLD) += board-rk3168-86v-old.o
-board-$(CONFIG_MACH_RK_FAC) += board-rk3168-fac.o
+board-$(CONFIG_MACH_RK3168_FAC) += board-rk3168-fac.o
obj-$(CONFIG_SOC_RK3168M) += board.o
board-$(CONFIG_MACH_RK3168M_TB) += board-rk3168m-tb.o
+++ /dev/null
-#if 1
-#define CONFIG_ERR(v, name) do { printk("%s: Invalid parameter: %s(%d)\n", __func__, (name), (v)); } while(0)
-#else
-#define CONFIG_ERR(v, name)
-#endif
-#include <mach/config.h>
-
-
-/* keyboard */
-uint key_adc = DEF_KEY_ADC;
-module_param(key_adc, uint, 0644);
-uint key_val_size = 6;
-uint key_val[] = {DEF_PLAY_KEY, DEF_VOLDN_KEY, DEF_VOLUP_KEY, DEF_MENU_KEY, DEF_ESC_KEY, DEF_HOME_KEY};
-module_param_array(key_val, uint, &key_val_size, 0644);
-static inline int check_key_param(void)
-{
- return 0;
-}
-
-/* backlight */
-static int bl_en = DEF_BL_EN;
-module_param(bl_en, int, 0644);
-static uint bl_pwmid = DEF_BL_PWMID;
-module_param(bl_pwmid, uint, 0644);
-
-static uint bl_pwm_mode =DEF_BL_PWM_MOD;
-
-static uint bl_mode = DEF_BL_MOD;
-module_param(bl_mode, uint, 0644);
-static uint bl_div = DEF_BL_DIV;
-module_param(bl_div, uint, 0644);
-static uint bl_ref = DEF_BL_REF;
-module_param(bl_ref, uint, 0644);
-static uint bl_min = DEF_BL_MIN;
-module_param(bl_min, uint, 0644);
-static uint bl_max = DEF_BL_MAX;
-module_param(bl_max, uint, 0644);
-
-static inline int check_bl_param(void){
- if(bl_pwmid < 0 || bl_pwmid > 3){
- CONFIG_ERR(bl_pwmid, "bl_pwm");
- return -EINVAL;
- }
- if(bl_ref != 0 && bl_ref != 1){
- CONFIG_ERR(bl_ref, "bl_ref");
- return -EINVAL;
- }
- if(bl_min < 0||bl_min > 255){
- CONFIG_ERR(bl_min, "bl_min");
- return -EINVAL;
- }
- if(bl_max < 0||bl_max > 255){
- CONFIG_ERR(bl_max, "bl_max");
- return -EINVAL;
- }
-
- return 0;
-}
-
-/* lcd */
-static int lcd_cs = DEF_LCD_CS;
-module_param(lcd_cs, int, 0644);
-static int lcd_en = DEF_LCD_EN;
-module_param(lcd_en, int, 0644);
-static int lcd_std = DEF_LCD_STD;
-module_param(lcd_std, int, 0644);
-
-static inline int check_lcd_param(void)
-{
- return 0;
-}
-uint lcd_param[LCD_PARAM_MAX] = DEF_LCD_PARAM;
-module_param_array(lcd_param, uint, NULL, 0644);
-
-
-/*codec*/
-int codec_type = DEF_CODEC_TYPE;
-module_param(codec_type, int, 0644);
-int codec_power = DEF_CODEC_POWER;
-module_param(codec_power, int, 0644);
-int codec_rst = DEF_CODEC_RST;
-module_param(codec_rst, int, 0644);
-int codec_hdmi_irq = DEF_CODEC_HDMI_IRQ;
-module_param(codec_hdmi_irq, int, 0644);
-static int spk_ctl = DEF_SPK_CTL;
-module_param(spk_ctl, int, 0644);
-static int hp_det = DEF_HP_DET;
-module_param(hp_det, int, 0644);
-static int codec_i2c = DEF_CODEC_I2C; // i2c channel
-module_param(codec_i2c, int, 0644);
-static int codec_addr = DEF_CODEC_ADDR; // i2c addr
-module_param(codec_addr, int, 0644);
-static inline int check_codec_param(void)
-{
- return 0;
-}
-
-/*tp*/
-static int tp_type = DEF_TP_TYPE;
-module_param(tp_type, int, 0644);
-static int tp_irq = DEF_TP_IRQ;
-module_param(tp_irq, int, 0644);
-static int tp_rst =DEF_TP_RST;
-module_param(tp_rst, int, 0644);
-static int tp_i2c = DEF_TP_I2C; // i2c channel
-module_param(tp_i2c, int, 0644);
-static int tp_addr = DEF_TP_ADDR; // i2c addr
-module_param(tp_addr, int, 0644);
-static int tp_xmax = DEF_X_MAX;
-module_param(tp_xmax, int, 0644);
-static int tp_ymax = DEF_Y_MAX;
-module_param(tp_ymax, int, 0644);
-static int tp_firmVer= DEF_FIRMVER;
-module_param(tp_firmVer, int, 0644);
-static inline int check_tp_param(void)
-{
- int i;
-
- if(tp_type == TP_TYPE_NONE)
- return 0;
- if(tp_type < TP_TYPE_NONE || tp_type > TP_TYPE_MAX){
- CONFIG_ERR(tp_type, "tp_type");
- return -EINVAL;
- }
- if(tp_i2c < 0 || tp_i2c > 3){
- CONFIG_ERR(tp_i2c, "tp_i2c");
- return -EINVAL;
- }
- if(tp_addr < 0 || tp_addr > 0x7f){
- CONFIG_ERR(tp_addr, "tp_addr");
- return -EINVAL;
- }
-
- if(tp_xmax < 0 || tp_xmax >1920){
- CONFIG_ERR(tp_xmax, "tp_xmax");
- return -EINVAL;
- }
-
- if(tp_ymax < 0 || tp_ymax >1920){
- CONFIG_ERR(tp_ymax, "tp_ymax");
- return -EINVAL;
- }
-
- return 0;
-}
-
-/* gsensor */
-static int gs_type = DEF_GS_TYPE;
-module_param(gs_type, int, 0644);
-static int gs_irq = DEF_GS_IRQ;
-module_param(gs_irq, int, 0644);
-static int gs_i2c = DEF_GS_I2C;
-module_param(gs_i2c, int, 0644);
-static int gs_addr = DEF_GS_ADDR;
-module_param(gs_addr, int, 0644);
-static int gs_orig[9] = DEF_GS_ORIG;
-module_param_array(gs_orig, int, NULL, 0644);
-static inline int check_gs_param(void)
-{
- int i;
- if(gs_type == GS_TYPE_NONE)
- return 0;
- if(gs_type < GS_TYPE_NONE || gs_type > GS_TYPE_MAX){
- CONFIG_ERR(gs_type, "gs_type");
- return -EINVAL;
- }
- if(gs_i2c < 0 || gs_i2c > 3){
- CONFIG_ERR(gs_i2c, "gs_i2c");
- return -EINVAL;
- }
- if(gs_addr < 0 || gs_addr > 0x7f){
- CONFIG_ERR(gs_i2c, "gs_addr");
- return -EINVAL;
- }
- for(i = 0; i < 9; i++){
- if(gs_orig[i] != 1 && gs_orig[i] != 0 && gs_orig[i] != -1)
- {
- CONFIG_ERR(gs_orig[i], "gs_orig[x]");
- return -EINVAL;
- }
- }
- return 0;
-}
-
-/* charge */
-static int dc_det = DEF_DC_DET;
-module_param(dc_det, int, 0644);
-static int bat_low = DEF_BAT_LOW;
-module_param(bat_low, int, 0644);
-static int chg_ok = DEF_CHG_OK;
-module_param(chg_ok, int, 0644);
-static int chg_set = DEF_CHG_SET;
-module_param(chg_set, int, 0644);
-static int usb_det = DEF_USB_DET;
-module_param(usb_det, int, 0644);
-static int ref_vol = DEF_REF_VOL;
-module_param(ref_vol, int, 0644);
-static int up_res = DEF_UP_RES;
-module_param(up_res, int, 0644);
-static int down_res = DEF_DOWN_RES;
-module_param(down_res, int, 0644);
-static int root_chg = DEF_ROOT_CHG;
-module_param(root_chg, int, 0644);
-static int save_cap = DEF_SAVE_CAP;
-module_param(save_cap, int, 0644);
-static int low_vol = DEF_LOW_VOL;
-module_param(low_vol, int, 0644);
-int bat_charge[11] = DEF_BAT_CHARGE;
-module_param_array(bat_charge, int, NULL, 0644);
-int bat_discharge[11] = DEF_BAT_DISCHARGE;
-module_param_array(bat_discharge, int, NULL, 0644);
-static inline int check_chg_param(void)
-{
- return 0;
-}
-
-/*wifi*/
-int wifi_type = DEF_WIFI_TYPE;
-module_param(wifi_type, int, 0644);
-int wifi_pwr = DEF_WIFI_POWER;
-module_param(wifi_pwr, int, 0644);
-static inline int check_wifi_param(void)
-{
- return 0;
-}
-
-/* global */
-static int pwr_on = DEF_PWR_ON;
-module_param(pwr_on, int, 0644);
-static inline int rk_power_on(void)
-{
- int ret;
- ret=port_output_init(pwr_on, 1, "pwr_on");
- if(ret<0)
- CONFIG_ERR(pwr_on, "pwr_on");
-
- port_output_on(pwr_on);
-}
-
#include <linux/ct36x.h>
#endif
#include <linux/regulator/act8931.h>
-#include <mach/config.h>
+#include <plat/config.h>
#endif
#include "board-rk3168-86v-camera.c"
-#include "board-rk-fac-config.c"
+#include "../plat-rk/rk-fac-config.c"
#include <plat/key.h>
/*
.buttons = key_button,
.chn = -1, //chn: 0-7, if do not use ADC,set 'chn' -1
};
-#if defined(CONFIG_CT36X_TS)
-
-#define TOUCH_MODEL 363
-#define TOUCH_MAX_X 1280
-#define TOUCH_MAX_y 800
-#define TOUCH_RESET_PIN RK30_PIN0_PB6
-#define TOUCH_INT_PIN RK30_PIN1_PB7
-
-static struct ct36x_platform_data ct36x_info = {
- .model = TOUCH_MODEL,
- .x_max = TOUCH_MAX_X,
- .y_max = TOUCH_MAX_y,
-
- .rst_io = {
- .gpio = TOUCH_RESET_PIN,
- .active_low = 1,
- },
- .irq_io = {
- .gpio = TOUCH_INT_PIN,
- .active_low = 1,
- },
- .orientation = {1, 0, 1, 0},
-};
-#endif
-#if defined(CONFIG_TOUCHSCREEN_GSLX680)
-#define TOUCH_RESET_PIN RK30_PIN0_PB6
-#define TOUCH_EN_PIN NULL
-#define TOUCH_INT_PIN RK30_PIN1_PB7
-
-int gslx680_init_platform_hw(void)
-{
- if(gpio_request(TOUCH_RESET_PIN,NULL) != 0){
- gpio_free(TOUCH_RESET_PIN);
- printk("gslx680_init_platform_hw gpio_request error\n");
- return -EIO;
- }
- if(gpio_request(TOUCH_INT_PIN,NULL) != 0){
- gpio_free(TOUCH_INT_PIN);
- printk("gslx680_init_platform_hw gpio_request error\n");
- return -EIO;
- }
- gpio_direction_output(TOUCH_RESET_PIN, GPIO_HIGH);
- mdelay(10);
- gpio_set_value(TOUCH_RESET_PIN,GPIO_LOW);
- mdelay(10);
- gpio_set_value(TOUCH_RESET_PIN,GPIO_HIGH);
- msleep(300);
- return 0;
-
-}
-
-struct ts_hw_data gslx680_info = {
- .reset_gpio = TOUCH_RESET_PIN,
- .touch_en_gpio = TOUCH_INT_PIN,
- .init_platform_hw = gslx680_init_platform_hw,
-};
-#endif
#if defined (CONFIG_TOUCHSCREEN_GSLX680_RK3168)
static int gslx680_init_platform_hw()
{
.platform_data = &cm3217_info,
},
#endif
-#if defined (CONFIG_TOUCHSCREEN_GSLX680)
- {
- .type = "gslX680",
- .addr = 0x40,
- .flags = 0,
- .platform_data =&gslx680_info,
- },
-#endif
#if defined(CONFIG_TOUCHSCREEN_GT82X_IIC)
{
.type = "Goodix-TS-82X",
+++ /dev/null
-#ifndef __MACH_CONFIG_H
-#define __MACH_CONFIG_H
-#include <mach/board.h>
-#include <mach/iomux-rk30.h>
-
-#define BOARD_DEFAULT
-//#define BOARD_RK3168_86V
-//#define BOARD_RK3168_86V_RK616
-
-#define INVALID_VALUE -1
-#define INVALID_GPIO -1
-
-
-
-enum {
- CODEC_TYPE_NONE = 0,
- CODEC_TYPE_RT5631,
- CODEC_TYPE_ES8323,
- CODEC_TYPE_RK616,
- CODEC_TYPE_MAX,
-};
-
-enum {
- TP_TYPE_NONE = 0,
- TP_TYPE_GSLX680,
- TP_TYPE_GT811_86V,
- TP_TYPE_MAX,
-};
-
-enum {
- GS_TYPE_NONE = 0,
- GS_TYPE_MMA7660,
- GS_TYPE_LIS3DH,
- GS_TYPE_MXC6225,
- GS_TYPE_DMARAD10,
- GS_TYPE_MAX,
-};
-
-enum {
- WIFI_TYPE_NONE = 0,
- WIFI_TYPE_RTL8188CU,
- WIFI_TYPE_RTL8188EU,
- WIFI_TYPE_MT7601,
- WIFI_TYPE_RTL8188ETV,
- WIFI_TYPE_MT5370,
- WIFI_TYPE_MAX,
-};
-
-
-enum {
- OUT_TYPE_INDEX = 0,
- OUT_FACE_INDEX,
- LVDS_FORMAT_INDEX,
- OUT_CLK_INDEX,
- LCDC_ACLK_INDEX,
- H_PW_INDEX,
- H_BP_INDEX,
- H_VD_INDEX,
- H_FP_INDEX,
- V_PW_INDEX,
- V_BP_INDEX,
- V_VD_INDEX,
- V_FP_INDEX,
- LCD_WIDTH_INDEX,
- LCD_HEIGHT_INDEX,
- DCLK_POL_INDEX,
- SWAP_RB_INDEX,
- LCD_PARAM_MAX,
-};
-
-#ifdef BOARD_DEFAULT
-////////////////////////////////////////////////////////////
-/*system*/
-enum {
- DEF_PWR_ON = -1,
-};
-////////////////////////////////////////////////////////////
-/*lcd*/
-enum {
- DEF_LCD_EN = -1,
- DEF_LCD_CS = -1,
- DEF_LCD_STD=-1,
-};
-
-
-#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888, 0,\
- 50000000, 500000000, \
- 30, 10, 1024, 210, \
- 13, 10, 600, 22, \
- 154, 85, \
- 1, 0 }
-//////////////////////////////////////////////////////////////
-/* backlight */
-
-enum{
- DEF_BL_EN = -1,
- DEF_BL_PWMID =-1,
- DEF_BL_PWM_MOD=-1,
- DEF_BL_MOD = -1,
- DEF_BL_DIV = -1,
- DEF_BL_REF = -1,
- DEF_BL_MIN = -1,
- DEF_BL_MAX = -1,
-};
-//////////////////////////////////////////////////////////////
-/*tp*/
-enum {
- DEF_TP_TYPE= -1,
- DEF_TP_IRQ = -1,
- DEF_TP_RST = -1,
- DEF_TP_I2C = -1,
- DEF_TP_ADDR = -1,
- DEF_X_MAX = -1,
- DEF_Y_MAX = -1,
- DEF_FIRMVER = -1,
-};
-//////////////////////////////////////////////////////////////
-/*key*/
-enum{
- DEF_KEY_ADC = -1,
- DEF_PLAY_KEY = -1,
- DEF_VOLDN_KEY = -1,
- DEF_VOLUP_KEY = -1,
- DEF_MENU_KEY = -1,
- DEF_ESC_KEY = -1,
- DEF_HOME_KEY = -1,
- //DEF_CAM_KEY = -1
- };
-//////////////////////////////////////////////////////////////
-/* gsensor */
-enum {
- DEF_GS_TYPE = -1,
- DEF_GS_IRQ = -1,
- DEF_GS_I2C = -1,
- DEF_GS_ADDR = -1,
-
-};
-#define DEF_GS_ORIG {-1, 0, 0, 0, -1, 0, 0, 0, 1}
-////////////////////////////////////////////////////////////////
-/* codec */
-enum {
- DEF_CODEC_TYPE=-1,
- DEF_CODEC_POWER=-1,
- DEF_CODEC_RST=-1,
- DEF_CODEC_HDMI_IRQ=-1,
- DEF_SPK_CTL = -1,
- DEF_HP_DET = -1,
- DEF_CODEC_I2C= -1,
- DEF_CODEC_ADDR=-1,
-};
-/////////////////////////////////////////////////////////////////
-/* charge */
-enum {
- DEF_DC_DET = -1,
- DEF_BAT_LOW = -1,
- DEF_CHG_OK = -1,
- DEF_CHG_SET = -1,
- DEF_USB_DET = -1,
- DEF_REF_VOL = -1,
- DEF_UP_RES = -1,
- DEF_DOWN_RES = -1,
- DEF_ROOT_CHG = -1,
- DEF_SAVE_CAP = -1,
- DEF_LOW_VOL = -1,
- DEF_NUM = 0,
-};
-#define DEF_BAT_CHARGE {3600, 3700, 3760, 3810, 3870, 3910, 3960, 4020, 4080, 4130, 4180};
-#define DEF_BAT_DISCHARGE {3495, 3570, 3630, 3700, 3740, 3790, 3825, 3865, 3920, 3980, 4050} ;
-//////////////////////////////////////////////////////////////////
-/*wifi*/
-enum {
- DEF_WIFI_TYPE = -1,
- DEF_WIFI_POWER = -1,
-};
-#endif
-
-#ifdef BOARD_RK3168_86V
-////////////////////////////////////////////////////////////
-/*system*/
-enum {
- DEF_PWR_ON = 0x000000a0,
-};
-////////////////////////////////////////////////////////////
-/*lcd*/
-enum {
- DEF_LCD_EN = 0x000100b0,
- DEF_LCD_CS = 0x000003d4,
- DEF_LCD_STD=0x000102c6,
-};
-
-#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888, 0,\
- 50000000, 500000000, \
- 30, 10, 1024, 210, \
- 13, 10, 600, 22, \
- 154, 85, \
- 0, 0 }
-
-
-//////////////////////////////////////////////////////////////
-/* backlight */
-
-enum{
- DEF_BL_EN = 0x000000a2,
- DEF_BL_PWMID = 3,
- DEF_BL_PWM_MOD=PWM3,
- DEF_BL_MOD = 1,
- DEF_BL_DIV = 20*1000,
- DEF_BL_REF = 0,
- DEF_BL_MIN = 60,
- DEF_BL_MAX = 255,
-};
-//////////////////////////////////////////////////////////////
-/*tp*/
-enum {
- DEF_TP_TYPE= TP_TYPE_GSLX680,
- DEF_TP_IRQ = 0x000001b7,
- DEF_TP_RST = 0x000000b6,
- DEF_TP_I2C = 2,
- DEF_TP_ADDR = 0x40,
- DEF_X_MAX = 1024,
- DEF_Y_MAX = 600,
- DEF_FIRMVER = 0,
-};
-//////////////////////////////////////////////////////////////
-/*key*/
-enum{
- DEF_KEY_ADC = 1,
- DEF_PLAY_KEY = 0x000100a4,
- DEF_VOLDN_KEY = 0x80000096,
- DEF_VOLUP_KEY = 0x80000001,
- DEF_MENU_KEY = 0x80000000,
- DEF_ESC_KEY = 0x80000000,
- DEF_HOME_KEY = 0x80000000,
- };
-//////////////////////////////////////////////////////////////
-/* gsensor */
-enum {
- DEF_GS_TYPE = GS_TYPE_MXC6225,
- DEF_GS_IRQ = 0x008000b7,
- DEF_GS_I2C = 0,
- DEF_GS_ADDR = 0x15,
-
-};
-#define DEF_GS_ORIG {-1, 0, 0, 0, -1, 0, 0, 0, 1}
-////////////////////////////////////////////////////////////////
-/* codec */
-enum {
- DEF_CODEC_TYPE=CODEC_TYPE_ES8323,
- DEF_CODEC_POWER=-1,
- DEF_CODEC_RST=-1,
- DEF_CODEC_HDMI_IRQ=-1,
- DEF_SPK_CTL = 0x000002d7,
- DEF_HP_DET = 0x000000b5,
- DEF_CODEC_I2C= 4,
- DEF_CODEC_ADDR=0x10,
-};
-/////////////////////////////////////////////////////////////////
-/* charge */
-enum {
- DEF_DC_DET = 0x000100b2,
- DEF_BAT_LOW = INVALID_GPIO,
- DEF_CHG_OK = 0x000000a6,
- DEF_CHG_SET = INVALID_GPIO,
- DEF_USB_DET = INVALID_GPIO,
- DEF_REF_VOL = 1800,
- DEF_UP_RES = 200,
- DEF_DOWN_RES = 120,
- DEF_ROOT_CHG = 1,
- DEF_SAVE_CAP = 1,
- DEF_LOW_VOL = 3600,
- DEF_NUM = 0,
-};
-#define DEF_BAT_CHARGE {3600, 3700, 3760, 3810, 3870, 3910, 3960, 4020, 4080, 4130, 4180};
-#define DEF_BAT_DISCHARGE {3495, 3570, 3630, 3700, 3740, 3790, 3825, 3865, 3920, 3980, 4050};
-//////////////////////////////////////////////////////////////////
-/*wifi*/
-enum {
- DEF_WIFI_TYPE = WIFI_TYPE_RTL8188EU,
- DEF_WIFI_POWER = 0x000100d5,
-};
-#endif
-
-
-
-
-
-
-
-
-#ifdef BOARD_RK3168_86V_RK616
-////////////////////////////////////////////////////////////
-/*system*/
-enum {
- DEF_PWR_ON = 0x000000a0,
-};
-////////////////////////////////////////////////////////////
-/*lcd*/
-enum {
- DEF_LCD_EN = 0x000100b0,
- DEF_LCD_CS = 0x000003d4,
- DEF_LCD_STD=0x000102c6,
-};
-/*
-#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888, \
- 50000000, 500000000, \
- 30, 10, 1024, 210, \
- 13, 10, 600, 22, \
- 154, 85, \
- 1, 0 }
-*/
-
-#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888,0, \
- 33000000, 150000000, \
- 1,88,800,40, \
- 3,29,480,13, \
- 154, 85, \
- 0, 0 }
-
-//////////////////////////////////////////////////////////////
-/* backlight */
-
-enum{
- DEF_BL_EN = 0x000000a2,
- DEF_BL_PWMID = 3,
- DEF_BL_PWM_MOD=PWM3,
- DEF_BL_MOD = 1,
- DEF_BL_DIV = 20*1000,
- DEF_BL_REF = 0,
- DEF_BL_MIN = 60,
- DEF_BL_MAX = 255,
-};
-//////////////////////////////////////////////////////////////
-/*tp*/
-enum {
- DEF_TP_TYPE= TP_TYPE_GSLX680,
- DEF_TP_IRQ = 0x000001b7,
- DEF_TP_RST = 0x000000b6,
- DEF_TP_I2C = 2,
- DEF_TP_ADDR = 0x40,
- DEF_X_MAX = 1024,
- DEF_Y_MAX = 600,
- DEF_FIRMVER= 0,
-};
-//////////////////////////////////////////////////////////////
-/*key*/
-enum{
- DEF_KEY_ADC = 1,
- DEF_PLAY_KEY = 0x000100a4,
- DEF_VOLDN_KEY = 0x80000096,
- DEF_VOLUP_KEY = 0x80000001,
- DEF_MENU_KEY = 0x80000000,
- DEF_ESC_KEY = 0x80000000,
- DEF_HOME_KEY = 0x80000000,
- };
-//////////////////////////////////////////////////////////////
-/* gsensor */
-enum {
- DEF_GS_TYPE = GS_TYPE_MMA7660,
- DEF_GS_IRQ = 0x008000b7,
- DEF_GS_I2C = 0,
- DEF_GS_ADDR = 0x4c,
-
-};
-#define DEF_GS_ORIG {1, 0, 0, 0, -1, 0, 0, 0, 1}
-////////////////////////////////////////////////////////////////
-/* codec */
-enum {
- DEF_CODEC_TYPE=CODEC_TYPE_RK616,
- DEF_CODEC_POWER=0x000000a3,
- DEF_CODEC_RST=0x000003b2,
- DEF_CODEC_HDMI_IRQ=0x000002d6,
- DEF_SPK_CTL = 0x000002d7,
- DEF_HP_DET = -1,
- DEF_CODEC_I2C= 4,
- DEF_CODEC_ADDR=0x50,
-};
-/////////////////////////////////////////////////////////////////
-/* charge */
-enum {
- DEF_DC_DET = 0x000100b2,
- DEF_BAT_LOW = INVALID_GPIO,
- DEF_CHG_OK = 0x000000a6,
- DEF_CHG_SET = INVALID_GPIO,
- DEF_USB_DET = INVALID_GPIO,
- DEF_REF_VOL = 1800,
- DEF_UP_RES = 200,
- DEF_DOWN_RES = 120,
- DEF_ROOT_CHG = 1,
- DEF_SAVE_CAP = 1,
- DEF_LOW_VOL = 3600,
- DEF_NUM = 0,
-};
-#define DEF_BAT_CHARGE {3600, 3700, 3760, 3810, 3870, 3910, 3960, 4020, 4080, 4130, 4180};
-#define DEF_BAT_DISCHARGE {3495, 3570, 3630, 3700, 3740, 3790, 3825, 3865, 3920, 3980, 4050} ;
-//////////////////////////////////////////////////////////////////
-/*wifi*/
-enum {
- DEF_WIFI_TYPE = WIFI_TYPE_RTL8188EU,
- DEF_WIFI_POWER = 0x000100d5,
-};
-#endif
-
-#endif
-
-
-
config RK_CONFIG
bool
+
+config MACH_RK_FAC
+ bool
config RK_TIMER
bool
--- /dev/null
+#ifndef __MACH_CONFIG_H
+#define __MACH_CONFIG_H
+#include <mach/board.h>
+//#include <mach/iomux-rk30.h>
+
+#define BOARD_DEFAULT
+//#define BOARD_RK3168_86V
+//#define BOARD_RK3168_86V_RK616
+
+#define INVALID_VALUE -1
+#define INVALID_GPIO -1
+
+
+
+enum {
+ CODEC_TYPE_NONE = 0,
+ CODEC_TYPE_RT5631,
+ CODEC_TYPE_ES8323,
+ CODEC_TYPE_RK616,
+ CODEC_TYPE_MAX,
+};
+
+enum {
+ TP_TYPE_NONE = 0,
+ TP_TYPE_GSLX680,
+ TP_TYPE_GT811_86V,
+ TP_TYPE_GT8XX,
+ TP_TYPE_MAX,
+};
+
+enum {
+ GS_TYPE_NONE = 0,
+ GS_TYPE_MMA7660,
+ GS_TYPE_LIS3DH,
+ GS_TYPE_MXC6225,
+ GS_TYPE_DMARAD10,
+ GS_TYPE_MAX,
+};
+
+enum {
+ WIFI_TYPE_NONE = 0,
+ WIFI_TYPE_RTL8188CU,
+ WIFI_TYPE_RTL8188EU,
+ WIFI_TYPE_MT7601,
+ WIFI_TYPE_RTL8188ETV,
+ WIFI_TYPE_MT5370,
+ WIFI_TYPE_MAX,
+};
+
+
+enum {
+ OUT_TYPE_INDEX = 0,
+ OUT_FACE_INDEX,
+ LVDS_FORMAT_INDEX,
+ OUT_CLK_INDEX,
+ LCDC_ACLK_INDEX,
+ H_PW_INDEX,
+ H_BP_INDEX,
+ H_VD_INDEX,
+ H_FP_INDEX,
+ V_PW_INDEX,
+ V_BP_INDEX,
+ V_VD_INDEX,
+ V_FP_INDEX,
+ LCD_WIDTH_INDEX,
+ LCD_HEIGHT_INDEX,
+ DCLK_POL_INDEX,
+ SWAP_RB_INDEX,
+ LCD_PARAM_MAX,
+};
+
+#ifdef BOARD_DEFAULT
+////////////////////////////////////////////////////////////
+/*system*/
+enum {
+ DEF_PWR_ON = -1,
+};
+////////////////////////////////////////////////////////////
+/*lcd*/
+enum {
+ DEF_LCD_EN = -1,
+ DEF_LCD_CS = -1,
+ DEF_LCD_STD=-1,
+};
+
+
+#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888, 0,\
+ 50000000, 500000000, \
+ 30, 10, 1024, 210, \
+ 13, 10, 600, 22, \
+ 154, 85, \
+ 1, 0 }
+//////////////////////////////////////////////////////////////
+/* backlight */
+
+enum{
+ DEF_BL_EN = -1,
+ DEF_BL_PWMID =-1,
+ DEF_BL_PWM_MOD=-1,
+ DEF_BL_MOD = -1,
+ DEF_BL_DIV = -1,
+ DEF_BL_REF = -1,
+ DEF_BL_MIN = -1,
+ DEF_BL_MAX = -1,
+};
+//////////////////////////////////////////////////////////////
+/*tp*/
+enum {
+ DEF_TP_TYPE= -1,
+ DEF_TP_IRQ = -1,
+ DEF_TP_RST = -1,
+ DEF_TP_I2C = -1,
+ DEF_TP_ADDR = -1,
+ DEF_X_MAX = -1,
+ DEF_Y_MAX = -1,
+ DEF_FIRMVER = -1,
+};
+//////////////////////////////////////////////////////////////
+/*key*/
+enum{
+ DEF_KEY_ADC = -1,
+ DEF_PLAY_KEY = -1,
+ DEF_VOLDN_KEY = -1,
+ DEF_VOLUP_KEY = -1,
+ DEF_MENU_KEY = -1,
+ DEF_ESC_KEY = -1,
+ DEF_HOME_KEY = -1,
+ //DEF_CAM_KEY = -1
+ };
+//////////////////////////////////////////////////////////////
+/* gsensor */
+enum {
+ DEF_GS_TYPE = -1,
+ DEF_GS_IRQ = -1,
+ DEF_GS_I2C = -1,
+ DEF_GS_ADDR = -1,
+
+};
+#define DEF_GS_ORIG {-1, 0, 0, 0, -1, 0, 0, 0, 1}
+////////////////////////////////////////////////////////////////
+/* codec */
+enum {
+ DEF_CODEC_TYPE=-1,
+ DEF_CODEC_POWER=-1,
+ DEF_CODEC_RST=-1,
+ DEF_CODEC_HDMI_IRQ=-1,
+ DEF_SPK_CTL = -1,
+ DEF_HP_DET = -1,
+ DEF_CODEC_I2C= -1,
+ DEF_CODEC_ADDR=-1,
+};
+/////////////////////////////////////////////////////////////////
+/* charge */
+enum {
+ DEF_DC_DET = -1,
+ DEF_BAT_LOW = -1,
+ DEF_CHG_OK = -1,
+ DEF_CHG_SET = -1,
+ DEF_USB_DET = -1,
+ DEF_REF_VOL = -1,
+ DEF_UP_RES = -1,
+ DEF_DOWN_RES = -1,
+ DEF_ROOT_CHG = -1,
+ DEF_SAVE_CAP = -1,
+ DEF_LOW_VOL = -1,
+ DEF_NUM = 0,
+};
+#define DEF_BAT_CHARGE {3600, 3700, 3760, 3810, 3870, 3910, 3960, 4020, 4080, 4130, 4180};
+#define DEF_BAT_DISCHARGE {3495, 3570, 3630, 3700, 3740, 3790, 3825, 3865, 3920, 3980, 4050} ;
+//////////////////////////////////////////////////////////////////
+/*wifi*/
+enum {
+ DEF_WIFI_TYPE = -1,
+ DEF_WIFI_POWER = -1,
+};
+#endif
+
+#ifdef BOARD_RK3168_86V
+////////////////////////////////////////////////////////////
+/*system*/
+enum {
+ DEF_PWR_ON = 0x000000a0,
+};
+////////////////////////////////////////////////////////////
+/*lcd*/
+enum {
+ DEF_LCD_EN = 0x000100b0,
+ DEF_LCD_CS = 0x000003d4,
+ DEF_LCD_STD=0x000102c6,
+};
+
+#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888, 0,\
+ 50000000, 500000000, \
+ 30, 10, 1024, 210, \
+ 13, 10, 600, 22, \
+ 154, 85, \
+ 0, 0 }
+
+
+//////////////////////////////////////////////////////////////
+/* backlight */
+
+enum{
+ DEF_BL_EN = 0x000000a2,
+ DEF_BL_PWMID = 3,
+ DEF_BL_PWM_MOD=PWM3,
+ DEF_BL_MOD = 1,
+ DEF_BL_DIV = 20*1000,
+ DEF_BL_REF = 0,
+ DEF_BL_MIN = 60,
+ DEF_BL_MAX = 255,
+};
+//////////////////////////////////////////////////////////////
+/*tp*/
+enum {
+ DEF_TP_TYPE= TP_TYPE_GSLX680,
+ DEF_TP_IRQ = 0x000001b7,
+ DEF_TP_RST = 0x000000b6,
+ DEF_TP_I2C = 2,
+ DEF_TP_ADDR = 0x40,
+ DEF_X_MAX = 1024,
+ DEF_Y_MAX = 600,
+ DEF_FIRMVER = 0,
+};
+//////////////////////////////////////////////////////////////
+/*key*/
+enum{
+ DEF_KEY_ADC = 1,
+ DEF_PLAY_KEY = 0x000100a4,
+ DEF_VOLDN_KEY = 0x80000096,
+ DEF_VOLUP_KEY = 0x80000001,
+ DEF_MENU_KEY = 0x80000000,
+ DEF_ESC_KEY = 0x80000000,
+ DEF_HOME_KEY = 0x80000000,
+ };
+//////////////////////////////////////////////////////////////
+/* gsensor */
+enum {
+ DEF_GS_TYPE = GS_TYPE_MXC6225,
+ DEF_GS_IRQ = 0x008000b7,
+ DEF_GS_I2C = 0,
+ DEF_GS_ADDR = 0x15,
+
+};
+#define DEF_GS_ORIG {-1, 0, 0, 0, -1, 0, 0, 0, 1}
+////////////////////////////////////////////////////////////////
+/* codec */
+enum {
+ DEF_CODEC_TYPE=CODEC_TYPE_ES8323,
+ DEF_CODEC_POWER=-1,
+ DEF_CODEC_RST=-1,
+ DEF_CODEC_HDMI_IRQ=-1,
+ DEF_SPK_CTL = 0x000002d7,
+ DEF_HP_DET = 0x000000b5,
+ DEF_CODEC_I2C= 4,
+ DEF_CODEC_ADDR=0x10,
+};
+/////////////////////////////////////////////////////////////////
+/* charge */
+enum {
+ DEF_DC_DET = 0x000100b2,
+ DEF_BAT_LOW = INVALID_GPIO,
+ DEF_CHG_OK = 0x000000a6,
+ DEF_CHG_SET = INVALID_GPIO,
+ DEF_USB_DET = INVALID_GPIO,
+ DEF_REF_VOL = 1800,
+ DEF_UP_RES = 200,
+ DEF_DOWN_RES = 120,
+ DEF_ROOT_CHG = 1,
+ DEF_SAVE_CAP = 1,
+ DEF_LOW_VOL = 3600,
+ DEF_NUM = 0,
+};
+#define DEF_BAT_CHARGE {3600, 3700, 3760, 3810, 3870, 3910, 3960, 4020, 4080, 4130, 4180};
+#define DEF_BAT_DISCHARGE {3495, 3570, 3630, 3700, 3740, 3790, 3825, 3865, 3920, 3980, 4050};
+//////////////////////////////////////////////////////////////////
+/*wifi*/
+enum {
+ DEF_WIFI_TYPE = WIFI_TYPE_RTL8188EU,
+ DEF_WIFI_POWER = 0x000100d5,
+};
+#endif
+
+
+
+
+
+
+
+
+#ifdef BOARD_RK3168_86V_RK616
+////////////////////////////////////////////////////////////
+/*system*/
+enum {
+ DEF_PWR_ON = 0x000000a0,
+};
+////////////////////////////////////////////////////////////
+/*lcd*/
+enum {
+ DEF_LCD_EN = 0x000100b0,
+ DEF_LCD_CS = 0x000003d4,
+ DEF_LCD_STD=0x000102c6,
+};
+/*
+#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888, \
+ 50000000, 500000000, \
+ 30, 10, 1024, 210, \
+ 13, 10, 600, 22, \
+ 154, 85, \
+ 1, 0 }
+*/
+
+#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P888,0, \
+ 33000000, 150000000, \
+ 1,88,800,40, \
+ 3,29,480,13, \
+ 154, 85, \
+ 0, 0 }
+
+//////////////////////////////////////////////////////////////
+/* backlight */
+
+enum{
+ DEF_BL_EN = 0x000000a2,
+ DEF_BL_PWMID = 3,
+ DEF_BL_PWM_MOD=PWM3,
+ DEF_BL_MOD = 1,
+ DEF_BL_DIV = 20*1000,
+ DEF_BL_REF = 0,
+ DEF_BL_MIN = 60,
+ DEF_BL_MAX = 255,
+};
+//////////////////////////////////////////////////////////////
+/*tp*/
+enum {
+ DEF_TP_TYPE= TP_TYPE_GSLX680,
+ DEF_TP_IRQ = 0x000001b7,
+ DEF_TP_RST = 0x000000b6,
+ DEF_TP_I2C = 2,
+ DEF_TP_ADDR = 0x40,
+ DEF_X_MAX = 1024,
+ DEF_Y_MAX = 600,
+ DEF_FIRMVER= 0,
+};
+//////////////////////////////////////////////////////////////
+/*key*/
+enum{
+ DEF_KEY_ADC = 1,
+ DEF_PLAY_KEY = 0x000100a4,
+ DEF_VOLDN_KEY = 0x80000096,
+ DEF_VOLUP_KEY = 0x80000001,
+ DEF_MENU_KEY = 0x80000000,
+ DEF_ESC_KEY = 0x80000000,
+ DEF_HOME_KEY = 0x80000000,
+ };
+//////////////////////////////////////////////////////////////
+/* gsensor */
+enum {
+ DEF_GS_TYPE = GS_TYPE_MMA7660,
+ DEF_GS_IRQ = 0x008000b7,
+ DEF_GS_I2C = 0,
+ DEF_GS_ADDR = 0x4c,
+
+};
+#define DEF_GS_ORIG {1, 0, 0, 0, -1, 0, 0, 0, 1}
+////////////////////////////////////////////////////////////////
+/* codec */
+enum {
+ DEF_CODEC_TYPE=CODEC_TYPE_RK616,
+ DEF_CODEC_POWER=0x000000a3,
+ DEF_CODEC_RST=0x000003b2,
+ DEF_CODEC_HDMI_IRQ=0x000002d6,
+ DEF_SPK_CTL = 0x000002d7,
+ DEF_HP_DET = -1,
+ DEF_CODEC_I2C= 4,
+ DEF_CODEC_ADDR=0x50,
+};
+/////////////////////////////////////////////////////////////////
+/* charge */
+enum {
+ DEF_DC_DET = 0x000100b2,
+ DEF_BAT_LOW = INVALID_GPIO,
+ DEF_CHG_OK = 0x000000a6,
+ DEF_CHG_SET = INVALID_GPIO,
+ DEF_USB_DET = INVALID_GPIO,
+ DEF_REF_VOL = 1800,
+ DEF_UP_RES = 200,
+ DEF_DOWN_RES = 120,
+ DEF_ROOT_CHG = 1,
+ DEF_SAVE_CAP = 1,
+ DEF_LOW_VOL = 3600,
+ DEF_NUM = 0,
+};
+#define DEF_BAT_CHARGE {3600, 3700, 3760, 3810, 3870, 3910, 3960, 4020, 4080, 4130, 4180};
+#define DEF_BAT_DISCHARGE {3495, 3570, 3630, 3700, 3740, 3790, 3825, 3865, 3920, 3980, 4050} ;
+//////////////////////////////////////////////////////////////////
+/*wifi*/
+enum {
+ DEF_WIFI_TYPE = WIFI_TYPE_RTL8188EU,
+ DEF_WIFI_POWER = 0x000100d5,
+};
+#endif
+
+#endif
+
+
+
--- /dev/null
+#if 1
+#define CONFIG_ERR(v, name) do { printk("%s: Invalid parameter: %s(%d)\n", __func__, (name), (v)); } while(0)
+#else
+#define CONFIG_ERR(v, name)
+#endif
+#include <plat/config.h>
+
+
+/* keyboard */
+uint key_adc = DEF_KEY_ADC;
+module_param(key_adc, uint, 0644);
+uint key_val_size = 6;
+uint key_val[] = {DEF_PLAY_KEY, DEF_VOLDN_KEY, DEF_VOLUP_KEY, DEF_MENU_KEY, DEF_ESC_KEY, DEF_HOME_KEY};
+module_param_array(key_val, uint, &key_val_size, 0644);
+static inline int check_key_param(void)
+{
+ return 0;
+}
+
+/* backlight */
+static int bl_en = DEF_BL_EN;
+module_param(bl_en, int, 0644);
+static uint bl_pwmid = DEF_BL_PWMID;
+module_param(bl_pwmid, uint, 0644);
+
+static uint bl_pwm_mode =DEF_BL_PWM_MOD;
+
+static uint bl_mode = DEF_BL_MOD;
+module_param(bl_mode, uint, 0644);
+static uint bl_div = DEF_BL_DIV;
+module_param(bl_div, uint, 0644);
+static uint bl_ref = DEF_BL_REF;
+module_param(bl_ref, uint, 0644);
+static uint bl_min = DEF_BL_MIN;
+module_param(bl_min, uint, 0644);
+static uint bl_max = DEF_BL_MAX;
+module_param(bl_max, uint, 0644);
+
+static inline int check_bl_param(void){
+ if(bl_pwmid < 0 || bl_pwmid > 3){
+ CONFIG_ERR(bl_pwmid, "bl_pwm");
+ return -EINVAL;
+ }
+ if(bl_ref != 0 && bl_ref != 1){
+ CONFIG_ERR(bl_ref, "bl_ref");
+ return -EINVAL;
+ }
+ if(bl_min < 0||bl_min > 255){
+ CONFIG_ERR(bl_min, "bl_min");
+ return -EINVAL;
+ }
+ if(bl_max < 0||bl_max > 255){
+ CONFIG_ERR(bl_max, "bl_max");
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+/* lcd */
+static int lcd_cs = DEF_LCD_CS;
+module_param(lcd_cs, int, 0644);
+static int lcd_en = DEF_LCD_EN;
+module_param(lcd_en, int, 0644);
+static int lcd_std = DEF_LCD_STD;
+module_param(lcd_std, int, 0644);
+
+static inline int check_lcd_param(void)
+{
+ return 0;
+}
+uint lcd_param[LCD_PARAM_MAX] = DEF_LCD_PARAM;
+module_param_array(lcd_param, uint, NULL, 0644);
+
+
+/*codec*/
+int codec_type = DEF_CODEC_TYPE;
+module_param(codec_type, int, 0644);
+int codec_power = DEF_CODEC_POWER;
+module_param(codec_power, int, 0644);
+int codec_rst = DEF_CODEC_RST;
+module_param(codec_rst, int, 0644);
+int codec_hdmi_irq = DEF_CODEC_HDMI_IRQ;
+module_param(codec_hdmi_irq, int, 0644);
+static int spk_ctl = DEF_SPK_CTL;
+module_param(spk_ctl, int, 0644);
+static int hp_det = DEF_HP_DET;
+module_param(hp_det, int, 0644);
+static int codec_i2c = DEF_CODEC_I2C; // i2c channel
+module_param(codec_i2c, int, 0644);
+static int codec_addr = DEF_CODEC_ADDR; // i2c addr
+module_param(codec_addr, int, 0644);
+static inline int check_codec_param(void)
+{
+ return 0;
+}
+
+/*tp*/
+static int tp_type = DEF_TP_TYPE;
+module_param(tp_type, int, 0644);
+static int tp_irq = DEF_TP_IRQ;
+module_param(tp_irq, int, 0644);
+static int tp_rst =DEF_TP_RST;
+module_param(tp_rst, int, 0644);
+static int tp_i2c = DEF_TP_I2C; // i2c channel
+module_param(tp_i2c, int, 0644);
+static int tp_addr = DEF_TP_ADDR; // i2c addr
+module_param(tp_addr, int, 0644);
+static int tp_xmax = DEF_X_MAX;
+module_param(tp_xmax, int, 0644);
+static int tp_ymax = DEF_Y_MAX;
+module_param(tp_ymax, int, 0644);
+static int tp_firmVer= DEF_FIRMVER;
+module_param(tp_firmVer, int, 0644);
+static inline int check_tp_param(void)
+{
+ int i;
+
+ if(tp_type == TP_TYPE_NONE)
+ return 0;
+ if(tp_type < TP_TYPE_NONE || tp_type > TP_TYPE_MAX){
+ CONFIG_ERR(tp_type, "tp_type");
+ return -EINVAL;
+ }
+ if(tp_i2c < 0 || tp_i2c > 3){
+ CONFIG_ERR(tp_i2c, "tp_i2c");
+ return -EINVAL;
+ }
+ if(tp_addr < 0 || tp_addr > 0x7f){
+ CONFIG_ERR(tp_addr, "tp_addr");
+ return -EINVAL;
+ }
+
+ if(tp_xmax < 0 || tp_xmax >1920){
+ CONFIG_ERR(tp_xmax, "tp_xmax");
+ return -EINVAL;
+ }
+
+ if(tp_ymax < 0 || tp_ymax >1920){
+ CONFIG_ERR(tp_ymax, "tp_ymax");
+ return -EINVAL;
+ }
+
+ return 0;
+}
+
+/* gsensor */
+static int gs_type = DEF_GS_TYPE;
+module_param(gs_type, int, 0644);
+static int gs_irq = DEF_GS_IRQ;
+module_param(gs_irq, int, 0644);
+static int gs_i2c = DEF_GS_I2C;
+module_param(gs_i2c, int, 0644);
+static int gs_addr = DEF_GS_ADDR;
+module_param(gs_addr, int, 0644);
+static int gs_orig[9] = DEF_GS_ORIG;
+module_param_array(gs_orig, int, NULL, 0644);
+static inline int check_gs_param(void)
+{
+ int i;
+ if(gs_type == GS_TYPE_NONE)
+ return 0;
+ if(gs_type < GS_TYPE_NONE || gs_type > GS_TYPE_MAX){
+ CONFIG_ERR(gs_type, "gs_type");
+ return -EINVAL;
+ }
+ if(gs_i2c < 0 || gs_i2c > 3){
+ CONFIG_ERR(gs_i2c, "gs_i2c");
+ return -EINVAL;
+ }
+ if(gs_addr < 0 || gs_addr > 0x7f){
+ CONFIG_ERR(gs_i2c, "gs_addr");
+ return -EINVAL;
+ }
+ for(i = 0; i < 9; i++){
+ if(gs_orig[i] != 1 && gs_orig[i] != 0 && gs_orig[i] != -1)
+ {
+ CONFIG_ERR(gs_orig[i], "gs_orig[x]");
+ return -EINVAL;
+ }
+ }
+ return 0;
+}
+
+/* charge */
+static int dc_det = DEF_DC_DET;
+module_param(dc_det, int, 0644);
+static int bat_low = DEF_BAT_LOW;
+module_param(bat_low, int, 0644);
+static int chg_ok = DEF_CHG_OK;
+module_param(chg_ok, int, 0644);
+static int chg_set = DEF_CHG_SET;
+module_param(chg_set, int, 0644);
+static int usb_det = DEF_USB_DET;
+module_param(usb_det, int, 0644);
+static int ref_vol = DEF_REF_VOL;
+module_param(ref_vol, int, 0644);
+static int up_res = DEF_UP_RES;
+module_param(up_res, int, 0644);
+static int down_res = DEF_DOWN_RES;
+module_param(down_res, int, 0644);
+static int root_chg = DEF_ROOT_CHG;
+module_param(root_chg, int, 0644);
+static int save_cap = DEF_SAVE_CAP;
+module_param(save_cap, int, 0644);
+static int low_vol = DEF_LOW_VOL;
+module_param(low_vol, int, 0644);
+int bat_charge[11] = DEF_BAT_CHARGE;
+module_param_array(bat_charge, int, NULL, 0644);
+int bat_discharge[11] = DEF_BAT_DISCHARGE;
+module_param_array(bat_discharge, int, NULL, 0644);
+static inline int check_chg_param(void)
+{
+ return 0;
+}
+
+/*wifi*/
+int wifi_type = DEF_WIFI_TYPE;
+module_param(wifi_type, int, 0644);
+int wifi_pwr = DEF_WIFI_POWER;
+module_param(wifi_pwr, int, 0644);
+static inline int check_wifi_param(void)
+{
+ return 0;
+}
+
+/* global */
+static int pwr_on = DEF_PWR_ON;
+module_param(pwr_on, int, 0644);
+static inline int rk_power_on(void)
+{
+ int ret;
+ ret=port_output_init(pwr_on, 1, "pwr_on");
+ if(ret<0)
+ CONFIG_ERR(pwr_on, "pwr_on");
+
+ port_output_on(pwr_on);
+}
+
{\r
int ret = 0;\r
struct rk_ts_data *ts;\r
- struct goodix_platform_data *pdata ;\r
+ #ifdef CONFIG_MACH_RK_FAC\r
+ struct tp_platform_data *pdata; \r
+ #else \r
+ struct goodix_platform_data *pdata ;\r
+ #endif\r
\r
printk(KERN_INFO "Install touch driver.\n");\r
if (!i2c_check_functionality(client->adapter, I2C_FUNC_I2C)) \r
\r
pdata = client->dev.platform_data;\r
ts->irq_pin = pdata->irq_pin;\r
+#ifdef CONFIG_MACH_RK_FAC\r
+ ts->rst_pin = pdata->reset_pin;\r
+#else\r
ts->rst_pin = pdata->rest_pin;\r
+#endif\r
ts->pendown =PEN_RELEASE;\r
ts->client = client;\r
ts->ts_init = goodix_ts_init; \r
#include <asm/uaccess.h>
#ifdef CONFIG_MACH_RK_FAC
-#include <mach/config.h>
+#include <plat/config.h>
extern int wifi_type;
#endif
#if (LINUX_VERSION_CODE >= KERNEL_VERSION(2, 6, 37))
#include "../hdmi/rk_hdmi.h"
#endif
#if defined(CONFIG_MACH_RK_FAC)
-#include <mach/config.h>
+#include <plat/config.h>
extern uint lcd_param[LCD_PARAM_MAX];
#endif
if(pchar!=NULL)
{
do{
- if(count==15)
+ if(count==13)
{
num=strcspn(pchar,",");
for(i=0;i<num;i++)
mLcdWith=simple_strtol(LcdWith,NULL,10);
}
- if(count==11){
+ if(count==9){
num=strcspn(pchar,",");
for(i=0;i<num;i++)
LcdHigh[i]=pchar[i];
#include <mach/gpio.h>
#ifdef CONFIG_MACH_RK_FAC
-#include <mach/config.h>
+#include <plat/config.h>
extern int codec_type;
#endif
#include "rk29_pcm.h"
#include "rk29_i2s.h"
#ifdef CONFIG_MACH_RK_FAC
-#include <mach/config.h>
+#include <plat/config.h>
extern int codec_type;
#endif
#include "rk29_i2s.h"
#ifdef CONFIG_MACH_RK_FAC
-#include <mach/config.h>
+#include <plat/config.h>
extern int codec_type;
#endif
#if 0