linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Marek Szyprowski <m.szyprowski@samsung.com>
To: Markus Reichl <m.reichl@fivetechno.de>,
	linux-usb@vger.kernel.org, linux-samsung-soc@vger.kernel.org,
	linux-kernel@vger.kernel.org
Cc: Minas Harutyunyan <hminas@synopsys.com>,
	Felipe Balbi <felipe.balbi@linux.intel.com>,
	Bartlomiej Zolnierkiewicz <b.zolnierkie@samsung.com>,
	Jules Maselbas <jmaselbas@kalray.eu>,
	Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH] usb: dwc2: Force 8bit UTMI width for Samsung Exynos SoCs
Date: Tue, 7 May 2019 14:03:09 +0200	[thread overview]
Message-ID: <26ff3deb-4b8d-7dd2-2418-d56f6dcea313@samsung.com> (raw)
In-Reply-To: <eefff244-f311-e59e-d914-9a18b5a21620@samsung.com>

Hi All,

On 2019-05-07 11:17, Marek Szyprowski wrote:
> Hi Markus,
>
> On 2019-05-07 10:12, Markus Reichl wrote:
>> Hi Marek,
>>
>> your patch did not help on stable v5.1
>>
>> [    3.255963] samsung-usb2-phy 125b0000.exynos-usbphy: 
>> 125b0000.exynos-usbphy supply vbus not found, using dummy regulator
>> [    4.044547] usbcore: registered new interface driver smsc95xx
>> [    4.112261] usb usb1: New USB device found, idVendor=1d6b, 
>> idProduct=0002, bcdDevice= 5.01
>> [    4.120363] usb usb1: New USB device strings: Mfr=3, Product=2, 
>> SerialNumber=1
>> [    4.127560] usb usb1: Product: EHCI Host Controller
>> [    4.132415] usb usb1: Manufacturer: Linux 
>> 5.1.0-00005-geb4efae48eb5 ehci_hcd
>> [    4.139446] usb usb1: SerialNumber: 12580000.ehci
>> [    4.183056] usb3503 0-0008: switched to HUB mode
>> [    4.183121] usb3503 0-0008: usb3503_probe: probed in hub mode
>> [    4.488344] usb 1-2: new high-speed USB device number 2 using 
>> exynos-ehci
>> [    4.675605] usb 1-2: New USB device found, idVendor=0424, 
>> idProduct=3503, bcdDevice=a1.a0
>> [    4.678166] usb 1-2: New USB device strings: Mfr=0, Product=0, 
>> SerialNumber=0
>> [    4.686140] usb 1-2: skipping disabled interface 0
>>
>> root@odroid-x2:~# lsusb
>> Bus 001 Device 002: ID 0424:3503 Standard Microsystems Corp.
>> Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
>
> This patch fixes the issue introduced by "usb: dwc2: gadget: Replace 
> phyif with phy_utmi_width" commit, which is queued only to linux-next 
> so far. Stable v5.1 doesn't include it, so the fix doesn't change 
> anything on v5.1.
>
> I've checked and OdroidU3 works fine with v5.1 release, but X2 fails 
> to detect USB devices. I will investigate this in a few minutes...


Broken USB on X2 is caused by commit 
01fdf179f4b064d4c9d30b39aba178caf32649f4 ("usb: core: skip interfaces 
disabled in devicetree").

I looks that the mentioned commit conflicts with the Exynos EHCI and 
OHCI bindings and the way the PHY ports are defined for those drivers. 
It worked on U3 only by the pure coincidence. This is probably a 
"minimal" fix for this issue:

diff --git a/drivers/usb/core/message.c b/drivers/usb/core/message.c
index 82239f27c4cc..cd455c4add25 100644
--- a/drivers/usb/core/message.c
+++ b/drivers/usb/core/message.c
@@ -2007,6 +2007,7 @@ int usb_set_configuration(struct usb_device *dev, 
int configuration)
                 struct usb_interface *intf = cp->interface[i];

                 if (intf->dev.of_node &&
+                   of_device_is_compatible(intf->dev.of_node, NULL) &&
                     !of_device_is_available(intf->dev.of_node)) {
                         dev_info(&dev->dev, "skipping disabled 
interface %d\n",
intf->cur_altsetting->desc.bInterfaceNumber);

I will try to describe the problem in details and discuss it on the usb 
mailing list.

Best regards
-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland


  reply	other threads:[~2019-05-07 12:03 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-05-03 20:49 [BUG BISECT] USB on Exynos4412 fails after usb: dwc2: gadget: Replace phyif with phy_utmi_width Krzysztof Kozlowski
     [not found] ` <CGME20190506130052eucas1p25afd4e15648e9efc6fd011e46081fbea@eucas1p2.samsung.com>
2019-05-06 13:00   ` [PATCH] usb: dwc2: Force 8bit UTMI width for Samsung Exynos SoCs Marek Szyprowski
2019-05-06 13:40     ` Jules Maselbas
2019-05-07  6:22     ` Minas Harutyunyan
2019-05-07  8:12     ` Markus Reichl
2019-05-07  9:17       ` Marek Szyprowski
2019-05-07 12:03         ` Marek Szyprowski [this message]
2019-05-07 12:38           ` Markus Reichl
2019-06-05  8:57     ` Krzysztof Kozlowski
2019-05-07  6:21 ` [BUG BISECT] USB on Exynos4412 fails after usb: dwc2: gadget: Replace phyif with phy_utmi_width Minas Harutyunyan
2019-05-07  6:43   ` Marek Szyprowski
2019-05-07 10:08 ` [PATCH] usb: dwc2: Use generic PHY width in params setup Jules Maselbas
2019-05-07 10:08   ` Jules Maselbas
2019-05-07 10:54     ` Marek Szyprowski
2019-05-09  9:15     ` [PATCH v2] " Jules Maselbas
2019-05-31 12:22       ` Jules Maselbas
2019-05-31 12:44       ` Minas Harutyunyan
2019-06-06 10:13         ` Marek Szyprowski
2019-06-18  7:26           ` 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=26ff3deb-4b8d-7dd2-2418-d56f6dcea313@samsung.com \
    --to=m.szyprowski@samsung.com \
    --cc=b.zolnierkie@samsung.com \
    --cc=felipe.balbi@linux.intel.com \
    --cc=hminas@synopsys.com \
    --cc=jmaselbas@kalray.eu \
    --cc=krzk@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-samsung-soc@vger.kernel.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=m.reichl@fivetechno.de \
    /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).