1 // SPDX-License-Identifier: GPL-2.0
2 /* Copyright (c) 2018, The Linux Foundation. All rights reserved.
4 * Inspired by dwc3-of-simple.c
10 #include <linux/irq.h>
11 #include <linux/of_clk.h>
12 #include <linux/module.h>
13 #include <linux/kernel.h>
14 #include <linux/extcon.h>
15 #include <linux/interconnect.h>
16 #include <linux/of_platform.h>
17 #include <linux/platform_device.h>
18 #include <linux/phy/phy.h>
19 #include <linux/usb/of.h>
20 #include <linux/reset.h>
21 #include <linux/iopoll.h>
22 #include <linux/usb/hcd.h>
23 #include <linux/usb.h>
26 /* USB QSCRATCH Hardware registers */
27 #define QSCRATCH_HS_PHY_CTRL 0x10
28 #define UTMI_OTG_VBUS_VALID BIT(20)
29 #define SW_SESSVLD_SEL BIT(28)
31 #define QSCRATCH_SS_PHY_CTRL 0x30
32 #define LANE0_PWR_PRESENT BIT(24)
34 #define QSCRATCH_GENERAL_CFG 0x08
35 #define PIPE_UTMI_CLK_SEL BIT(0)
36 #define PIPE3_PHYSTATUS_SW BIT(3)
37 #define PIPE_UTMI_CLK_DIS BIT(8)
39 #define PWR_EVNT_IRQ_STAT_REG 0x58
40 #define PWR_EVNT_LPM_IN_L2_MASK BIT(4)
41 #define PWR_EVNT_LPM_OUT_L2_MASK BIT(5)
43 #define SDM845_QSCRATCH_BASE_OFFSET 0xf8800
44 #define SDM845_QSCRATCH_SIZE 0x400
45 #define SDM845_DWC3_CORE_SIZE 0xcd00
47 /* Interconnect path bandwidths in MBps */
48 #define USB_MEMORY_AVG_HS_BW MBps_to_icc(240)
49 #define USB_MEMORY_PEAK_HS_BW MBps_to_icc(700)
50 #define USB_MEMORY_AVG_SS_BW MBps_to_icc(1000)
51 #define USB_MEMORY_PEAK_SS_BW MBps_to_icc(2500)
52 #define APPS_USB_AVG_BW 0
53 #define APPS_USB_PEAK_BW MBps_to_icc(40)
57 void __iomem *qscratch_base;
58 struct platform_device *dwc3;
61 struct reset_control *resets;
67 enum usb_device_speed usb2_speed;
69 struct extcon_dev *edev;
70 struct extcon_dev *host_edev;
71 struct notifier_block vbus_nb;
72 struct notifier_block host_nb;
74 enum usb_dr_mode mode;
77 struct icc_path *icc_path_ddr;
78 struct icc_path *icc_path_apps;
81 static inline void dwc3_qcom_setbits(void __iomem *base, u32 offset, u32 val)
85 reg = readl(base + offset);
87 writel(reg, base + offset);
89 /* ensure that above write is through */
93 static inline void dwc3_qcom_clrbits(void __iomem *base, u32 offset, u32 val)
97 reg = readl(base + offset);
99 writel(reg, base + offset);
101 /* ensure that above write is through */
102 readl(base + offset);
105 static void dwc3_qcom_vbus_override_enable(struct dwc3_qcom *qcom, bool enable)
108 dwc3_qcom_setbits(qcom->qscratch_base, QSCRATCH_SS_PHY_CTRL,
110 dwc3_qcom_setbits(qcom->qscratch_base, QSCRATCH_HS_PHY_CTRL,
111 UTMI_OTG_VBUS_VALID | SW_SESSVLD_SEL);
113 dwc3_qcom_clrbits(qcom->qscratch_base, QSCRATCH_SS_PHY_CTRL,
115 dwc3_qcom_clrbits(qcom->qscratch_base, QSCRATCH_HS_PHY_CTRL,
116 UTMI_OTG_VBUS_VALID | SW_SESSVLD_SEL);
120 static int dwc3_qcom_vbus_notifier(struct notifier_block *nb,
121 unsigned long event, void *ptr)
123 struct dwc3_qcom *qcom = container_of(nb, struct dwc3_qcom, vbus_nb);
125 /* enable vbus override for device mode */
126 dwc3_qcom_vbus_override_enable(qcom, event);
127 qcom->mode = event ? USB_DR_MODE_PERIPHERAL : USB_DR_MODE_HOST;
132 static int dwc3_qcom_host_notifier(struct notifier_block *nb,
133 unsigned long event, void *ptr)
135 struct dwc3_qcom *qcom = container_of(nb, struct dwc3_qcom, host_nb);
137 /* disable vbus override in host mode */
138 dwc3_qcom_vbus_override_enable(qcom, !event);
139 qcom->mode = event ? USB_DR_MODE_HOST : USB_DR_MODE_PERIPHERAL;
144 static int dwc3_qcom_register_extcon(struct dwc3_qcom *qcom)
146 struct device *dev = qcom->dev;
147 struct extcon_dev *host_edev;
150 if (!of_property_read_bool(dev->of_node, "extcon"))
153 qcom->edev = extcon_get_edev_by_phandle(dev, 0);
154 if (IS_ERR(qcom->edev))
155 return dev_err_probe(dev, PTR_ERR(qcom->edev),
156 "Failed to get extcon\n");
158 qcom->vbus_nb.notifier_call = dwc3_qcom_vbus_notifier;
160 qcom->host_edev = extcon_get_edev_by_phandle(dev, 1);
161 if (IS_ERR(qcom->host_edev))
162 qcom->host_edev = NULL;
164 ret = devm_extcon_register_notifier(dev, qcom->edev, EXTCON_USB,
167 dev_err(dev, "VBUS notifier register failed\n");
172 host_edev = qcom->host_edev;
174 host_edev = qcom->edev;
176 qcom->host_nb.notifier_call = dwc3_qcom_host_notifier;
177 ret = devm_extcon_register_notifier(dev, host_edev, EXTCON_USB_HOST,
180 dev_err(dev, "Host notifier register failed\n");
184 /* Update initial VBUS override based on extcon state */
185 if (extcon_get_state(qcom->edev, EXTCON_USB) ||
186 !extcon_get_state(host_edev, EXTCON_USB_HOST))
187 dwc3_qcom_vbus_notifier(&qcom->vbus_nb, true, qcom->edev);
189 dwc3_qcom_vbus_notifier(&qcom->vbus_nb, false, qcom->edev);
194 static int dwc3_qcom_interconnect_enable(struct dwc3_qcom *qcom)
198 ret = icc_enable(qcom->icc_path_ddr);
202 ret = icc_enable(qcom->icc_path_apps);
204 icc_disable(qcom->icc_path_ddr);
209 static int dwc3_qcom_interconnect_disable(struct dwc3_qcom *qcom)
213 ret = icc_disable(qcom->icc_path_ddr);
217 ret = icc_disable(qcom->icc_path_apps);
219 icc_enable(qcom->icc_path_ddr);
225 * dwc3_qcom_interconnect_init() - Get interconnect path handles
227 * @qcom: Pointer to the concerned usb core.
230 static int dwc3_qcom_interconnect_init(struct dwc3_qcom *qcom)
232 enum usb_device_speed max_speed;
233 struct device *dev = qcom->dev;
236 qcom->icc_path_ddr = of_icc_get(dev, "usb-ddr");
237 if (IS_ERR(qcom->icc_path_ddr)) {
238 return dev_err_probe(dev, PTR_ERR(qcom->icc_path_ddr),
239 "failed to get usb-ddr path\n");
242 qcom->icc_path_apps = of_icc_get(dev, "apps-usb");
243 if (IS_ERR(qcom->icc_path_apps)) {
244 ret = dev_err_probe(dev, PTR_ERR(qcom->icc_path_apps),
245 "failed to get apps-usb path\n");
249 max_speed = usb_get_maximum_speed(&qcom->dwc3->dev);
250 if (max_speed >= USB_SPEED_SUPER || max_speed == USB_SPEED_UNKNOWN) {
251 ret = icc_set_bw(qcom->icc_path_ddr,
252 USB_MEMORY_AVG_SS_BW, USB_MEMORY_PEAK_SS_BW);
254 ret = icc_set_bw(qcom->icc_path_ddr,
255 USB_MEMORY_AVG_HS_BW, USB_MEMORY_PEAK_HS_BW);
258 dev_err(dev, "failed to set bandwidth for usb-ddr path: %d\n", ret);
262 ret = icc_set_bw(qcom->icc_path_apps, APPS_USB_AVG_BW, APPS_USB_PEAK_BW);
264 dev_err(dev, "failed to set bandwidth for apps-usb path: %d\n", ret);
271 icc_put(qcom->icc_path_apps);
273 icc_put(qcom->icc_path_ddr);
278 * dwc3_qcom_interconnect_exit() - Release interconnect path handles
279 * @qcom: Pointer to the concerned usb core.
281 * This function is used to release interconnect path handle.
283 static void dwc3_qcom_interconnect_exit(struct dwc3_qcom *qcom)
285 icc_put(qcom->icc_path_ddr);
286 icc_put(qcom->icc_path_apps);
289 /* Only usable in contexts where the role can not change. */
290 static bool dwc3_qcom_is_host(struct dwc3_qcom *qcom)
295 * FIXME: Fix this layering violation.
297 dwc = platform_get_drvdata(qcom->dwc3);
299 /* Core driver may not have probed yet. */
306 static enum usb_device_speed dwc3_qcom_read_usb2_speed(struct dwc3_qcom *qcom)
308 struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3);
309 struct usb_device *udev;
310 struct usb_hcd __maybe_unused *hcd;
313 * FIXME: Fix this layering violation.
315 hcd = platform_get_drvdata(dwc->xhci);
318 * It is possible to query the speed of all children of
319 * USB2.0 root hub via usb_hub_for_each_child(). DWC3 code
320 * currently supports only 1 port per controller. So
321 * this is sufficient.
324 udev = usb_hub_find_child(hcd->self.root_hub, 1);
329 return USB_SPEED_UNKNOWN;
334 static void dwc3_qcom_enable_wakeup_irq(int irq, unsigned int polarity)
340 irq_set_irq_type(irq, polarity);
343 enable_irq_wake(irq);
346 static void dwc3_qcom_disable_wakeup_irq(int irq)
351 disable_irq_wake(irq);
352 disable_irq_nosync(irq);
355 static void dwc3_qcom_disable_interrupts(struct dwc3_qcom *qcom)
357 dwc3_qcom_disable_wakeup_irq(qcom->qusb2_phy_irq);
359 if (qcom->usb2_speed == USB_SPEED_LOW) {
360 dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq);
361 } else if ((qcom->usb2_speed == USB_SPEED_HIGH) ||
362 (qcom->usb2_speed == USB_SPEED_FULL)) {
363 dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq);
365 dwc3_qcom_disable_wakeup_irq(qcom->dp_hs_phy_irq);
366 dwc3_qcom_disable_wakeup_irq(qcom->dm_hs_phy_irq);
369 dwc3_qcom_disable_wakeup_irq(qcom->ss_phy_irq);
372 static void dwc3_qcom_enable_interrupts(struct dwc3_qcom *qcom)
374 dwc3_qcom_enable_wakeup_irq(qcom->qusb2_phy_irq, 0);
377 * Configure DP/DM line interrupts based on the USB2 device attached to
378 * the root hub port. When HS/FS device is connected, configure the DP line
379 * as falling edge to detect both disconnect and remote wakeup scenarios. When
380 * LS device is connected, configure DM line as falling edge to detect both
381 * disconnect and remote wakeup. When no device is connected, configure both
382 * DP and DM lines as rising edge to detect HS/HS/LS device connect scenario.
385 if (qcom->usb2_speed == USB_SPEED_LOW) {
386 dwc3_qcom_enable_wakeup_irq(qcom->dm_hs_phy_irq,
387 IRQ_TYPE_EDGE_FALLING);
388 } else if ((qcom->usb2_speed == USB_SPEED_HIGH) ||
389 (qcom->usb2_speed == USB_SPEED_FULL)) {
390 dwc3_qcom_enable_wakeup_irq(qcom->dp_hs_phy_irq,
391 IRQ_TYPE_EDGE_FALLING);
393 dwc3_qcom_enable_wakeup_irq(qcom->dp_hs_phy_irq,
394 IRQ_TYPE_EDGE_RISING);
395 dwc3_qcom_enable_wakeup_irq(qcom->dm_hs_phy_irq,
396 IRQ_TYPE_EDGE_RISING);
399 dwc3_qcom_enable_wakeup_irq(qcom->ss_phy_irq, 0);
402 static int dwc3_qcom_suspend(struct dwc3_qcom *qcom, bool wakeup)
407 if (qcom->is_suspended)
410 val = readl(qcom->qscratch_base + PWR_EVNT_IRQ_STAT_REG);
411 if (!(val & PWR_EVNT_LPM_IN_L2_MASK))
412 dev_err(qcom->dev, "HS-PHY not in L2\n");
414 for (i = qcom->num_clocks - 1; i >= 0; i--)
415 clk_disable_unprepare(qcom->clks[i]);
417 ret = dwc3_qcom_interconnect_disable(qcom);
419 dev_warn(qcom->dev, "failed to disable interconnect: %d\n", ret);
422 * The role is stable during suspend as role switching is done from a
423 * freezable workqueue.
425 if (dwc3_qcom_is_host(qcom) && wakeup) {
426 qcom->usb2_speed = dwc3_qcom_read_usb2_speed(qcom);
427 dwc3_qcom_enable_interrupts(qcom);
430 qcom->is_suspended = true;
435 static int dwc3_qcom_resume(struct dwc3_qcom *qcom, bool wakeup)
440 if (!qcom->is_suspended)
443 if (dwc3_qcom_is_host(qcom) && wakeup)
444 dwc3_qcom_disable_interrupts(qcom);
446 for (i = 0; i < qcom->num_clocks; i++) {
447 ret = clk_prepare_enable(qcom->clks[i]);
450 clk_disable_unprepare(qcom->clks[i]);
455 ret = dwc3_qcom_interconnect_enable(qcom);
457 dev_warn(qcom->dev, "failed to enable interconnect: %d\n", ret);
459 /* Clear existing events from PHY related to L2 in/out */
460 dwc3_qcom_setbits(qcom->qscratch_base, PWR_EVNT_IRQ_STAT_REG,
461 PWR_EVNT_LPM_IN_L2_MASK | PWR_EVNT_LPM_OUT_L2_MASK);
463 qcom->is_suspended = false;
468 static irqreturn_t qcom_dwc3_resume_irq(int irq, void *data)
470 struct dwc3_qcom *qcom = data;
471 struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3);
473 /* If pm_suspended then let pm_resume take care of resuming h/w */
474 if (qcom->pm_suspended)
478 * This is safe as role switching is done from a freezable workqueue
479 * and the wakeup interrupts are disabled as part of resume.
481 if (dwc3_qcom_is_host(qcom))
482 pm_runtime_resume(&dwc->xhci->dev);
487 static void dwc3_qcom_select_utmi_clk(struct dwc3_qcom *qcom)
489 /* Configure dwc3 to use UTMI clock as PIPE clock not present */
490 dwc3_qcom_setbits(qcom->qscratch_base, QSCRATCH_GENERAL_CFG,
493 usleep_range(100, 1000);
495 dwc3_qcom_setbits(qcom->qscratch_base, QSCRATCH_GENERAL_CFG,
496 PIPE_UTMI_CLK_SEL | PIPE3_PHYSTATUS_SW);
498 usleep_range(100, 1000);
500 dwc3_qcom_clrbits(qcom->qscratch_base, QSCRATCH_GENERAL_CFG,
504 static int dwc3_qcom_setup_irq(struct platform_device *pdev)
506 struct dwc3_qcom *qcom = platform_get_drvdata(pdev);
510 irq = platform_get_irq_byname_optional(pdev, "qusb2_phy");
512 /* Keep wakeup interrupts disabled until suspend */
513 ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
514 qcom_dwc3_resume_irq,
515 IRQF_ONESHOT | IRQF_NO_AUTOEN,
516 "qcom_dwc3 QUSB2", qcom);
518 dev_err(qcom->dev, "qusb2_phy_irq failed: %d\n", ret);
521 qcom->qusb2_phy_irq = irq;
524 irq = platform_get_irq_byname_optional(pdev, "dp_hs_phy_irq");
526 ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
527 qcom_dwc3_resume_irq,
528 IRQF_ONESHOT | IRQF_NO_AUTOEN,
529 "qcom_dwc3 DP_HS", qcom);
531 dev_err(qcom->dev, "dp_hs_phy_irq failed: %d\n", ret);
534 qcom->dp_hs_phy_irq = irq;
537 irq = platform_get_irq_byname_optional(pdev, "dm_hs_phy_irq");
539 ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
540 qcom_dwc3_resume_irq,
541 IRQF_ONESHOT | IRQF_NO_AUTOEN,
542 "qcom_dwc3 DM_HS", qcom);
544 dev_err(qcom->dev, "dm_hs_phy_irq failed: %d\n", ret);
547 qcom->dm_hs_phy_irq = irq;
550 irq = platform_get_irq_byname_optional(pdev, "ss_phy_irq");
552 ret = devm_request_threaded_irq(qcom->dev, irq, NULL,
553 qcom_dwc3_resume_irq,
554 IRQF_ONESHOT | IRQF_NO_AUTOEN,
555 "qcom_dwc3 SS", qcom);
557 dev_err(qcom->dev, "ss_phy_irq failed: %d\n", ret);
560 qcom->ss_phy_irq = irq;
566 static int dwc3_qcom_clk_init(struct dwc3_qcom *qcom, int count)
568 struct device *dev = qcom->dev;
569 struct device_node *np = dev->of_node;
578 qcom->num_clocks = count;
580 qcom->clks = devm_kcalloc(dev, qcom->num_clocks,
581 sizeof(struct clk *), GFP_KERNEL);
585 for (i = 0; i < qcom->num_clocks; i++) {
589 clk = of_clk_get(np, i);
592 clk_put(qcom->clks[i]);
596 ret = clk_prepare_enable(clk);
599 clk_disable_unprepare(qcom->clks[i]);
600 clk_put(qcom->clks[i]);
613 static int dwc3_qcom_of_register_core(struct platform_device *pdev)
615 struct dwc3_qcom *qcom = platform_get_drvdata(pdev);
616 struct device_node *np = pdev->dev.of_node, *dwc3_np;
617 struct device *dev = &pdev->dev;
620 dwc3_np = of_get_compatible_child(np, "snps,dwc3");
622 dev_err(dev, "failed to find dwc3 core child\n");
626 ret = of_platform_populate(np, NULL, NULL, dev);
628 dev_err(dev, "failed to register dwc3 core - %d\n", ret);
632 qcom->dwc3 = of_find_device_by_node(dwc3_np);
635 dev_err(dev, "failed to get dwc3 platform device\n");
636 of_platform_depopulate(dev);
640 of_node_put(dwc3_np);
645 static int dwc3_qcom_probe(struct platform_device *pdev)
647 struct device_node *np = pdev->dev.of_node;
648 struct device *dev = &pdev->dev;
649 struct dwc3_qcom *qcom;
650 struct resource *res;
652 bool ignore_pipe_clk;
655 qcom = devm_kzalloc(&pdev->dev, sizeof(*qcom), GFP_KERNEL);
659 platform_set_drvdata(pdev, qcom);
660 qcom->dev = &pdev->dev;
662 qcom->resets = devm_reset_control_array_get_optional_exclusive(dev);
663 if (IS_ERR(qcom->resets)) {
664 return dev_err_probe(&pdev->dev, PTR_ERR(qcom->resets),
665 "failed to get resets\n");
668 ret = reset_control_assert(qcom->resets);
670 dev_err(&pdev->dev, "failed to assert resets, err=%d\n", ret);
674 usleep_range(10, 1000);
676 ret = reset_control_deassert(qcom->resets);
678 dev_err(&pdev->dev, "failed to deassert resets, err=%d\n", ret);
682 ret = dwc3_qcom_clk_init(qcom, of_clk_get_parent_count(np));
684 dev_err_probe(dev, ret, "failed to get clocks\n");
688 res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
690 qcom->qscratch_base = devm_ioremap_resource(dev, res);
691 if (IS_ERR(qcom->qscratch_base)) {
692 ret = PTR_ERR(qcom->qscratch_base);
696 ret = dwc3_qcom_setup_irq(pdev);
698 dev_err(dev, "failed to setup IRQs, err=%d\n", ret);
703 * Disable pipe_clk requirement if specified. Used when dwc3
704 * operates without SSPHY and only HS/FS/LS modes are supported.
706 ignore_pipe_clk = device_property_read_bool(dev,
707 "qcom,select-utmi-as-pipe-clk");
709 dwc3_qcom_select_utmi_clk(qcom);
711 ret = dwc3_qcom_of_register_core(pdev);
713 dev_err(dev, "failed to register DWC3 Core, err=%d\n", ret);
717 ret = dwc3_qcom_interconnect_init(qcom);
721 qcom->mode = usb_get_dr_mode(&qcom->dwc3->dev);
723 /* enable vbus override for device mode */
724 if (qcom->mode != USB_DR_MODE_HOST)
725 dwc3_qcom_vbus_override_enable(qcom, true);
727 /* register extcon to override sw_vbus on Vbus change later */
728 ret = dwc3_qcom_register_extcon(qcom);
730 goto interconnect_exit;
732 wakeup_source = of_property_read_bool(dev->of_node, "wakeup-source");
733 device_init_wakeup(&pdev->dev, wakeup_source);
734 device_init_wakeup(&qcom->dwc3->dev, wakeup_source);
736 qcom->is_suspended = false;
737 pm_runtime_set_active(dev);
738 pm_runtime_enable(dev);
739 pm_runtime_forbid(dev);
744 dwc3_qcom_interconnect_exit(qcom);
746 of_platform_depopulate(&pdev->dev);
747 platform_device_put(qcom->dwc3);
749 for (i = qcom->num_clocks - 1; i >= 0; i--) {
750 clk_disable_unprepare(qcom->clks[i]);
751 clk_put(qcom->clks[i]);
754 reset_control_assert(qcom->resets);
759 static void dwc3_qcom_remove(struct platform_device *pdev)
761 struct dwc3_qcom *qcom = platform_get_drvdata(pdev);
762 struct device *dev = &pdev->dev;
765 of_platform_depopulate(&pdev->dev);
766 platform_device_put(qcom->dwc3);
768 for (i = qcom->num_clocks - 1; i >= 0; i--) {
769 clk_disable_unprepare(qcom->clks[i]);
770 clk_put(qcom->clks[i]);
772 qcom->num_clocks = 0;
774 dwc3_qcom_interconnect_exit(qcom);
775 reset_control_assert(qcom->resets);
777 pm_runtime_allow(dev);
778 pm_runtime_disable(dev);
781 static int __maybe_unused dwc3_qcom_pm_suspend(struct device *dev)
783 struct dwc3_qcom *qcom = dev_get_drvdata(dev);
784 bool wakeup = device_may_wakeup(dev);
787 ret = dwc3_qcom_suspend(qcom, wakeup);
791 qcom->pm_suspended = true;
796 static int __maybe_unused dwc3_qcom_pm_resume(struct device *dev)
798 struct dwc3_qcom *qcom = dev_get_drvdata(dev);
799 bool wakeup = device_may_wakeup(dev);
802 ret = dwc3_qcom_resume(qcom, wakeup);
806 qcom->pm_suspended = false;
811 static int __maybe_unused dwc3_qcom_runtime_suspend(struct device *dev)
813 struct dwc3_qcom *qcom = dev_get_drvdata(dev);
815 return dwc3_qcom_suspend(qcom, true);
818 static int __maybe_unused dwc3_qcom_runtime_resume(struct device *dev)
820 struct dwc3_qcom *qcom = dev_get_drvdata(dev);
822 return dwc3_qcom_resume(qcom, true);
825 static const struct dev_pm_ops dwc3_qcom_dev_pm_ops = {
826 SET_SYSTEM_SLEEP_PM_OPS(dwc3_qcom_pm_suspend, dwc3_qcom_pm_resume)
827 SET_RUNTIME_PM_OPS(dwc3_qcom_runtime_suspend, dwc3_qcom_runtime_resume,
831 static const struct of_device_id dwc3_qcom_of_match[] = {
832 { .compatible = "qcom,dwc3" },
835 MODULE_DEVICE_TABLE(of, dwc3_qcom_of_match);
837 static struct platform_driver dwc3_qcom_driver = {
838 .probe = dwc3_qcom_probe,
839 .remove_new = dwc3_qcom_remove,
842 .pm = &dwc3_qcom_dev_pm_ops,
843 .of_match_table = dwc3_qcom_of_match,
847 module_platform_driver(dwc3_qcom_driver);
849 MODULE_LICENSE("GPL v2");
850 MODULE_DESCRIPTION("DesignWare DWC3 QCOM Glue Driver");