To add a MMC card to your Zipit, you must obtain an MMC socket and wire it using very fine wires to several places on the Zipit PC board.

To add a MMC card to your Zipit, you must obtain an MMC socket and wire it using very fine wires to several places on the Zipit PC board.

Line 38:

Line 39:

An important distinction with regard to pin numbers: With an MMC card, there are only seven pins numbered 1 thru 7. On an SD card, there are 9 pins numbered 912345678. Pins 8 and 9 are a superset of the MMC functionality. You'll need to make accommodations based on the socket you use. If you only have 7 pins, start counting from "1".

An important distinction with regard to pin numbers: With an MMC card, there are only seven pins numbered 1 thru 7. On an SD card, there are 9 pins numbered 912345678. Pins 8 and 9 are a superset of the MMC functionality. You'll need to make accommodations based on the socket you use. If you only have 7 pins, start counting from "1".

−

Either SD or MMC cards will work in this application. The SPI implementations for both are designed to be interoperable. Since both cards will fit in either socket, and the Zipit only operates in the SPI mode, choosing a card and socket is dealer's choice. I chose the 9-pin socket and an SD card simply because I had them on hand.You also need to wire up power for the MMC socket. [[Migraine Man]] [jimbobbus@aol.com] and Cynfab on the [[ZipIt]] Yahoo Group did the design work on this.

+

Either SD or MMC cards will work in this application. The SPI implementations for both are designed to be interoperable. Since both cards will fit in either socket, and the Zipit only operates in the SPI mode, choosing a card and socket is dealer's choice. I chose the 9-pin socket and an SD card simply because I had them on hand.You also need to wire up power for the MMC socket. Migraine Man [jimbobbus@aol.com] and Cynfab on the [[ZipIt]] Yahoo Group did the design work on this.

[[Image:zipitMMCinternalWiring.jpg]]

[[Image:zipitMMCinternalWiring.jpg]]

Line 104:

Line 105:

i'm currently doing some MMC hacking on another device, [[JuiceBox MMCHack]], and was curious what possibilities existed for adding a MMC interface on the zipit, if i could get access to either 4 [[GPIO|gpios]], or 2 data lines, and the OE and WR lines i could fix up something. worst case, i could use one of the uarts to do the job.

i'm currently doing some MMC hacking on another device, [[JuiceBox MMCHack]], and was curious what possibilities existed for adding a MMC interface on the zipit, if i could get access to either 4 [[GPIO|gpios]], or 2 data lines, and the OE and WR lines i could fix up something. worst case, i could use one of the uarts to do the job.

−

[[Tim Riker]]:

+

[[User:TimRiker|Tim Riker]]:

Looks like there should be enough space there. Need to stay as close to the power connection as possible. Need some [[GPIO|gpio]] lines next, yes?

Looks like there should be enough space there. Need to stay as close to the power connection as possible. Need some [[GPIO|gpio]] lines next, yes?

Line 116:

Line 117:

KenMcGuire aka GPSFan:

KenMcGuire aka GPSFan:

−

Or, hijack Port-E as described in Yahoo Zipit group by [[Migraine Man]]

+

Or, hijack Port-E as described in Yahoo Zipit group by Migraine Man

[http://groups.yahoo.com/group/zipitwireless/message/794]

[http://groups.yahoo.com/group/zipitwireless/message/794]

{|

{|

Line 133:

Line 134:

|}

|}

−

This method seems to work ok. I was able to port the driver from the WRT54G folks. I have posted the binary: mmc.o, source: mmc.c, and a patch integrating it into the kernel tree on the Yahoo bbs.

+

This method seems to work ok. I was able to port the driver from the [[WRT54G]] folks.

+

+

I have posted the binary: mmc.o, source: mmc.c, and a patch integrating it into the kernel tree on the Yahoo bbs.

I have found that it is easy to knock off the resistors that connect to Port-E while doing this mod.

I have found that it is easy to knock off the resistors that connect to Port-E while doing this mod.

Line 160:

Line 163:

|}

|}

−

[[Warner Losh]]:

+

Warner Losh:

The datasheets for the 7312 says that it has two synchronous serial interfaces. SS1 and SS2. Are they used for the CODEC or are they available? In addition, there's a second serial port for the IR features, which zipit doesn't appear to use.

The datasheets for the 7312 says that it has two synchronous serial interfaces. SS1 and SS2. Are they used for the CODEC or are they available? In addition, there's a second serial port for the IR features, which zipit doesn't appear to use.

Latest revision as of 11:19, 15 December 2012

Howto

To add a MMC card to your Zipit, you must obtain an MMC socket and wire it using very fine wires to several places on the Zipit PC board.

The SPI signal names (DI,DO,CLK,nCS) are all named from the MMC card's perspective. For example - DO (Data Out) is the output from the MMC card and needs to be connected to the input pin (nEXTFIQ) on the CPU.

An important distinction with regard to pin numbers: With an MMC card, there are only seven pins numbered 1 thru 7. On an SD card, there are 9 pins numbered 912345678. Pins 8 and 9 are a superset of the MMC functionality. You'll need to make accommodations based on the socket you use. If you only have 7 pins, start counting from "1".

Either SD or MMC cards will work in this application. The SPI implementations for both are designed to be interoperable. Since both cards will fit in either socket, and the Zipit only operates in the SPI mode, choosing a card and socket is dealer's choice. I chose the 9-pin socket and an SD card simply because I had them on hand.You also need to wire up power for the MMC socket. Migraine Man [jimbobbus@aol.com] and Cynfab on the ZipIt Yahoo Group did the design work on this.

Thanks to Chris, the mmc driver works a whole lot faster now!!
I have added a bit to it:
1) automatically determine if the mmc card supports multi-block reads.
2) "cat /proc/mmc-multi" returns 0 if no support, 1 if supported.
Now there is only 1 kernel module required and it will use multi-block reads if it can.
I have posted the new binary, and sources to the Files > MMC > mmc-multi folder. http://groups.yahoo.com/group/zipitwireless/files/MMC/
I have also posted nls.o, fat.o, and vfat.o kernel modules. Insmod them in that order and you will be able to read & write vfat formatted sd/mmc cards. This is the way they come out of the box.
Remember that vfat formatted cards don't support Unix permissions.
The mmc driver is named mmc-multi.c &.o just to keep it distinguishable from the old one.
To rebuild the other kernel modules just enable them as modules while in make menuconfig, then make modules. The binaries will be found in fs/nls, fs/fat, fs/vfat.

Software Issues

There should be an entry in the fstab for the MMC device. It should be in /etc/fstab What does it say? Should go something like this:

/<device> /<mount-point> <type> <options> <...>

What is the "type"? Should be "msdos" for a stock MMC which is formatted as FAT16, or "vfat" for FAT32 formatted MMC, or EXT2, or ...

In any event, you should be able to manually mount the drive...

The MMC card has to be set up already with a linux partition and formatted for ext2. If your MMC card is still using a FAT filesystem that would be the problem.

What I've done is I have one of those USB -> multi card devices, and I pop the MMC in there. It usually turns up as /dev/sda for its device address. Then I used fdisk to delete the partion(s) that it came with, and add one primary partition, type 83, for the whole size of the card. Once that is done and written, I use

mkfs -t ext2 /dev/sda1

to format that partition for Linux. At this point you can the move or create your .config directory on the MMC card.

My flash files make some assumptions, the biggest one being what I've just outlined - the MMC card is formatted for linux, linux is the first partition, and it's ext2.

You can get some info as to what is happening, by first making sure that the mmc.o module is not active (rmmod mmc.o) then activating it manually and watch the output. That should give some hints as to what is going on. If the module loads properly then try mounting the card and see if that gives you any errors. You can see the instructions that set up the mmc card on the zipit in /etc/init.d/S10mmc

Commentary

i'm currently doing some MMC hacking on another device, JuiceBox MMCHack, and was curious what possibilities existed for adding a MMC interface on the zipit, if i could get access to either 4 gpios, or 2 data lines, and the OE and WR lines i could fix up something. worst case, i could use one of the uarts to do the job.

This method seems to work ok. I was able to port the driver from the WRT54G folks.

I have posted the binary: mmc.o, source: mmc.c, and a patch integrating it into the kernel tree on the Yahoo bbs.

I have found that it is easy to knock off the resistors that connect to Port-E while doing this mod.
Here are the values:

R9

100K

pullup

R23

10K

pulldown

R26

100K

pullup

R27

10K

pulldown

R28

100K

pullup

Warner Losh:

The datasheets for the 7312 says that it has two synchronous serial interfaces. SS1 and SS2. Are they used for the CODEC or are they available? In addition, there's a second serial port for the IR features, which zipit doesn't appear to use.

from ken mcguire's zipit autopsy:

The SSI1 port consists of the following signals:

name

ball

condition

ADCLK

V11

NC

ADCIN

Y8

NC

ADCOUT

W11

NC

nADCCS

V9

NC

SMPCLK

Y11

pulled down by R3 (10k)

These can be seen in the pictures I posted, unfortunately they don't come out from under the CPU chip so are impossible to connect to.
The SSI2 port is configured as DAI and used to talk to the WM8751L Stereo Codec.
The i2c is bit banged on GPIO Port B bit 6 & 7. Both the WM8751L and the LPC915 are on the i2c at address 0x1b and 0x55 respectively. The WW8751L is a write only device.

ok i just found this page http://www.i2cchip.com/mix_spi_i2c.html which explains how to do the spi on the same bus as the i2c. we have one unused gpio which can perform as the ChipSelect for the SD/MMC card, so the hardware is pretty much no issue now,just need to do some coding.