Hi all,
I have a short question regarding BPI-R4 boot from NAND. I was able to built my own custom BL2 AT-F and FIP U-boot but regarding what kind of DTB I’m choosing for U-boot, eMMC is not able to be initialized.
Normally I tried to set “mt7988-rfb” DTB for U-boot to be able to use eMMC instead SD slot, but each time I’m booting with DIP switch in position AB = 01 I’m getting this error:
EasyOS(BPi-R4)> mmc info
Card did not respond to voltage select! : -110
mmc_init: -95, time 16
There is a restriction when using SPI NAND that MUX for SD/eMMC is not switched to eMMC?
Looking into the DTS sources for mt7988-rfb.dts
:
mmc0_pins_default: mmc0default {
mux {
function = "flash";
groups = "emmc_51";
};
conf-cmd-dat {
pins = "EMMC_DATA_0", "EMMC_DATA_1", "EMMC_DATA_2",
"EMMC_DATA_3", "EMMC_DATA_4", "EMMC_DATA_5",
"EMMC_DATA_6", "EMMC_DATA_7", "EMMC_CMD";
input-enable;
};
conf-clk {
pins = "EMMC_CK";
};
conf-dsl {
pins = "EMMC_DSL";
};
conf-rst {
pins = "EMMC_RSTB";
};
};
and mt7988-sd-rfb.dts
:
mmc1_pins_default: mmc1default {
mux {
function = "flash";
groups = "emmc_45";
};
conf-cmd-dat {
pins = "SPI2_CSB", "SPI2_MISO", "SPI2_MOSI",
"SPI2_CLK", "SPI2_HOLD";
input-enable;
drive-strength = <MTK_DRIVE_4mA>;
};
conf-clk {
pins = "SPI2_WP";
drive-strength = <MTK_DRIVE_4mA>;
};
};
I’m seeing that mux
part configuration that sounds like it must switch between eMMC and SD slot.
De-compiling the u-boot.dtb
after build shows me clearly this:
mmc0default {
phandle = <0x0e>;
mux {
function = "flash";
groups = "emmc_51";
};
conf-cmd-dat {
pins = "EMMC_DATA_0\0EMMC_DATA_1\0EMMC_DATA_2\0EMMC_DATA_3\0EMMC_DATA_4\0EMMC_DATA_5\0EMMC_DATA_6\0EMMC_DATA_7\0EMMC_CMD";
input-enable;
};
conf-clk {
pins = "EMMC_CK";
};
conf-dsl {
pins = "EMMC_DSL";
};
conf-rst {
pins = "EMMC_RSTB";
};
};
};
..
mmc@11230000 {
compatible = "mediatek,mt7988-mmc\0mediatek,mt7986-mmc";
reg = <0x00 0x11230000 0x00 0x1000>;
interrupts = <0x00 0x8f 0x04>;
clocks = <0x08 0x3f 0x08 0x40 0x08 0x41 0x08 0x42>;
clock-names = "source\0hclk\0source_cg\0axi_cg";
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <0x0e>;
max-frequency = <0x3197500>;
bus-width = <0x08>;
cap-mmc-highspeed;
cap-mmc-hw-reset;
vmmc-supply = <0x0f>;
vqmmc-supply = <0x10>;
non-removable;
phandle = <0x30>;
};
..
regulator-3p3v {
compatible = "regulator-fixed";
regulator-name = "fixed-3.3V";
regulator-min-microvolt = <0x325aa0>;
regulator-max-microvolt = <0x325aa0>;
regulator-boot-on;
regulator-always-on;
phandle = <0x0f>;
};
regulator-1p8v {
compatible = "regulator-fixed";
regulator-name = "fixed-1.8V";
regulator-min-microvolt = <0x1b7740>;
regulator-max-microvolt = <0x1b7740>;
regulator-boot-on;
regulator-always-on;
phandle = <0x10>;
};
And soon as I’m inserting the SD card in slot is shows me the external card:
> mmc info
Card did not respond to voltage select! : -110
mmc_init: -95, time 17
EasyOS(BPi-R4)> mmc info
Device: mmc@11230000
Manufacturer ID: 3
OEM: 5344
Name: SC32G
Bus Speed: 25000000
Mode: MMC legacy
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 29.7 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
Is something that I’m missing out here?
Thank you in advance.