Modify

Opened 7 years ago

Last modified 3 years ago

#9582 new defect

SD/MMC problem

Reported by: michal Owned by: developers
Priority: normal Milestone: Barrier Breaker 14.07
Component: packages Version: Trunk
Keywords: Cc:

Description

I am having problem with SD/MMC mod.

dmesg shows:

gpio-mmc: Failed to request mmc_spi module.
mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
gpio-mmc: MMC-Card "default" attached to GPIO pins di=2, do=4, clk=3, cs=7
mmc_spi spi32766.0: can't change chip-select polarity
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 00000 968 MiB

mmcblk0:

My card is SAMSUNG 1GB microSD.

When I try to fdisk /dev/mmcblk0 I got:

mmcblk0: retrying using single block read
mmcblk0: error -89 sending status comand
mmcblk0: error -89 sending read/write command, response 0x4, card status 0x4
end_request: I/O error, dev mmcblk0, sector 1982456
mmcblk0: error -89 sending status comand
mmcblk0: error -89 sending read/write command, response 0x4, card status 0x4
end_request: I/O error, dev mmcblk0, sector 1982457

and so on...

My system is:

DISTRIB_ID="OpenWrt
DISTRIB_RELEASE="10.03"
DISTRIB_CODENAME="backfire"
DISTRIB_DESCRIPTION="OpenWrt Backfire 10.03.1-rc4"
DISTRIB_TARGET="brcm47xx"
DISTRIB_REVISION="r24045"
DISTRIB_OFFICIAL="1"

Attachments (0)

Change History (6)

comment:1 Changed 7 years ago by michal

Forgot to mention - my hardware is WRT54GL

comment:2 Changed 7 years ago by Ivan

Same problem here. WHR-HP-G54. I'm using 2GB SD card.

comment:3 Changed 7 years ago by windchine@…

I'm getting a similar problem on a wrt54gs v1.1 with 10.03.1-rc5 brcm47xx with a 1G microSD:

root@OpenWrt:~# dmesg -c
gpio-mmc: Failed to request mmc_spi module.
mmc_spi spi32766.0: ASSUMING 3.2-3.4 V slot power
mmc_spi spi32766.0: SD/MMC host mmc0, no DMA, no WP, no poweroff
gpio-mmc: MMC-Card "default" attached to GPIO pins di=5, do=4, clk=3, cs=7
mmc_spi spi32766.0: can't change chip-select polarity
mmc0: host does not support reading read-only switch. assuming write-enable.
mmc0: new SD card on SPI
mmcblk0: mmc0:0000 SD01G 922 MiB 
 mmcblk0: p1

root@OpenWrt:~# fdisk -l /dev/mmcblk0
root@OpenWrt:~# dmesg -c
mmcblk0: retrying using single block read
mmcblk0: error -89 sending status comand
mmcblk0: error -89 sending read/write command, response 0x4, card status 0xff04
end_request: I/O error, dev mmcblk0, sector 1888248
mmcblk0: error -89 sending status comand
mmcblk0: error -89 sending read/write command, response 0x4, card status 0xff04
end_request: I/O error, dev mmcblk0, sector 1888249
...

Config is:

opkg update
opkg install block-extroot
opkg install e2fsprogs
opkg install fdisk
opkg install kmod-fs-ext3
opkg install kmod-mmc-over-gpio 

Edited: /etc/config/mmc_over_gpio [see pin allocations in above log]

Edited: /etc/init.d/mmc_over_gpio :

start() {                                                                                  
        echo 0xb8 > /proc/diag/gpiomask                                                    
...

rmmod b43 b43legacy

/etc/init.d/mmc_over_gpio start

The rc5 brcm-2.4 works correctly and the SD can be formatted (ext3) and mounted so the hardware is capable of working.

comment:4 Changed 7 years ago by windchine@…

With an identical configuration to my previous post, but on a wrt54gs v4 fitted with a 2G full sized SD (except for SD Din on GPIO 2 rather than 5), the SD configures and mounts without any problem. Could the problem be hardware differences in the SD chip itself ? I'd try swapping them over but both are soldered direct to the boards.

comment:5 Changed 4 years ago by jow

  • Milestone changed from Attitude Adjustment 12.09 to Barrier Breaker 14.07

Milestone Attitude Adjustment 12.09 deleted

comment:6 Changed 3 years ago by valentt

I don't have brcm47xx based hardware so can't confirm but looking on the forums it looks like this issue is resolved by alternative package:
https://forum.openwrt.org/viewtopic.php?id=30322

Add Comment

Modify Ticket

Action
as new .
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.