Lines Matching +full:usb +full:- +full:isp1763

1 // SPDX-License-Identifier: GPL-2.0
5 * - OpenFirmware
6 * - PCI
7 * - PDEV (generic platform device centralized driver model)
14 #include <linux/usb.h>
21 #include <linux/usb/hcd.h>
22 #include <linux/usb/otg.h>
24 #include "isp1760-core.h"
25 #include "isp1760-regs.h"
46 return -ENOMEM; in isp1761_pci_init()
49 if (!request_mem_region(mem_start, mem_length, "ISP-PCI")) { in isp1761_pci_init()
51 return -EBUSY; in isp1761_pci_init()
59 return -ENOMEM; in isp1761_pci_init()
83 retry_count--; in isp1761_pci_init()
93 dev_err(&dev->dev, "scratch register mismatch %x\n", reg_data); in isp1761_pci_init()
94 return -ENOMEM; in isp1761_pci_init()
103 return -EBUSY; in isp1761_pci_init()
110 return -ENOMEM; in isp1761_pci_init()
132 if (!dev->irq) in isp1761_pci_probe()
133 return -ENODEV; in isp1761_pci_probe()
136 return -ENODEV; in isp1761_pci_probe()
144 ret = isp1760_register(&dev->resource[3], dev->irq, 0, &dev->dev, in isp1761_pci_probe()
158 isp1760_unregister(&dev->dev); in isp1761_pci_remove()
205 if (IS_ENABLED(CONFIG_OF) && pdev->dev.of_node) { in isp1760_plat_probe()
206 struct device_node *dp = pdev->dev.of_node; in isp1760_plat_probe()
209 if (of_device_is_compatible(dp, "nxp,usb-isp1761")) in isp1760_plat_probe()
212 if (of_device_is_compatible(dp, "nxp,usb-isp1763")) in isp1760_plat_probe()
219 of_property_read_u32(dp, "bus-width", &bus_width); in isp1760_plat_probe()
225 if (usb_get_dr_mode(&pdev->dev) == USB_DR_MODE_PERIPHERAL) in isp1760_plat_probe()
228 if (of_property_read_bool(dp, "analog-oc")) in isp1760_plat_probe()
231 if (of_property_read_bool(dp, "dack-polarity")) in isp1760_plat_probe()
234 if (of_property_read_bool(dp, "dreq-polarity")) in isp1760_plat_probe()
238 return -ENXIO; in isp1760_plat_probe()
241 ret = isp1760_register(mem_res, irq, irqflags, &pdev->dev, devflags); in isp1760_plat_probe()
245 pr_info("ISP1760 USB device initialised\n"); in isp1760_plat_probe()
251 isp1760_unregister(&pdev->dev); in isp1760_plat_remove()
256 { .compatible = "nxp,usb-isp1760", },
257 { .compatible = "nxp,usb-isp1761", },
258 { .compatible = "nxp,usb-isp1763", },
275 int ret, any_ret = -ENODEV; in isp1760_init()