ashcharles
Posts: 5
Joined: Fri Oct 02, 2015 7:03 pm

Connecting external SD/SDIO device

Fri Oct 02, 2015 7:32 pm

Hi,

I'm trying to hook up a Wifi chip via SDIO to the SD1 interface (GPIO22-27, ALT3) on the compute module. I've enabled the sdio-overlay and see linux attempt to initialize mmc1 but it fails repeating this message several times:
>>>
[ 2.283907] mmc1: host does not support reading read-only switch, assuming write-enable
[ 2.300090] mmc1: error -110 whilst initialising SD card
<<<
I tried compiling both a stable rpi-4.1.y kernel as well the most recent rpi-4.2.y branch with no noticeable difference in behaviour. I see reasonably clean signals @ 3.3V on the interface and, with a logic analyser, I can see what looks like a good MMC initialization sequence (CLK@400kHz, CMD signalling, and, eventually activity on DAT1). To rule out hardware initialization problems with the Wifi chip, I also tried wiring up a microSD card but with no success.

1. What might I be missing here? Should I be able to use this interface for SD (not SD via SPI)? These posts [1, 2] hinted to me that this should be possible so I'm probably doing something silly.

2. Does this SD interface support the 1.8V signalling mode?

Many thanks for any insights.

[1] viewtopic.php?f=98&t=74487
[2] viewtopic.php?f=98&t=88781
(My first post! Please excuse me if this is not the right forum for this question.)

ashcharles
Posts: 5
Joined: Fri Oct 02, 2015 7:03 pm

Re: Connecting external SD/SDIO device

Mon Oct 05, 2015 3:31 pm

To follow up, I tried hooking up the microSD card to an RPI 2 B rather than to the Compute Module as described. It started up without error: linux happily recognized and initialized a /dev/mmcblk1 device. Hmm...processor specific difference?

gsh
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 1557
Joined: Sat Sep 10, 2011 11:43 am

Re: Connecting external SD/SDIO device

Wed Oct 07, 2015 6:02 am

Did you set up the alternate settings for the GPIO as well? You should be able to do this using the device-tree

Can you actually see the signals on the bus with a scope?

Gordon
--
Gordon Hollingworth PhD
Raspberry Pi - Director of Software Engineering

ashcharles
Posts: 5
Joined: Fri Oct 02, 2015 7:03 pm

Re: Connecting external SD/SDIO device

Wed Oct 07, 2015 3:44 pm

Thanks for the response :).

I added dtoverlay=sdio [1] to my config.txt which remuxes the sdio pins "brcm,function = <7 7 7 7 7 7>; /* ALT3 = SD1 */" as well as pulling in the sdhost overlay [2] which ensures the eMMC pins are muxed. Is there additional muxing or pin configuration needed?

I'm able to see the SD initialization sequence with a scope i.e 400kHz clock and toggling on the CMD line before I get the 'timed out' message from Linux.

[1] https://github.com/raspberrypi/linux/bl ... verlay.dts
[2] https://github.com/raspberrypi/linux/bl ... verlay.dts

oneinsect
Posts: 8
Joined: Sun Aug 02, 2015 7:52 pm

Re: Connecting external SD/SDIO device

Wed Dec 02, 2015 4:17 am

Hi charles,

Were you able to connect any sd card via SDIO pins?

ashcharles
Posts: 5
Joined: Fri Oct 02, 2015 7:03 pm

Re: Connecting external SD/SDIO device

Fri Dec 04, 2015 1:19 am

Hi oneinsect,

IIRC, I was only successful hooking a microSD card up to an RPI B-2, not the Compute Module. Unfortunately, I don't remember exactly how I hooked it up but I suspect, based on the "brcm,pins = <22 23 24 25 26 27>;" from the overlay, that I tried these GPIOs.

Ash

oneinsect
Posts: 8
Joined: Sun Aug 02, 2015 7:52 pm

Re: Connecting external SD/SDIO device

Fri Dec 04, 2015 2:08 am

Thanks charles

Anyone can please tell how those pins are mapped to an sd card?

vjvarada
Posts: 14
Joined: Wed Mar 16, 2016 7:12 pm

Re: Connecting external SD/SDIO device

Wed Mar 30, 2016 5:14 pm

Hi!

Any luck on the Compute module? im facing the exact same issues as you are, Charles.

ashcharles
Posts: 5
Joined: Fri Oct 02, 2015 7:03 pm

Re: Connecting external SD/SDIO device

Wed Mar 30, 2016 5:16 pm

Sorry---no luck. I've had to move on to other challenges. Certainly post back though if you uncover anything interesting.

Return to “Compute Module”