linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
To: Felipe Balbi <balbi@kernel.org>,
	linux-usb@vger.kernel.org,
	Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
	Ferry Toth <fntoth@gmail.com>
Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
Subject: [v2,3/3] dwc3: Intel Merrifield can be host
Date: Mon, 23 Jul 2018 16:12:40 +0300	[thread overview]
Message-ID: <20180723131240.67852-3-andriy.shevchenko@linux.intel.com> (raw)

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.

Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com>
---
 drivers/usb/dwc3/dwc3-pci.c | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/drivers/usb/dwc3/dwc3-pci.c b/drivers/usb/dwc3/dwc3-pci.c
index 9d3fff91e1bc..ec43fe81ad2a 100644
--- a/drivers/usb/dwc3/dwc3-pci.c
+++ b/drivers/usb/dwc3/dwc3-pci.c
@@ -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),

             reply	other threads:[~2018-07-23 13:12 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-23 13:12 Andy Shevchenko [this message]
  -- strict thread matches above, loose matches on Subject: below --
2018-07-26 11:08 [v2,3/3] dwc3: Intel Merrifield can be host Felipe Balbi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180723131240.67852-3-andriy.shevchenko@linux.intel.com \
    --to=andriy.shevchenko@linux.intel.com \
    --cc=balbi@kernel.org \
    --cc=fntoth@gmail.com \
    --cc=gregkh@linuxfoundation.org \
    --cc=linux-usb@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).