SPI and I2C port use?

I'm having trouble figuring out which SPI ports are available on the BBB if I want to continue to use the eMMC.

I also need to connect I2C and SPI to an audio codec IC. I think I can use any I2C/SPI port combination, right? Just might have to modify the driver a bit? I'm using the same codec as on the BBB Audio Cape.

But I was hoping there'd be an additional SPI port I could use for something else on my cape, and still be able to use the eMMC.

Lastly, the EEPROM is on I2C2, right? Can I share that with the audio codec? That would let me wire it the same as the Audio Cape, might make it easier to get the software working.

Thanks,

EEPROM is in I2C0 which does not connect to the expansion headers. I2C2 is a shared bus. As long as no tow devices have the same address, you are limited to 255 different devices on an I2C bus.

SPI has a dedicated CS line. You can and that with a GPIO pin and create more CS signals if you like.

CODECS typically uses I2S which is a totally different animal. But there are SPI and I2C CODECs out there.

Gerald

EEPROM is in I2C0 which does not connect to the expansion headers. I2C2 is a shared bus. As long as no tow devices have the same address, you are limited to 255 different devices on an I2C bus.

Sorry, I meant the cape EEPROM, not the BBB's EEPROM.

SPI has a dedicated CS line. You can and that with a GPIO pin and create more CS signals if you like.

The WiFi cape has some incompatibility with the eMMC, is it just because it's trying to use the same CS line?

CODECS typically uses I2S which is a totally different animal. But there are SPI and I2C CODECs out there.

The CODEC I'm using is the same one on the Audio Cape (http://elinux.org/images/1/11/Audio_Cape_B1_Schematic.pdf), a tlv320aic3104 (http://www.ti.com/lit/ds/symlink/tlv320aic3104.pdf). It is I2S, and uses an I2C and SPI bus (at least, that's how the Audio Cape is connected).

Hmm, looking more closely, it's using the SPI1 pins, and a GPIO, but doesn't seem to be actually using the SPI bus. That's confusing. Oh, looking at the DTS (http://elinux.org/images/1/10/BB-BONE-AUDI-02-00A0.zip), it seems to be using McASP in I2S mode?

I don't know if it's possible to use McASP on different pins...

SPI has a dedicated CS line. You can and that with a GPIO pin and create more CS signals if you like.

Wonder why more people do not realize this ? SPI on Linux is software . . .a CS “line” pin, etc is just a toggled GPIO high/low at the appropriate times. . . .

I'm actually well aware of how SPI works. What's harder to know is exactly why a particular SPI bus might not be available for use due to conflicts. Some processors take over control of the CS pin(s), and you can't "just" use a GPIO as another CS line. Add to that multiple software entities trying to use the SPI peripheral, and things can get impossible very fast.