Part Number: AM5728
platform : am572x-idk
sdk : processor-sdk-linux 05.02.00.10
U-Boot version: 2018.01
U-Boot config: am57xx_evm_defconfig
U-Boot devicetree: am572x-idk.dts
Here is the part of the device tree related to mmc1:
&mmc1 { pinctrl-names = "default", "hs", "sdr12", "sdr25", "sdr50", "ddr50", "sdr104"; pinctrl-0 = <&mmc1_pins_default>; pinctrl-1 = <&mmc1_pins_hs>; pinctrl-2 = <&mmc1_pins_sdr12>; pinctrl-3 = <&mmc1_pins_sdr25>; pinctrl-4 = <&mmc1_pins_sdr50>; pinctrl-5 = <&mmc1_pins_ddr50 &mmc1_iodelay_ddr_rev20_conf>; pinctrl-6 = <&mmc1_pins_sdr104 &mmc1_iodelay_sdr104_rev20_conf>; }; &mmc1 { status = "okay"; vmmc-supply = <&v3_3d>; vqmmc-supply = <&ldo1_reg>; bus-width = <4>; cd-gpios = <&gpio6 27 GPIO_ACTIVE_LOW>; /* gpio 219 */ }; v3_3d: fixedregulator-v3_3d { compatible = "regulator-fixed"; regulator-name = "V3_3D"; vin-supply = <&smps9_reg>; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; }; &i2c1 { @tps659038 { tps659038_pmic { regulators { smps9_reg: smps9 {
/* VDD_3_3D */ regulator-name = "smps9"; regulator-min-microvolt = <3300000>; regulator-max-microvolt = <3300000>; regulator-always-on; regulator-boot-on; }; ldo1_reg: ldo1 { /* VDDSHV8 - VSDMMC */ /* NOTE: on rev 1.3a, data supply */ regulator-name = "ldo1"; regulator-min-microvolt = <1800000>; regulator-max-microvolt = <3300000>; regulator-boot-on; regulator-always-on; }; }; }; }; };
I am using a SanDisk Extreme® microSDXC™ UHS-I CARD:https://shop.westerndigital.com/products/memory-cards/sandisk-extreme-uhs-i-microsd#SDSQXA2-064G-AN6MA
I want to support UHS mode in uboot, but it seems to be unsuccessful. Debugging found that UHS capabilities was masked in the sd_select_mode_and_width function:Image may be NSFW.
Clik here to view.
uhs_en depends on bit [24] (OCR_S18R) of mmc->ocr, which is set in function sd_send_op_cond:
Send CMD55 and ACMD41, then (OCR) content in the response on the CMD line.
Image may be NSFW.
Clik here to view.
#define MMC_CMD_APP_CMD 55
#define SD_CMD_APP_SEND_OP_COND 41
#define OCR_BUSY 0x80000000
#define OCR_HCS 0x40000000
Image may be NSFW.
Clik here to view.
Image may be NSFW.
Clik here to view.
I added some print information to these two functions, and found that bit [24] (OCR_S18R) of cmd.arg is 1, but bit [24] (OCR_S18R) of cmd.response[0] is 0.
Image may be NSFW.
Clik here to view.
Then I look at the OCR register definition, bit [24-30] is reserved.
Image may be NSFW.
Clik here to view.[
1. I want to know what is the definition of bit [24] of ocr? Why use it as a flag to UHS?
2. The print information contains this error "mmc@4809c000: No vmmc supply" in function mmc_power_init. Vmmc supply was set but not found. Why is that? Does it affect uhs mode?