This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM5728: SD UHS support in U-boot

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:

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.

#define MMC_CMD_APP_CMD 55

#define SD_CMD_APP_SEND_OP_COND 41

#define OCR_BUSY 0x80000000

#define OCR_HCS 0x40000000

#define OCR_S18R 0x1000000

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.

Then I look at the OCR register definition, bit [24-30] is reserved.

 [

 

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?

 

  • Hi,
    You query has been assigned to a TI engineer. Please note that response may be delayed due to Christmas and New Year holidays.
  • Allen,

    are you using an actual AM5728 IDK EVM (Part# TMDXIDK572x)? If so, rather than trying to debug what you have, can you instead run the latest processor SDK for that platform as-is and verify U-Boot operation. The idea is that this should serve as a known-good starting point for UHS operation such as HS200 and other modes.

    allen.zhang said:
    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?

    There should be no such errors if you are using the standard current Linux SDK. Access to the regulators is especially important for UHS support as it involves switching to 1.8V for the I/Os via the vqmmc regulator. You don't see a warning like "No vqmmc supply"? There could be issues with your U-Boot config, and/or device tree setup. Hence the suggestion of going back to the current SDK.

    Regards, Andreas