mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-09 12:17:12 +09:00
rk30:phone loquat:support Tps80032 usb otg
This commit is contained in:
@@ -593,8 +593,19 @@ static struct twl4030_bci_platform_data tps80032_bci_data = {
|
||||
.battery_tmp_tbl = tps_batt_table,
|
||||
.tblsize = ARRAY_SIZE(tps_batt_table),
|
||||
};
|
||||
static struct twl4030_usb_data tps80032_usb_data = {
|
||||
.usb_mode = T2_USB_MODE_ULPI,
|
||||
|
||||
int rk30_phy_init(){}
|
||||
int rk30_phy_exit(){}
|
||||
int rk30_phy_power(){}
|
||||
int rk30_phy_set_clk(){}
|
||||
int rk30_phy_suspend(){}
|
||||
static struct twl4030_usb_data tps80032_usbphy_data = {
|
||||
.phy_init = rk30_phy_init,
|
||||
.phy_exit = rk30_phy_exit,
|
||||
.phy_power = rk30_phy_power,
|
||||
.phy_set_clock = rk30_phy_set_clk,
|
||||
.phy_suspend = rk30_phy_suspend,
|
||||
|
||||
};
|
||||
static struct twl4030_ins sleep_on_seq[] __initdata = {
|
||||
/*
|
||||
@@ -777,7 +788,7 @@ static struct twl4030_platform_data tps80032_data = {
|
||||
|
||||
.madc = &tps80032_madc_data,
|
||||
.bci = &tps80032_bci_data,
|
||||
.usb = &tps80032_usb_data,
|
||||
.usb = &tps80032_usbphy_data,
|
||||
// .power = &tps80032_scripts_data,
|
||||
/* Regulators */
|
||||
.ldo1 = &tps80032_ldo1,
|
||||
|
||||
@@ -34,7 +34,7 @@
|
||||
#include <linux/slab.h>
|
||||
#include <linux/delay.h>
|
||||
|
||||
#include <plat/usb.h>
|
||||
//#include <plat/usb.h>
|
||||
|
||||
/* usb register definitions */
|
||||
#define USB_VENDOR_ID_LSB 0x00
|
||||
@@ -92,6 +92,9 @@
|
||||
#define CONTROLLER_STAT1 0x03
|
||||
#define VBUS_DET BIT(2)
|
||||
|
||||
extern int get_msc_connect_flag(void);
|
||||
|
||||
|
||||
struct twl6030_usb {
|
||||
struct otg_transceiver otg;
|
||||
struct device *dev;
|
||||
@@ -310,7 +313,11 @@ static irqreturn_t twl6030_usb_irq(int irq, void *_twl)
|
||||
|
||||
regulator_enable(twl->usb3v3);
|
||||
twl6030_phy_suspend(&twl->otg, 0);
|
||||
charger_type = omap4_charger_detect();
|
||||
if(0 == get_msc_connect_flag())
|
||||
charger_type = POWER_SUPPLY_TYPE_USB_DCP;
|
||||
else
|
||||
charger_type = POWER_SUPPLY_TYPE_USB;
|
||||
|
||||
twl6030_phy_suspend(&twl->otg, 1);
|
||||
if ((charger_type == POWER_SUPPLY_TYPE_USB_CDP)
|
||||
|| (charger_type == POWER_SUPPLY_TYPE_USB)) {
|
||||
|
||||
Reference in New Issue
Block a user