From: Nikolai Zhubr <hidden> Date: 2012-01-07 17:31:46
Hello developers,
I'm trying to find/combine/fix a driver for Synopsys' DesignWare USB
controller. This thing is USB 2.0 host/slave/otg capable and is used in
various SoCs including Amlogic 8726M, Ralink RT305x, and probably more.
There is some code floating around, partly usable, but all I could see
for now is really not perfect. I also saw commit logs on linuxppc-dev,
but failed to find out what repository they are related to. I'd like to
know if someone is currently developing/testing/maintaining the driver
or is planning to do so in the near future (in a FOSS-friendly manner -
making development results public immediately and with eventual goal of
inclusion into mainline) in order to avoid duplicate/uncoordinated work
and waste of effort.
I'm currently examining 2 versions (That is, 2 sets of files):
1. From android kernel for 8726m-based tablets (like the one I own).
Usable to some extent, but there are issues (e.g. it looks like certain
packets get corrupted, reproducibly, relevant dumps are available)
2. From openwrt kernel for RT305x-based routers. The code looks a bit
more tidy, but not quite well updated (slave-mode parts are unused in
openwrt and they can not even be compiled for modern kernels without
certain patching; have not tried host-mode on the hardware yet)
Quite obviously both versions originated from the same code initially,
but subsequently were apparently tested/corrected/updated by separate
teams. It is not quite clear if all bugfixes were cross-applied
carefully (if at all). I was initially hoping that compare and bisect
will just do the job, but the driver is quite huge... and some files
have diverged substantially in the 2 versions, so at the moment I'm a
bit fed up and will probably resume a bit later. Meanwhile, I'd be happy
to discuss the subject with whoever interested in order to plan my
further steps.
Please CC me, I'm not subscribed to the lists.
Thank you.
Nikolai.
From: Peter Chen <hidden> Date: 2012-01-08 03:12:18
2012/1/8 Nikolai Zhubr [off-list ref]:
Hello developers,
I'm trying to find/combine/fix a driver for Synopsys' DesignWare USB
controller. This thing is USB 2.0 host/slave/otg capable and is used in
various SoCs including Amlogic 8726M, Ralink RT305x, and probably more.
There is some code floating around, partly usable, but all I could see fo=
r
now is really not perfect. I also saw commit logs on linuxppc-dev, but
failed to find out what repository they are related to. I'd like to know =
if
someone is currently developing/testing/maintaining the driver or is
planning to do so in the near future (in a FOSS-friendly manner - making
development results public immediately and with eventual goal of inclusio=
n
into mainline) in order to avoid duplicate/uncoordinated work and waste o=
f
effort.
I'm currently examining 2 versions (That is, 2 sets of files):
1. From android kernel for 8726m-based tablets (like the one I own). Usab=
le
to some extent, but there are issues (e.g. it looks like certain packets =
get
corrupted, reproducibly, relevant dumps are available)
2. From openwrt kernel for RT305x-based routers. The code looks a bit mor=
e
tidy, but not quite well updated (slave-mode parts are unused in openwrt =
and
they can not even be compiled for modern kernels without certain patching=
;
have not tried host-mode on the hardware yet)
Quite obviously both versions originated from the same code initially, bu=
t
subsequently were apparently tested/corrected/updated by separate teams. =
It
is not quite clear if all bugfixes were cross-applied carefully (if at al=
l).
I was initially hoping that compare and bisect will just do the job, but =
the
driver is quite huge... and some files have diverged substantially in the=
2
versions, so at the moment I'm a bit fed up and will probably resume a bi=
t
later. Meanwhile, I'd be happy to discuss the subject with whoever
interested in order to plan my further steps.
Please see:
http://marc.info/?l=3Dlinux-usb&m=3D129906859817430&w=3D2
I am not sure we can combine all Synopsys USB drivers to single file, but w=
e
can try combine similar IP versions to one file, this work may need all Syn=
opsys
USB IP driver maintainer work together.
Thank you.
Nikolai.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at =A0http://vger.kernel.org/majordomo-info.html
From: Nikolai Zhubr <hidden> Date: 2012-01-08 12:58:07
Hello Piter,
08.01.2012 7:12, you wrote:
2012/1/8 Nikolai Zhubr[off-list ref]:
quoted
Hello developers,
I'm trying to find/combine/fix a driver for Synopsys' DesignWare USB
controller. This thing is USB 2.0 host/slave/otg capable and is used in
various SoCs including Amlogic 8726M, Ralink RT305x, and probably more.
Ah, thanks. So sadly uncoordinated work in this area is quite common.
However, in case of Synopsys the situation is even more disappointing
because initially it _was_ a single driver! What probably lacked was
some shared repository and proper communication between developers to
stay in sync. Maybe there were also licensing issues at some point,
though currently file headers contain rather reasonable (imho)
permissive license from Synopsys.
I am not sure we can combine all Synopsys USB drivers to single file, but we
Synopsys driver which I examine consists of 16 files (each of 2
versions), 200k lines total. I've already perpared some few smaller
files for version merging. So probably it is doable, but quite a lot of
work, therefore I wouldn't like it to be wasted.
can try combine similar IP versions to one file, this work may need all Synopsys
USB IP driver maintainer work together.
Exactly. This is why I'm now trying to find all relevant people to begin
with.
Thank you.
Nikolai.
Please CC me, I'm not subscribed to the lists.
quoted
Thank you.
Nikolai.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Ah, thanks. So sadly uncoordinated work in this area is quite
common. However, in case of Synopsys the situation is even more
disappointing because initially it _was_ a single driver! What
probably lacked was some shared repository and proper communication
between developers to stay in sync. Maybe there were also licensing
issues at some point, though currently file headers contain rather
reasonable (imho) permissive license from Synopsys.
quoted
I am not sure we can combine all Synopsys USB drivers to single file, but we
Synopsys driver which I examine consists of 16 files (each of 2
versions), 200k lines total. I've already perpared some few smaller
files for version merging. So probably it is doable, but quite a lot
of work, therefore I wouldn't like it to be wasted.
I mean one file is just a common udc driver for all Synopsys, not all usb file.
For ehci, I think it will be easier to use single file as well as
some specific SoC's quirks if needed.
For udc, as there is no standard spec for how usb device should be designed,
maybe different Synopsys IPs have a little different for work flow.
For otg, it should be not difficult after we split PHY's operation
from the otg, as common otg operation is the same.
quoted
can try combine similar IP versions to one file, this work may need all Synopsys
USB IP driver maintainer work together.
Exactly. This is why I'm now trying to find all relevant people to
begin with.
I know someone(@Pengutronix and @linux.intel.com) is doing that. I think first
we should find which driver file at current code base is most capable and
compatible. I would like to help it, and verify it at Freescale i.MX SoCs.
Thank you.
Nikolai.
Please CC me, I'm not subscribed to the lists.
quoted
quoted
Thank you.
Nikolai.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
On Sun, Jan 8, 2012 at 8:56 PM, Nikolai Zhubr [off-list ref] wrote:
Hello Piter,
08.01.2012 7:12, you wrote:
quoted
2012/1/8 Nikolai Zhubr[off-list ref]:
quoted
Hello developers,
I'm trying to find/combine/fix a driver for Synopsys' DesignWare USB
controller. This thing is USB 2.0 host/slave/otg capable and is used in
various SoCs including Amlogic 8726M, Ralink RT305x, and probably more.
Ah, thanks. So sadly uncoordinated work in this area is quite common.
However, in case of Synopsys the situation is even more disappointing
because initially it _was_ a single driver! What probably lacked was some
shared repository and proper communication between developers to stay in
sync. Maybe there were also licensing issues at some point, though currently
file headers contain rather reasonable (imho) permissive license from
Synopsys.
I think the challenge of cooperation in situation like this is that
most companies don't like to advertise the source of the licensed IP
block. Even the owner of the IP block doesn't list all users of the
block(maybe business requirement). It was really hard to find out if
the same IP has been used by anyone else. Also the owner of this USB
IP block has been changed for several times(ARC, TDI, ChipIdea, and
Synopsys) which made it even more difficult to tell.
quoted
I am not sure we can combine all Synopsys USB drivers to single file, but
we
Synopsys driver which I examine consists of 16 files (each of 2 versions),
200k lines total. I've already perpared some few smaller files for version
merging. So probably it is doable, but quite a lot of work, therefore I
wouldn't like it to be wasted.
I didn't examine the Synopsys driver myself. But if it is so complex
as you described, it might be better to start with the in-tree drivers
IMO.
- Leo
From: Nikolai Zhubr <hidden> Date: 2012-01-09 12:36:57
Hello Peter,
09.01.2012 6:12, Peter Chen:
quoted
quoted
I am not sure we can combine all Synopsys USB drivers to single file, but we
Synopsys driver which I examine consists of 16 files (each of 2
versions), 200k lines total. I've already perpared some few smaller
files for version merging. So probably it is doable, but quite a lot
of work, therefore I wouldn't like it to be wasted.
I mean one file is just a common udc driver for all Synopsys, not all usb file.
For ehci, I think it will be easier to use single file as well as
some specific SoC's quirks if needed.
For udc, as there is no standard spec for how usb device should be designed,
maybe different Synopsys IPs have a little different for work flow.
For otg, it should be not difficult after we split PHY's operation
from the otg, as common otg operation is the same.
quoted
quoted
can try combine similar IP versions to one file, this work may need all Synopsys
USB IP driver maintainer work together.
Exactly. This is why I'm now trying to find all relevant people to
begin with.
I know someone(@Pengutronix and @linux.intel.com) is doing that. I think first
we should find which driver file at current code base is most capable and
compatible. I would like to help it, and verify it at Freescale i.MX SoCs.
Ok. Because my resources are limited (and my knowledge is actually
limited too) I'll list what exactly I'm able (and willing) to do:
- split formatting/naming/uninteresting changes from algorythmical
changes, prepare clean diffs as necessary (boring work, but anyway);
- bisect changes which make the driver stop working on my tablet;
- try whichever driver parameters and see what happens to my tablet;
- connect the tablet to a regular linux PC with USB cable, do some
tests, capture traffic dumps as necessary;
- connect some devices to the tablet, do tests, report results;
and with some luck:
- prepare bufixes (depending very much on how simple is the bug).
So basically my effort would probably only be usefull in cooperation
with someone with more knowledge and understanding of the situation in
whole. Otherwise it would be more wasting of time.
If usb issues were solved, it might make some sense to try to create
e.g. a generic openwrt target for 8726m-based tablet. (Of course it
wouldn't allow to use the device for its intended purpose yet, but still
might be interesting as kind of devel/testing reference option)
Thank you.
Nikolai.
quoted
Thank you.
Nikolai.
Please CC me, I'm not subscribed to the lists.
quoted
quoted
Thank you.
Nikolai.
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
From: Nikolai Zhubr <hidden> Date: 2012-01-09 12:39:02
Hello Leo,
09.01.2012 9:17, Leo Li:
On Sun, Jan 8, 2012 at 8:56 PM, Nikolai Zhubr[off-list ref] wrote:
quoted
quoted
2012/1/8 Nikolai Zhubr[off-list ref]:
quoted
Hello developers,
I'm trying to find/combine/fix a driver for Synopsys' DesignWare USB
controller. This thing is USB 2.0 host/slave/otg capable and is used in
various SoCs including Amlogic 8726M, Ralink RT305x, and probably more.
[...trim...]
I think the challenge of cooperation in situation like this is that
most companies don't like to advertise the source of the licensed IP
block. Even the owner of the IP block doesn't list all users of the
block(maybe business requirement). It was really hard to find out if
the same IP has been used by anyone else. Also the owner of this USB
IP block has been changed for several times(ARC, TDI, ChipIdea, and
Synopsys) which made it even more difficult to tell.
Ah, I see. It explains.
But communicating in private and keeping some public repository up to
date would still be allowed I suppose?
quoted
quoted
I am not sure we can combine all Synopsys USB drivers to single file, but
we
Synopsys driver which I examine consists of 16 files (each of 2 versions),
200k lines total. I've already perpared some few smaller files for version
merging. So probably it is doable, but quite a lot of work, therefore I
wouldn't like it to be wasted.
I didn't examine the Synopsys driver myself. But if it is so complex
as you described, it might be better to start with the in-tree drivers
IMO.
Unfortunately its far beyond my capabilities at the moment. Besides, it
looks like huge effort has already been invested into the existing
driver, so to me it seems fixing it rather than starting from scratch
would be more realistic anyway (unless a company with unlimited
resources step in...)
Thank you.
Nikolai.