I am having a similar problem using the SPI(3-wire) IP core and uClinux. I am using DE2-115 board and tried with 4 different cards (nothing changed), also same output when using no card at all. I am using "nios2"-branch (uClinux 3.7.0+), but have tried with "v3.3-nios2 -> v3.6-nios2" with same results.
mmc_spi spi32766.0: setup mode 0, 8 bits/w, 400000 Hz max --> 0
mmc0: req done (CMD58): 0: 00000000 00000000 00000000 00000000
mmc0: host doesn't support card's voltages
mmc0: error -22 whilst initialising SD card
My dts is configured as follows:
mmc_spi: spi <at> 0x10003420 {
compatible = "ALTR,spi-12.0", "ALTR,spi-1.0";
reg = < 0x10003420 0x00000020 >;
interrupt-parent = < &cpu >;
interrupts = < 2 >;
mmc-slot <at> 0 {
compatible = "mmc-spi-slot";
reg = < 0x00000000 >;
voltage-ranges = <3300 3300>;
spi-max-frequency = <2000000>;
};
};
I have really checked all the wire connections multiple times. They are connected as follows:
SD_DAT --> MISO
SD_CMD <-- MOSI
SD_CLK <-- SCLK
SD_DAT <-- SS_N
Any hints or suggestions on what I am doing wrong is appreciated. Thank you.