#if defined(CONFIG_MTK23D)
+static int mtk23d_io_init(void)
+{
+ return 0;
+}
+
+static int mtk23d_io_deinit(void)
+{
+
+ return 0;
+}
+
struct rk2818_23d_data rk2818_23d_info = {
- .bp_power = RK29_PIN0_PA0,
- .bp_reset = RK29_PIN0_PA1,
- .bp_statue = RK29_PIN0_PA3,//input high bp sleep;
- .ap_statue = RK29_PIN0_PA2,//output high ap sleep;
- .ap_bp_wakeup = RK29_PIN0_PA4, //output AP wake up BP used rising edge;
- //.bp_ap_wakeup = RK2818_PIN_PE0,//input BP wake up AP
-};
-struct platform_device rk2818_device_mtk23d = {
- .name = "mtk23d",
- .id = -1,
- .dev = {
- .platform_data = &rk2818_23d_info,
- }
+ .io_init = mtk23d_io_init,
+ .io_deinit = mtk23d_io_deinit,
+ .bp_power = RK29_PIN6_PB0,
+ .bp_power_active_low = 0,
+ .bp_reset = RK29_PIN6_PB1,
+ .bp_reset_active_low = 0,
+ .bp_statue = RK29_PIN0_PA2,//input high bp sleep;
+ .ap_statue = RK29_PIN0_PA3,//output high ap sleep;
+ .ap_bp_wakeup = RK29_PIN0_PA0, //output AP wake up BP used rising edge;
+ //.bp_ap_wakeup = RK2818_PIN_PA4,//input BP wake up AP
+};
+struct platform_device rk2818_device_mtk23d = {
+ .name = "mtk23d",
+ .id = -1,
+ .dev = {
+ .platform_data = &rk2818_23d_info,
+ }
};
#endif
-
/*****************************************************************************************
* SDMMC devices
*****************************************************************************************/
.name = "virtualkeys.hx8520-touchscreen",
#elif defined(CONFIG_TOUCHSCREEN_GT801_IIC)
.name = "virtualkeys.gt801-touchscreen",
-#elif defined(CONFIG_TOUCHSCREEN_GT801_IIC)
+#elif defined(CONFIG_TOUCHSCREEN_ILI2102_IIC)
.name = "virtualkeys.ili2102-touchscreen",
#endif
rk29sdk_init_wifi_mem();
#endif
- //rk29xx_virtual_keys_init();
+ rk29xx_virtual_keys_init();
}
static void __init machine_rk29_fixup(struct machine_desc *desc, struct tag *tags,
static struct regulator_consumer_supply dcdc2_consumers[] = {
{
.supply = "dcdc2",
+ },
+ {
+ .supply = "vcore",
}
};
static struct regulator_consumer_supply dcdc3_consumers[] = {
#if defined(CONFIG_MTK23D)
+static int mtk23d_io_init(void)
+{
+ return 0;
+}
+
+static int mtk23d_io_deinit(void)
+{
+
+ return 0;
+}
+
struct rk2818_23d_data rk2818_23d_info = {
+ .io_init = mtk23d_io_init,
+ .io_deinit = mtk23d_io_deinit,
.bp_power = RK29_PIN0_PA0,
+ .bp_power_active_low = 0,
.bp_reset = RK29_PIN0_PA1,
+ .bp_reset_active_low = 1,
.bp_statue = RK29_PIN0_PA3,//input high bp sleep;
.ap_statue = RK29_PIN0_PA2,//output high ap sleep;
.ap_bp_wakeup = RK29_PIN0_PA4, //output AP wake up BP used rising edge;
.name = "virtualkeys.hx8520-touchscreen",
#elif defined(CONFIG_TOUCHSCREEN_GT801_IIC)
.name = "virtualkeys.gt801-touchscreen",
+#elif defined(CONFIG_TOUCHSCREEN_ILI2102_IIC)
+ .name = "virtualkeys.ili2102-touchscreen",
#endif
int ret = 0;
- gpio_direction_output(pdata->bp_power, GPIO_HIGH);
+ gpio_direction_output(pdata->bp_power, pdata->bp_power_active_low? GPIO_LOW:GPIO_HIGH);
gpio_direction_input(pdata->bp_statue);
gpio_direction_output(pdata->ap_bp_wakeup, GPIO_LOW);
mdelay(100);
//rk2818_mux_api_set(GPIOE_SPI1_FLASH_SEL_NAME, IOMUXA_GPIO1_A3B7);
- gpio_direction_output(pdata->bp_reset, GPIO_LOW);
+ gpio_direction_output(pdata->bp_reset, pdata->bp_reset_active_low? GPIO_LOW:GPIO_HIGH);
mdelay(100);
- gpio_set_value(pdata->bp_reset, GPIO_HIGH);
+ gpio_set_value(pdata->bp_reset, pdata->bp_reset_active_low? GPIO_HIGH:GPIO_LOW);
mdelay(2000);
- gpio_set_value(pdata->bp_power, GPIO_LOW);
+ gpio_set_value(pdata->bp_power, pdata->bp_power_active_low? GPIO_HIGH:GPIO_LOW);
gpio_set_value(pdata->ap_bp_wakeup, GPIO_HIGH);
//INIT_WORK(&mt6223d_data->work, bpwakeup_work_func_work);
device_init_wakeup(&pdev, 1);
+ printk("%s\n",__FUNCTION__);
return 0;
}
}
platform_set_drvdata(pdev, mt6223d_data);
+ pdata->io_init();
+
result = gpio_request(pdata->bp_statue, "mtk23d");
if (result) {
printk("failed to request BP_STATUS gpio\n");
printk("failed to request BP_POW_EN gpio\n");
goto err1;
}
+
#if 0
- gpio_direction_output(pdata->bp_power, GPIO_HIGH);
+ gpio_direction_output(pdata->bp_power, pdata->bp_power_active_low? GPIO_HIGH:GPIO_LOW);
gpio_direction_input(pdata->bp_statue);
-
- rk2818_mux_api_set(CXGPIO_HSADC_SEL_NAME, 0);
+
+ //rk2818_mux_api_set(CXGPIO_HSADC_SEL_NAME, 0);
gpio_direction_output(pdata->ap_statue, GPIO_LOW);
-
- rk2818_mux_api_set(GPIOF5_APWM3_DPWM3_NAME,0);
+
+ //rk2818_mux_api_set(GPIOF5_APWM3_DPWM3_NAME,0);
gpio_direction_output(pdata->ap_bp_wakeup, GPIO_LOW);
mdelay(100);
+ //rk2818_mux_api_set(GPIOE_SPI1_FLASH_SEL_NAME, IOMUXA_GPIO1_A3B7);
+ gpio_direction_output(pdata->bp_reset, pdata->bp_reset_active_low? GPIO_LOW:GPIO_HIGH);
+ mdelay(100);
+ gpio_set_value(pdata->bp_reset, pdata->bp_reset_active_low? GPIO_HIGH:GPIO_LOW);
- //rk2818_mux_api_set(GPIOE_SPI1_FLASH_SEL_NAME, IOMUXA_GPIO1_A3B7);
- gpio_direction_output(pdata->bp_reset, GPIO_LOW);
- mdelay(100);
- gpio_set_value(pdata->bp_reset, GPIO_HIGH);
-
mdelay(2000);
- gpio_set_value(pdata->bp_power, GPIO_LOW);
-
+ gpio_set_value(pdata->bp_power, pdata->bp_power_active_low? GPIO_LOW:GPIO_HIGH);
+
gpio_set_value(pdata->ap_bp_wakeup, GPIO_HIGH);
-
- //INIT_WORK(&mt6223d_data->work, bpwakeup_work_func_work);
-
- device_init_wakeup(&pdev->dev, 1);
+ printk("%s:power up modem\n",__FUNCTION__);
#endif
+
INIT_WORK(&mt6223d_data->work, bpwakeup_work_func_work);
result = misc_register(&mtk23d_misc);
#include "rk2818_serial.h"
#define DBG_PORT 0
-#if 1
+#if 0
#define DBG(msg...) printk(msg);
#else
#define DBG(...)
/* 耳机数据结构体 */
struct rk2818_23d_data {
+ int (*io_init)(void);
+ int (*io_deinit)(void);
unsigned int bp_power;
+ unsigned int bp_power_active_low;
unsigned int bp_reset;
+ unsigned int bp_reset_active_low;
unsigned int bp_statue;
unsigned int ap_statue;
unsigned int ap_bp_wakeup;