
First you remove the parts which are marked in the pictures. They basically are all the SW1 pull down resistors on the back of the board and the SW1 capacitors on the front of the board. After this you wire all the pins as described under general pinout to the SD card. You have to add a ~10kΩ resistor between SW1.1 and SW1.3 to pull the DO signal high while no card is inserted.
Compile your OpenWRT with this patchset.
To apply the patches, execute the following in your OpenWRT root folder:
svn mkdir target/linux/atheros/files/include/asm-mips/mach-atheros/ar5312
svn mkdir target/linux/atheros/files/include/asm-mips/mach-atheros/ar5315
svn mv target/linux/atheros/files/arch/mips/atheros/ar5312/ar5312.h target/linux/atheros/files/include/asm-mips/mach-atheros/ar5312/
svn mv target/linux/atheros/files/arch/mips/atheros/ar5315/ar5315.h target/linux/atheros/files/include/asm-mips/mach-atheros/ar5315/
svn mv target/linux/atheros/files/arch/mips/atheros/ar531x.h target/linux/atheros/files/include/asm-mips/mach-atheros/
wget -q -O - --no-check-certificate 'https://dev.openwrt.org/attachment/ticket/1861/01-atheros-move-headers.patch?format=raw' | patch -p0
wget -q -O - --no-check-certificate 'https://dev.openwrt.org/attachment/ticket/1861/02-atheros-generic-gpio.patch?format=raw' | patch -p0
wget -q -O - --no-check-certificate 'https://dev.openwrt.org/attachment/ticket/1861/03-atheros-gpiodev.patch?format=raw' | patch -p0
wget -q -O - --no-check-certificate 'https://dev.openwrt.org/attachment/ticket/1861/04-gpioctl-for-atheros.patch?format=raw' | patch -p0
Keep in mind that you have to fully recompile your kernel for this to work, so remove the directory build_dir/linux-atheros/linux-<version> before compiling to make sure the kernel sources have the right patches applied.
In OpenWRT you will need to select these options:
Kernel modules|Other modules|kmod-mmc-over-gpioUtilities|gpioctl (useful for testing)
After you installed kmod-mmc-over-gpio, edit the file /etc/init.d/mmc_over_gpio like this:
# before this line:add_device "default" 5 4 3 7 0add_device "fonera" 1 3 4 7 0
Restart your system and your SD card should work.
Note that the PIN assignment is compatible with the other SD card mods I've seen, so if this doesn't work, try them.
| SD Pin (1-based) | SPI signal | GPIO (0-based) | SW1.x Pin (0-based) | Description |
| 2 | DI | 1 | SW1.5 | Wire directly to your SD cards PIN 2 |
| 7 | DO | 3 | SW1.1 PU 10kΩ | Wire directly to your SD cards PIN 7 and add a 10kΩ pull up resistor between this signal and SW1.3 (+3.3V) |
| 5 | CLK | 4 | SW1.2 | Wire directly to your SD cards PIN 5 |
| 1 | CS | 7 | SW1.6 | Wire directly to your SD cards PIN 1 |
| 4 | +3.3V | SW1.3 | Wire directly to your SD cards PIN 4 | |
| 3 | GND | Wire together with PIN 6 to the next ground connection | ||
| 6 | GND | Wire together with PIN 3 to the next ground connection |
![]() |
|