[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation

From: Philippe Mathieu-Daudé
Subject: Re: [PATCH v2 0/6] dwc-hsotg (aka dwc2) USB host controller emulation
Date: Tue, 31 Mar 2020 13:15:50 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:68.0) Gecko/20100101 Thunderbird/68.5.0

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:

has a pretty complete description of the controller starting on
page 370.

has a description of the controller registers starting on page

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,

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.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]