linux-usb.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
To: Minas Harutyunyan <Minas.Harutyunyan@synopsys.com>
Cc: christoph.muellner@theobroma-systems.com,
	Thinh Nguyen <thinhn@synopsys.com>,
	John Keeping <john@metanate.com>, Felipe Balbi <balbi@kernel.org>,
	linux-usb@vger.kernel.org, linux-rockchip@lists.infradead.org
Subject: dwc2: gadget mode and timeout with GRSTCTL_CSFTRST
Date: Wed, 05 Feb 2020 15:37:33 +0100	[thread overview]
Message-ID: <3600884.FGW0xRIbGs@phil> (raw)

Hi,

right now we're experiencing strange behaviour with a dwc2 on Rockchip's
PX30 soc.

With a cable connected to the port, the configfs-snippet below seems to
work and at least creates a acm device on the host. Though I'm told that a
	 picocom -b 115200 /dev/ttyACM
sometimes works ok but also sometimes returns -EBUSY or hangs.
[But I guess that is a separate problem]

But if there is no cable connected when trying to do the configfs steps
we end up with
	dwc2_core_reset: HANG! Soft Reset timeout GRSTCTL GRSTCTL_CSFTRST
and no gadget gets configured.


So I guess to get a feeling for the issue, is this something to be
expected, or at least a known issue, with maybe a fix flying around
somewhere?

Or is this working on other dwc2 platforms correctly and is caused
by some other part talking to the dwc2 doing strange things?


Thanks
Heiko

-------- 8< ---- configfs snippet ------ >8 --------
cd /configfs/usb_gadget
mkdir g1
cd g1
echo "0x1d6d" > idVendor
echo "0x0104" > idProduct
mkdir strings/0x409
echo "0123456789" > strings/0x409/serialnumber
echo "Theobroma Systems" > strings/0x409/manufacturer
echo "Cobra Debug Serial" > strings/0x409/product

# create config
mkdir configs/c.1
mkdir configs/c.1/strings/0x409
echo "conf1" > configs/c.1/strings/0x409/configuration

# create function
mkdir functions/acm.usb0
ln -s functions/acm.usb0 configs/c.1

# activate new config
echo "" > UDC
echo "ff300000.usb" > UDC




             reply	other threads:[~2020-02-05 15:07 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-02-05 14:37 Heiko Stuebner [this message]
2020-02-06 10:49 ` dwc2: gadget mode and timeout with GRSTCTL_CSFTRST Minas Harutyunyan

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=3600884.FGW0xRIbGs@phil \
    --to=heiko.stuebner@theobroma-systems.com \
    --cc=Minas.Harutyunyan@synopsys.com \
    --cc=balbi@kernel.org \
    --cc=christoph.muellner@theobroma-systems.com \
    --cc=john@metanate.com \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=linux-usb@vger.kernel.org \
    --cc=thinhn@synopsys.com \
    /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).