* Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. @ 2020-03-07 0:34 Paul Zimmerman 2020-03-10 2:23 ` John Snow 2020-03-10 9:26 ` Peter Maydell 0 siblings, 2 replies; 7+ messages in thread From: Paul Zimmerman @ 2020-03-07 0:34 UTC (permalink / raw) To: Peter Maydell; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-devel Hi Folks, I have been working on an emulation of the dwc-otg USB controller (host mode only for now), as implemented on the Raspberry Pi 3 and below, and on numerous other embedded platforms. I have it to a point where it works pretty well with the dwc2 driver in the mainline Linux kernel, and with the dwc-otg driver in the Raspbian kernel. Mouse and keyboard work fine, and I *think* the usb-net device is working too, although I have been unsuccessful in connecting to the outside world with it. I haven't done anything with gadget-mode yet, but that could certainly be added in the future. Would there be any interest in me submitting this for inclusion in Qemu? I ask because I see there was a previous effort at this at github.com/0xabu/qemu/hw/usb/bcm2835_usb.c, but it seems it never went anywhere. Thanks, Paul ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. 2020-03-07 0:34 Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below Paul Zimmerman @ 2020-03-10 2:23 ` John Snow 2020-03-10 3:15 ` Paul Zimmerman 2020-03-10 9:26 ` Peter Maydell 1 sibling, 1 reply; 7+ messages in thread From: John Snow @ 2020-03-10 2:23 UTC (permalink / raw) To: Paul Zimmerman, Peter Maydell Cc: Paolo Bonzini, Philippe Mathieu-Daudé, qemu-devel On 3/6/20 7:34 PM, Paul Zimmerman wrote: > Hi Folks, > > I have been working on an emulation of the dwc-otg USB controller > (host mode only for now), as implemented on the Raspberry Pi 3 and > below, and on numerous other embedded platforms. I have it to a point > where it works pretty well with the dwc2 driver in the mainline Linux > kernel, and with the dwc-otg driver in the Raspbian kernel. Mouse and > keyboard work fine, and I *think* the usb-net device is working too, > although I have been unsuccessful in connecting to the outside world > with it. > > I haven't done anything with gadget-mode yet, but that could certainly > be added in the future. > > Would there be any interest in me submitting this for inclusion in > Qemu? I ask because I see there was a previous effort at this at > github.com/0xabu/qemu/hw/usb/bcm2835_usb.c, but it seems it never went > anywhere. > > Thanks, > Paul > At a minimum, I think you should send your patches to the list for posterity even if they don't wind up getting enough review pressure to be merged. If you want advice on how to split up your patches to entice more reviewers, please let us know and any one of us can write a thousand more :words: that might help make a better case. (There's a much-too-long wiki entry on the matter, if you are brave.) The issue, as always, is usually just reviewer time -- and how squeaky the wheel is. Making the patches look pretty and well organized is one way to trick well meaning people into reviewing your patches. --js ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. 2020-03-10 2:23 ` John Snow @ 2020-03-10 3:15 ` Paul Zimmerman 2020-03-10 9:52 ` Stefan Hajnoczi 0 siblings, 1 reply; 7+ messages in thread From: Paul Zimmerman @ 2020-03-10 3:15 UTC (permalink / raw) To: John Snow Cc: qemu-devel, Paolo Bonzini, Philippe Mathieu-Daudé, Peter Maydell [-- Attachment #1: Type: text/plain, Size: 1863 bytes --] Hi John, Thanks for the tips! I found an issue when testing with the usb-storage device, so I will work on fixing that, and then think about how best to split up the patches. Thanks, Paul On Mon, Mar 9, 2020 at 7:23 PM John Snow <jsnow@redhat.com> wrote: > > > On 3/6/20 7:34 PM, Paul Zimmerman wrote: > > Hi Folks, > > > > I have been working on an emulation of the dwc-otg USB controller > > (host mode only for now), as implemented on the Raspberry Pi 3 and > > below, and on numerous other embedded platforms. I have it to a point > > where it works pretty well with the dwc2 driver in the mainline Linux > > kernel, and with the dwc-otg driver in the Raspbian kernel. Mouse and > > keyboard work fine, and I *think* the usb-net device is working too, > > although I have been unsuccessful in connecting to the outside world > > with it. > > > > I haven't done anything with gadget-mode yet, but that could certainly > > be added in the future. > > > > Would there be any interest in me submitting this for inclusion in > > Qemu? I ask because I see there was a previous effort at this at > > github.com/0xabu/qemu/hw/usb/bcm2835_usb.c, but it seems it never went > > anywhere. > > > > Thanks, > > Paul > > > > At a minimum, I think you should send your patches to the list for > posterity even if they don't wind up getting enough review pressure to > be merged. > > If you want advice on how to split up your patches to entice more > reviewers, please let us know and any one of us can write a thousand > more :words: that might help make a better case. > > (There's a much-too-long wiki entry on the matter, if you are brave.) > > The issue, as always, is usually just reviewer time -- and how squeaky > the wheel is. Making the patches look pretty and well organized is one > way to trick well meaning people into reviewing your patches. > > --js > > [-- Attachment #2: Type: text/html, Size: 2568 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. 2020-03-10 3:15 ` Paul Zimmerman @ 2020-03-10 9:52 ` Stefan Hajnoczi 0 siblings, 0 replies; 7+ messages in thread From: Stefan Hajnoczi @ 2020-03-10 9:52 UTC (permalink / raw) To: Paul Zimmerman Cc: Peter Maydell, qemu-devel, Philippe Mathieu-Daudé, kraxel, Paolo Bonzini, John Snow [-- Attachment #1: Type: text/plain, Size: 2187 bytes --] On Mon, Mar 09, 2020 at 08:15:33PM -0700, Paul Zimmerman wrote: > Hi John, > > Thanks for the tips! I found an issue when testing with the usb-storage > device, so I will work on fixing that, and then think about how best to > split up the patches. Please CC Gerd Hoffmann (QEMU USB maintainer) when sending your patches. Thanks! Stefan > > Thanks, > Paul > > On Mon, Mar 9, 2020 at 7:23 PM John Snow <jsnow@redhat.com> wrote: > > > > > > > On 3/6/20 7:34 PM, Paul Zimmerman wrote: > > > Hi Folks, > > > > > > I have been working on an emulation of the dwc-otg USB controller > > > (host mode only for now), as implemented on the Raspberry Pi 3 and > > > below, and on numerous other embedded platforms. I have it to a point > > > where it works pretty well with the dwc2 driver in the mainline Linux > > > kernel, and with the dwc-otg driver in the Raspbian kernel. Mouse and > > > keyboard work fine, and I *think* the usb-net device is working too, > > > although I have been unsuccessful in connecting to the outside world > > > with it. > > > > > > I haven't done anything with gadget-mode yet, but that could certainly > > > be added in the future. > > > > > > Would there be any interest in me submitting this for inclusion in > > > Qemu? I ask because I see there was a previous effort at this at > > > github.com/0xabu/qemu/hw/usb/bcm2835_usb.c, but it seems it never went > > > anywhere. > > > > > > Thanks, > > > Paul > > > > > > > At a minimum, I think you should send your patches to the list for > > posterity even if they don't wind up getting enough review pressure to > > be merged. > > > > If you want advice on how to split up your patches to entice more > > reviewers, please let us know and any one of us can write a thousand > > more :words: that might help make a better case. > > > > (There's a much-too-long wiki entry on the matter, if you are brave.) > > > > The issue, as always, is usually just reviewer time -- and how squeaky > > the wheel is. Making the patches look pretty and well organized is one > > way to trick well meaning people into reviewing your patches. > > > > --js > > > > [-- Attachment #2: signature.asc --] [-- Type: application/pgp-signature, Size: 488 bytes --] ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. 2020-03-07 0:34 Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below Paul Zimmerman 2020-03-10 2:23 ` John Snow @ 2020-03-10 9:26 ` Peter Maydell 2020-03-10 19:00 ` Paul Zimmerman 1 sibling, 1 reply; 7+ messages in thread From: Peter Maydell @ 2020-03-10 9:26 UTC (permalink / raw) To: Paul Zimmerman Cc: Paolo Bonzini, Philippe Mathieu-Daudé, QEMU Developers On Sat, 7 Mar 2020 at 00:34, Paul Zimmerman <pauldzim@gmail.com> wrote: > > Hi Folks, > > I have been working on an emulation of the dwc-otg USB controller > (host mode only for now), as implemented on the Raspberry Pi 3 and > below, and on numerous other embedded platforms. I have it to a point > where it works pretty well with the dwc2 driver in the mainline Linux > kernel, and with the dwc-otg driver in the Raspbian kernel. Mouse and > keyboard work fine, and I *think* the usb-net device is working too, > although I have been unsuccessful in connecting to the outside world > with it. Do you have documentation of the hardware? One of the issues we've had with this in the past is that we couldn't find the hardare specs for the USB controller, so it was a bit difficult to tell if a model of it was correct or not. thanks -- PMM ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. 2020-03-10 9:26 ` Peter Maydell @ 2020-03-10 19:00 ` Paul Zimmerman 2020-03-10 21:46 ` John Snow 0 siblings, 1 reply; 7+ messages in thread From: Paul Zimmerman @ 2020-03-10 19:00 UTC (permalink / raw) To: Peter Maydell; +Cc: Paolo Bonzini, Philippe Mathieu-Daudé, QEMU Developers Hi Peter, I used to work for Synopsys, who is the vendor for the usb-otg IP, and am the author of the dwc2 driver in the Linux kernel (actually just a port of the vendor driver to Linux). So I am pretty familiar with the hardware. But I had to give up all the documentation when I left Synopsys. So, beyond what I could find on the web (register description and programming model), I don't have any further documentation. Thanks, Paul On Tue, Mar 10, 2020 at 2:27 AM Peter Maydell <peter.maydell@linaro.org> wrote: > > On Sat, 7 Mar 2020 at 00:34, Paul Zimmerman <pauldzim@gmail.com> wrote: > > > > Hi Folks, > > > > I have been working on an emulation of the dwc-otg USB controller > > (host mode only for now), as implemented on the Raspberry Pi 3 and > > below, and on numerous other embedded platforms. I have it to a point > > where it works pretty well with the dwc2 driver in the mainline Linux > > kernel, and with the dwc-otg driver in the Raspbian kernel. Mouse and > > keyboard work fine, and I *think* the usb-net device is working too, > > although I have been unsuccessful in connecting to the outside world > > with it. > > Do you have documentation of the hardware? One of the issues > we've had with this in the past is that we couldn't find the > hardare specs for the USB controller, so it was a bit difficult > to tell if a model of it was correct or not. > > thanks > -- PMM ^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below. 2020-03-10 19:00 ` Paul Zimmerman @ 2020-03-10 21:46 ` John Snow 0 siblings, 0 replies; 7+ messages in thread From: John Snow @ 2020-03-10 21:46 UTC (permalink / raw) To: Paul Zimmerman, Peter Maydell Cc: Paolo Bonzini, Philippe Mathieu-Daudé, QEMU Developers On 3/10/20 3:00 PM, Paul Zimmerman wrote: > Hi Peter, > > I used to work for Synopsys, who is the vendor for the usb-otg IP, and > am the author of the dwc2 driver in the Linux kernel (actually just a > port of the vendor driver to Linux). So I am pretty familiar with the > hardware. But I had to give up all the documentation when I left > Synopsys. So, beyond what I could find on the web (register > description and programming model), I don't have any further > documentation. > > Thanks, > Paul > That's awesome! We don't always have specs for everything, but as many (public and legal) references as you can spell out in your git commit messages, the better, for the sake of maintainers who might need to audit changes in the future (and don't have your expertise.) Correlating things against the kernel driver will probably be plenty good enough, I'd hope -- if the driver winds up having a bug against real hardware we'd hope to see it in the wild, so it should be safe to reference against. (This is a bit of the snake eating its own tail but sometimes we just don't have better.) I wasn't aware you were the author of the kernel driver too. Now I'm convinced it'd be a shame if you didn't at least post a v1! --js ^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2020-03-10 21:50 UTC | newest] Thread overview: 7+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2020-03-07 0:34 Any interest in dwc-otg (aka dwc2) device emulation? For Raspi 3 and below Paul Zimmerman 2020-03-10 2:23 ` John Snow 2020-03-10 3:15 ` Paul Zimmerman 2020-03-10 9:52 ` Stefan Hajnoczi 2020-03-10 9:26 ` Peter Maydell 2020-03-10 19:00 ` Paul Zimmerman 2020-03-10 21:46 ` John Snow
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).