From: Marek Vasut <marex@denx.de>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>,
"linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>
Cc: Amelie Delaunay <amelie.delaunay@st.com>,
Greg Kroah-Hartman <gregkh@linuxfoundation.org>,
Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
Subject: Re: [PATCH] [RFC] usb: dwc2: Run the core connect in dwc2_hcd_init()
Date: Mon, 20 Apr 2020 14:09:05 +0200 [thread overview]
Message-ID: <bb4835f6-a6c7-61cf-d4f0-eddbb5d6dea9@denx.de> (raw)
In-Reply-To: <ebb175be-edc1-892f-4537-a7402fd4460e@synopsys.com>
On 4/17/20 11:00 AM, Minas Harutyunyan wrote:
> Hi,
Hi,
> On 4/16/2020 6:31 PM, Marek Vasut wrote:
>> On 4/16/20 3:37 PM, Minas Harutyunyan wrote:
>
>>> Or instead of patch, if you have any utility in system which will allow
>>> from command line clear soft disconnect bit from DCTL register? Offset
>>> of DCTL register is 0x804. SoftDiscon bit number is 1. Clear this bit
>>> and then plug cable.
>>
>> Clearing that bit with devmem allows the host PC to detect some
>> high-speed device got connected, but that's it, it does not detect it as
>> a gadget and no communication really happens.
>>
>
> Please provide part of debug log on above mentioned scenario.
~ # devmem 0x49000804
0x00000002
~ # devmem 0x49000804 w 0
[ 38.420954] dwc2 49000000.usb-otg: gintsts=04008c20 gintmsk=d8000806
[ 38.425950] dwc2 49000000.usb-otg: USB SUSPEND
[ 38.430395] dwc2 49000000.usb-otg: dwc2_handle_usb_suspend_intr:
DSTS=0x400003
[ 38.437630] dwc2 49000000.usb-otg: DSTS.Suspend Status=1 HWCFG4.Power
Optimize=1 HWCFG4.Hibernation=0
[ 38.446866] dwc2 49000000.usb-otg: ignore suspend request before
enumeration
[ 38.453934] dwc2 49000000.usb-otg: dwc2_hsotg_irq: 04008420 00000000
(d8000806) retry 8
~ # devmem 0x49000804
0x00000000
cable is plugged in below
[ 50.224271] dwc2 49000000.usb-otg: gintsts=44008420 gintmsk=d8000806
[ 50.229268] dwc2 49000000.usb-otg: Session request interrupt - lx_state=0
[ 50.236072] dwc2 49000000.usb-otg: dwc2_hsotg_irq: 04008420 00000000
(d8000806) retry 8
[ 50.292232] dwc2 49000000.usb-otg: gintsts=04008c20 gintmsk=d8000806
[ 50.297219] dwc2 49000000.usb-otg: USB SUSPEND
[ 50.301666] dwc2 49000000.usb-otg: dwc2_handle_usb_suspend_intr:
DSTS=0x400003
[ 50.308902] dwc2 49000000.usb-otg: DSTS.Suspend Status=1 HWCFG4.Power
Optimize=1 HWCFG4.Hibernation=0
[ 50.318141] dwc2 49000000.usb-otg: ignore suspend request before
enumeration
[ 50.325209] dwc2 49000000.usb-otg: dwc2_hsotg_irq: 04008420 00000000
(d8000806) retry 8
>>> Unfortunately, currently I'm working from home and can't remotely
>>> connect/disconnect cable in lab to try to reproduce observed by you issue.
>>
>> Maybe you should consider using something like this in the lab:
>> https://urldefense.com/v3/__https://www.ti.com/product/TS3USB30__;!!A4F2R9G_pg!O9sBVS3qah9rW57ccw0cT_8vz5fw0Ku3K_ZtNLuL2LNez4_AGF6wP2ZoKY2NF7yZ2vEfjmdg$
>>
> Thanks for advise. I'll buy and setup multiplexer later, because
> currently I'm on quarantine and can't visit office.
Sure, hope it helps.
>> [...]
>>
>> dwc2 49000000.usb-otg: mapped PA 49000000 to VA 473352f1
>> dwc2 49000000.usb-otg: mapped PA 49000000 to VA 923761cb
>> dwc2 49000000.usb-otg: supply vusb_d not found, using dummy regulator
>> dwc2 49000000.usb-otg: supply vusb_a not found, using dummy regulator
>> dwc2 49000000.usb-otg: registering common handler for irq48
>> dwc2 49000000.usb-otg: dwc2_core_reset()
>> dwc2 49000000.usb-otg: Core Release: 3.30a (snpsid=4f54330a)
>> dwc2 49000000.usb-otg: Forcing mode to host
>> dwc2 49000000.usb-otg: Waiting for host mode
>> dwc2 49000000.usb-otg: Host mode set
>> dwc2 49000000.usb-otg: Forcing mode to device
>> dwc2 49000000.usb-otg: Waiting for device mode
>> dwc2 49000000.usb-otg: Device mode set
>> dwc2 49000000.usb-otg: Clearing force mode bits
>> dwc2 49000000.usb-otg: NonPeriodic TXFIFO size: 32
>> dwc2 49000000.usb-otg: RXFIFO size: 256
>> dwc2 49000000.usb-otg: EPs: 9, dedicated fifos, 952 entries in SPRAM
>
>> dwc2 49000000.usb-otg: bound driver zero
>> dwc2 49000000.usb-otg: dwc2_hsotg_pullup: is_on: 1 op_state: 0
>
>> dwc2 49000000.usb-otg: DCFG=0x08100000, DCTL=0x00000002, DIEPMSK=00000000
>> dwc2 49000000.usb-otg: GAHBCFG=0x00000000, GHWCFG1=0x00000000
>> dwc2 49000000.usb-otg: GRXFSIZ=0x00000400, GNPTXFSIZ=0x04000400
>> dwc2 49000000.usb-otg: DPTx[1] FSize=1024, StAddr=0x00000800
>> dwc2 49000000.usb-otg: DPTx[2] FSize=1024, StAddr=0x00000c00
>
> Do you use zero gadget?
Yes
> Pay attention that bounding function driver and
> pullup set to 1 much earlier than core/dwc2 finished initialization.
> Can you modprobe zero gadget after dwc2 fully initialized?
I have the zero gadget compiled into the kernel, I would expect that
should work too, right ?
next prev parent reply other threads:[~2020-04-20 13:46 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-04-13 14:31 [PATCH] [RFC] usb: dwc2: Run the core connect in dwc2_hcd_init() Marek Vasut
2020-04-13 14:45 ` Minas Harutyunyan
2020-04-13 14:54 ` Marek Vasut
2020-04-13 15:27 ` Minas Harutyunyan
2020-04-13 17:00 ` Marek Vasut
2020-04-14 7:14 ` Minas Harutyunyan
2020-04-14 12:18 ` Marek Vasut
2020-04-15 8:37 ` Minas Harutyunyan
2020-04-15 14:55 ` Marek Vasut
2020-04-15 15:10 ` Minas Harutyunyan
2020-04-16 9:46 ` Marek Vasut
2020-04-16 13:37 ` Minas Harutyunyan
2020-04-16 14:31 ` Marek Vasut
2020-04-17 9:00 ` Minas Harutyunyan
2020-04-20 12:09 ` Marek Vasut [this message]
2020-04-22 13:45 ` Minas Harutyunyan
2020-04-22 14:21 ` Marek Vasut
2020-05-14 0:10 ` Marek Vasut
2020-05-15 7:41 ` Minas Harutyunyan
2020-05-27 6:17 ` Minas Harutyunyan
2020-05-28 22:35 ` Marek Vasut
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=bb4835f6-a6c7-61cf-d4f0-eddbb5d6dea9@denx.de \
--to=marex@denx.de \
--cc=Minas.Harutyunyan@synopsys.com \
--cc=amelie.delaunay@st.com \
--cc=gregkh@linuxfoundation.org \
--cc=linux-usb@vger.kernel.org \
--cc=manivannan.sadhasivam@linaro.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).