SDMMC
The QB EMMC driver can be configured and instanced using the sdmmc
node. For example:
sdmmc {
/* Instance numbering starts from 0 */
sdmmc@3 {
Instance = <3>;
/*
* 2 - skip CMD0, start full init with CMD1
* 1 - init only, exit after CMD0 and initiating CMD1
* 0 - full initialization
*/
InitTypeNative = <0>;
InitTypePL = <0>;
InitTypeOSL = <0>;
factor =
/* ClockDivisor, CardClockDivisor, Mantissa */
<4 2 1>;
DataWidth = <6>;
DisableHS400 = <1>;
/* Values depend on SDR or DDR mode selection */
TapVal = <0x9>;
TrimVal = <0x5>;
};
};
Where:
-
Instance
is the controller instance in hardware: 0, 1, or 2, as explained in the example's comments. -
factor
is the internal controller clock divisor setting <ClockDivisor, CardClockDivisor, Mantissa>. -
DisableHS400
is set to 1 for EMMC in DDR 50, or 0 for EMMC in HS400 (if supported by the device). -
TapVal
andTrim
Val are fixed values based on SDR/DDR mode. They should not be changed.
The SDMMC driver is shared by several stage bootloaders (Quickboot, Partition Loader, and OS Loader).
The InitTypeNative
, InitTypeFL
, and InitTypeOSL
fields allow further initialization time optimization in SDMMC node. These nodes are:
InitTypeNative = <0>;
InitTypePL = <0>;
InitTypeOSL = <0>;
For each field:
- 0 specifies full initialization.
- 1 abbreviates initialization: the process ends after sending CMD0 and initiating CMD1.
- 2 skips CMD0 and starts full initialization with CMD1.