summaryrefslogtreecommitdiff
path: root/drivers/usb/dwc2
diff options
context:
space:
mode:
authorAmelie Delaunay <amelie.delaunay@foss.st.com>2022-06-21 17:23:50 +0200
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2022-06-22 07:38:22 +0200
commit2c8845fe9342b8801185b4c1b9261c532901fafd (patch)
treed94ebba206d7566c09e60236aedddf2d65215bb0 /drivers/usb/dwc2
parent54bd6c9a3b7b1ccb34a4d6ab64c4c53469c6aacd (diff)
usb: dwc2: host: add TPL support
The Target Peripheral List (TPL) is used to identify targeted devices during Embedded Host compliance testing. The user can add "tpl-support" in the device tree to enable it. Signed-off-by: Amelie Delaunay <amelie.delaunay@foss.st.com> Signed-off-by: Fabrice Gasnier <fabrice.gasnier@foss.st.com> Acked-by: Minas Harutyunyan <hminas@synopsys.com> Link: https://lore.kernel.org/r/20220621152350.145745-5-fabrice.gasnier@foss.st.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/usb/dwc2')
-rw-r--r--drivers/usb/dwc2/hcd.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/hcd.c b/drivers/usb/dwc2/hcd.c
index 3f107a06817d..2c9613d0d395 100644
--- a/drivers/usb/dwc2/hcd.c
+++ b/drivers/usb/dwc2/hcd.c
@@ -52,6 +52,7 @@
#include <linux/usb/hcd.h>
#include <linux/usb/ch11.h>
+#include <linux/usb/of.h>
#include "core.h"
#include "hcd.h"
@@ -5339,6 +5340,8 @@ int dwc2_hcd_init(struct dwc2_hsotg *hsotg)
/* Don't support SG list at this point */
hcd->self.sg_tablesize = 0;
+ hcd->tpl_support = of_usb_host_tpl_support(hsotg->dev->of_node);
+
if (!IS_ERR_OR_NULL(hsotg->uphy))
otg_set_host(hsotg->uphy->otg, &hcd->self);