Lines Matching +full:otg +full:- +full:port

5  * SPDX-License-Identifier:	GPL-2.0+
12 #include <usb/ehci-ci.h>
14 #include <asm/arch/imx-regs.h>
37 /* OTG wakeup intr enable */
39 /* OTG power mask */
41 /* OTG power pin polarity */
53 /* OTG Polarity of Overcurrent */
55 /* OTG Disable Overcurrent Event */
61 /* OTG Power Pin Polarity */
82 int mxc_set_usbcontrol(int port, unsigned int flags) in mxc_set_usbcontrol() argument
91 switch (port) { in mxc_set_usbcontrol()
92 case 0: /* OTG port */ in mxc_set_usbcontrol()
133 /* The clock for the USBH1 ULPI port will come externally in mxc_set_usbcontrol()
214 int __weak board_ehci_hcd_init(int port) in board_ehci_hcd_init() argument
219 void __weak board_ehci_hcd_postinit(struct usb_ehci *ehci, int port) in board_ehci_hcd_postinit() argument
239 /* The only user for this is efikamx-usb */ in ehci_hcd_init()
253 *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); in ehci_hcd_init()
255 HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); in ehci_hcd_init()
256 setbits_le32(&ehci->usbmode, CM_HOST); in ehci_hcd_init()
258 __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); in ehci_hcd_init()
259 setbits_le32(&ehci->portsc, USB_EN); in ehci_hcd_init()
264 /* Do board specific post-initialization */ in ehci_hcd_init()
292 mode = fdt_getprop(gd->fdt_blob, dev_of_offset(dev), "dr_mode", NULL); in ehci_usb_ofdata_to_platdata()
295 plat->init_type = USB_INIT_DEVICE; in ehci_usb_ofdata_to_platdata()
297 plat->init_type = USB_INIT_HOST; in ehci_usb_ofdata_to_platdata()
299 return -EINVAL; in ehci_usb_ofdata_to_platdata()
310 enum usb_init_type type = plat->init_type; in ehci_usb_probe()
322 priv->ehci = ehci; in ehci_usb_probe()
323 priv->portnr = dev->seq; in ehci_usb_probe()
324 priv->init_type = type; in ehci_usb_probe()
326 ret = device_get_supply_regulator(dev, "vbus-supply", in ehci_usb_probe()
327 &priv->vbus_supply); in ehci_usb_probe()
329 debug("%s: No vbus supply\n", dev->name); in ehci_usb_probe()
331 if (!ret && priv->vbus_supply) { in ehci_usb_probe()
332 ret = regulator_set_enable(priv->vbus_supply, in ehci_usb_probe()
341 hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); in ehci_usb_probe()
343 HC_LENGTH(ehci_readl(&(hccr)->cr_capbase))); in ehci_usb_probe()
344 setbits_le32(&ehci->usbmode, CM_HOST); in ehci_usb_probe()
346 __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); in ehci_usb_probe()
347 setbits_le32(&ehci->portsc, USB_EN); in ehci_usb_probe()
349 mxc_set_usbcontrol(priv->portnr, CONFIG_MXC_USB_FLAGS); in ehci_usb_probe()
353 priv->init_type); in ehci_usb_probe()
357 { .compatible = "fsl,imx53-usb" },