Hello @Oswalag
Thank you for reply. I set u-boot to open via SD or NOR(QSPI) according to rcw configuration with switch. When u-boot opens via NOR, eMMC mux is activated by CPLD. I have successfully activated eMMC but it is started as 4 buses every time. I get pinstate error while opening u-boot.
MMC:
esdhc_change_pinstate 0 error
esdhc_set_timing error -22
=> mmcinfo
esdhc_change_pinstate 4 error
esdhc_set_timing error -22
Device: FSL_SDHC
Manufacturer ID: 13
OEM: 14e
Name: 0IM20
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 5.1
High Capacity: Yes
Capacity: 118.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 KiB
HC WP Group Size: 32 MiB
User Capacity: 118.6 GiB WRREL
Boot Capacity: 31.5 MiB ENH
RPMB Capacity: 4 MiB ENH
After opening the kernel I get the error "bus width 8 failed".
dmesg | grep mmc
[ 1.496588] mmc0: SDHCI controller on 2140000.esdhc [2140000.esdhc] using ADMA 64-bit
[ 2.912927] mmc0: switch to bus width 8 failed
[ 2.924054] mmc0: new high speed MMC card at address 0001
[ 2.925439] mmcblk0: mmc0:0001 0IM20G 119 GiB
[ 2.926164] mmcblk0boot0: mmc0:0001 0IM20G partition 1 31.5 MiB
[ 2.926869] mmcblk0boot1: mmc0:0001 0IM20G partition 2 31.5 MiB
[ 2.927160] mmcblk0rpmb: mmc0:0001 0IM20G partition 3 4.00 MiB, chardev (508:0)
[ 2.930264] mmcblk0: p1
/sys/kernel/debug/mmc0# cat ios
clock: 52000000 Hz
actual clock: 50000000 Hz
vdd: 21 (3.3 ~ 3.4 V)
bus mode: 2 (push-pull)
chip select: 0 (don't care)
power mode: 2 (on)
bus width: 2 (4 bits)
timing spec: 1 (mmc high-speed)
signal voltage: 0 (3.30 V)
driver type: 0 (driver type B)
My definitions for emmc in dts and dtsi files are as follows;
dts;
&esdhc {
status = "okay";
compatible = "fsl,ls1088a-esdhc", "fsl,esdhc";
non-removable;
bus-width = <8>;
};
dtsi; (changed bus width to 8)
esdhc: esdhc@2140000 {
compatible = "fsl,ls1088a-esdhc", "fsl,esdhc";
reg = <0x0 0x2140000 0x0 0x10000>;
interrupts = <0 28 0x4>; /* Level high type */
clock-frequency = <0>;
voltage-ranges = <1800 1800 3300 3300>;
sdhci,auto-cmd12;
little-endian;
bus-width = <8>;
status = "okay";
};
I want to run emmc as 8 bus width. I have seen parameters like pinctrl-names, pinctrl-0, vmmc-supply, mmc-hs200-1_8v but I always got a compilation error in a few dts attempts. Especially when I defined "mmc-hs200-1_8v", I saw that emmc was not loaded in the kernel at all and I got an error. Are there any parameters that I definitely need to add among these parameters? Can you give an example? What is the reason why emmc does not work with 8 bus width? Are there any parts that you see as missing or incorrect?
Note: I added the picture of the processor's SD, eMMC and CPLD connections.