Discussion:
[flashrom] USB 3 PCI Card support (request to add device)
Philipp Post
2013-01-24 18:23:26 UTC
Permalink
Good day,

following configuration:

- USB 3 PCI (not PCI-Express) card with RENESAS uPD720200A(Revision 4) USB
chip
and ATMEL AT25F512B (ATMEL 1138, 25F512B, SSH) rom chip in
- IBM NetVista 8305 Desktop PC - built year 2003

The issue with the card is that it needs a flash rom update to work with
Windows Vista and up, otherwise the device does not work at all in these OS
("device cannot start"). Windows XP with Renesas drivers and Linux Ubuntu
11.3 out of the box works fine.

RENESAS has a rom update for the chip and a flash update tool which however
does not work with PCI cards, but just chips soldered to mainboards. At
least this seems to me the reason why it does not work. Chip is recognized
but the RENESAS tool says "Can not load / access firmware". The tool has the
option to change the device / vendor id as well via .ini file.

The card used is the only PCI USB 3 card on the market and basically works
very well when it works - with max PCI speed of course, which means approx.
double speed of USB 2. The card exists in hardware version 1 (RENESAS chip
uPD720200A) and 2 (RENESAS chip uPD720202). I do just have access to
hardware version 1. The name of the manufacturer behind the card is unknown
to me, but it could be an ADDONICS product. I do not have a technical
drawing of the card and I fear I can not obtain one but I do have the card
itself.

My question: would it be possible to incorporate this card into flashrom?
Would be great if someone could do it as I do not have the necessary skills
to do it myself.

In case you need further information, please let me know.

Thanks in advance, brgds
Philipp



Links and further reading:
--------------------------

Card Information from different sellers (same card):
http://www.addonics.com/products/ad2u3pci.php
http://eu.startech.com/Cards-Adapters/USB-3.0/Cards/2-Port-PCI-SuperSpeed-US
B-3-Card-Adapter~PCIUSB3S2
http://www.lindy.de/premium-usb-3-karte-2-port-pci/51082.html

ATMEL rom specification (contains info how to write rom images):
www.atmel.com/Images/doc3689.pdf

Renesas USB chip information:
http://www.renesas.eu/products/soc/usb_assp/product/upd720200a/index.jsp

RENESAS rom update 4.0.2.0 with Windows updater (32 + 64 Bit) and drivers:
http://www.station-drivers.com/page/renesas.htm
We need: "Firmware Version 4.0.2.0 pour uPD720200a"

RENESAS MS DOS flash update tool (which did not do the job):
http://www.computerbase.de/forum/attachment.php?attachmentid=283282&d=133832
3319

IBM NetVista 8305 Hardware Maintenance Manual:
http://download.lenovo.com/ibmdl/pub/pc/pccbbs/netvista_pdf/24p2969.pdf

Hardware Ids:
Renesas Electronics USB 3.0 Host Controller:
PCI\VEN_1033&DEV_0194&SUBSYS_01941033&REV_04\5&25043F3&0&0048F0

Renesas Electronics USB 3.0 Root Hub
NUSB3\ROOT_HUB30\6&2D374EF3&2
Philipp Post
2013-01-26 15:18:48 UTC
Permalink
I have added some flashrom and linux logs which might be helpfull:

The USB 3 PCI card has the following system properties:
DRIVER=xhci_hcd
PCI_CLASS=C0330
PCI_ID=1033:0194
PCI_SUBSYS_ID=1033:0194
PCI_SLOT_NAME=0000:03:00.0
MODALIAS=pci:v00001033d00000194sv00001033sd00000194bc0Csc03i30

There is also a PCI NIC Intel 82541PI Gigabit Ethernet Controller
(8086:107c, BDF 02:0a.0) and a PCI soundcard installed.

Tried to read the flash rom out of the 82541PI Intel NIC without problems.
/sys/bus/pci/devices/0000:02:0a.0 of the Intel NIC also gives access to
"rom" which the USB 3 and the soundcard do not. I am not sure if that means
that the rom is not accessible at all or if Ubuntu just does not know how.

Thanks in advance, brgds
Philipp


-----Ursprüngliche Nachricht-----
Von: Philipp Post [mailto:***@googlemail.com]
Gesendet: Donnerstag, 24. Januar 2013 19:23
An: '***@flashrom.org'
Betreff: USB 3 PCI Card support (request to add device)

Good day,

following configuration:

- USB 3 PCI (not PCI-Express) card with RENESAS uPD720200A(Revision 4) USB
chip
and ATMEL AT25F512B (ATMEL 1138, 25F512B, SSH) rom chip in
- IBM NetVista 8305 Desktop PC - built year 2003

The issue with the card is that it needs a flash rom update to work with
Windows Vista and up, otherwise the device does not work at all in these OS
("device cannot start"). Windows XP with Renesas drivers and Linux Ubuntu
11.3 out of the box works fine.

RENESAS has a rom update for the chip and a flash update tool which however
does not work with PCI cards, but just chips soldered to mainboards. At
least this seems to me the reason why it does not work. Chip is recognized
but the RENESAS tool says "Can not load / access firmware". The tool has the
option to change the device / vendor id as well via .ini file.

The card used is the only PCI USB 3 card on the market and basically works
very well when it works - with max PCI speed of course, which means approx.
double speed of USB 2. The card exists in hardware version 1 (RENESAS chip
uPD720200A) and 2 (RENESAS chip uPD720202). I do just have access to
hardware version 1. The name of the manufacturer behind the card is unknown
to me, but it could be an ADDONICS product. I do not have a technical
drawing of the card and I fear I can not obtain one but I do have the card
itself.

My question: would it be possible to incorporate this card into flashrom?
Would be great if someone could do it as I do not have the necessary skills
to do it myself.

In case you need further information, please let me know.

Thanks in advance, brgds
Philipp



Links and further reading:
--------------------------

Card Information from different sellers (same card):
http://www.addonics.com/products/ad2u3pci.php
http://eu.startech.com/Cards-Adapters/USB-3.0/Cards/2-Port-PCI-SuperSpeed-US
B-3-Card-Adapter~PCIUSB3S2
http://www.lindy.de/premium-usb-3-karte-2-port-pci/51082.html

ATMEL rom specification (contains info how to write rom images):
www.atmel.com/Images/doc3689.pdf

Renesas USB chip information:
http://www.renesas.eu/products/soc/usb_assp/product/upd720200a/index.jsp

RENESAS rom update 4.0.2.0 with Windows updater (32 + 64 Bit) and drivers:
http://www.station-drivers.com/page/renesas.htm
We need: "Firmware Version 4.0.2.0 pour uPD720200a"

RENESAS MS DOS flash update tool (which did not do the job):
http://www.computerbase.de/forum/attachment.php?attachmentid=283282&d=133832
3319

IBM NetVista 8305 Hardware Maintenance Manual:
http://download.lenovo.com/ibmdl/pub/pc/pccbbs/netvista_pdf/24p2969.pdf

Hardware Ids:
Renesas Electronics USB 3.0 Host Controller:
PCI\VEN_1033&DEV_0194&SUBSYS_01941033&REV_04\5&25043F3&0&0048F0

Renesas Electronics USB 3.0 Root Hub
NUSB3\ROOT_HUB30\6&2D374EF3&2
Stefan Tauner
2013-02-03 10:24:07 UTC
Permalink
On Sat, 26 Jan 2013 16:18:48 +0100
Philipp Post <***@googlemail.com> wrote:

hello philipp
Post by Philipp Post
Gesendet: Donnerstag, 24. Januar 2013 19:23
Betreff: USB 3 PCI Card support (request to add device)
Good day,
- USB 3 PCI (not PCI-Express) card with RENESAS uPD720200A(Revision 4) USB
chip
and ATMEL AT25F512B (ATMEL 1138, 25F512B, SSH) rom chip in
flashrom supports the chip in the current version. but the flash
interface of the renesas chip does not give full access to the chip
anyway, so that is not needed anyway (see below).
Post by Philipp Post
- IBM NetVista 8305 Desktop PC - built year 2003
The issue with the card is that it needs a flash rom update to work with
Windows Vista and up, otherwise the device does not work at all in these OS
("device cannot start"). Windows XP with Renesas drivers and Linux Ubuntu
11.3 out of the box works fine.
RENESAS has a rom update for the chip and a flash update tool which however
does not work with PCI cards, but just chips soldered to mainboards. At
least this seems to me the reason why it does not work. Chip is recognized
but the RENESAS tool says "Can not load / access firmware". The tool has the
option to change the device / vendor id as well via .ini file.
stupid question... but this sounds a bit as if it could not find the
file, maybe that's the problem?
you say the tool detects the chip... which one? the uPD720200A or the
AT25F512B?
Post by Philipp Post
The card used is the only PCI USB 3 card on the market and basically works
very well when it works - with max PCI speed of course, which means approx.
double speed of USB 2. The card exists in hardware version 1 (RENESAS chip
uPD720200A) and 2 (RENESAS chip uPD720202). I do just have access to
hardware version 1. The name of the manufacturer behind the card is unknown
to me, but it could be an ADDONICS product. I do not have a technical
drawing of the card and I fear I can not obtain one but I do have the card
itself.
drawings won't help much anyway :) if at all we would need you to test
our code on the real hardware.
Post by Philipp Post
My question: would it be possible to incorporate this card into flashrom?
Would be great if someone could do it as I do not have the necessary skills
to do it myself.
i had to create an account on renesas' website to get the datasheet and
a few other documents. they are quite informative in general but there
is very little detail about the SPI interface unfortunately. OTOH the
datasheet of the uPD720202 describes the SPI and firmware access in
detail and from what i have seen i would presume that it is at least
very similar to the 200A interface.

so to answer your question: yes, adding support is probably possible.
the interface is not very nice to work with, because it does not give
direct access to the SPI bus and hence it would not be a nice generic
SPI flash controller (like the intel nics are), but reading and writing
firmware should be possible to get working.

i dont think any of the regulars here will be motivated to try though
and i do not presume that you would like to hire someone to do it? :)
Post by Philipp Post
In case you need further information, please let me know.
please send us the output of lspci -nnxxxvv -d 1033:0194
Post by Philipp Post
[…]
Tried to read the flash rom out of the 82541PI Intel NIC without problems.
/sys/bus/pci/devices/0000:02:0a.0 of the Intel NIC also gives access to
"rom" which the USB 3 and the soundcard do not. I am not sure if that means
that the rom is not accessible at all or if Ubuntu just does not know how.
i dont know for sure but i guess that's not the full rom anyway and it
is probably read-only. flashrom does not care anyway.
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
Philipp Post
2013-02-03 17:11:43 UTC
Permalink
Hello Stefan,

thanks for your message and taking the time to look into this.
Post by Stefan Tauner
stupid question... but this sounds a bit as if it could not find the
file, maybe that's the problem?
you say the tool detects the chip... which one? the uPD720200A or the
AT25F512B? <<

I have checked this already and tried the Windows and DOS versions of the
tool. I tried up- and download of firmware, but both end up with "cannot
load firmware" or error 9 which apparently means the same = no access to the
firmware. The tool reports that it detects the RENESAS uPD720200A not the
ATMEL AT25F512B however.

I do assume that the tool cannot handle PCI access, but motherboards only -
and maybe PCIe cards.

This card has also a PERICOM PCIe to PCI bridge on it. Apparently the
RENESAS chip needs PCIe to work with, which is translated back to the
motherboard's PCI slot with this bridge:
02:09.0 PCI bridge [0604]: Pericom Semiconductor Device [12d8:e111] (rev 02)
Post by Stefan Tauner
if at all we would need you to test our code on the real hardware.<<
Appreciate to do this. I do have the flashrom source code on the Ubuntu
installation. I did a successful build already ("make install"). - But I do
not have experience in C programming, just in VB, VBA and SQL.
Post by Stefan Tauner
i had to create an account on renesas' website to get the datasheet and a
few other documents. they are quite informative in general but there is very
little detail about the SPI interface unfortunately. OTOH the datasheet of
the uPD720202 describes the SPI and firmware access in detail and from what
i have seen i would presume that it is at least very similar to the 200A
interface. <<

To be honest, I am not sure and looked at the papers there as well with the
same result. The uPD720200 and uPD720200A seem to be NEC chips which RENESAS
inherited when they took over NEC. The newer devices are developed by
Renesas themselves I guess. uPD720200 and uPD720200A are closer to each
other where uPD720200A has improved power management. Maybe RENESAS just
provides the rom programming papers for uPD720200A on request, however I did
not ask yet.
Post by Stefan Tauner
so to answer your question: yes, adding support is probably possible.
the interface is not very nice to work with, because it does not give direct
access to the SPI bus and hence it would not be a nice generic SPI flash
controller (like the intel nics are), but reading and writing firmware
should be possible to get working.
i dont think any of the regulars here will be motivated to try though and i
do not presume that you would like to hire someone to do it? :) <<

That would not make much sense to fix a 40 EUR device indeed. Nevertheless I
think adding support to fix the RENESAS USB 3 chips would provide additional
value to flashrom as I see much trouble reports also for mainboards (from
Asus and others) on the web. I would be willing to give a moderate donnation
to the flashrom project if things could be fixed successfully but this will
certainly not pay the time of anyone.

What about creating a simple patch which shows if we could access the
firmware at all and stop there if it does not work?
Post by Stefan Tauner
please send us the output of lspci -nnxxxvv -d 1033:0194 <<
output of lspci -nnxxxvv -d 1033:0194
03:00.0 USB Controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host
Controller [1033:0194] (rev 04) (prog-if 30 [XHCI])
Subsystem: NEC Corporation uPD720200 USB 3.0 Host Controller
[1033:0194]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 21
Region 0: Memory at a0300000 (64-bit, non-prefetchable) [size=8K]
Capabilities: <access denied>
Kernel driver in use: xhci_hcd
Kernel modules: xhci-hcd
00: 33 10 94 01 06 05 10 00 04 30 03 0c 08 00 00 00
10: 04 00 30 a0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 94 01
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 01 00 00



Thanks + brgds
Philipp Post
Stefan Tauner
2013-02-04 13:16:55 UTC
Permalink
On Sun, 3 Feb 2013 18:11:43 +0100
Post by Philipp Post
What about creating a simple patch which shows if we could access the
firmware at all and stop there if it does not work?
the lspci output might indicate exactly that. it would be nice if you
could mail renesas and ask them for differences in the
firmware/flash access procedures between the uPD720200A and the
uPD720201/uPD720202. if they are equal we might come up with something...
Post by Philipp Post
Post by Stefan Tauner
please send us the output of lspci -nnxxxvv -d 1033:0194 <<
run it as root please; else not the complete config space dump will be
produced :)
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
Philipp Post
2013-02-05 20:02:06 UTC
Permalink
Stefan,
it would be nice if you could mail renesas and ask them for differences
in the firmware/flash access procedures between the uPD720200A and the
uPD720201/uPD720202. if they are equal we might come up with something...<<

Renesas replied the following:
"Renesas cannot assist or support such an effort. In addition, the
programming interface for the uPD720200 and uPD720200A is different from the
uPD720202, needs different programming tools, and relies on proprietary chip
features that cannot be disclosed outside of Renesas."
please send us the output of lspci -nnxxxvv -d 1033:0194
run it as root please; else not the complete config space dump will be
produced :) <<


***@PC02: lspci -nnxxxvv -d 1033:0194
03:00.0 USB Controller [0c03]: NEC Corporation uPD720200 USB 3.0 Host
Controller [1033:0194] (rev 04) (prog-if 30 [XHCI])
Subsystem: NEC Corporation uPD720200 USB 3.0 Host Controller
[1033:0194]
Control: I/O- Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
Stepping- SERR+ FastB2B- DisINTx+
Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
<TAbort- <MAbort- >SERR- <PERR- INTx-
Latency: 0, Cache Line Size: 32 bytes
Interrupt: pin A routed to IRQ 21
Region 0: Memory at a0300000 (64-bit, non-prefetchable) [size=8K]
Capabilities: [50] Power Management version 3
Flags: PMEClk- DSI- D1- D2- AuxCurrent=0mA
PME(D0+,D1-,D2-,D3hot+,D3cold-)
Status: D0 NoSoftRst+ PME-Enable- DSel=0 DScale=0 PME-
Capabilities: [70] MSI: Enable- Count=1/8 Maskable- 64bit+
Address: 0000000000000000 Data: 0000
Capabilities: [90] MSI-X: Enable+ Count=8 Masked-
Vector table: BAR=0 offset=00001000
PBA: BAR=0 offset=00001080
Capabilities: [a0] Express (v2) Endpoint, MSI 00
DevCap: MaxPayload 128 bytes, PhantFunc 0, Latency L0s
unlimited, L1 unlimited
ExtTag- AttnBtn- AttnInd- PwrInd- RBE+ FLReset-
DevCtl: Report errors: Correctable- Non-Fatal- Fatal-
Unsupported-
RlxdOrd- ExtTag- PhantFunc- AuxPwr- NoSnoop+
MaxPayload 128 bytes, MaxReadReq 512 bytes
DevSta: CorrErr+ UncorrErr- FatalErr- UnsuppReq+ AuxPwr-
TransPend-
LnkCap: Port #0, Speed 5GT/s, Width x1, ASPM L0s L1, Latency
L0 <4us, L1 unlimited
ClockPM+ Surprise- LLActRep- BwNot-
LnkCtl: ASPM Disabled; RCB 64 bytes Disabled- Retrain-
CommClk-
ExtSynch- ClockPM+ AutWidDis- BWInt- AutBWInt-
LnkSta: Speed 2.5GT/s, Width x1, TrErr- Train- SlotClk+
DLActive- BWMgmt- ABWMgmt-
DevCap2: Completion Timeout: Not Supported, TimeoutDis+
DevCtl2: Completion Timeout: 50us to 50ms, TimeoutDis-
LnkCtl2: Target Link Speed: 5GT/s, EnterCompliance-
SpeedDis-, Selectable De-emphasis: -6dB
Transmit Margin: Normal Operating Range,
EnterModifiedCompliance- ComplianceSOS-
Compliance De-emphasis: -6dB
LnkSta2: Current De-emphasis Level: -3.5dB
Kernel driver in use: xhci_hcd
Kernel modules: xhci-hcd
00: 33 10 94 01 06 05 10 00 04 30 03 0c 08 00 00 00
10: 04 00 30 a0 00 00 00 00 00 00 00 00 00 00 00 00
20: 00 00 00 00 00 00 00 00 00 00 00 00 33 10 94 01
30: 00 00 00 00 50 00 00 00 00 00 00 00 0b 01 00 00
40: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
50: 01 70 03 48 08 00 00 00 00 00 00 00 00 00 00 00
60: 30 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00
70: 05 90 86 00 00 00 00 00 00 00 00 00 00 00 00 00
80: 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
90: 11 a0 07 80 00 10 00 00 80 10 00 00 00 00 00 00
a0: 10 00 02 00 c0 8f 00 00 00 28 09 00 12 ec 07 00
b0: 00 01 11 10 00 00 00 00 00 00 00 00 00 00 00 00
c0: 00 00 00 00 10 08 00 00 00 00 00 00 00 00 00 00
d0: 02 00 01 00 00 00 00 00 00 00 00 00 00 00 00 00
e0: fc 1f 00 00 00 00 00 00 00 00 00 00 00 00 00 00
f0: 08 14 60 00 00 00 00 00 00 00 00 00 00 00 00 00


Due to above, I am closing the file.

brgds

Philipp
Stefan Tauner
2013-06-13 08:56:46 UTC
Permalink
On Tue, 5 Feb 2013 21:02:06 +0100
Post by Philipp Post
Stefan,
it would be nice if you could mail renesas and ask them for differences
in the firmware/flash access procedures between the uPD720200A and the
uPD720201/uPD720202. if they are equal we might come up with something...<<
"Renesas cannot assist or support such an effort. In addition, the
programming interface for the uPD720200 and uPD720200A is different from the
uPD720202, needs different programming tools, and relies on proprietary chip
features that cannot be disclosed outside of Renesas."
i was notified that someone else implemented a DOS flasher for the
uPD720201/uPD720202 in assembler. i don't have time to look into it in
detail, but maybe the existing code (and precompiled binary) is of use
to you.
http://komposter.com.ua/content/kak-vosstanovit-proshivku-renesas-upd72020x-2013-06-03
(google translate somewhat works :)
--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner
Philipp Post
2013-06-13 19:23:50 UTC
Permalink
Stefan,

thanks a lot for letting me know.

In fact there is even source code in c available for uPD720201 / uPD720202
which comes with the firmware files from Renesas.

As Renesas said, these both are not compatible with mine and furthermore it
seems that the access problems on my device come from the PCI to PCI-Express
bride (said a technician from a seller of these cards in the US) I have put
this case aside.

For the time being I will stick to USB 2 until the manufacturers solved the
problems and most likely I will not be keen to buy hardware with Renesas
chips again.

brgds
Philipp

-----Ursprüngliche Nachricht-----
Von: Stefan Tauner [mailto:***@student.tuwien.ac.at]
Gesendet: Donnerstag, 13. Juni 2013 10:57
An: Philipp Post
Cc: ***@flashrom.org
Betreff: Re: [flashrom] USB 3 PCI Card support (request to add device)

On Tue, 5 Feb 2013 21:02:06 +0100
Post by Philipp Post
Stefan,
it would be nice if you could mail renesas and ask them for
differences
in the firmware/flash access procedures between the uPD720200A and the
uPD720201/uPD720202. if they are equal we might come up with
something...<<
"Renesas cannot assist or support such an effort. In addition, the
programming interface for the uPD720200 and uPD720200A is different
from the uPD720202, needs different programming tools, and relies on
proprietary chip features that cannot be disclosed outside of Renesas."
i was notified that someone else implemented a DOS flasher for the
uPD720201/uPD720202 in assembler. i don't have time to look into it in
detail, but maybe the existing code (and precompiled binary) is of use to
you.
http://komposter.com.ua/content/kak-vosstanovit-proshivku-renesas-upd72020x-
2013-06-03
(google translate somewhat works :)

--
Kind regards/Mit freundlichen Grüßen, Stefan Tauner

Loading...