Hi Igor,
huge thanks for your quick reply.
Maybe i'm getting that wrong... But, i don't want to use uSDHC module. i'd like to add a new sd device, using SPI1 (or SPI2 it's the same) signals, removed from CSI module. To achieve that, I enabled MMC_OVER_SPI in yocto menuconfing (this is the reference https://www.kernelconfig.io/config_mmc_spi?q=&kernelversion=5.4.118&arch=arm) and i double checked the .config file and all dependecies are imported.
my new device tree is:
&ecspi1 {
fsl,spi-num-chipselects = <1>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_ecspi1>;
cs-gpios = <&gpio4 26 0 GPIO_ACTIVE_HIGH>;
status = "okay";
/*
spidev@0x00 {
compatible = "spidev";
spi-max-frequency = <20000000>;
reg = <0>;
};
*/
mmc-slot@0x00 {
#address-cells = <1>;
#size-cells = <1>;
compatible = "mmc-spi-slot";
reg = <0>;
spi-max-frequency = <50000>;
voltage-ranges = <3000 3400>;
disable-wp;
disable-cd;
};
};
It compiles without errors or warnings, and during boot sequence i can see the line:
[ 2.284524] mmc_spi spi0.0: SD/MMC host mmc2, no WP, no poweroff, cd polling
[ 2.289852] sdhci-pltfm: SDHCI platform and OF driver helper
[ 2.301530] sdhci-esdhc-imx 2190000.usdhc: Got CD GPIO
[ 2.348249] mmc0: SDHCI controller on 2190000.usdhc [2190000.usdhc] using ADMA
[ 2.397736] mmc1: SDHCI controller on 2194000.usdhc [2194000.usdhc] using ADMA
there's the mmc2 instantiated.
Besides, when the os is running, if I insert the sd card in my adapter, i can see these errors:
[ 96.674783] mmc_spi spi0.0: no support for card's volts
[ 96.680106] mmc2: error -22 whilst initialising SD card
[ 96.686496] mmc_spi spi0.0: no support for card's volts
[ 96.697171] mmc2: error -22 whilst initialising MMC card
So i really think that there's a way out....
thanks again
Simone