From patchwork Mon Jul 23 13:12:40 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andy Shevchenko X-Patchwork-Id: 10540221 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 5A7EF90E3 for ; Mon, 23 Jul 2018 13:14:04 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 48D4A284FF for ; Mon, 23 Jul 2018 13:14:04 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 3B5A928856; Mon, 23 Jul 2018 13:14:04 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-7.9 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id CF8BF284FF for ; Mon, 23 Jul 2018 13:14:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S2388064AbeGWOPN (ORCPT ); Mon, 23 Jul 2018 10:15:13 -0400 Received: from mga02.intel.com ([134.134.136.20]:39198 "EHLO mga02.intel.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387954AbeGWOPN (ORCPT ); Mon, 23 Jul 2018 10:15:13 -0400 X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga007.fm.intel.com ([10.253.24.52]) by orsmga101.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 23 Jul 2018 06:14:02 -0700 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.51,393,1526367600"; d="scan'208";a="56487539" Received: from black.fi.intel.com ([10.237.72.28]) by fmsmga007.fm.intel.com with ESMTP; 23 Jul 2018 06:12:33 -0700 Received: by black.fi.intel.com (Postfix, from userid 1003) id 508F4190; Mon, 23 Jul 2018 16:12:41 +0300 (EEST) From: Andy Shevchenko To: Felipe Balbi , linux-usb@vger.kernel.org, Greg Kroah-Hartman , Ferry Toth Cc: Andy Shevchenko Subject: [PATCH v2 3/3] dwc3: Intel Merrifield can be host Date: Mon, 23 Jul 2018 16:12:40 +0300 Message-Id: <20180723131240.67852-3-andriy.shevchenko@linux.intel.com> X-Mailer: git-send-email 2.18.0 In-Reply-To: <20180723131240.67852-1-andriy.shevchenko@linux.intel.com> References: <20180723131240.67852-1-andriy.shevchenko@linux.intel.com> Sender: linux-usb-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-usb@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP 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 --- 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),