Home
last modified time | relevance | path

Searched refs:ssusb (Results 1 – 9 of 9) sorted by relevance

/drivers/usb/mtu3/
Dmtu3_plat.c23 int ssusb_check_clocks(struct ssusb_mtk *ssusb, u32 ex_clks) in ssusb_check_clocks() argument
25 void __iomem *ibase = ssusb->ippc_base; in ssusb_check_clocks()
35 dev_err(ssusb->dev, "clks of sts1 are not stable!\n"); in ssusb_check_clocks()
42 dev_err(ssusb->dev, "mac2 clock is not stable\n"); in ssusb_check_clocks()
49 static int wait_for_ip_sleep(struct ssusb_mtk *ssusb) in wait_for_ip_sleep() argument
55 if (!ssusb->is_host) in wait_for_ip_sleep()
56 sleep_check = ssusb_gadget_ip_sleep_check(ssusb); in wait_for_ip_sleep()
62 ret = readl_poll_timeout(ssusb->ippc_base + U3D_SSUSB_IP_PW_STS1, value, in wait_for_ip_sleep()
65 dev_err(ssusb->dev, "ip sleep failed!!!\n"); in wait_for_ip_sleep()
75 static int ssusb_phy_init(struct ssusb_mtk *ssusb) in ssusb_phy_init() argument
[all …]
Dmtu3_host.c53 static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable) in ssusb_wakeup_ip_sleep_set() argument
57 switch (ssusb->uwk_vers) { in ssusb_wakeup_ip_sleep_set()
59 reg = ssusb->uwk_reg_base + PERI_WK_CTRL1; in ssusb_wakeup_ip_sleep_set()
64 reg = ssusb->uwk_reg_base + PERI_WK_CTRL0; in ssusb_wakeup_ip_sleep_set()
69 reg = ssusb->uwk_reg_base + PERI_WK_CTRL0; in ssusb_wakeup_ip_sleep_set()
74 reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL; in ssusb_wakeup_ip_sleep_set()
81 regmap_update_bits(ssusb->uwk, reg, msk, val); in ssusb_wakeup_ip_sleep_set()
84 int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb, in ssusb_wakeup_of_property_parse() argument
91 ssusb->uwk_en = of_property_read_bool(dn, "wakeup-source"); in ssusb_wakeup_of_property_parse()
92 if (!ssusb->uwk_en) in ssusb_wakeup_of_property_parse()
[all …]
Dmtu3_dr.c22 static void toggle_opstate(struct ssusb_mtk *ssusb) in toggle_opstate() argument
24 mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION); in toggle_opstate()
25 mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN); in toggle_opstate()
29 static int ssusb_port0_switch(struct ssusb_mtk *ssusb, in ssusb_port0_switch() argument
32 void __iomem *ibase = ssusb->ippc_base; in ssusb_port0_switch()
35 dev_dbg(ssusb->dev, "%s (switch u%d port0 to %s)\n", __func__, in ssusb_port0_switch()
67 static void switch_port_to_host(struct ssusb_mtk *ssusb) in switch_port_to_host() argument
71 dev_dbg(ssusb->dev, "%s\n", __func__); in switch_port_to_host()
73 ssusb_port0_switch(ssusb, USB2_PORT, true); in switch_port_to_host()
75 if (ssusb->otg_switch.is_u3_drd) { in switch_port_to_host()
[all …]
Dmtu3_dr.h15 int ssusb_host_init(struct ssusb_mtk *ssusb, struct device_node *parent_dn);
16 void ssusb_host_exit(struct ssusb_mtk *ssusb);
17 int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb,
19 int ssusb_host_resume(struct ssusb_mtk *ssusb, bool p0_skipped);
20 int ssusb_host_suspend(struct ssusb_mtk *ssusb);
21 void ssusb_wakeup_set(struct ssusb_mtk *ssusb, bool enable);
25 static inline int ssusb_host_init(struct ssusb_mtk *ssusb, in ssusb_host_init() argument
32 static inline void ssusb_host_exit(struct ssusb_mtk *ssusb) in ssusb_host_exit() argument
36 struct ssusb_mtk *ssusb, struct device_node *dn) in ssusb_wakeup_of_property_parse() argument
41 static inline int ssusb_host_resume(struct ssusb_mtk *ssusb, bool p0_skipped) in ssusb_host_resume() argument
[all …]
Dmtu3_debugfs.c352 struct ssusb_mtk *ssusb = mtu->ssusb; in mtu3_debugfs_create_prb_files() local
357 dir_prb = debugfs_create_dir("probe", ssusb->dbgfs_root); in mtu3_debugfs_create_prb_files()
389 struct ssusb_mtk *ssusb = mtu->ssusb; in mtu3_debugfs_create_ep_dirs() local
393 dir_eps = debugfs_create_dir("eps", ssusb->dbgfs_root); in mtu3_debugfs_create_ep_dirs()
401 void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) in ssusb_dev_debugfs_init() argument
403 struct mtu3 *mtu = ssusb->u3d; in ssusb_dev_debugfs_init()
406 dir_regs = debugfs_create_dir("regs", ssusb->dbgfs_root); in ssusb_dev_debugfs_init()
424 debugfs_create_file("link-state", 0444, ssusb->dbgfs_root, in ssusb_dev_debugfs_init()
426 debugfs_create_file("ep-used", 0444, ssusb->dbgfs_root, in ssusb_dev_debugfs_init()
432 struct ssusb_mtk *ssusb = sf->private; in ssusb_mode_show() local
[all …]
Dmtu3_debug.h30 void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
31 void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
32 void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
33 void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
36 static inline void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) {} in ssusb_dev_debugfs_init() argument
37 static inline void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb) {} in ssusb_dr_debugfs_init() argument
38 static inline void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) {} in ssusb_debugfs_create_root() argument
39 static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {} in ssusb_debugfs_remove_root() argument
Dmtu3_core.c113 if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG) { in mtu3_device_enable()
120 return ssusb_check_clocks(mtu->ssusb, check_clk); in mtu3_device_enable()
134 if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG) { in mtu3_device_disable()
825 if (mtu->u3_capable && (mtu->ssusb->u3p_dis_msk & BIT(0))) in mtu3_check_params()
922 int ssusb_gadget_init(struct ssusb_mtk *ssusb) in ssusb_gadget_init() argument
924 struct device *dev = ssusb->dev; in ssusb_gadget_init()
953 mtu->ippc_base = ssusb->ippc_base; in ssusb_gadget_init()
954 ssusb->mac_base = mtu->mac_base; in ssusb_gadget_init()
955 ssusb->u3d = mtu; in ssusb_gadget_init()
956 mtu->ssusb = ssusb; in ssusb_gadget_init()
[all …]
Dmtu3.h325 struct ssusb_mtk *ssusb; member
417 int ssusb_check_clocks(struct ssusb_mtk *ssusb, u32 ex_clks);
Dmtu3_gadget.c535 if (mtu->ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) in mtu3_gadget_start()
590 if (mtu->ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) in mtu3_gadget_stop()