/openbmc/linux/drivers/usb/cdns3/ |
H A D | core.c | 87 enum usb_dr_mode dr_mode; in cdns_core_init_role() local 90 dr_mode = usb_get_dr_mode(dev); in cdns_core_init_role() 98 if (dr_mode == USB_DR_MODE_UNKNOWN) { in cdns_core_init_role() 102 dr_mode = USB_DR_MODE_OTG; in cdns_core_init_role() 104 dr_mode = USB_DR_MODE_HOST; in cdns_core_init_role() 106 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns_core_init_role() 110 dr_mode = USB_DR_MODE_OTG; in cdns_core_init_role() 112 dr_mode = USB_DR_MODE_HOST; in cdns_core_init_role() 114 dr_mode = USB_DR_MODE_PERIPHERAL; in cdns_core_init_role() 119 * At this point cdns->dr_mode contains strap configuration. in cdns_core_init_role() [all …]
|
H A D | drd.c | 134 if (cdns->dr_mode == USB_DR_MODE_HOST) in cdns_is_host() 144 if (cdns->dr_mode == USB_DR_MODE_PERIPHERAL) in cdns_is_device() 146 else if (cdns->dr_mode == USB_DR_MODE_OTG) in cdns_is_device() 318 switch (cdns->dr_mode) { in cdns_drd_update_mode() 330 cdns->dr_mode); in cdns_drd_update_mode() 360 if (cdns->dr_mode != USB_DR_MODE_OTG) in cdns_drd_irq() 457 /* Update dr_mode according to STRAP configuration. */ in cdns_drd_init() 458 cdns->dr_mode = USB_DR_MODE_OTG; in cdns_drd_init() 465 cdns->dr_mode = USB_DR_MODE_HOST; in cdns_drd_init() 471 cdns->dr_mode = USB_DR_MODE_PERIPHERAL; in cdns_drd_init()
|
/openbmc/u-boot/drivers/usb/common/ |
H A D | common.c | 26 const char *dr_mode; in usb_get_dr_mode() local 29 dr_mode = fdt_getprop(fdt, node, "dr_mode", NULL); in usb_get_dr_mode() 30 if (!dr_mode) { in usb_get_dr_mode() 31 pr_err("usb dr_mode not found\n"); in usb_get_dr_mode() 36 if (!strcmp(dr_mode, usb_dr_modes[i])) in usb_get_dr_mode()
|
/openbmc/u-boot/doc/ |
H A D | README.fsl-hwconfig | 40 'dr_mode' 44 usb1:dr_mode=host;usb2:dr_mode=peripheral' 46 usb1:dr_mode=host,phy_type=utmi;usb2:dr_mode=host'
|
/openbmc/u-boot/drivers/usb/dwc3/ |
H A D | dwc3-generic.c | 92 dwc3->dr_mode = usb_get_dr_mode(node); in dwc3_generic_peripheral_ofdata_to_platdata() 93 if (dwc3->dr_mode == USB_DR_MODE_UNKNOWN) { in dwc3_generic_peripheral_ofdata_to_platdata() 215 enum usb_dr_mode dr_mode; in dwc3_glue_bind() local 221 dr_mode = usb_get_dr_mode(node); in dwc3_glue_bind() 223 switch (dr_mode) { in dwc3_glue_bind() 227 debug("%s: dr_mode: OTG or Peripheral\n", __func__); in dwc3_glue_bind() 232 debug("%s: dr_mode: HOST\n", __func__); in dwc3_glue_bind() 236 debug("%s: unsupported dr_mode\n", __func__); in dwc3_glue_bind() 320 enum usb_dr_mode dr_mode; in dwc3_glue_probe() local 322 dr_mode = usb_get_dr_mode(dev_of_offset(child)); in dwc3_glue_probe() [all …]
|
/openbmc/linux/drivers/usb/phy/ |
H A D | phy-am335x.c | 20 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() 108 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, false); in am335x_phy_suspend() 117 phy_ctrl_power(am_phy->phy_ctrl, am_phy->id, am_phy->dr_mode, true); in am335x_phy_resume()
|
H A D | phy-am335x-control.h | 7 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()
|
/openbmc/linux/drivers/usb/mtu3/ |
H A D | mtu3_plat.c | 270 ssusb->dr_mode = usb_get_dr_mode(dev); in get_ssusb_rscs() 271 if (ssusb->dr_mode == USB_DR_MODE_UNKNOWN) in get_ssusb_rscs() 272 ssusb->dr_mode = USB_DR_MODE_OTG; in get_ssusb_rscs() 276 if (ssusb->dr_mode == USB_DR_MODE_PERIPHERAL) in get_ssusb_rscs() 296 if (ssusb->dr_mode == USB_DR_MODE_HOST) in get_ssusb_rscs() 319 dev_info(dev, "dr_mode: %d, drd: %s\n", ssusb->dr_mode, in get_ssusb_rscs() 386 ssusb->dr_mode = USB_DR_MODE_HOST; in mtu3_probe() 388 ssusb->dr_mode = USB_DR_MODE_PERIPHERAL; in mtu3_probe() 391 ssusb->is_host = !(ssusb->dr_mode == USB_DR_MODE_PERIPHERAL); in mtu3_probe() 393 switch (ssusb->dr_mode) { in mtu3_probe() [all …]
|
/openbmc/u-boot/drivers/usb/host/ |
H A D | ehci-vf.c | 200 enum dr_mode { enum 212 enum dr_mode dr_mode; member 226 mode = fdt_getprop(dt_blob, node, "dr_mode", NULL); in vf_usb_ofdata_to_platdata() 229 priv->dr_mode = DR_MODE_HOST; in vf_usb_ofdata_to_platdata() 232 priv->dr_mode = DR_MODE_DEVICE; in vf_usb_ofdata_to_platdata() 235 priv->dr_mode = DR_MODE_OTG; in vf_usb_ofdata_to_platdata() 244 debug("%s: Cannot decode dr_mode '%s'\n", in vf_usb_ofdata_to_platdata() 249 priv->dr_mode = DR_MODE_HOST; in vf_usb_ofdata_to_platdata() 253 if (priv->dr_mode == DR_MODE_OTG) { in vf_usb_ofdata_to_platdata()
|
H A D | xhci-dwc3.c | 119 enum usb_dr_mode dr_mode; in xhci_dwc3_probe() local 135 dr_mode = usb_get_dr_mode(dev_of_offset(dev)); in xhci_dwc3_probe() 136 if (dr_mode == USB_DR_MODE_UNKNOWN) in xhci_dwc3_probe() 138 dr_mode = USB_DR_MODE_HOST; in xhci_dwc3_probe() 140 dwc3_set_mode(dwc3_reg, dr_mode); in xhci_dwc3_probe()
|
H A D | ehci-tegra.c | 52 enum dr_mode { enum 78 enum dr_mode dr_mode; /* dual role mode */ member 262 config->dr_mode == DR_MODE_OTG && in set_up_vbus() 374 if (config->dr_mode == DR_MODE_OTG && in init_utmi_usb_controller() 698 mode = dev_read_string(dev, "dr_mode"); in fdt_decode_usb() 701 config->dr_mode = DR_MODE_HOST; in fdt_decode_usb() 703 config->dr_mode = DR_MODE_DEVICE; in fdt_decode_usb() 705 config->dr_mode = DR_MODE_OTG; in fdt_decode_usb() 707 debug("%s: Cannot decode dr_mode '%s'\n", __func__, in fdt_decode_usb() 712 config->dr_mode = DR_MODE_HOST; in fdt_decode_usb() [all …]
|
/openbmc/linux/arch/powerpc/platforms/83xx/ |
H A D | usb_834x.c | 26 const void *prop, *dr_mode; in mpc834x_usb_cfg() local 50 dr_mode = of_get_property(np, "dr_mode", NULL); in mpc834x_usb_cfg() 51 if (dr_mode && !strcmp(dr_mode, "otg")) { in mpc834x_usb_cfg()
|
H A D | usb_831x.c | 30 const void *dr_mode; in mpc831x_usb_cfg() local 113 dr_mode = of_get_property(np, "dr_mode", NULL); in mpc831x_usb_cfg() 114 if (dr_mode && !strcmp(dr_mode, "otg")) in mpc831x_usb_cfg()
|
/openbmc/linux/drivers/usb/dwc2/ |
H A D | platform.c | 30 * Check the dr_mode against the module configuration and hardware 33 * The hardware, module, and dr_mode, can each be set to host, device, 35 * value of dr_mode if possible. 38 * HW MOD dr_mode dr_mode 50 * OTG OTG any : dr_mode 56 hsotg->dr_mode = usb_get_dr_mode(hsotg->dev); in dwc2_get_dr_mode() 57 if (hsotg->dr_mode == USB_DR_MODE_UNKNOWN) in dwc2_get_dr_mode() 58 hsotg->dr_mode = USB_DR_MODE_OTG; in dwc2_get_dr_mode() 60 mode = hsotg->dr_mode; in dwc2_get_dr_mode() 83 if (mode != hsotg->dr_mode) { in dwc2_get_dr_mode() [all …]
|
H A D | drd.c | 38 dwc2_force_mode(hsotg, (hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_ovr_init() 92 /* Skip session not in line with dr_mode */ in dwc2_drd_role_sw_set() 93 if ((role == USB_ROLE_DEVICE && hsotg->dr_mode == USB_DR_MODE_HOST) || in dwc2_drd_role_sw_set() 94 (role == USB_ROLE_HOST && hsotg->dr_mode == USB_DR_MODE_PERIPHERAL)) in dwc2_drd_role_sw_set() 159 if (!already && hsotg->dr_mode == USB_DR_MODE_OTG) in dwc2_drd_role_sw_set()
|
/openbmc/linux/drivers/phy/marvell/ |
H A D | phy-mvebu-cp110-utmi.c | 101 * @dr_mode: PHY connection: USB_DR_MODE_HOST or USB_DR_MODE_PERIPHERAL 106 enum usb_dr_mode dr_mode; member 210 if (port->dr_mode == USB_DR_MODE_PERIPHERAL) { in mvebu_cp110_utmi_phy_power_on() 329 port->dr_mode = of_usb_get_dr_mode_by_phy(child, -1); in mvebu_cp110_utmi_phy_probe() 330 if ((port->dr_mode != USB_DR_MODE_HOST) && in mvebu_cp110_utmi_phy_probe() 331 (port->dr_mode != USB_DR_MODE_PERIPHERAL)) { in mvebu_cp110_utmi_phy_probe() 335 port->dr_mode = USB_DR_MODE_HOST; in mvebu_cp110_utmi_phy_probe() 338 if (port->dr_mode == USB_DR_MODE_PERIPHERAL) { in mvebu_cp110_utmi_phy_probe() 344 port->dr_mode = USB_DR_MODE_HOST; in mvebu_cp110_utmi_phy_probe()
|
/openbmc/linux/drivers/usb/common/ |
H A D | common.c | 193 const char *dr_mode; in usb_get_dr_mode() local 196 err = device_property_read_string(dev, "dr_mode", &dr_mode); in usb_get_dr_mode() 200 return usb_get_dr_mode_from_string(dr_mode); in usb_get_dr_mode() 274 * the string from property 'dr_mode' of the controller associated with the 281 const char *dr_mode; in of_usb_get_dr_mode_by_phy() local 312 err = of_property_read_string(controller, "dr_mode", &dr_mode); in of_usb_get_dr_mode_by_phy() 318 return usb_get_dr_mode_from_string(dr_mode); in of_usb_get_dr_mode_by_phy()
|
/openbmc/linux/Documentation/devicetree/bindings/usb/ |
H A D | amlogic,meson-g12a-usb-ctrl.yaml | 72 dr_mode: true 99 - dr_mode 211 dr_mode = "otg"; 223 dr_mode = "peripheral"; 233 dr_mode = "host";
|
H A D | allwinner,sun4i-a10-musb.yaml | 56 dr_mode: 74 - dr_mode 103 dr_mode = "peripheral";
|
H A D | dwc3-st.txt | 36 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 D | starfive,jh7110-usb.yaml | 28 dr_mode: 78 - dr_mode 103 dr_mode = "host";
|
/openbmc/u-boot/doc/device-tree-bindings/usb/ |
H A D | dwc3-st.txt | 31 NB: The dr_mode property is NOT optional for this driver, as the default value 32 is "otg", which isn't supported by this SoC. Valid dr_mode values for dwc3-st are 56 dr_mode = "host";
|
/openbmc/linux/arch/arm64/boot/dts/renesas/ |
H A D | salvator-xs.dtsi | 46 dr_mode = "otg"; 51 dr_mode = "otg"; 56 dr_mode = "otg";
|
/openbmc/linux/drivers/usb/chipidea/ |
H A D | ci_hdrc_tegra.c | 40 enum usb_dr_mode dr_mode; member 47 .dr_mode = USB_DR_MODE_HOST, 55 .dr_mode = USB_DR_MODE_HOST, 63 .dr_mode = USB_DR_MODE_UNKNOWN, 71 .dr_mode = USB_DR_MODE_UNKNOWN, 337 usb->data.dr_mode = soc->dr_mode; in tegra_usb_probe()
|
/openbmc/linux/drivers/usb/host/ |
H A D | fsl-mph-dr-of.c | 20 char *dr_mode; /* controller mode */ member 27 .dr_mode = "host", 32 .dr_mode = "otg", 37 .dr_mode = "peripheral", 48 prop = of_get_property(np, "dr_mode", NULL); in get_dr_mode_data() 51 if (!strcmp(prop, dr_mode_data[i].dr_mode)) in get_dr_mode_data() 55 pr_warn("%pOF: Invalid 'dr_mode' property, fallback to host mode\n", in get_dr_mode_data()
|