Home
last modified time | relevance | path

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

/Linux-v5.4/drivers/usb/mtu3/
Dmtu3_plat.c22 int ssusb_check_clocks(struct ssusb_mtk *ssusb, u32 ex_clks) in ssusb_check_clocks() argument
24 void __iomem *ibase = ssusb->ippc_base; in ssusb_check_clocks()
34 dev_err(ssusb->dev, "clks of sts1 are not stable!\n"); in ssusb_check_clocks()
41 dev_err(ssusb->dev, "mac2 clock is not stable\n"); in ssusb_check_clocks()
48 static int ssusb_phy_init(struct ssusb_mtk *ssusb) in ssusb_phy_init() argument
53 for (i = 0; i < ssusb->num_phys; i++) { in ssusb_phy_init()
54 ret = phy_init(ssusb->phys[i]); in ssusb_phy_init()
62 phy_exit(ssusb->phys[i - 1]); in ssusb_phy_init()
67 static int ssusb_phy_exit(struct ssusb_mtk *ssusb) in ssusb_phy_exit() argument
71 for (i = 0; i < ssusb->num_phys; i++) in ssusb_phy_exit()
[all …]
Dmtu3_host.c41 static void ssusb_wakeup_ip_sleep_set(struct ssusb_mtk *ssusb, bool enable) in ssusb_wakeup_ip_sleep_set() argument
45 switch (ssusb->uwk_vers) { in ssusb_wakeup_ip_sleep_set()
47 reg = ssusb->uwk_reg_base + PERI_WK_CTRL1; in ssusb_wakeup_ip_sleep_set()
52 reg = ssusb->uwk_reg_base + PERI_SSUSB_SPM_CTRL; in ssusb_wakeup_ip_sleep_set()
59 regmap_update_bits(ssusb->uwk, reg, msk, val); in ssusb_wakeup_ip_sleep_set()
62 int ssusb_wakeup_of_property_parse(struct ssusb_mtk *ssusb, in ssusb_wakeup_of_property_parse() argument
69 ssusb->uwk_en = of_property_read_bool(dn, "wakeup-source"); in ssusb_wakeup_of_property_parse()
70 if (!ssusb->uwk_en) in ssusb_wakeup_of_property_parse()
78 ssusb->uwk_reg_base = args.args[0]; in ssusb_wakeup_of_property_parse()
79 ssusb->uwk_vers = args.args[1]; in ssusb_wakeup_of_property_parse()
[all …]
Dmtu3_dr.c42 static void toggle_opstate(struct ssusb_mtk *ssusb) in toggle_opstate() argument
44 if (!ssusb->otg_switch.is_u3_drd) { in toggle_opstate()
45 mtu3_setbits(ssusb->mac_base, U3D_DEVICE_CONTROL, DC_SESSION); in toggle_opstate()
46 mtu3_setbits(ssusb->mac_base, U3D_POWER_MANAGEMENT, SOFT_CONN); in toggle_opstate()
51 static int ssusb_port0_switch(struct ssusb_mtk *ssusb, in ssusb_port0_switch() argument
54 void __iomem *ibase = ssusb->ippc_base; in ssusb_port0_switch()
57 dev_dbg(ssusb->dev, "%s (switch u%d port0 to %s)\n", __func__, in ssusb_port0_switch()
89 static void switch_port_to_host(struct ssusb_mtk *ssusb) in switch_port_to_host() argument
93 dev_dbg(ssusb->dev, "%s\n", __func__); in switch_port_to_host()
95 ssusb_port0_switch(ssusb, USB2_PORT, true); 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_enable(struct ssusb_mtk *ssusb);
20 int ssusb_host_disable(struct ssusb_mtk *ssusb, bool suspend);
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_enable(struct ssusb_mtk *ssusb) in ssusb_host_enable() argument
[all …]
Dmtu3_debug.h29 void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb);
30 void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb);
31 void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb);
32 void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb);
35 static inline void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) {} in ssusb_dev_debugfs_init() argument
36 static inline void ssusb_dr_debugfs_init(struct ssusb_mtk *ssusb) {} in ssusb_dr_debugfs_init() argument
37 static inline void ssusb_debugfs_create_root(struct ssusb_mtk *ssusb) {} in ssusb_debugfs_create_root() argument
38 static inline void ssusb_debugfs_remove_root(struct ssusb_mtk *ssusb) {} in ssusb_debugfs_remove_root() argument
Dmtu3_debugfs.c351 struct ssusb_mtk *ssusb = mtu->ssusb; in mtu3_debugfs_create_prb_files() local
356 dir_prb = debugfs_create_dir("probe", ssusb->dbgfs_root); in mtu3_debugfs_create_prb_files()
388 struct ssusb_mtk *ssusb = mtu->ssusb; in mtu3_debugfs_create_ep_dirs() local
392 dir_eps = debugfs_create_dir("eps", ssusb->dbgfs_root); in mtu3_debugfs_create_ep_dirs()
400 void ssusb_dev_debugfs_init(struct ssusb_mtk *ssusb) in ssusb_dev_debugfs_init() argument
402 struct mtu3 *mtu = ssusb->u3d; in ssusb_dev_debugfs_init()
405 dir_regs = debugfs_create_dir("regs", ssusb->dbgfs_root); in ssusb_dev_debugfs_init()
423 debugfs_create_file("link-state", 0444, ssusb->dbgfs_root, in ssusb_dev_debugfs_init()
425 debugfs_create_file("ep-used", 0444, ssusb->dbgfs_root, in ssusb_dev_debugfs_init()
431 struct ssusb_mtk *ssusb = sf->private; in ssusb_mode_show() local
[all …]
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()
826 int ssusb_gadget_init(struct ssusb_mtk *ssusb) in ssusb_gadget_init() argument
828 struct device *dev = ssusb->dev; in ssusb_gadget_init()
852 mtu->ippc_base = ssusb->ippc_base; in ssusb_gadget_init()
853 ssusb->mac_base = mtu->mac_base; in ssusb_gadget_init()
854 ssusb->u3d = mtu; in ssusb_gadget_init()
855 mtu->ssusb = ssusb; in ssusb_gadget_init()
905 if (mtu->ssusb->dr_mode == USB_DR_MODE_OTG) in ssusb_gadget_init()
[all …]
Dmtu3.h328 struct ssusb_mtk *ssusb; member
422 int ssusb_check_clocks(struct ssusb_mtk *ssusb, u32 ex_clks);
Dmtu3_gadget.c531 if (mtu->ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) in mtu3_gadget_start()
585 if (mtu->ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) in mtu3_gadget_stop()
/Linux-v5.4/arch/arm64/boot/dts/mediatek/
Dmt2712-evb.dts124 &ssusb {
Dmt7622-rfb1.dts482 &ssusb {
Dmt7622-bananapi-bpi-r64.dts519 &ssusb {
Dmt8173-evb.dts513 &ssusb {
Dmt7622.dtsi710 ssusb: usb@1a0c0000 { label
Dmt2712e.dtsi669 ssusb: usb@11271000 { label
Dmt8173.dtsi844 ssusb: usb@11271000 { label
/Linux-v5.4/arch/arm/boot/dts/
Dmt7629-rfb.dts254 &ssusb {
Dmt7629.dtsi294 ssusb: usb@1a0c0000 { label
/Linux-v5.4/Documentation/devicetree/bindings/usb/
Dmediatek,mtu3.txt75 ssusb: usb@11271000 {