R6220 miniPCIe mod

Hi
I'm presenting to you a simple mod to add a single mini PCIe port to the Netgear R6220 router. Maybe someone will find it useful.
Netgear R6220 is build using MT7621. The CPU itself contains one USB 2.0, one USB 3.0 (unconnected) and a single PCIe x1 port.
The CPU generates three lanes for the port, so it can be split into three physical PCIe ports. Two of them are already used for the 5GHz and 2.4GHz wireless cards. There is however another unsoldered mini PCIe connector on the board. To make use of it, you will need:

  • 1xhigh profile mini PCI-e socket (they are available on Aliexpress for instance, look for the high ones, like 6.8mm or 9mm, otherwise you will have problems inserting any card),
  • 2x0.1µF 0402 capacitors,
  • 2x0Ω 0402 resistors,
  • 2x51Ω±1% 0402 resistors preferably paired.

Steps:

  • Solder the 0Ω resistors to R81 and R85, located in the middle of the underside of the board (image),
  • Solder the 0.1µF capacitors to C131 and C132, located on the top side of the board near the CPU (image),
  • Solder on the mini PCIe connector to CON1. The location is pretty straight forward.
  • Solder the 51Ω resistors to R117 and R92, located near the first pins of the PCIe connector (image).

The locations are marked with red ellipses.
There is unfortunately no easy way to add screws, but you can use a cable tie, as I did in the pic to ensure a proper connection. Just make sure it's not too tight, as to not damage the card or the connector.
Afterwards you can see the device being enabled in the beginning of the log. The PCIe initialization log should change from:

PCIE1 no card, disable it(RST&CLK)

to:

PCIE1 enabled

The attached card should also be visible when checked for using the lspci utility:

root@Polaris:~# lspci
00:00.0 PCI bridge: Device 0e8d:0801 (rev 01)
00:01.0 PCI bridge: Device 0e8d:0801 (rev 01)
00:02.0 PCI bridge: Device 0e8d:0801 (rev 01)
01:00.0 Network controller: MEDIATEK Corp. MT7662E 802.11ac PCI Express Wireless Network Adapter
02:00.0 Network controller: Intel Corporation Centrino Advanced-N 6200 (rev 35)
03:00.0 Network controller: MEDIATEK Corp. Device 7603

The mod itself is pretty simple and easy. Unfortunately I am not so good with soldering and my soldering is abysmal. I could not use the hot air to melt the solder, because the heat was being dissipated too quickly. Any attempt to heat the board up was met with failure due to it's enormous mass. About 10s after heating up a spot for several minutes it was cool to touch. I'm guessing you have to use a heat bed to keep the temperature up constantly, however I don't have access to such tools. Instead, I used an I-type thin soldering tip, 0.5mm solder and tweezers.

What can be done with this mod is unfortunately limited: you can attach only miniPCIe devices which don't use USB pins. This means that most of the combo devices like WiFi+BT or WWAN are impossible to make work and will lack the USB part of it's functionality.
But what will work are pure PCIe devices. There are dozens of them, like USB/Ethernet controllers, SD card readers. There are also some Intel cards offering 2GB of flash memory for any of your ext-root needs. You can also add a riser with a conventional PCIe port and attach theoretically anything, when supplied with enough power. It'd be amazing to see a graphics card connected this way, though essentially pointless.
You can also attach a miniPCIe to 4x USB 3.0 controller, which is actually why I was doing this in the first place.

UPDATE: If you go for the USB 3.0, you will need to add a shield on the 2.4GHz WiFi card. Otherwise the interference from USB will make 2.4GHz nearly unusable. Luckily there is a spot to solder it on and should be enough. Unluckily, making the shield itself will require some creativity.

8 Likes

So did you ever get the USB 3.0 working?
I'm planning to attempt the same on R6260 which seems to have similar hardware.
Any already working flow might prevent potential failures.

for full functionality just solder wires from D+ D- on mpcie to some of the USB port inputs

Could you help me understand why not?

Also what about this?

You can also attach a miniPCIe to 4x USB 3.0 controller, which is actually why I was doing this in the first place.

UPDATE: If you go for the USB 3.0, you will need to add a shield on the 2.4GHz WiFi card. Otherwise the interference from USB will make 2.4GHz nearly unusable. Luckily there is a spot to solder it on and should be enough. Unluckily, making the shield itself will require some creativity.

Hello
I plan to buy this model.
Did anyone manage to run USB 3.0 without adding mPCI?
The processor supports such a question, is there a place where you should solder?
Will the device support an external USB hub?
Regards Michal

I have wondered the same. Looking at the system log, shows USB 3 being assigned bus number 2.
Edit:Looking at the underside of the board, there appears to be a slot for connector directly opposite the unused mini pcie location. it can be seen near the serial connection pins in image 207 above. (I am guessing that these may be the for USB3, since I don't see any other possibilities)
Tue Feb 25 23:15:58 2020 kern.info kernel: [ 6.645616] xhci-mtk 1e1c0000.xhci: xHCI Host Controller
Tue Feb 25 23:15:58 2020 kern.info kernel: [ 6.656301] xhci-mtk 1e1c0000.xhci: new USB bus registered, assigned bus number 2
Tue Feb 25 23:15:58 2020 kern.info kernel: [ 6.671228] xhci-mtk 1e1c0000.xhci: Host supports USB 3.0 SuperSpeed
Tue Feb 25 23:15:58 2020 kern.info kernel: [ 6.684250] usb usb2: We don't know the algorithms for LPM for this host, disabling LPM.

@CptHindsight, I made your mod and ordered mpcie to sata card from ali - https://www.aliexpress.com/item/4000594720396.html based on ASM1061 chip, but somehow it shows as ASM1062 in the system.

I have used 7 or 8 mm high slot, can't remember, but its perfect.

When installed and powered up, it takes old 2.4GHz radio address on pci (as in your lspci output) bus so it doesn't work anymore. Quick address fix in /etc/config/wireless and it works again.

SATA controller: ASMedia Technology Inc. ASM1062 Serial ATA Controller (rev 02)

The card itself works like a treat, 2.5" 5400rpm disk:

hdparm -tT /dev/sdb1

/dev/sdb1:
 Timing cached reads:   284 MB in  2.01 seconds = 141.15 MB/sec
 Timing buffered disk reads: 228 MB in  3.00 seconds =  75.95 MB/sec

3.5" 7200rpm disk:

hdparm -tT /dev/sda1

/dev/sda1:
Timing cached reads:   272 MB in  2.01 seconds = 135.48 MB/sec
Timing buffered disk reads: 280 MB in  3.01 seconds =  92.98 MB/sec

I'll be running more test tomorrow.

1 Like

So I thought that someone might find these useful. Took some time and made some tests. Even if the raw read from disk was up to 94MB/s (and the SSD if I had one probably could give even better result), the router itself is not capable of pushing that many data trough network.

4.5GB file, both disks with EXT4, OpenWrt 19.07 with luci.

File copy between two HHDs - 35MB/s
Downloading by web browser trough uhttpd - 15MB/s
smb36 - down 40-45MB/s, up 20MB/s
smb4 - down 25MB/s, up 10MB/s
ksmbd - should be faster than smb36, but I couldn't get it working.
vsftpd - down 60-65MB/s, up 25MB/s
vsftpd-tls - down 3.6MB/s, up 3.5MB/s

So the main question is - is it worth to add sata card and do all of the fine soldering? Cheap-ass sata to usb2.0 adapter was able to read with 35MB/s and smb36 was capable of 30MB/s. If its meant to be just a network drive, yeah the ftp is quite good with sata. If its meant to be DLNA server for streaming media, not so much, because this is slow anyway and won't use the extra speed.

Oh, the card just needs kmod-ata-ahci to work, nothing more.

1 Like

@floppy I don't visit this forum anymore, I have just remembered this little project and saw your amazing work. It makes me really happy that you went through all that trouble. Great job and great execution. Nice shield, nice connections, basically nice everything.

Well if I had to say... Hell no it's not worth it. :smiley: The whole project was just a proof-of-concept. Also I thought that USB 3.0 was more useful than a SATA interface. After all you can add a USB 3.0 hard drive enclosure and obtain almost SATA level speeds. That being said, USB 3.0, even with a shield, caused major interference on my router, which is why I have abandoned it eventually. I have only just recently revisited this but only because all my devices are 5GHz capable now and I could abandon 2.4GHz entirely. Hence my return to the forum.
That being said, even if this mod would have little practical value, I simply enjoy this kind of tinkering. Most of the time it is tinkering for tinkering's sake but it relaxes me and I fell like I learn a lot from projects if they bear any fruit.

I have looked into this at the very beginning. The required pins for USB 3.0 are in the second and third row from the edge of the chip. This means that there is no way of accessing them without redoing the entire PCB. Let me tell you all the options that we have:

  • Of course you could redo the entire PCB to include USB 3.0. It would only cost you way more than a new device itself.
  • You could desolder the CPU and connect to the pins with wires. However then you would have to somehow solder the CPU back to the PCB without shorting soldered wires with pins and themselves and without desoldering them from the CPU and without blocking other pins. This breaks the laws of physics and we just can't risk the jail time for it.
  • You could desolder the chip and make holes in the PCB for the required pins. Then you could resolder the chip and attach wires through the backside of the PCB. This won't work from the obvious reasons: the backside of the PCB is a mess of capacitors and traces. Even if it wasn't, the PCB is multilayer and we cannot see what else is in the way. You WILL destroy something.
  • You could create a buffer PCB. What I mean is make a PCB with pads on both sides mirroring the chip's and vias connecting them. You could then make some traces leading from pins in question and expose them to the world. This has the greatest potential for success and could actually work. However this time even I must say that this just isn't worth it. The original mod is way quicker to do.