.batt_low_pin = INVALID_GPIO,
.charge_set_pin = INVALID_GPIO,
.charge_ok_pin = INVALID_GPIO,
-
- //.io_init = rk30_battery_adc_io_init,
- #if defined(CONFIG_REGULATOR_ACT8931)
- .is_dc_charging = rk30_battery_adc_is_dc_charging,
- .charging_ok = rk30_battery_adc_charging_ok ,
- #endif
-
+ .io_init = rk30_battery_adc_io_init,
.charging_sleep = 0 ,
.save_capacity = 1 ,
};
if(ret < 0)
return ret;
rk30_adc_battery_platdata.adc_channel = chg_adc;
- rk30_adc_battery_platdata.dc_det_pin = get_port_config(dc_det).gpio;
- rk30_adc_battery_platdata.batt_low_pin = get_port_config(bat_low).gpio;
- rk30_adc_battery_platdata.charge_ok_pin = get_port_config(chg_ok).gpio;
- rk30_adc_battery_platdata.charge_set_pin = get_port_config(chg_set).gpio;
+ if(dc_det != -1){
+ rk30_adc_battery_platdata.dc_det_pin = get_port_config(dc_det).gpio;
+ rk30_adc_battery_platdata.dc_det_level = !get_port_config(dc_det).io.active_low;
+ }
+ if(bat_low != -1){
+ rk30_adc_battery_platdata.batt_low_pin = get_port_config(bat_low).gpio;
+ rk30_adc_battery_platdata.batt_low_level = !get_port_config(bat_low).io.active_low;
+ }
+ if(chg_ok != -1){
+ rk30_adc_battery_platdata.charge_ok_pin = get_port_config(chg_ok).gpio;
+ rk30_adc_battery_platdata.charge_ok_level = !get_port_config(chg_ok).io.active_low;
+ }
+ if(chg_set != -1){
+ rk30_adc_battery_platdata.charge_set_pin = get_port_config(chg_set).gpio;
+ rk30_adc_battery_platdata.charge_set_level = !get_port_config(chg_set).io.active_low;
+ }
+ if(pmic_is_act8931()){
+ rk30_adc_battery_platdata.is_dc_charging = rk30_battery_adc_is_dc_charging;
+ rk30_adc_battery_platdata.charging_ok = rk30_battery_adc_charging_ok;
+ };
return 0;
}
#define RK2926_TB_DEFAULT_CONFIG
//#define RK2928_TB_DEFAULT_CONFIG
+//#define RK2926_V86_DEFAULT_CONFIG
//#define RK2926_SDK_DEFAULT_CONFIG
//#define RK2928_SDK_DEFAULT_CONFIG
//#define RK2928_PHONEPAD_DEFAULT_CONFIG
};
/* usb */
enum {
- DEF_OTG_DRV = -1,
+ DEF_OTG_DRV = 0x000003c1,
DEF_HOST_DRV = 0x000002b4,
};
/* lcd */
};
/* usb */
enum {
- DEF_OTG_DRV = -1,
+ DEF_OTG_DRV = 0x000003c1,
DEF_HOST_DRV = 0x000001b2,
};
/* lcd */
DEF_CHG_SEL = 0x000001a1,
};
+/* global */
+enum {
+ DEF_IS_PHONEPAD = 0,
+ DEF_PWR_ON = 0x000001a2,
+};
+/**************************** rk2926 sdk(v86) ******************************/
+#elif defined(RK2926_V86_DEFAULT_CONFIG)
+/* keyboard */
+enum{
+ DEF_KEY_ADC = 1,
+ DEF_PLAY_KEY = 0x000101a4,
+ DEF_VOLDN_KEY = 512 | (1<<31),
+ DEF_VOLUP_KEY = 1 | (1<<31),
+ DEF_MENU_KEY = 0 | (1<<31),
+ DEF_ESC_KEY = 0 | (1<<31),
+ DEF_HOME_KEY = 0 | (1<<31),
+ DEF_CAM_KEY = 0 | (1<<31),
+};
+/* backlight */
+enum{
+ DEF_BL_PWM = 0,
+ DEF_BL_REF = 0,
+ DEF_BL_MIN = 80,
+ DEF_BL_EN = 0x000003c1,
+};
+
+/* usb */
+enum {
+ DEF_OTG_DRV = -1,
+ DEF_HOST_DRV = -1,
+};
+/* lcd */
+enum {
+ DEF_LCD_CABC = -1,
+ DEF_LCD_EN = 0x000101b3,
+ DEF_LCD_STD = -1,
+};
+
+#define DEF_LCD_PARAM {SCREEN_RGB, OUT_P666, \
+ 33000000, 15000000, \
+ 30, 10, 800, 210, \
+ 13, 10, 480, 22, \
+ 154, 85, \
+ 0, 0 }
+/* gsensor */
+enum {
+ DEF_GS_TYPE = GS_TYPE_MMA7660,
+ DEF_GS_I2C = 1,
+ DEF_GS_ADDR = 0x4c,
+ DEF_GS_IRQ = 0x008001b2,
+ DEF_GS_PWR = -1,
+};
+#define DEF_GS_ORIG {0, 1, 0, 0, 0, -1, 1, 0, 0}
+/* lsensor */
+enum {
+ DEF_LS_TYPE = LS_TYPE_NONE,
+ DEF_LS_I2C = -1,
+ DEF_LS_ADDR = -1,
+ DEF_LS_IRQ = -1,
+ DEF_LS_PWR = -1,
+};
+/* psensor */
+enum {
+ DEF_PS_TYPE = PS_TYPE_NONE,
+ DEF_PS_I2C = -1,
+ DEF_PS_ADDR = -1,
+ DEF_PS_IRQ = -1,
+ DEF_PS_PWR = -1,
+};
+
+/* camera */
+enum {
+ DEF_FRONT_CAM_ID = CAM_ID_FRONT_SENSOR_0,
+ DEF_FRONT_CAM_I2C = 1,
+ DEF_FRONT_CAM_PWR = 0x000003b3,
+};
+enum {
+ DEF_BACK_CAM_ID = -1,
+ DEF_BACK_CAM_I2C = -1,
+ DEF_BACK_CAM_PWR = -1,
+};
+
+/* pwm regulator */
+enum {
+ DEF_REG_PWM = 1,
+};
+/* pmic */
+enum {
+ DEF_PMIC_TYPE = PMIC_TYPE_TPS65910,
+ DEF_PMIC_SLP = 0x000001a1,
+ DEF_PMIC_IRQ = 0x000001b1,
+ DEF_PMIC_I2C = 0,
+ DEF_PMIC_ADDR = 0x2d,
+};
+/* tps656910_dcdc: vdd_cpu, vdd2, vdd3, vio
+ * tps65910_ldo: vdig1, vdig2, vaux1, vaux2, vaux33, vmmc, vdac, vpll
+ * act8931_dcdc: act_dcdc1, act_dcdc2, vdd_cpu
+ * act8931_ldo: act_ldo1, act_ldo2, act_ldo3, act_ldo4
+ */
+#define DEF_TPS65910_DCDC {1200000,1200000,1200000,1200000,0,0,3300000,3300000}
+#define DEF_TPS65910_LDO {1500000,1500000,1200000,1200000,2800000,2800000,3300000,3300000,3300000,3300000,3300000,3300000,0,0,0,0}
+#define DEF_ACT8931_DCDC {3300000,3300000,1500000,1500000,1200000,1200000}
+#define DEF_ACT8931_LDO {2800000,2800000,1800000,1800000,3000000,3000000,3300000,3300000}
+/* ion */
+enum {
+ DEF_ION_SIZE = 80 * 1024 * 1024,
+};
+/* codec */
+enum {
+ DEF_SPK_CTL = 0x000001a0,
+ DEF_HP_DET = -1,
+};
+/* sdmmc */
+enum {
+ DEF_SD_DET = 0x000102a7,
+};
+/* wifi */
+enum {
+ DEF_WIFI_RST = -1,
+ DEF_WIFI_PWR = -1,
+ DEF_WIFI_TYPE = WIFI_NONE,
+ DEF_WIFI_LDO = 5,
+};
+/* rtc */
+enum {
+ DEF_RTC_I2C = 0,
+ DEF_RTC_ADDR = 0x51,
+ DEF_RTC_IRQ = -1,
+};
+/* charge */
+enum {
+ DEF_CHG_ADC = 0,
+ DEF_DC_DET = 0x001101a5,
+ DEF_BAT_LOW = -1,
+ DEF_CHG_OK = -1,
+ DEF_CHG_SET = -1,
+ DEF_CHG_SEL = -1,
+};
+
/* global */
enum {
DEF_IS_PHONEPAD = 0,
};
/* usb */
enum {
- DEF_OTG_DRV = -1,
+ DEF_OTG_DRV = 0x000003c1,
DEF_HOST_DRV = -1,
};
/* lcd */