Lines Matching +full:no +full:- +full:otg +full:- +full:pins

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * Platform level USB initialization for FS USB OTG controller on omap1
12 #include <linux/dma-mapping.h>
23 /* These routines should handle the standard chip-specific modes
26 * Some board-*.c files will need to set up additional mux options,
31 * - 1611B H2 (with usb1 mini-AB) using standard Mini-B or OTG cables
32 * - 5912 OSK OHCI (with usb0 standard-A), standard A-to-B cables
33 * - 5912 OSK UDC, with *nonstandard* A-to-A cable
34 * - 1510 Innovator UDC with bundled usb0 cable
35 * - 1510 Innovator OHCI with bundled usb1/usb2 cable
36 * - 1510 Innovator OHCI with custom usb0 cable, feeding 5V VBUS
37 * - 1710 custom development board using alternate pin group
38 * - 1710 H3 (with usb1 mini-AB) using standard Mini-B or OTG cables
56 /* NOTE: no bus or clock setup (yet?) */ in omap_otg_init()
65 if (config->pins[0] > 2) /* alt pingroup 2 */ in omap_otg_init()
67 syscon |= config->usb0_init(config->pins[0], is_usb0_device(config)); in omap_otg_init()
68 syscon |= config->usb1_init(config->pins[1]); in omap_otg_init()
69 syscon |= config->usb2_init(config->pins[2], alt_pingroup); in omap_otg_init()
73 syscon = config->hmc_mode; in omap_otg_init()
76 if (config->otg) in omap_otg_init()
84 printk("USB: hmc %d", config->hmc_mode); in omap_otg_init()
86 pr_cont(", usb2 alt %d wires", config->pins[2]); in omap_otg_init()
87 else if (config->pins[0]) in omap_otg_init()
88 pr_cont(", usb0 %d wires%s", config->pins[0], in omap_otg_init()
90 if (config->pins[1]) in omap_otg_init()
91 pr_cont(", usb1 %d wires", config->pins[1]); in omap_otg_init()
92 if (!alt_pingroup && config->pins[2]) in omap_otg_init()
93 pr_cont(", usb2 %d wires", config->pins[2]); in omap_otg_init()
94 if (config->otg) in omap_otg_init()
95 pr_cont(", Mini-AB on usb%d", config->otg - 1); in omap_otg_init()
112 if (config->otg || config->register_dev) { in omap_otg_init()
113 struct platform_device *udc_device = config->udc_device; in omap_otg_init()
117 udc_device->dev.platform_data = config; in omap_otg_init()
125 if (config->otg || config->register_host) { in omap_otg_init()
126 struct platform_device *ohci_device = config->ohci_device; in omap_otg_init()
130 ohci_device->dev.platform_data = config; in omap_otg_init()
138 if (config->otg) { in omap_otg_init()
139 struct platform_device *otg_device = config->otg_device; in omap_otg_init()
143 otg_device->dev.platform_data = config; in omap_otg_init()
146 pr_debug("can't register OTG device, %d\n", status); in omap_otg_init()
181 .id = -1,
198 pdata->udc_device = &udc_device; in udc_device_init()
228 .id = -1,
241 pdata->ohci_device = &ohci_device; in ohci_device_init()
242 pdata->ocpi_enable = &ocpi_enable; in ohci_device_init()
269 .id = -1,
278 pdata->otg_device = &otg_device; in otg_device_init()
297 /* pulldown D+/D- */ in omap1_usb0_init()
323 /* This works on 1510-Innovator */ in omap1_usb0_init()
328 * - peripheral should configure VBUS detection! in omap1_usb0_init()
329 * - only peripherals may use the internal D+/D- pulldowns in omap1_usb0_init()
330 * - OTG support on this port not yet written in omap1_usb0_init()
333 /* Don't do this for omap7xx -- it causes USB to not work correctly */ in omap1_usb0_init()
347 printk(KERN_ERR "no usb0 alt pin config on 15xx\n"); in omap1_usb0_init()
357 /* NOTE: SPEED and SUSP aren't configured here. OTG hosts in omap1_usb0_init()
390 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", in omap1_usb0_init()
456 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", in omap1_usb1_init()
486 /* there is no USB2_SPEED */ in omap1_usb2_init()
529 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", in omap1_usb2_init()
556 (u64)-1)) in omap_1510_usb_ohci_notifier()
570 config->usb0_init(config->pins[0], is_usb0_device(config)); in omap_1510_usb_init()
571 config->usb1_init(config->pins[1]); in omap_1510_usb_init()
572 config->usb2_init(config->pins[2], 0); in omap_1510_usb_init()
575 val |= (config->hmc_mode << 1); in omap_1510_usb_init()
578 printk("USB: hmc %d", config->hmc_mode); in omap_1510_usb_init()
579 if (config->pins[0]) in omap_1510_usb_init()
580 pr_cont(", usb0 %d wires%s", config->pins[0], in omap_1510_usb_init()
582 if (config->pins[1]) in omap_1510_usb_init()
583 pr_cont(", usb1 %d wires", config->pins[1]); in omap_1510_usb_init()
584 if (config->pins[2]) in omap_1510_usb_init()
585 pr_cont(", usb2 %d wires", config->pins[2]); in omap_1510_usb_init()
608 if (config->register_dev) { in omap_1510_usb_init()
620 if (config->register_host) { in omap_1510_usb_init()
646 pdata->usb0_init = omap1_usb0_init; in omap1_usb_init()
647 pdata->usb1_init = omap1_usb1_init; in omap1_usb_init()
648 pdata->usb2_init = omap1_usb2_init; in omap1_usb_init()
658 printk(KERN_ERR "USB: No init for your chip yet\n"); in omap1_usb_init()