From: "Philippe Mathieu-Daudé" <philmd@redhat.com>
To: Gerd Hoffmann <kraxel@redhat.com>, Paul Zimmerman <pauldzim@gmail.com>
Cc: "Stefan Hajnoczi" <stefanha@gmail.com>,
"Peter Maydell" <peter.maydell@linaro.org>,
"John Snow" <jsnow@redhat.com>,
qemu-devel@nongnu.org, "Philippe Mathieu-Daudé" <f4bug@amsat.org>
Subject: Re: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation
Date: Tue, 31 Mar 2020 13:15:50 +0200 [thread overview]
Message-ID: <8e9e419c-9249-1070-bbc7-d927ca69fda5@redhat.com> (raw)
In-Reply-To: <20200331092831.4s2smc4wtbslzirw@sirius.home.kraxel.org>
On 3/31/20 11:28 AM, Gerd Hoffmann wrote:
> On Sat, Mar 28, 2020 at 05:16:59PM -0700, Paul Zimmerman wrote:
>> This patch series adds emulation for the dwc-hsotg USB controller,
>> which is used on the Raspberry Pi 3 and earlier, as well as a number
>> of other development boards. The main benefit for Raspberry Pi is that
>> this enables networking on these boards, since the network adapter is
>> attached via USB.
>>
>> The emulation is working quite well, I have tested with USB network,
>> mass storage, mouse, keyboard, and tablet. I have tested with the dwc2
>> driver in the upstream Linux kernel, and with the dwc-otg driver in the
>> Raspbian kernel. One remaining issue is that USB redirection does not
>> work, I tried connecting to a USB stick on the host, but the device
>> generates babble errors and does not work. I will continue to work on
>> this issue.
>>
>> The patch series also includes a very basic emulation of the MPHI
>> device on the Raspberry Pi SOC, which provides the FIQ interrupt that
>> is used by the dwc-otg driver in the Raspbian kernel. But that driver
>> still does not work in full FIQ mode, so it is necessary to add a
>> parameter to the kernel command line ("dwc_otg.fiq_fsm_enable=0") to
>> make it work.
>>
>> I have used some on-line sources of information while developing
>> this emulation, including:
>>
>> http://www.capital-micro.com/PDF/CME-M7_Family_User_Guide_EN.pdf
>> has a pretty complete description of the controller starting on
>> page 370.
>>
>> https://sourceforge.net/p/wive-ng/wive-ng-mt/ci/master/tree/docs/DataSheets/RT3050_5x_V2.0_081408_0902.pdf
>> has a description of the controller registers starting on page
>> 130.
>>
>> Changes from v1:
>> - Fixed checkpatch errors/warnings, except for dwc2-regs.h since
>> that is a direct import from the Linux kernel.
>> - Switched from debug printfs to tracepoints in hcd-dwc2.c, on the
>> advice of Gerd. I just dropped the debug prints in bcm2835_mphi.c,
>> since I didn't consider them very useful.
>> - Updated a couple of the commit messages with more info.
>>
>> Thanks for your time,
>> Paul
>
> Looks good to me. We are in 5.0 freeze now though, so this has to wait
> until the tree is open for 5.1 development.
Plenty of time to complete this series with an acceptance test using
your device :)
As a starting point you can look at do_test_arm_raspi2() in
tests/acceptance/boot_linux_console.py.
Regards,
Phil.
next prev parent reply other threads:[~2020-03-31 11:17 UTC|newest]
Thread overview: 20+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-29 0:16 [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation Paul Zimmerman
2020-03-29 0:17 ` [PATCH v2 1/6] Add BCM2835 SOC MPHI emulation Paul Zimmerman
2020-03-29 0:17 ` [PATCH v2 2/6] dwc-hsotg USB host controller register definitions Paul Zimmerman
2020-03-29 0:17 ` [PATCH v2 3/6] dwc-hsotg USB host controller state definitions Paul Zimmerman
2020-03-29 0:17 ` [PATCH v2 4/6] dwc-hsotg USB host controller emulation Paul Zimmerman
2020-04-16 15:45 ` Peter Maydell
2020-04-16 15:47 ` Peter Maydell
2020-04-16 16:30 ` Philippe Mathieu-Daudé
2020-04-16 19:50 ` Paul Zimmerman
2020-04-18 21:55 ` Paul Zimmerman
2020-04-20 7:16 ` Philippe Mathieu-Daudé
2020-04-20 19:49 ` Paul Zimmerman
2020-04-20 7:25 ` Philippe Mathieu-Daudé
2020-04-20 19:28 ` Paul Zimmerman
2020-03-29 0:17 ` [PATCH v2 5/6] Add short-packet handling to usb-storage driver Paul Zimmerman
2020-03-29 0:17 ` [PATCH v2 6/6] Wire in the dwc-hsotg USB host controller emulation Paul Zimmerman
2020-03-29 0:35 ` [PATCH v2 0/6] dwc-hsotg (aka dwc2) " no-reply
2020-03-31 9:28 ` Gerd Hoffmann
2020-03-31 11:15 ` Philippe Mathieu-Daudé [this message]
2020-03-31 18:41 ` Paul Zimmerman
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=8e9e419c-9249-1070-bbc7-d927ca69fda5@redhat.com \
--to=philmd@redhat.com \
--cc=f4bug@amsat.org \
--cc=jsnow@redhat.com \
--cc=kraxel@redhat.com \
--cc=pauldzim@gmail.com \
--cc=peter.maydell@linaro.org \
--cc=qemu-devel@nongnu.org \
--cc=stefanha@gmail.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).