Skip to contentSkip to conversation

dwc3: Intel Merrifield can be host

PATCH New Andy Shevchenko 1 participant 1 message Jul 23, 2018

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 3/3 dwc3: Intel Merrifield can be host

On Intel Edison board the OTG function is enabled, thus, USB can switch to the host mode.

Allow that by changing dr_mode property to "otg" for Intel Merrifield.

---
 drivers/usb/dwc3/dwc3-pci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)
drivers/usb/dwc3/dwc3-pci.c +7 -1
index 9d3fff91e1bc..ec43fe81ad2a 100644
@@ -82,6 +82,12 @@ static const struct property_entry dwc3_pci_intel_properties[] = {
 	{}
 };
 
+static const struct property_entry dwc3_pci_mrfld_properties[] = {
+	PROPERTY_ENTRY_STRING("dr_mode", "otg"),
+	PROPERTY_ENTRY_BOOL("linux,sysdev_is_parent"),
+	{}
+};
+
 static const struct property_entry dwc3_pci_amd_properties[] = {
 	PROPERTY_ENTRY_BOOL("snps,has-lpm-erratum"),
 	PROPERTY_ENTRY_U8("snps,lpm-nyet-threshold", 0xf),
@@ -258,7 +264,7 @@ static const struct pci_device_id dwc3_pci_id_table[] = {
 	DWC3_PCI_DEV(SYNOPSYS, SYNOPSYS_HAPSUSB31, dwc3_pci_synopsys_properties),
 	DWC3_PCI_DEV(INTEL, INTEL_BSW, dwc3_pci_intel_properties),
 	DWC3_PCI_DEV(INTEL, INTEL_BYT, dwc3_pci_intel_properties),
-	DWC3_PCI_DEV(INTEL, INTEL_MRFLD, dwc3_pci_intel_properties),
+	DWC3_PCI_DEV(INTEL, INTEL_MRFLD, dwc3_pci_mrfld_properties),
 	DWC3_PCI_DEV(INTEL, INTEL_SPTLP, dwc3_pci_intel_properties),
 	DWC3_PCI_DEV(INTEL, INTEL_SPTH, dwc3_pci_intel_properties),
 	DWC3_PCI_DEV(INTEL, INTEL_BXT, dwc3_pci_intel_properties),