#include <linux/interrupt.h>
#include <linux/irq.h>
#include <linux/reset.h>
+#include <linux/mfd/syscon.h>
+#include <linux/regmap.h>
#include <linux/rockchip/cru.h>
#include <linux/rockchip/grf.h>
#include <linux/rockchip/cpu.h>
#define PHY_USB_MODE (0)
#define PHY_UART_MODE (1)
+#define PHY_POWER_DOWN (0)
+#define PHY_POWER_UP (1)
+
#define USB_STATUS_BVABLID (1)
#define USB_STATUS_DPDM (2)
#define USB_STATUS_ID (3)
/* rk3188 platform data */
extern struct dwc_otg_platform_data usb20otg_pdata_rk3188;
extern struct dwc_otg_platform_data usb20host_pdata_rk3188;
-extern struct rkehci_platform_data rkhsic_pdata_rk3188;
+extern struct rkehci_platform_data rkehci_pdata_rk3188;
/* rk3288 platform data */
extern struct dwc_otg_platform_data usb20otg_pdata_rk3288;
extern struct dwc_otg_platform_data usb20host_pdata_rk3288;
-extern struct rkehci_platform_data rkhsic_pdata_rk3288;
+extern struct rkehci_platform_data rkehci1_pdata_rk3288;
extern struct rkehci_platform_data rkehci_pdata_rk3288;
extern struct rkehci_platform_data rkohci_pdata_rk3288;
/* rk3036 platform data */
/* rk3126 platform data */
extern struct dwc_otg_platform_data usb20otg_pdata_rk3126;
extern struct dwc_otg_platform_data usb20host_pdata_rk3126;
-
+extern struct dwc_otg_platform_data usb20ohci_pdata_rk3126;
+extern struct rkehci_platform_data usb20ehci_pdata_rk3126;
+/* rk3368 platform data */
+extern struct rkehci_platform_data usb20ehci_pdata_rk3368;
+extern struct dwc_otg_platform_data usb20ohci_pdata_rk3368;
+extern struct dwc_otg_platform_data usb20otg_pdata_rk3368;
struct dwc_otg_platform_data {
void *privdata;
void (*dwc_otg_uart_mode) (void *pdata, int enter_usb_uart_mode);
void (*bc_detect_cb) (int bc_type);
int (*get_status) (int id);
+ void (*phy_power_down)(int power_down);
};
struct rkehci_platform_data {
struct device *dev;
- struct clk *hclk_hsic;
- struct clk *hsic_phy_480m;
- struct clk *hsic_phy_12m;
+ struct clk *hclk_ehci;
+ struct clk *ehci_phy_480m;
+ struct clk *ehci_phy_12m;
struct clk *phyclk;
struct clk *ahbclk;
void (*hw_init) (void);
pGRF_SOC_STATUS19_RK3288 grf_soc_status19_rk3288;
pGRF_SOC_STATUS21_RK3288 grf_soc_status21_rk3288;
+ struct regmap *grf;
struct gpio *host_gpios;
struct gpio *otg_gpios;
struct clk *hclk_usb_peri;
struct wake_lock usb_wakelock;
int remote_wakeup;
int usb_irq_wakeup;
+ int linestate_wakeup;
int chip_id;
};
RK3126_USB_CTLR,
};
-struct usb20otg_pdata_id {
- char name[32];
- struct dwc_otg_platform_data *pdata;
-};
-
-struct usb20host_pdata_id {
- char name[32];
- struct dwc_otg_platform_data *pdata;
-};
-
struct rkehci_pdata_id {
char name[32];
struct rkehci_platform_data *pdata;