Home
last modified time | relevance | path

Searched full:dr_mode (Results 1 – 25 of 880) sorted by relevance

12345678910>>...36

/OK3568_Linux_fs/u-boot/drivers/usb/cdns3/
H A Dcore.c106 enum usb_dr_mode dr_mode; in cdns3_core_init_role() local
109 dr_mode = usb_get_dr_mode(dev->node); in cdns3_core_init_role()
117 if (dr_mode == USB_DR_MODE_UNKNOWN) { in cdns3_core_init_role()
120 dr_mode = USB_DR_MODE_OTG; in cdns3_core_init_role()
122 dr_mode = USB_DR_MODE_HOST; in cdns3_core_init_role()
124 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns3_core_init_role()
128 * At this point cdns->dr_mode contains strap configuration. in cdns3_core_init_role()
131 best_dr_mode = cdns->dr_mode; in cdns3_core_init_role()
137 if (dr_mode == USB_DR_MODE_OTG) { in cdns3_core_init_role()
138 best_dr_mode = cdns->dr_mode; in cdns3_core_init_role()
[all …]
H A Ddrd.c91 if (cdns->dr_mode == USB_DR_MODE_HOST) in cdns3_is_host()
101 if (cdns->dr_mode == USB_DR_MODE_PERIPHERAL) in cdns3_is_device()
103 else if (cdns->dr_mode == USB_DR_MODE_OTG) in cdns3_is_device()
220 switch (cdns->dr_mode) { in cdns3_drd_update_mode()
232 cdns->dr_mode); in cdns3_drd_update_mode()
279 /* Update dr_mode according to STRAP configuration. */ in cdns3_drd_init()
280 cdns->dr_mode = USB_DR_MODE_OTG; in cdns3_drd_init()
283 cdns->dr_mode = USB_DR_MODE_HOST; in cdns3_drd_init()
286 cdns->dr_mode = USB_DR_MODE_PERIPHERAL; in cdns3_drd_init()
/OK3568_Linux_fs/kernel/drivers/usb/cdns3/
H A Dcore.c88 enum usb_dr_mode dr_mode; in cdns3_core_init_role() local
91 dr_mode = usb_get_dr_mode(dev); in cdns3_core_init_role()
99 if (dr_mode == USB_DR_MODE_UNKNOWN) { in cdns3_core_init_role()
103 dr_mode = USB_DR_MODE_OTG; in cdns3_core_init_role()
105 dr_mode = USB_DR_MODE_HOST; in cdns3_core_init_role()
107 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns3_core_init_role()
111 dr_mode = USB_DR_MODE_OTG; in cdns3_core_init_role()
113 dr_mode = USB_DR_MODE_HOST; in cdns3_core_init_role()
115 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns3_core_init_role()
120 * At this point cdns->dr_mode contains strap configuration. in cdns3_core_init_role()
[all …]
H A Ddrd.c110 if (cdns->dr_mode == USB_DR_MODE_HOST) in cdns3_is_host()
120 if (cdns->dr_mode == USB_DR_MODE_PERIPHERAL) in cdns3_is_device()
122 else if (cdns->dr_mode == USB_DR_MODE_OTG) in cdns3_is_device()
287 switch (cdns->dr_mode) { in cdns3_drd_update_mode()
299 cdns->dr_mode); in cdns3_drd_update_mode()
329 if (cdns->dr_mode != USB_DR_MODE_OTG) in cdns3_drd_irq()
413 /* Update dr_mode according to STRAP configuration. */ in cdns3_drd_init()
414 cdns->dr_mode = USB_DR_MODE_OTG; in cdns3_drd_init()
421 cdns->dr_mode = USB_DR_MODE_HOST; in cdns3_drd_init()
427 cdns->dr_mode = USB_DR_MODE_PERIPHERAL; in cdns3_drd_init()
/OK3568_Linux_fs/u-boot/drivers/usb/dwc3/
H A Ddwc3-generic.c35 enum usb_dr_mode dr_mode; member
60 dwc3->dr_mode = plat->dr_mode; in dwc3_generic_probe()
119 plat->dr_mode = usb_get_dr_mode(node); in dwc3_generic_ofdata_to_platdata()
120 if (plat->dr_mode == USB_DR_MODE_UNKNOWN) { in dwc3_generic_ofdata_to_platdata()
123 } else if (plat->dr_mode != USB_DR_MODE_HOST && in dwc3_generic_ofdata_to_platdata()
125 pr_info("Set dr_mode to HOST\n"); in dwc3_generic_ofdata_to_platdata()
126 plat->dr_mode = USB_DR_MODE_HOST; in dwc3_generic_ofdata_to_platdata()
308 enum usb_dr_mode dr_mode; in dwc3_glue_bind() local
314 dr_mode = usb_get_dr_mode(node); in dwc3_glue_bind()
316 switch (dr_mode) { in dwc3_glue_bind()
[all …]
H A Dcore.c525 if ((dwc->dr_mode == USB_DR_MODE_HOST || in dwc3_core_init()
526 dwc->dr_mode == USB_DR_MODE_OTG) && in dwc3_core_init()
606 switch (dwc->dr_mode) { in dwc3_core_init_mode()
638 dev_err(dev, "Unsupported mode of operation %d\n", dwc->dr_mode); in dwc3_core_init_mode()
653 switch (dwc->dr_mode) { in dwc3_core_exit_mode()
736 dwc->dr_mode = dwc3_dev->dr_mode; in dwc3_uboot_init()
788 dwc->dr_mode = USB_DR_MODE_HOST; in dwc3_uboot_init()
790 dwc->dr_mode = USB_DR_MODE_PERIPHERAL; in dwc3_uboot_init()
792 if (dwc->dr_mode == USB_DR_MODE_UNKNOWN) in dwc3_uboot_init()
793 dwc->dr_mode = USB_DR_MODE_OTG; in dwc3_uboot_init()
/OK3568_Linux_fs/kernel/arch/powerpc/platforms/83xx/
H A Dusb.c29 const void *prop, *dr_mode; in mpc834x_usb_cfg() local
53 dr_mode = of_get_property(np, "dr_mode", NULL); in mpc834x_usb_cfg()
54 if (dr_mode && !strcmp(dr_mode, "otg")) { in mpc834x_usb_cfg()
109 const void *dr_mode; in mpc831x_usb_cfg() local
193 dr_mode = of_get_property(np, "dr_mode", NULL); in mpc831x_usb_cfg()
194 if (dr_mode && !strcmp(dr_mode, "otg")) in mpc831x_usb_cfg()
/OK3568_Linux_fs/u-boot/drivers/usb/common/
H A Dcommon.c27 const char *dr_mode; in usb_get_dr_mode() local
30 dr_mode = ofnode_read_string(node, "dr_mode"); in usb_get_dr_mode()
31 if (!dr_mode) { in usb_get_dr_mode()
32 pr_err("usb dr_mode not found\n"); in usb_get_dr_mode()
37 if (!strcmp(dr_mode, usb_dr_modes[i])) in usb_get_dr_mode()
/OK3568_Linux_fs/kernel/drivers/usb/dwc2/
H A Dplatform.c60 * Check the dr_mode against the module configuration and hardware
63 * The hardware, module, and dr_mode, can each be set to host, device,
65 * value of dr_mode if possible.
68 * HW MOD dr_mode dr_mode
80 * OTG OTG any : dr_mode
86 hsotg->dr_mode = usb_get_dr_mode(hsotg->dev); in dwc2_get_dr_mode()
87 if (hsotg->dr_mode == USB_DR_MODE_UNKNOWN) in dwc2_get_dr_mode()
88 hsotg->dr_mode = USB_DR_MODE_OTG; in dwc2_get_dr_mode()
90 mode = hsotg->dr_mode; in dwc2_get_dr_mode()
113 if (mode != hsotg->dr_mode) { in dwc2_get_dr_mode()
[all …]
H A Ddrd.c31 dwc2_force_mode(hsotg, (hsotg->dr_mode == USB_DR_MODE_HOST)); in dwc2_ovr_init()
78 /* Skip session not in line with dr_mode */ in dwc2_drd_role_sw_set()
79 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_drd_role_sw_set()
80 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) in dwc2_drd_role_sw_set()
128 if (!already && hsotg->dr_mode == USB_DR_MODE_OTG) in dwc2_drd_role_sw_set()
H A Dparams.c398 if ((hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_set_default_params()
399 (hsotg->dr_mode == USB_DR_MODE_OTG)) { in dwc2_set_default_params()
411 if ((hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) || in dwc2_set_default_params()
412 (hsotg->dr_mode == USB_DR_MODE_OTG)) { in dwc2_set_default_params()
443 if ((hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) || in dwc2_get_device_properties()
444 (hsotg->dr_mode == USB_DR_MODE_OTG)) { in dwc2_get_device_properties()
692 if ((hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_check_params()
693 (hsotg->dr_mode == USB_DR_MODE_OTG)) { in dwc2_check_params()
713 if ((hsotg->dr_mode == USB_DR_MODE_PERIPHERAL) || in dwc2_check_params()
714 (hsotg->dr_mode == USB_DR_MODE_OTG)) { in dwc2_check_params()
[all …]
/OK3568_Linux_fs/kernel/drivers/usb/mtu3/
H A Dmtu3_plat.c269 ssusb->dr_mode = usb_get_dr_mode(dev); in get_ssusb_rscs()
270 if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN) in get_ssusb_rscs()
271 ssusb->dr_mode = USB_DR_MODE_OTG; in get_ssusb_rscs()
273 if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) in get_ssusb_rscs()
293 if (ssusb->dr_mode == USB_DR_MODE_HOST) in get_ssusb_rscs()
311 dev_info(dev, "dr_mode: %d, is_u3_dr: %d, u3p_dis_msk: %x, drd: %s\n", in get_ssusb_rscs()
312 ssusb->dr_mode, otg_sx->is_u3_drd, ssusb->u3p_dis_msk, in get_ssusb_rscs()
357 ssusb->dr_mode = USB_DR_MODE_HOST; in mtu3_probe()
359 ssusb->dr_mode = USB_DR_MODE_PERIPHERAL; in mtu3_probe()
362 ssusb->is_host = !(ssusb->dr_mode == USB_DR_MODE_PERIPHERAL); in mtu3_probe()
[all …]
/OK3568_Linux_fs/u-boot/doc/
H A DREADME.fsl-hwconfig40 'dr_mode'
44 usb1:dr_mode=host;usb2:dr_mode=peripheral'
46 usb1:dr_mode=host,phy_type=utmi;usb2:dr_mode=host'
/OK3568_Linux_fs/kernel/drivers/usb/phy/
H A Dphy-am335x.c20 enum usb_dr_mode dr_mode; member
27 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true); in am335x_init()
35 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_shutdown()
58 am_phy->dr_mode = of_usb_get_dr_mode_by_phy(pdev->dev.of_node, -1); in am335x_phy_probe()
80 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_phy_probe()
109 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_phy_suspend()
118 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true); in am335x_phy_resume()
H A Dphy-am335x-control.h7 enum usb_dr_mode dr_mode, bool on);
12 enum usb_dr_mode dr_mode, bool on) in phy_ctrl_power() argument
14 phy_ctrl->phy_power(phy_ctrl, id, dr_mode, on); in phy_ctrl_power()
/OK3568_Linux_fs/u-boot/drivers/usb/host/
H A Dehci-vf.c201 enum dr_mode { enum
213 enum dr_mode dr_mode; member
227 mode = fdt_getprop(dt_blob, node, "dr_mode", NULL); in vf_usb_ofdata_to_platdata()
230 priv->dr_mode = DR_MODE_HOST; in vf_usb_ofdata_to_platdata()
233 priv->dr_mode = DR_MODE_DEVICE; in vf_usb_ofdata_to_platdata()
236 priv->dr_mode = DR_MODE_OTG; in vf_usb_ofdata_to_platdata()
245 debug("%s: Cannot decode dr_mode '%s'\n", in vf_usb_ofdata_to_platdata()
250 priv->dr_mode = DR_MODE_HOST; in vf_usb_ofdata_to_platdata()
254 if (priv->dr_mode == DR_MODE_OTG) { in vf_usb_ofdata_to_platdata()
H A Dehci-tegra.c55 enum dr_mode { enum
81 enum dr_mode dr_mode; /* dual role mode */ member
265 config->dr_mode == DR_MODE_OTG && in set_up_vbus()
377 if (config->dr_mode == DR_MODE_OTG && in init_utmi_usb_controller()
701 mode = dev_read_string(dev, "dr_mode"); in fdt_decode_usb()
704 config->dr_mode = DR_MODE_HOST; in fdt_decode_usb()
706 config->dr_mode = DR_MODE_DEVICE; in fdt_decode_usb()
708 config->dr_mode = DR_MODE_OTG; in fdt_decode_usb()
710 debug("%s: Cannot decode dr_mode '%s'\n", __func__, in fdt_decode_usb()
715 config->dr_mode = DR_MODE_HOST; in fdt_decode_usb()
[all …]
H A Dxhci-dwc3.c121 enum usb_dr_mode dr_mode; in xhci_dwc3_probe() local
160 dr_mode = usb_get_dr_mode(dev->node); in xhci_dwc3_probe()
161 if (dr_mode == USB_DR_MODE_UNKNOWN) in xhci_dwc3_probe()
163 dr_mode = USB_DR_MODE_HOST; in xhci_dwc3_probe()
165 dwc3_set_mode(dwc3_reg, dr_mode); in xhci_dwc3_probe()
/OK3568_Linux_fs/kernel/drivers/usb/common/
H A Dcommon.c192 const char *dr_mode; in usb_get_dr_mode() local
195 err = device_property_read_string(dev, "dr_mode", &dr_mode); in usb_get_dr_mode()
199 return usb_get_dr_mode_from_string(dr_mode); in usb_get_dr_mode()
253 * the string from property 'dr_mode' of the controller associated with the
260 const char *dr_mode; in of_usb_get_dr_mode_by_phy() local
291 err = of_property_read_string(controller, "dr_mode", &dr_mode); in of_usb_get_dr_mode_by_phy()
297 return usb_get_dr_mode_from_string(dr_mode); in of_usb_get_dr_mode_by_phy()
/OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/usb/
H A Damlogic,meson-g12a-usb-ctrl.yaml72 dr_mode: true
97 - dr_mode
208 dr_mode = "otg";
220 dr_mode = "peripheral";
230 dr_mode = "host";
H A Dallwinner,sun4i-a10-musb.yaml50 dr_mode:
68 - dr_mode
97 dr_mode = "peripheral";
H A Ddwc3-st.txt36 NB: The dr_mode property described in [1] is NOT optional for this driver, as the default value
37 is "otg", which isn't supported by this SoC. Valid dr_mode values for dwc3-st are either "host"
62 dr_mode = "host";
H A Dfsl-usb.txt26 - dr_mode : indicates the working mode for "fsl-usb2-dr" compatible
64 dr_mode = "otg";
77 dr_mode = "otg";
/OK3568_Linux_fs/kernel/drivers/usb/host/
H A Dfsl-mph-dr-of.c19 char *dr_mode; /* controller mode */ member
26 .dr_mode = "host",
31 .dr_mode = "otg",
36 .dr_mode = "peripheral",
47 prop = of_get_property(np, "dr_mode", NULL); in get_dr_mode_data()
50 if (!strcmp(prop, dr_mode_data[i].dr_mode)) in get_dr_mode_data()
54 pr_warn("%pOF: Invalid 'dr_mode' property, fallback to host mode\n", in get_dr_mode_data()
/OK3568_Linux_fs/kernel/drivers/phy/amlogic/
H A Dphy-meson8b-usb2.c126 enum usb_dr_mode dr_mode; member
186 if (priv->dr_mode == USB_DR_MODE_HOST) { in phy_meson8b_usb2_power_on()
214 if (priv->dr_mode == USB_DR_MODE_HOST) in phy_meson8b_usb2_power_off()
268 priv->dr_mode = of_usb_get_dr_mode_by_phy(pdev->dev.of_node, -1); in phy_meson8b_usb2_probe()
269 if (priv->dr_mode == USB_DR_MODE_UNKNOWN) { in phy_meson8b_usb2_probe()

12345678910>>...36