Topic: ath79: SD-card on SPI-bus

Translated & added more info:
http://wiki.openwrt.org/toh/tp-link/tl- … p.mmc.hack
Comment on this topic.

2 (edited by anarchy99 2016-03-19 17:12:51)

Re: ath79: SD-card on SPI-bus

hi

i'm trying gpio mmc mod but card not detected

root@OpenWrt:~# cat /sys/kernel/debug/mmc0/clock
0
root@OpenWrt:~# cat /sys/kernel/debug/mmc0/ios
clock:        0 Hz
vdd:        0 (invalid)
bus mode:    2 (push-pull)
chip select:    1 (active high)
power mode:    0 (off)
bus width:    0 (1 bits)
timing spec:    0 (legacy)
signal voltage:    1 (3.30 V)

looks like problem with clock and power, 3.3V taken from spi flash pin is it enough?

update: gpio debug

 gpio-1   (spi_cs              ) out lo    
 gpio-6   (sw1                 ) in  hi    
 gpio-7   (sw2                 ) in  lo    
 gpio-11  (reset               ) in  lo    
 gpio-14  (spi_mosi            ) out hi    
 gpio-16  (spi_clock           ) out lo    
 gpio-17  (spi_miso            ) in  hi    
 gpio-18  (USB power           ) out hi    
 gpio-27  (tp-link:blue:system ) out hi   

Re: ath79: SD-card on SPI-bus

switched clock and miso and got this, but only for 2-3 seconds before it goes back to previously posted state

root@OpenWrt:~# cat /sys/kernel/debug/mmc0/ios
clock:        400000 Hz
vdd:        21 (3.3 ~ 3.4 V)
bus mode:    2 (push-pull)
chip select:    1 (active high)
power mode:    2 (on)
bus width:    0 (1 bits)
timing spec:    0 (legacy)
signal voltage:    1 (3.30 V)

dmesg:

[ 8167.810000] gpio-mmc: MMC-Card "default" attached to GPIO pins di=14, do=16, clk=17, cs=1
[ 8167.820000] mmc_spi spi32759.0: no support for card's volts
[ 8167.830000] mmc0: error -22 whilst initialising SDIO card
[ 8167.840000] mmc_spi spi32759.0: no support for card's volts
[ 8167.840000] mmc0: error -22 whilst initialising SD card
[ 8167.850000] mmc_spi spi32759.0: no support for card's volts
[ 8167.850000] mmc0: error -22 whilst initialising MMC card

4 (edited by lobonse 2017-01-07 23:14:45)

Re: ath79: SD-card on SPI-bus

Hi, I've been trying to rig up the deep mmc mod for dir-601 a1 ( ar7240, mx25l3205d spi flash ) using pins 8 (miso)15 (mosi) and 16 (clock) on flash and cs on wps led ( for internal cs on gpio0 ) or button, with no additional components other than a microsd card with sd adapter soldered to those pins. With that kernel mod ( trying to get extroot on card ) I get a freeze up at boot just as all leds light up. Serial console shows nothing, no uboot at that point and with the card out of the adapter it boots normally.

Anybody have any luck with this router? I have ordered an arduino style card reader module so that should eliminate any question of signal problems with pull up resistors etc, although spi is supposed to work anyhow. I feel like it's a short somewhere.

I generally hate signatures

Re: ath79: SD-card on SPI-bus

lobonse wrote:

... With that kernel mod ( trying to get extroot on card ) I get a freeze up at boot just as all leds light up. Serial console shows nothing, no uboot at that point and with the card out of the adapter it boots normally.

Anybody have any luck with this router?...

I have same problem with kernel integration of necessary modules(i used "make kernel_menuconfig"), but I had this problem only if i used fresh trunk.
Try to use Chaos Calmer branch.

Write please if you success.

Re: ath79: SD-card on SPI-bus

Interesting, I am using Barrier Breaker. So CC sysupgrades no problem? I'd be worried about it being too large for 4mb. I am waiting for those arduino-style sd card adapters to see if they will help. if not, I'll definitely try the CC sysupgrade, thanks!

I generally hate signatures

Re: ath79: SD-card on SPI-bus

Chaos Calmer installed, now to wait a few weeks for the sd card adapter..

I generally hate signatures