Lines Matching +full:omap +full:- +full:usb2

1 // SPDX-License-Identifier: GPL-2.0-or-later
12 #include <linux/dma-map-ops.h>
15 #include <linux/soc/ti/omap1-io.h>
24 /* These routines should handle the standard chip-specific modes
27 * Some board-*.c files will need to set up additional mux options,
32 * - 1611B H2 (with usb1 mini-AB) using standard Mini-B or OTG cables
33 * - 5912 OSK OHCI (with usb0 standard-A), standard A-to-B cables
34 * - 5912 OSK UDC, with *nonstandard* A-to-A cable
35 * - 1510 Innovator UDC with bundled usb0 cable
36 * - 1510 Innovator OHCI with bundled usb1/usb2 cable
37 * - 1510 Innovator OHCI with custom usb0 cable, feeding 5V VBUS
38 * - 1710 custom development board using alternate pin group
39 * - 1710 H3 (with usb1 mini-AB) using standard Mini-B or OTG cables
66 if (config->pins[0] > 2) /* alt pingroup 2 */ in omap_otg_init()
68 syscon |= config->usb0_init(config->pins[0], is_usb0_device(config)); in omap_otg_init()
69 syscon |= config->usb1_init(config->pins[1]); in omap_otg_init()
70 syscon |= config->usb2_init(config->pins[2], alt_pingroup); in omap_otg_init()
74 syscon = config->hmc_mode; in omap_otg_init()
77 if (config->otg) in omap_otg_init()
85 printk("USB: hmc %d", config->hmc_mode); in omap_otg_init()
87 pr_cont(", usb2 alt %d wires", config->pins[2]); in omap_otg_init()
88 else if (config->pins[0]) in omap_otg_init()
89 pr_cont(", usb0 %d wires%s", config->pins[0], in omap_otg_init()
91 if (config->pins[1]) in omap_otg_init()
92 pr_cont(", usb1 %d wires", config->pins[1]); in omap_otg_init()
93 if (!alt_pingroup && config->pins[2]) in omap_otg_init()
94 pr_cont(", usb2 %d wires", config->pins[2]); in omap_otg_init()
95 if (config->otg) in omap_otg_init()
96 pr_cont(", Mini-AB on usb%d", config->otg - 1); in omap_otg_init()
113 if (config->otg || config->register_dev) { in omap_otg_init()
114 struct platform_device *udc_device = config->udc_device; in omap_otg_init()
118 udc_device->dev.platform_data = config; in omap_otg_init()
126 if (config->otg || config->register_host) { in omap_otg_init()
127 struct platform_device *ohci_device = config->ohci_device; in omap_otg_init()
131 ohci_device->dev.platform_data = config; in omap_otg_init()
139 if (config->otg) { in omap_otg_init()
140 struct platform_device *otg_device = config->otg_device; in omap_otg_init()
144 otg_device->dev.platform_data = config; in omap_otg_init()
182 .id = -1,
193 pdata->udc_device = &udc_device; in udc_device_init()
221 .id = -1,
235 pdata->ohci_device = &ohci_device; in ohci_device_init()
236 pdata->ocpi_enable = &ocpi_enable; in ohci_device_init()
255 .id = -1,
262 pdata->otg_device = &otg_device; in otg_device_init()
281 /* pulldown D+/D- */ in omap1_usb0_init()
300 /* This works on 1510-Innovator */ in omap1_usb0_init()
305 * - peripheral should configure VBUS detection! in omap1_usb0_init()
306 * - only peripherals may use the internal D+/D- pulldowns in omap1_usb0_init()
307 * - OTG support on this port not yet written in omap1_usb0_init()
364 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", in omap1_usb0_init()
430 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", in omap1_usb1_init()
503 printk(KERN_ERR "illegal usb%d %d-wire transceiver\n", in omap1_usb2_init()
511 /* OMAP-1510 OHCI has its own MMU for DMA */
523 * Bus address is physical address, except for OMAP-1510 Local Bus.
524 * OMAP-1510 bus address is translated into a Local Bus address if the
525 * OMAP bus type is lbus.
530 * OMAP-1510 specific Local Bus clock on/off
545 * OMAP-1510 specific Local Bus initialization
547 * See also arch/mach-omap/memory.h for __virt_to_dma() and
598 config->usb0_init(config->pins[0], is_usb0_device(config)); in omap_1510_usb_init()
599 config->usb1_init(config->pins[1]); in omap_1510_usb_init()
600 config->usb2_init(config->pins[2], 0); in omap_1510_usb_init()
603 val |= (config->hmc_mode << 1); in omap_1510_usb_init()
606 printk("USB: hmc %d", config->hmc_mode); in omap_1510_usb_init()
607 if (config->pins[0]) in omap_1510_usb_init()
608 pr_cont(", usb0 %d wires%s", config->pins[0], in omap_1510_usb_init()
610 if (config->pins[1]) in omap_1510_usb_init()
611 pr_cont(", usb1 %d wires", config->pins[1]); in omap_1510_usb_init()
612 if (config->pins[2]) in omap_1510_usb_init()
613 pr_cont(", usb2 %d wires", config->pins[2]); in omap_1510_usb_init()
636 if (config->register_dev) { in omap_1510_usb_init()
647 if (IS_ENABLED(CONFIG_USB_OHCI_HCD) && config->register_host) { in omap_1510_usb_init()
652 OMAP1510_LB_OFFSET, (u64)-1); in omap_1510_usb_init()
658 config->lb_reset = omap_1510_local_bus_reset; in omap_1510_usb_init()
674 pdata->usb0_init = omap1_usb0_init; in omap1_usb_init()
675 pdata->usb1_init = omap1_usb1_init; in omap1_usb_init()
676 pdata->usb2_init = omap1_usb2_init; in omap1_usb_init()