Part Number:BEAGLEBN
Tool/software: Linux
Hi,
I am trying to interface MMC card via SPI (see attachment) to Beagle bone Black,
It is running linux-4.4.19 version,
I have selected the "MMC/SD/SDIO over SPI" from kernel config (CONFIG_MMC_SPI), and added following entries in the device tree.
spi0_pins: pinmux_spi0_pins { pinctrl-single,pins = < 0x150 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_sclk, INPUT_PULLUP | MODE0 */ 0x154 (PIN_INPUT_PULLDOWN | MUX_MODE0) /* spi0_d0, INPUT_PULLUP | MODE0 */ 0x158 (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_d1, OUTPUT_PULLUP | MODE0 */ 0x15c (PIN_OUTPUT_PULLUP | MUX_MODE0) /* spi0_cs0, OUTPUT_PULLUP | MODE0 */ >; }; &spi0 { pinctrl-names = "default"; pinctrl-0 = <&spi0_pins>; status = "okay"; mmcsdcard@0 { compatible = "mmc-spi-slot"; reg = <0>; voltage-ranges = <3200 3400>; spi-max-frequency = <2000000>; }; };
but after it boots , I cannot see node /dev/mmblk2 created
from kernel log we can see that the driver has not initialized the MMC card,
root@am335x-evm:~# dmesg | grep spi
[ 1.290601] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/ocp/spi@48030000/mmcsdcard@0[0]'
[ 1.290624] of_get_named_gpiod_flags: can't parse 'gpios' property of node '/ocp/spi@48030000/mmcsdcard@0[1]'
[ 1.290832] mmc_spi spi1.0: mmc_spi: power up (22)
[ 1.310113] mmc_spi spi1.0: mmc_spi: power on (22)
[ 4.320330] mmc_spi spi1.0: mmc_spi: clock to 400000 Hz, 0
[ 4.340145] mmc_spi spi1.0: SD/MMC host mmc2, no WP, no poweroff, cd polling
[ 4.347265] mmc_spi spi1.0: mmc_spi: CMD52, resp R2/R5
Please let me know if anything , I am missing ?
Regards,
Nitesh
&spi0 {
pinctrl-names = "default";
pinctrl-0 = <&spi0_pins>;
status = "okay";
mmcsdcard@0 {
compatible = "mmc-spi-slot";
reg = <0>;
voltage-ranges = <3200 3400>;
spi-max-frequency = <2000000>;
};
};