OpenWrt Forum Archive

Topic: Dir-300 B1 MMC Hack

The content of this topic has been archived between 7 Apr 2018 and 18 Apr 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hello, I have a dir-300 B1 identical to this: http://wiki.openwrt.org/_media/toh/d-link/img_4337.jpg?w=400
I would like to add a MMC to my device, I found this tutorial: http://tinyhack.com/2010/04/04/d-link-d … nd-sd-mod/
but the hardward is a little bit different: http://farm3.static.flickr.com/2766/4488923533_3351855dae.jpg.

Someone managed to get it working on a device identical to mine?

Thanks
Gallochri

(Last edited by gallochri on 21 May 2012, 20:36)

Anyone had any success with this?

I connected GPIO as follows:

option 'DI_pin' '9' - Green Power LED
option 'DO_pin' '8' - Amber Power LED
option 'CLK_pin' '13' - WPS LED
option 'CS_pin' '0' - WPS Button

I also removed button and led modules from kernel, so I can change state of LEDs and read button status from GPIO control and nothing is using/blocking those GPIO.

When I start /etc/init.d/mmc_over_gpio LEDs blinks for a moment. But some errors shows in dmesg:

root@OpenWrt:/etc/config# /etc/init.d/mmc_over_gpio start
configfs on /config type configfs (rw,relatime)
[  876.240000] gpio-mmc: Failed to request mmc_spi module.
[  876.260000] spi-gpio spi-gpio.5: master is unqueued, this is deprecated
[  876.270000] mmc_spi spi32761.0: ASSUMING 3.2-3.4 V slot power
[  879.310000] mmc_spi spi32761.0: setup: unsupported mode bits 4
[  879.320000] mmc_spi spi32761.0: can't change chip-select polarity
[  879.350000] mmc_spi spi32761.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
[  879.360000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=8, clk=13, cs=0
[  879.380000] mmc0: host doesn't support card's voltages
[  879.390000] mmc0: error -22 whilst initialising SDIO card
[  879.410000] mmc0: host doesn't support card's voltages
[  879.420000] mmc0: error -22 whilst initialising SD card
[  879.430000] mmc0: host doesn't support card's voltages
[  879.440000] mmc0: error -22 whilst initialising MMC card

Here is also lsmod output:

root@OpenWrt:/etc/config# lsmod
Module                  Size  Used by    Tainted: G
gpiommc                 3600  2
spi_gpio_old            2192  1 gpiommc
spi_gpio                3744  0
spi_bitbang             2848  2 spi_gpio_old,spi_gpio
mmc_spi                 7728  0
mmc_block              14976  0
mmc_core               58640  2 mmc_spi,mmc_block
dwc_otg                58432  0
pppoe                   7488  0
pppox                   1120  1 pppoe
ppp_async               5984  0
ppp_generic            18880  3 pppoe,pppox,ppp_async
slhc                    4144  1 ppp_generic
lib80211_crypt_tkip     6240  0
lib80211_crypt_ccmp     3472  0
lib80211_crypt_wep      1888  0
lib80211                2560  3 lib80211_crypt_tkip,lib80211_crypt_ccmp,lib80211_crypt_wep
usbcore                96768  1 dwc_otg
usb_common               480  1 usbcore
nls_base                4672  1 usbcore
crc7                     672  1 mmc_spi
crc_itu_t                944  1 mmc_spi
crc_ccitt                944  1 ppp_async
cfg80211              146656  0
compat                  1792  5 lib80211_crypt_tkip,lib80211_crypt_ccmp,lib80211_crypt_wep,lib80211,cfg80211
input_polldev           1696  0
input_core             19984  1 input_polldev

I tried to change GPIO order but always with this same effect.

I aslo noticed that GPIO levels are 'reversed' - when I set value to 0 LED is on and off when set to 1.  This same with button - when pressed is 0 and not pressed 1. Is it OK?

I will be very grateful for your help with this issue.

----------- Added:

Some progress.. I removed LEDs - WPS and Power. Also rearrange connections and change to smaller SD CARD - it is detected now, but I have problems with errors:

[   15.810000] gpio-mmc: Failed to request mmc_spi module.
[   15.830000] spi-gpio spi-gpio.0: master is unqueued, this is deprecated
[   15.840000] mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
[   15.870000] mmc_spi spi32766.0: setup: unsupported mode bits 4
[   15.880000] mmc_spi spi32766.0: can't change chip-select polarity
[   15.910000] mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
[   15.920000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=0, clk=13, cs=8
[   16.230000] mmc0: host does not support reading read-only switch. assuming write-enable.
[   16.240000] mmc0: new SD card on SPI
[   16.270000] mmcblk0: mmc0:0000 SA01G 956 MiB
[   16.340000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.360000] mmcblk0: retrying using single block read
[   16.430000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.450000] end_request: I/O error, dev mmcblk0, sector 0
[   16.550000] Buffer I/O error on device mmcblk0, logical block 0
[   16.640000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.660000] mmcblk0: retrying using single block read
[   16.720000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.740000] end_request: I/O error, dev mmcblk0, sector 0
[   16.800000] Buffer I/O error on device mmcblk0, logical block 0
[   16.860000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.880000] mmcblk0: retrying using single block read
[   16.930000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.950000] end_request: I/O error, dev mmcblk0, sector 0
[   17.010000] Buffer I/O error on device mmcblk0, logical block 0
[   17.020000]  mmcblk0: unable to read partition table

Any ideas?

----------------- Added:

DONE!

Changed GPIOs to

Data Input = GPIO9 (Green Power LED)
Data Output = GPIO13 (WPS LED)
Clock = GPIO8 (Amber Power LED)
ChipSel = GPIO0 (WPS Switch)

[   31.250000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0
[   31.370000] mmc0: host does not support reading read-only switch. assuming write-enable.
[   31.380000] mmc0: new SD card on SPI
[   31.410000] mmcblk0: mmc0:0000 SA01G 956 MiB
[   31.530000]  mmcblk0: p1

Everything works fine. I think, that debouncing circuits on GPIO0 and GPIO10 mess a little, but they are OK for CS line. I removed LEDs and don't know how it works with them.

(Last edited by podly on 20 Dec 2012, 00:27)

Sorry, but could you show screen where this GPIOs situated on plate? thx
P/s my english is bad(

Sure,

https://dl.dropbox.com/u/101429500/dir300b1.jpg

yellow = ChipSel = GPIO0
purple = Data Output = GPIO13 (WPS LED)
green = Data Input = GPIO9 (Green Power LED)
blue = Clock = GPIO8 (Amber Power LED)

(green and blue can be swapped - I don't remember which is which)

yellow and green pair together = power supply 3.3V.

cheers,

(Last edited by podly on 20 Dec 2012, 00:10)

THNX!!! Iam try this shem

Ok, i try it, but it didnt work for me. What i do wrong?

/etc/init.d/mmc_over_gpio start output

root@OpenWrt:~# /etc/init.d/mmc_over_gpio start
configfs on /config type configfs (rw,relatime)
root@OpenWrt:~# sh: write error: Device or resource busy

lsmod output

root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: G  
gpiommc                 3600  2 
spi_gpio_old            2192  1 gpiommc
spi_bitbang             2848  1 spi_gpio_old
mmc_spi                 7728  0 
mmc_block              14624  0 
mmc_core               58224  2 mmc_spi,mmc_block
nf_nat_irc               816  0 
nf_conntrack_irc        2480  1 nf_nat_irc
nf_nat_ftp               992  0 
nf_conntrack_ftp        4448  1 nf_nat_ftp
ipt_MASQUERADE           976  1 
iptable_nat             2528  1 
nf_nat                 10368  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
pppoe                   7504  0 
xt_conntrack            2080  3 
xt_CT                   1216  0 
xt_NOTRACK               448  0 
iptable_raw              560  1 
xt_state                 608  0 
nf_conntrack_ipv4       4368  6 iptable_nat,nf_nat
nf_defrag_ipv4           640  1 nf_conntrack_ipv4
nf_conntrack           38096 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
pppox                   1152  1 pppoe
ipt_REJECT              1680  2 
xt_TCPMSS               2560  1 
ipt_LOG                 6096  0 
xt_comment               400  0 
xt_multiport            1120  0 
xt_mac                   528  0 
xt_limit                 944  1 
iptable_mangle           816  1 
iptable_filter           592  1 
ip_tables               8848  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1616  4 
x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               5984  0 
ppp_generic            18880  3 pppoe,pppox,ppp_async
slhc                    4144  1 ppp_generic
ext4                  230176  0 
jbd2                   37776  1 ext4
mbcache                 3504  1 ext4
rt2800pci               5264  0 
rt2800lib              47392  1 rt2800pci
rt2x00soc               1136  1 rt2800pci
rt2x00pci               1824  1 rt2800pci
rt2x00lib              28752  4 rt2800pci,rt2800lib,rt2x00soc,rt2x00pci
mac80211              250128  3 rt2800lib,rt2x00soc,rt2x00lib
nls_base                4672  0 
crc7                     672  1 mmc_spi
crc16                    944  1 ext4
crc_itu_t                944  1 mmc_spi
crc_ccitt                944  2 ppp_async,rt2800lib
eeprom_93cx6            1632  0 
cfg80211              153616  2 rt2x00lib,mac80211
compat                  4576  3 rt2800pci,mac80211,cfg80211
arc4                     768  2 
aes_generic            29600  0 
crypto_algapi           9216  2 arc4,aes_generic
leds_gpio               1552  0 
button_hotplug          2656  0 
gpio_keys_polled        2064  0 
input_polldev           1696  1 gpio_keys_polled
input_core             20000  4 button_hotplug,gpio_keys_polled,input_polldev
root@OpenWrt:~# dmesg
[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sun Nov 18 18:54:19 UTC 2012
[    0.000000] prom: fw_arg0=00000001, fw_arg1=01f5bfb0, fw_arg2=01f5c3b0, fw_arg3=00000000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x400000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x400000
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 80254770, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=DIR-300-B1 console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=0001f4f0
[    0.000000] Readback ErrCtl register=0001f4f0
[    0.000000] Memory: 29672k/32768k available (2046k kernel code, 3096k reserved, 340k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is D-Link DIR-300 B1
[    0.120000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.130000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.140000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.180000] bio: create slab <bio-0> at 0
[    0.190000] Switching to clocksource MIPS
[    0.210000] NET: Registered protocol family 2
[    0.210000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.230000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.240000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.260000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.270000] TCP reno registered
[    0.280000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.290000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] NET: Registered protocol family 1
[    0.360000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.380000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.400000] msgmni has been set to 57
[    0.410000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.420000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.460000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.470000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.500000] physmap platform flash device: 00800000 at bf000000
[    0.520000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    0.540000] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
[    0.540000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.550000]   Amd/Fujitsu Extended Query version 1.1.
[    0.560000] number of CFI chips: 1
[    0.570000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    0.580000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.590000] 0x000000000000-0x000000030000 : "u-boot"
[    0.610000] 0x000000030000-0x000000040000 : "devdata"
[    0.620000] 0x000000040000-0x000000050000 : "devconf"
[    0.640000] 0x000000050000-0x000000130000 : "kernel"
[    0.650000] 0x000000130000-0x000000400000 : "rootfs"
[    0.670000] mtd: partition "rootfs" set to be root filesystem
[    0.680000] mtd: partition "rootfs_data" created automatically, ofs=310000, len=F0000 
[    0.700000] 0x000000310000-0x000000400000 : "rootfs_data"
[    0.710000] 0x000000050000-0x000000400000 : "firmware"
[    0.740000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 40, using 40
[    0.760000] TCP cubic registered
[    0.760000] NET: Registered protocol family 17
[    0.770000] Bridge firewalling registered
[    0.780000] 8021q: 802.1Q VLAN Support v1.8
[    0.800000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.810000] Freeing unused kernel memory: 176k freed
[    3.090000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    3.200000] Button Hotplug driver version 0.4.1
[    3.450000] Registered led device: d-link:amber:status
[    3.450000] Registered led device: d-link:green:status
[    3.450000] Registered led device: d-link:amber:wan
[    3.450000] Registered led device: d-link:green:wan
[    3.450000] Registered led device: d-link:blue:wps
[    6.860000] JFFS2 notice: (378) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 43 of xref (0 dead, 3 orphan) found.
[    9.400000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    9.410000] Backport based on wireless-testing.git master-2012-09-07
[    9.420000] compat.git: wireless-testing.git
[    9.490000] cfg80211: Calling CRDA to update world regulatory domain
[    9.500000] cfg80211: World regulatory domain updated:
[    9.510000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.530000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.540000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.560000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.570000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.590000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.860000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.870000] Registered led device: rt2800pci-phy0::radio
[   10.870000] Registered led device: rt2800pci-phy0::assoc
[   10.870000] Registered led device: rt2800pci-phy0::quality
[   11.520000] PPP generic driver version 2.4.2
[   11.780000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.050000] NET: Registered protocol family 24
[   12.090000] nf_conntrack version 0.5.0 (466 buckets, 1864 max)
[   17.150000] device eth0.1 entered promiscuous mode
[   17.160000] device eth0 entered promiscuous mode
[   17.170000] br-lan: port 1(eth0.1) entered forwarding state
[   17.180000] br-lan: port 1(eth0.1) entered forwarding state
[   19.180000] br-lan: port 1(eth0.1) entered forwarding state
[   21.490000] ramips-wdt: timeout value 60 must be 0 < timeout <= 40, using 40
[   41.960000] gpio-mmc: Failed to request mmc_spi module.
[   41.970000] spi-gpio: probe of spi-gpio.0 failed with error -16
[   41.980000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0
root@OpenWrt:~# /etc/init.d/mmc_over_gpio start
configfs on /config type configfs (rw,relatime)
root@OpenWrt:~# sh: write error: Device or resource busy
root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: G  
gpiommc                 3600  2 
spi_gpio_old            2192  1 gpiommc
spi_bitbang             2848  1 spi_gpio_old
mmc_spi                 7728  0 
mmc_block              14624  0 
mmc_core               58224  2 mmc_spi,mmc_block
nf_nat_irc               816  0 
nf_conntrack_irc        2480  1 nf_nat_irc
nf_nat_ftp               992  0 
nf_conntrack_ftp        4448  1 nf_nat_ftp
ipt_MASQUERADE           976  1 
iptable_nat             2528  1 
nf_nat                 10368  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
pppoe                   7504  0 
xt_conntrack            2080  3 
xt_CT                   1216  0 
xt_NOTRACK               448  0 
iptable_raw              560  1 
xt_state                 608  0 
nf_conntrack_ipv4       4368  6 iptable_nat,nf_nat
nf_defrag_ipv4           640  1 nf_conntrack_ipv4
nf_conntrack           38096 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
pppox                   1152  1 pppoe
ipt_REJECT              1680  2 
xt_TCPMSS               2560  1 
ipt_LOG                 6096  0 
xt_comment               400  0 
xt_multiport            1120  0 
xt_mac                   528  0 
xt_limit                 944  1 
iptable_mangle           816  1 
iptable_filter           592  1 
ip_tables               8848  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1616  4 
x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               5984  0 
ppp_generic            18880  3 pppoe,pppox,ppp_async
slhc                    4144  1 ppp_generic
ext4                  230176  0 
jbd2                   37776  1 ext4
mbcache                 3504  1 ext4
rt2800pci               5264  0 
rt2800lib              47392  1 rt2800pci
rt2x00soc               1136  1 rt2800pci
rt2x00pci               1824  1 rt2800pci
rt2x00lib              28752  4 rt2800pci,rt2800lib,rt2x00soc,rt2x00pci
mac80211              250128  3 rt2800lib,rt2x00soc,rt2x00lib
nls_base                4672  0 
crc7                     672  1 mmc_spi
crc16                    944  1 ext4
crc_itu_t                944  1 mmc_spi
crc_ccitt                944  2 ppp_async,rt2800lib
eeprom_93cx6            1632  0 
cfg80211              153616  2 rt2x00lib,mac80211
compat                  4576  3 rt2800pci,mac80211,cfg80211
arc4                     768  2 
aes_generic            29600  0 
crypto_algapi           9216  2 arc4,aes_generic
leds_gpio               1552  0 
button_hotplug          2656  0 
gpio_keys_polled        2064  0 
input_polldev           1696  1 gpio_keys_polled
input_core             20000  4 button_hotplug,gpio_keys_polled,input_polldev

dmesg output

root@OpenWrt:~# dmesg
[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sun Nov 18 18:54:19 UTC 2012
[    0.000000] prom: fw_arg0=00000001, fw_arg1=01f5bfb0, fw_arg2=01f5c3b0, fw_arg3=00000000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x400000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x400000
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 80254770, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=DIR-300-B1 console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=0001f4f0
[    0.000000] Readback ErrCtl register=0001f4f0
[    0.000000] Memory: 29672k/32768k available (2046k kernel code, 3096k reserved, 340k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is D-Link DIR-300 B1
[    0.120000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.130000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.140000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.180000] bio: create slab <bio-0> at 0
[    0.190000] Switching to clocksource MIPS
[    0.210000] NET: Registered protocol family 2
[    0.210000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.230000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.240000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.260000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.270000] TCP reno registered
[    0.280000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.290000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] NET: Registered protocol family 1
[    0.360000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.380000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.400000] msgmni has been set to 57
[    0.410000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.420000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.460000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.470000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.500000] physmap platform flash device: 00800000 at bf000000
[    0.520000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    0.540000] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
[    0.540000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.550000]   Amd/Fujitsu Extended Query version 1.1.
[    0.560000] number of CFI chips: 1
[    0.570000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    0.580000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.590000] 0x000000000000-0x000000030000 : "u-boot"
[    0.610000] 0x000000030000-0x000000040000 : "devdata"
[    0.620000] 0x000000040000-0x000000050000 : "devconf"
[    0.640000] 0x000000050000-0x000000130000 : "kernel"
[    0.650000] 0x000000130000-0x000000400000 : "rootfs"
[    0.670000] mtd: partition "rootfs" set to be root filesystem
[    0.680000] mtd: partition "rootfs_data" created automatically, ofs=310000, len=F0000 
[    0.700000] 0x000000310000-0x000000400000 : "rootfs_data"
[    0.710000] 0x000000050000-0x000000400000 : "firmware"
[    0.740000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 40, using 40
[    0.760000] TCP cubic registered
[    0.760000] NET: Registered protocol family 17
[    0.770000] Bridge firewalling registered
[    0.780000] 8021q: 802.1Q VLAN Support v1.8
[    0.800000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.810000] Freeing unused kernel memory: 176k freed
[    3.090000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    3.200000] Button Hotplug driver version 0.4.1
[    3.450000] Registered led device: d-link:amber:status
[    3.450000] Registered led device: d-link:green:status
[    3.450000] Registered led device: d-link:amber:wan
[    3.450000] Registered led device: d-link:green:wan
[    3.450000] Registered led device: d-link:blue:wps
[    6.860000] JFFS2 notice: (378) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 43 of xref (0 dead, 3 orphan) found.
[    9.400000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    9.410000] Backport based on wireless-testing.git master-2012-09-07
[    9.420000] compat.git: wireless-testing.git
[    9.490000] cfg80211: Calling CRDA to update world regulatory domain
[    9.500000] cfg80211: World regulatory domain updated:
[    9.510000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.530000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.540000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.560000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.570000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.590000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.860000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.870000] Registered led device: rt2800pci-phy0::radio
[   10.870000] Registered led device: rt2800pci-phy0::assoc
[   10.870000] Registered led device: rt2800pci-phy0::quality
[   11.520000] PPP generic driver version 2.4.2
[   11.780000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   12.050000] NET: Registered protocol family 24
[   12.090000] nf_conntrack version 0.5.0 (466 buckets, 1864 max)
[   17.150000] device eth0.1 entered promiscuous mode
[   17.160000] device eth0 entered promiscuous mode
[   17.170000] br-lan: port 1(eth0.1) entered forwarding state
[   17.180000] br-lan: port 1(eth0.1) entered forwarding state
[   19.180000] br-lan: port 1(eth0.1) entered forwarding state
[   21.490000] ramips-wdt: timeout value 60 must be 0 < timeout <= 40, using 40
[   41.960000] gpio-mmc: Failed to request mmc_spi module.
[   41.970000] spi-gpio: probe of spi-gpio.0 failed with error -16
[   41.980000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0

also
http://imageshack.us/scaled/thumb/221/img0005xq.jpg

I guess, the module leds_gpio already occupies some of the gpios you want to use. Remove or uninstall it.

Ok, i build image without this module, but all same (Device or resource busy) :

root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: G  
gpiommc                 3600  2 
spi_gpio_old            2192  1 gpiommc
spi_gpio                3744  0 
spi_bitbang             2848  2 spi_gpio_old,spi_gpio
mmc_spi                 7728  0 
mmc_block              14624  0 
mmc_core               58224  2 mmc_spi,mmc_block
dwc_otg                58592  0 
ledtrig_usbdev          2032  0 
nf_nat_irc               816  0 
nf_conntrack_irc        2480  1 nf_nat_irc
nf_nat_ftp               992  0 
nf_conntrack_ftp        4448  1 nf_nat_ftp
ipt_MASQUERADE           976  1 
iptable_nat             2112  1 
nf_nat                  9888  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
pppoe                   7504  0 
xt_conntrack            2080  3 
xt_CT                   1216  0 
xt_NOTRACK               448  0 
iptable_raw              560  1 
xt_state                 608  0 
nf_conntrack_ipv4       3856  6 iptable_nat,nf_nat
nf_defrag_ipv4           624  1 nf_conntrack_ipv4
nf_conntrack           36976 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
pppox                   1152  1 pppoe
ipt_REJECT              1680  2 
xt_TCPMSS               1840  1 
ipt_LOG                 5984  0 
xt_comment               400  0 
xt_multiport            1120  0 
xt_mac                   528  0 
xt_limit                 944  1 
iptable_mangle           816  1 
iptable_filter           592  1 
ip_tables               8848  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1616  4 
x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               5984  0 
ppp_generic            18880  3 pppoe,pppox,ppp_async
slhc                    4144  1 ppp_generic
ext4                  230144  0 
jbd2                   37776  1 ext4
mbcache                 3504  1 ext4
rt2800pci               5248  0 
rt2800lib              48112  1 rt2800pci
rt2x00soc               1136  1 rt2800pci
rt2x00pci               1824  1 rt2800pci
rt2x00lib              28752  4 rt2800pci,rt2800lib,rt2x00soc,rt2x00pci
mac80211              250048  3 rt2800lib,rt2x00soc,rt2x00lib
usbcore                97456  3 dwc_otg,ledtrig_usbdev
usb_common               480  1 usbcore
nls_base                4672  1 usbcore
crc7                     672  1 mmc_spi
crc16                    944  1 ext4
crc_itu_t                944  1 mmc_spi
crc_ccitt                944  2 ppp_async,rt2800lib
eeprom_93cx6            1632  0 
cfg80211              153584  2 rt2x00lib,mac80211
compat                  4576  3 rt2800pci,mac80211,cfg80211
arc4                     768  2 
aes_generic            29600  0 
crypto_algapi           9216  2 arc4,aes_generic
button_hotplug          2656  0 
gpio_keys_polled        2064  0 
input_polldev           1696  1 gpio_keys_polled
input_core             20000  4 button_hotplug,gpio_keys_polled,input_polldev
root@OpenWrt:~# dmesg
[    0.000000] Linux version 3.3.8 (capone@bender) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sun Feb 17 18:54:37 NOVT 2013
[    0.000000] prom: fw_arg0=00000001, fw_arg1=01f5bfb0, fw_arg2=01f5c3b0, fw_arg3=00000000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x400000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x400000
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802339f0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0 
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=DIR-300-B1 console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 29804k/32768k available (1932k kernel code, 2964k reserved, 323k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is D-Link DIR-300 B1
[    0.120000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.130000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.140000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.180000] bio: create slab <bio-0> at 0
[    0.190000] Switching to clocksource MIPS
[    0.210000] NET: Registered protocol family 2
[    0.210000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.230000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.240000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.260000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.270000] TCP reno registered
[    0.280000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.290000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] NET: Registered protocol family 1
[    0.370000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.380000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.400000] msgmni has been set to 58
[    0.410000] io scheduler noop registered
[    0.420000] io scheduler deadline registered (default)
[    0.430000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.440000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.460000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.480000] physmap platform flash device: 00800000 at bf000000
[    0.490000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x0000c2 Chip ID 0x0022a8
[    0.510000] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
[    0.510000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.520000]   Amd/Fujitsu Extended Query version 1.1.
[    0.530000] number of CFI chips: 1
[    0.540000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    0.550000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.560000] 0x000000000000-0x000000030000 : "u-boot"
[    0.580000] 0x000000030000-0x000000040000 : "devdata"
[    0.590000] 0x000000040000-0x000000050000 : "devconf"
[    0.610000] 0x000000050000-0x000000130000 : "kernel"
[    0.620000] 0x000000130000-0x000000400000 : "rootfs"
[    0.640000] mtd: partition "rootfs" set to be root filesystem
[    0.650000] mtd: partition "rootfs_data" created automatically, ofs=2C0000, len=140000 
[    0.670000] 0x0000002c0000-0x000000400000 : "rootfs_data"
[    0.680000] 0x000000050000-0x000000400000 : "firmware"
[    0.710000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 40, using 40
[    0.730000] TCP cubic registered
[    0.740000] NET: Registered protocol family 17
[    0.740000] 8021q: 802.1Q VLAN Support v1.8
[    0.760000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.780000] Freeing unused kernel memory: 176k freed
[    3.240000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    3.360000] Button Hotplug driver version 0.4.1
[    6.980000] JFFS2 notice: (342) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 7 of xref (0 dead, 2 orphan) found.
[    8.700000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    8.720000] Backport based on wireless-testing.git master-2012-09-07
[    8.730000] compat.git: wireless-testing.git
[    8.790000] cfg80211: Calling CRDA to update world regulatory domain
[    8.800000] cfg80211: World regulatory domain updated:
[    8.810000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    8.830000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.840000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.860000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    8.880000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    8.890000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.720000] usbcore: registered new interface driver usbfs
[    9.730000] usbcore: registered new interface driver hub
[    9.750000] usbcore: registered new device driver usb
[   10.370000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   10.370000] Registered led device: rt2800pci-phy0::radio
[   10.370000] Registered led device: rt2800pci-phy0::assoc
[   10.370000] Registered led device: rt2800pci-phy0::quality
[   11.030000] PPP generic driver version 2.4.2
[   11.540000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.910000] NET: Registered protocol family 24
[   12.090000] nf_conntrack version 0.5.0 (468 buckets, 1872 max)
[   13.040000] dwc_otg: version 2.72a 24-JUN-2008
[   18.800000] ramips-wdt: timeout value 60 must be 0 < timeout <= 40, using 40
[   19.280000] device eth0.1 entered promiscuous mode
[   19.290000] device eth0 entered promiscuous mode
[   19.310000] br-lan: port 1(eth0.1) entered forwarding state
[   19.320000] br-lan: port 1(eth0.1) entered forwarding state
[   21.320000] br-lan: port 1(eth0.1) entered forwarding state
[  484.540000] gpio-mmc: Failed to request mmc_spi module.
[  484.550000] spi-gpio: probe of spi-gpio.0 failed with error -16
[  484.560000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0

maybe another module?

you could try to rmmod gpio_keys_polled, although that should not conflict.
also, you could issue something like "echo 13 > /sys/class/gpio/export" (and replace 13 with 0, 8 and 9 respectively) to figure out, which gpio is already in use.

Ok, now i have the same problem as podly had. dmesg: http://bpaste.net/show/zKAq0aKoNjbobeID9cRD/

also also
http://imageshack.us/scaled/thumb/221/img0005xq.jpg

and

DI 9 (Green Power LED)
DO 13 (WPS LED)
CK 8 (Amber Power LED)
CS 0 (WPS Switch)

podly wrote:

Everything works fine. I think, that debouncing circuits on GPIO0 and GPIO10 mess a little, but they are OK for CS line. I removed LEDs and don't know how it works with them.

you would not be able to tell what kind of contact on the board what contact ka sd card compare?

whether to make modifications kakieto firmware to install it

thanks

Sorry for bad English

Taken on like true but writes

root @ OpenWrt: ~ # dmesg
[25.430000] wlan0: associated
[43.150000] gpio-mmc: Failed to request mmc_spi module.
[43.160000] spi-gpio: probe of spi-gpio.0 failed with error -16
[43.170000] gpio-mmc: MMC-Card "default" attached to GPIO pins di = 9, do = 13, clk = 8, cs = 0

(Last edited by nivaua on 8 Mar 2013, 22:12)

nivaua wrote:

root @ OpenWrt: ~ # dmesg
[43.150000] gpio-mmc: Failed to request mmc_spi module.
[43.160000] spi-gpio: probe of spi-gpio.0 failed with error -16
[43.170000] gpio-mmc: MMC-Card "default" attached to GPIO pins di = 9, do = 13, clk = 8, cs = 0

You should delete this packages from firmware (captured some GPIO pins):
1. kmod-leds-gpio
2. kmod-input-gpio-keys-polled

Can sd card be used like this or only mmc?

andjelko.conar wrote:

Can sd card be used like this or only mmc?

Yes.

SD, MMC pins:
PunBB bbcode test

podly wrote:

Anyone had any success with this?

I connected GPIO as follows:

option 'DI_pin' '9' - Green Power LED
option 'DO_pin' '8' - Amber Power LED
option 'CLK_pin' '13' - WPS LED
option 'CS_pin' '0' - WPS Button

I also removed button and led modules from kernel, so I can change state of LEDs and read button status from GPIO control and nothing is using/blocking those GPIO.

When I start /etc/init.d/mmc_over_gpio LEDs blinks for a moment. But some errors shows in dmesg:

root@OpenWrt:/etc/config# /etc/init.d/mmc_over_gpio start
configfs on /config type configfs (rw,relatime)
[  876.240000] gpio-mmc: Failed to request mmc_spi module.
[  876.260000] spi-gpio spi-gpio.5: master is unqueued, this is deprecated
[  876.270000] mmc_spi spi32761.0: ASSUMING 3.2-3.4 V slot power
[  879.310000] mmc_spi spi32761.0: setup: unsupported mode bits 4
[  879.320000] mmc_spi spi32761.0: can't change chip-select polarity
[  879.350000] mmc_spi spi32761.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
[  879.360000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=8, clk=13, cs=0
[  879.380000] mmc0: host doesn't support card's voltages
[  879.390000] mmc0: error -22 whilst initialising SDIO card
[  879.410000] mmc0: host doesn't support card's voltages
[  879.420000] mmc0: error -22 whilst initialising SD card
[  879.430000] mmc0: host doesn't support card's voltages
[  879.440000] mmc0: error -22 whilst initialising MMC card

Here is also lsmod output:

root@OpenWrt:/etc/config# lsmod
Module                  Size  Used by    Tainted: G
gpiommc                 3600  2
spi_gpio_old            2192  1 gpiommc
spi_gpio                3744  0
spi_bitbang             2848  2 spi_gpio_old,spi_gpio
mmc_spi                 7728  0
mmc_block              14976  0
mmc_core               58640  2 mmc_spi,mmc_block
dwc_otg                58432  0
pppoe                   7488  0
pppox                   1120  1 pppoe
ppp_async               5984  0
ppp_generic            18880  3 pppoe,pppox,ppp_async
slhc                    4144  1 ppp_generic
lib80211_crypt_tkip     6240  0
lib80211_crypt_ccmp     3472  0
lib80211_crypt_wep      1888  0
lib80211                2560  3 lib80211_crypt_tkip,lib80211_crypt_ccmp,lib80211_crypt_wep
usbcore                96768  1 dwc_otg
usb_common               480  1 usbcore
nls_base                4672  1 usbcore
crc7                     672  1 mmc_spi
crc_itu_t                944  1 mmc_spi
crc_ccitt                944  1 ppp_async
cfg80211              146656  0
compat                  1792  5 lib80211_crypt_tkip,lib80211_crypt_ccmp,lib80211_crypt_wep,lib80211,cfg80211
input_polldev           1696  0
input_core             19984  1 input_polldev

I tried to change GPIO order but always with this same effect.

I aslo noticed that GPIO levels are 'reversed' - when I set value to 0 LED is on and off when set to 1.  This same with button - when pressed is 0 and not pressed 1. Is it OK?

I will be very grateful for your help with this issue.

----------- Added:

Some progress.. I removed LEDs - WPS and Power. Also rearrange connections and change to smaller SD CARD - it is detected now, but I have problems with errors:

[   15.810000] gpio-mmc: Failed to request mmc_spi module.
[   15.830000] spi-gpio spi-gpio.0: master is unqueued, this is deprecated
[   15.840000] mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
[   15.870000] mmc_spi spi32766.0: setup: unsupported mode bits 4
[   15.880000] mmc_spi spi32766.0: can't change chip-select polarity
[   15.910000] mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
[   15.920000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=0, clk=13, cs=8
[   16.230000] mmc0: host does not support reading read-only switch. assuming write-enable.
[   16.240000] mmc0: new SD card on SPI
[   16.270000] mmcblk0: mmc0:0000 SA01G 956 MiB
[   16.340000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.360000] mmcblk0: retrying using single block read
[   16.430000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.450000] end_request: I/O error, dev mmcblk0, sector 0
[   16.550000] Buffer I/O error on device mmcblk0, logical block 0
[   16.640000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.660000] mmcblk0: retrying using single block read
[   16.720000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.740000] end_request: I/O error, dev mmcblk0, sector 0
[   16.800000] Buffer I/O error on device mmcblk0, logical block 0
[   16.860000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.880000] mmcblk0: retrying using single block read
[   16.930000] mmcblk0: error -88 transferring data, sector 0, nr 8, cmd response 0x1, card status 0x0
[   16.950000] end_request: I/O error, dev mmcblk0, sector 0
[   17.010000] Buffer I/O error on device mmcblk0, logical block 0
[   17.020000]  mmcblk0: unable to read partition table

Any ideas?

----------------- Added:

DONE!

Changed GPIOs to

Data Input = GPIO9 (Green Power LED)
Data Output = GPIO13 (WPS LED)
Clock = GPIO8 (Amber Power LED)
ChipSel = GPIO0 (WPS Switch)

[   31.250000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0
[   31.370000] mmc0: host does not support reading read-only switch. assuming write-enable.
[   31.380000] mmc0: new SD card on SPI
[   31.410000] mmcblk0: mmc0:0000 SA01G 956 MiB
[   31.530000]  mmcblk0: p1

Everything works fine. I think, that debouncing circuits on GPIO0 and GPIO10 mess a little, but they are OK for CS line. I removed LEDs and don't know how it works with them.

this is so not working on dlink dir 300 rev B1 with atittude adjustment

andjelko.conar wrote:

this is so not working on dlink dir 300 rev B1 with atittude adjustment

Maybe, not enought of the power supply. Card not enabled. Need oscilloscope.

I dont think so.It is connected directly to 3.3V rail.

So, guys! Anyone still working on it?
Few days ago I started trying to make this mod, but without results
Can anybody help me on my way?
Dir 300 rev. B1

(Last edited by fingerskillz on 18 Feb 2014, 23:17)

Hello i have the same question smile and first i need disable the amber and green status led, becouste if i use the

/etc/init.d/mmc_over_gpio start

have this resoult

[   44.310000] gpio-mmc: Failed to request mmc_spi module.
[   44.320000] spi-gpio: probe of spi-gpio.0 failed with error -16
[   44.330000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0

the green status led is on,

i don't know what can i disable this led and other what i need. pls need help smile

Did you follow post #13?

Thanx for reply i use

opkg remove kmod-leds-gpio
opkg remove kmod-input-gpio-keys-polled

and have the same resoult

"

root@OpenWrt:~# opkg remove kmod-leds-gpio
No packages removed.


"

Meyby have problem becouste i use :

OpenWrt Attitude Adjustment 12.09

can you help me install kamikazze for my dir300b1

I have project from post #10

PunBB bbcode test


and my /etc/config/mmc_over_gpio is:

"

config 'mmc_over_gpio'
        option 'name' 'default'
        option 'enabled' '1'
        option 'DI_pin' '9'
        option 'DO_pin' '13'
        option 'CLK_pin' '8'
        option 'CS_pin' '0'
        option 'mode' '0'

"

my dmesg :

"
[    0.000000] Linux version 3.3.8 (blogic@Debian-60-squeeze-64-minimal) (gcc version 4.6.3 20120201 (prerelease) (Linaro GCC 4.6-2012.02) ) #1 Sat Mar 23 19:00:46 UTC 2013
[    0.000000] prom: fw_arg0=00000001, fw_arg1=01f5bfb0, fw_arg2=01f5c3b0, fw_arg3=00000000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x800000
[    0.000000] env[0]: memsize=32
[    0.000000] env[1]: initrd_start=0x00000000
[    0.000000] env[2]: initrd_size=0x0
[    0.000000] env[3]: flash_start=0xBF000000
[    0.000000] env[4]: flash_size=0x800000
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU revision is: 0001964c (MIPS 24KEc)
[    0.000000] Ralink RT3350 id:1 rev:2 running at 320.00 MHz
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 02000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Zone PFN ranges:
[    0.000000]   Normal   0x00000000 -> 0x00002000
[    0.000000] Movable zone start PFN for each node
[    0.000000] Early memory PFN ranges
[    0.000000]     0: 0x00000000 -> 0x00002000
[    0.000000] On node 0 totalpages: 8192
[    0.000000] free_area_init_node: node 0, pgdat 802547a0, node_mem_map 81000000
[    0.000000]   Normal zone: 64 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 8128 pages, LIFO batch:0
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 8128
[    0.000000] Kernel command line:  board=DIR-300-B1 console=ttyS1,57600 mtdparts=physmap-flash.0:192k(u-boot)ro,64k(devdata)ro,64k(devconf)ro,896k(kernel),2880k(rootfs),3776k@0x50000(firmware) rootfstype=squashfs,jffs2
[    0.000000] PID hash table entries: 128 (order: -3, 512 bytes)
[    0.000000] Dentry cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Inode-cache hash table entries: 2048 (order: 1, 8192 bytes)
[    0.000000] Primary instruction cache 16kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 16kB, 4-way, VIPT, no aliases, linesize 32 bytes
[    0.000000] Writing ErrCtl register=00025de6
[    0.000000] Readback ErrCtl register=00025de6
[    0.000000] Memory: 29672k/32768k available (2046k kernel code, 3096k reserved, 340k data, 176k init, 0k highmem)
[    0.000000] SLUB: Genslabs=9, HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:48
[    0.000000] console [ttyS1] enabled, bootconsole disabled
[    0.010000] Calibrating delay loop... 212.58 BogoMIPS (lpj=1062912)
[    0.090000] pid_max: default: 32768 minimum: 301
[    0.090000] Mount-cache hash table entries: 512
[    0.100000] NET: Registered protocol family 16
[    0.110000] MIPS: machine is D-Link DIR-300 B1
[    0.120000] gpiochip_add: registered GPIOs 0 to 23 on device: RT305X-GPIO0
[    0.130000] gpiochip_add: registered GPIOs 24 to 39 on device: RT305X-GPIO1
[    0.140000] gpiochip_add: registered GPIOs 40 to 51 on device: RT305X-GPIO2
[    0.180000] bio: create slab <bio-0> at 0
[    0.190000] Switching to clocksource MIPS
[    0.210000] NET: Registered protocol family 2
[    0.210000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.230000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.240000] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.260000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.270000] TCP reno registered
[    0.280000] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.290000] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.300000] NET: Registered protocol family 1
[    0.360000] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    0.380000] JFFS2 version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    0.400000] msgmni has been set to 57
[    0.410000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
[    0.420000] io scheduler noop registered
[    0.430000] io scheduler deadline registered (default)
[    0.440000] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    0.460000] serial8250: ttyS0 at MMIO 0x10000500 (irq = 13) is a 16550A
[    0.470000] serial8250: ttyS1 at MMIO 0x10000c00 (irq = 20) is a 16550A
[    0.500000] physmap platform flash device: 00800000 at bf000000
[    0.520000] physmap-flash.0: Found 1 x16 devices at 0x0 in 16-bit bank. Manufacturer ID 0x000001 Chip ID 0x001a00
[    0.540000] physmap-flash.0: Found an alias at 0x400000 for the chip at 0x0
[    0.540000] Amd/Fujitsu Extended Query Table at 0x0040
[    0.550000]   Amd/Fujitsu Extended Query version 1.3.
[    0.560000] number of CFI chips: 1
[    0.570000] 6 cmdlinepart partitions found on MTD device physmap-flash.0
[    0.580000] Creating 6 MTD partitions on "physmap-flash.0":
[    0.590000] 0x000000000000-0x000000030000 : "u-boot"
[    0.610000] 0x000000030000-0x000000040000 : "devdata"
[    0.620000] 0x000000040000-0x000000050000 : "devconf"
[    0.640000] 0x000000050000-0x000000130000 : "kernel"
[    0.650000] 0x000000130000-0x000000400000 : "rootfs"
[    0.670000] mtd: partition "rootfs" set to be root filesystem
[    0.680000] mtd: partition "rootfs_data" created automatically, ofs=2F0000, len=110000
[    0.700000] 0x0000002f0000-0x000000400000 : "rootfs_data"
[    0.710000] 0x000000050000-0x000000400000 : "firmware"
[    0.740000] ramips-wdt ramips-wdt: timeout value must be 0 < timeout <= 40, using 40
[    0.760000] TCP cubic registered
[    0.760000] NET: Registered protocol family 17
[    0.770000] Bridge firewalling registered
[    0.780000] 8021q: 802.1Q VLAN Support v1.8
[    0.800000] VFS: Mounted root (squashfs filesystem) readonly on device 31:4.
[    0.820000] Freeing unused kernel memory: 176k freed
[    3.350000] input: gpio-keys-polled as /devices/platform/gpio-keys-polled/input/input0
[    3.460000] Button Hotplug driver version 0.4.1
[    3.710000] Registered led device: d-link:amber:status
[    3.710000] Registered led device: d-link:green:status
[    3.710000] Registered led device: d-link:amber:wan
[    3.720000] Registered led device: d-link:green:wan
[    3.720000] Registered led device: d-link:blue:wps
[    7.130000] JFFS2 notice: (378) jffs2_build_xattr_subsystem: complete building xattr subsystem, 1 of xdatum (1 unchecked, 0 orphan) and 67 of xref (0 dead, 44 orphan) found.
[    9.670000] Compat-drivers backport release: compat-drivers-2012-09-04-2-gddac993
[    9.690000] Backport based on wireless-testing.git master-2012-09-07
[    9.700000] compat.git: wireless-testing.git
[    9.760000] cfg80211: Calling CRDA to update world regulatory domain
[    9.770000] cfg80211: World regulatory domain updated:
[    9.780000] cfg80211:   (start_freq - end_freq @ bandwidth), (max_antenna_gain, max_eirp)
[    9.800000] cfg80211:   (2402000 KHz - 2472000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.820000] cfg80211:   (2457000 KHz - 2482000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.830000] cfg80211:   (2474000 KHz - 2494000 KHz @ 20000 KHz), (300 mBi, 2000 mBm)
[    9.850000] cfg80211:   (5170000 KHz - 5250000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[    9.860000] cfg80211:   (5735000 KHz - 5835000 KHz @ 40000 KHz), (300 mBi, 2000 mBm)
[   10.550000] usbcore: registered new interface driver usbfs
[   10.560000] usbcore: registered new interface driver hub
[   10.580000] usbcore: registered new device driver usb
[   11.200000] ieee80211 phy0: Selected rate control algorithm 'minstrel_ht'
[   11.200000] Registered led device: rt2800pci-phy0::radio
[   11.200000] Registered led device: rt2800pci-phy0::assoc
[   11.200000] Registered led device: rt2800pci-phy0::quality
[   11.270000] PPP generic driver version 2.4.2
[   11.520000] ip_tables: (C) 2000-2006 Netfilter Core Team
[   11.900000] NET: Registered protocol family 24
[   11.950000] nf_conntrack version 0.5.0 (466 buckets, 1864 max)
[   12.520000] dwc_otg: version 2.72a 24-JUN-2008
[   18.570000] device eth0.1 entered promiscuous mode
[   18.580000] device eth0 entered promiscuous mode
[   18.600000] br-lan: port 1(eth0.1) entered forwarding state
[   18.610000] br-lan: port 1(eth0.1) entered forwarding state
[   20.240000] ramips-wdt: timeout value 60 must be 0 < timeout <= 40, using 40
[   20.610000] br-lan: port 1(eth0.1) entered forwarding state
[   38.950000] gpio-mmc: Failed to request mmc_spi module.
[   38.960000] spi-gpio: probe of spi-gpio.0 failed with error -16
[   38.970000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=9, do=13, clk=8, cs=0

"

and my lsmod:

"
Module                  Size  Used by    Tainted: G
gpiommc                 3600  2
spi_gpio_old            2192  1 gpiommc
spi_gpio                3744  0
spi_bitbang             2848  2 spi_gpio_old,spi_gpio
mmc_spi                 7728  0
mmc_block              14624  0
mmc_core               58224  2 mmc_spi,mmc_block
dwc_otg                58592  0
nf_nat_irc               816  0
nf_conntrack_irc        2480  1 nf_nat_irc
nf_nat_ftp               992  0
nf_conntrack_ftp        4448  1 nf_nat_ftp
ipt_MASQUERADE           976  1
iptable_nat             2528  1
nf_nat                 10368  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
pppoe                   7504  0
xt_conntrack            2080  3
xt_CT                   1216  0
xt_NOTRACK               448  0
iptable_raw              560  1
xt_state                 608  0
nf_conntrack_ipv4       4368  6 iptable_nat,nf_nat
nf_defrag_ipv4           640  1 nf_conntrack_ipv4
nf_conntrack           38224 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
pppox                   1152  1 pppoe
ipt_REJECT              1680  2
xt_TCPMSS               2560  0
ipt_LOG                 6096  0
xt_comment               400  0
xt_multiport            1120  0
xt_mac                   528  0
xt_limit                 944  1
iptable_mangle           816  1
iptable_filter           592  1
ip_tables               8848  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1616  3
x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               5984  0
ppp_generic            18880  3 pppoe,pppox,ppp_async
slhc                    4144  1 ppp_generic
rt2800pci               5264  0
rt2800lib              48112  1 rt2800pci
rt2x00soc               1136  1 rt2800pci
rt2x00pci               1824  1 rt2800pci
rt2x00lib              28816  4 rt2800pci,rt2800lib,rt2x00soc,rt2x00pci
mac80211              250128  3 rt2800lib,rt2x00soc,rt2x00lib
usbcore                97456  2 dwc_otg
usb_common               480  1 usbcore
nls_base                4672  1 usbcore
crc7                     672  1 mmc_spi
crc_itu_t                944  1 mmc_spi
crc_ccitt                944  2 ppp_async,rt2800lib
eeprom_93cx6            1632  0
cfg80211              153616  2 rt2x00lib,mac80211
compat                  4576  3 rt2800pci,mac80211,cfg80211
arc4                     768  2
aes_generic            29600  0
crypto_algapi           9216  2 arc4,aes_generic
leds_gpio               1552  0
button_hotplug          2656  0
gpio_keys_polled        2064  0
input_polldev           1696  1 gpio_keys_polled
input_core             20000  4 button_hotplug,gpio_keys_polled,input_polldev

"

pls help smile

Well, maybe it's better to take a step back and check, if the desired GPIOs are free for use. Check each one of them like it is described on this page: http://squidge.sourceforge.net/gpio/

Thanx for Reply MBS, meyby now only u can help me smile

i use command:

root@OpenWrt:~# echo 0 > /sys/class/gpio/export

and have resoult:

ash: write error: Device or resource busy

I have a good read of this article, can I find help.

Sorry, now I realized, that you still have those modules loaded, which already occupy your GPIOs:

finch84 wrote:

leds_gpio               1552  0
button_hotplug          2656  0
gpio_keys_polled        2064  0

So, if you issue a "rmmod leds_gpio" and "rmmod gpio_keys_polled", you should be able export those GPIOs to userspace, and also get the mmc driver to work.
Only issue remaining is, how to get it to work automatically when starting the router. The packages for LEDs and buttons are already installed on the squashfs-partition, thus read-only and cannot be removed. Any attempt to delete or overwrite some files there will just create a reference on the jffs2-partition, which gets mounted somehow later during boot (when button and LED module might already be loaded). So here are the options I see: You can either build your own image, with LED and button modules disabled, or make sure, that those modules get removed, before the mmc gets started (for example put it into /etc/init.d/mmc_over_gpio, or create your own file in that directory and use a START-value of 89).