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.

Linux/AM5716: SD card 1.8V switching

Part Number: AM5716

Tool/software: Linux

Dear Team,

I am working on a custom board with AM5716 based CPU variant.

I have MMC1(SDR104) controller of AM571x connected to TS3A27518EPWR MUX (NO1-NO6 lines, schematics below). Mux selection lines are controlled to chose the input source as MMC.

I am able to boot MMC card Class-4.

I am seeing issue with UHS-cards, failing to switch to 1.8V and ending with SD error initialization, below is the log.

I have verified that controller HCTL & AC12 are properly configured to 1.8V and PMIC is also setting VSDMMC to 1.8V

Our custom board design is as per AM571x-IDK, I have used kernel prints to get the sequence.

[    3.505696] dmm 4e000000.dmm: initialized all PAT entries
[    3.513841] Inside mmc_set_ios: mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[    3.525498] Inside mmc_set_ios: mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[    3.535433] hctosys: unable to open rtc device (rtc0)
[    3.546668] Inside mmc_set_ios: mmc0: clock 400000Hz busmode 2 powermode 2 cs 1 Vdd 21 width 0 timing 0
[    3.565727] Inside mmc_set_ios: mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[    3.575508] ALSA device list:
[    3.578488]   No soundcards found.
[    3.582870] Waiting for root device PARTUUID=7a1fc7e1-02...
[    3.603901] MMC0:Inside mmc_sd_get_cid rocr = c1ff8000
[    3.609060] MMC0:CCS & S18A is set in response
[    3.613538] MMC0:Inside mmc_set_signal_voltage signal_voltage = 1
[    3.619966] MMC0:Inside mmc_set_signal_voltage CMD-11 success
[    3.626754] MMC0:Inside mmc_set_signal_voltage card is not busy
[    3.632697] MMC0:Inside mmc_set_signal_voltage Setting clock = 0
[    3.638743] Inside mmc_set_ios: mmc0: clock 0Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[    3.647754] MMC0:Inside omap_hsmmc_start_signal_voltage_switch signal_voltage = 1
[    3.655284] MMC0: Inside omap_hsmmc_start_signal_voltage_switch 1.8V switch request
[    3.662972] MMC0:Inside omap_hsmmc_conf_bus_power iov = 1
[    3.668405] MMC0:Inside omap_hsmmc_conf_bus_power HCTL = b10
[    3.674097] MMC0:Inside set_sd_bus_power
[    3.678035] MMC0:Inside set_sd_bus_power loops_per_jiffy = 61475
[    3.684076] MMC0:Inside set_sd_bus_power SDBP is set
[    3.689058] MMC0:Inside set_sd_bus_power i = 0
[    3.693552] MMC0: Inside omap_hsmmc_start_signal_voltage_switch AC12 = 0
[    3.700280] MMC0: Inside omap_hsmmc_start_signal_voltage_switch AC12 = 80000
[    3.707367] 1.8V
[    3.709209] MMC0: Switch enabled - 1
[    3.714801] MMC0: Inside omap_hsmmc_set_power
[    3.719261] MMC0: Inside omap_hsmmc_set_power calling set_pbias
[    3.725218] MMC0: Inside omap_hsmmc_set_pbias
[    3.729677] MMC0: Inside omap_hsmmc_set_pbias power_off pbias_enabled state = 1
[    3.737027] Inside regulator_disable
[    3.740615] Inside _regulator_disable use_count = 1
[    3.745530] MMC0:Inside omap_hsmmc_set_pbias pbias-disabled
[    3.751123] MMC0: Inside omap_hsmmc_set_power power_on
[    3.756293] MMC0: Inside omap_hsmmc_enable_supply iov = 7
[    3.761713] MMC0: Inside mmc_regulator_set_ocr vdd_bit = 21
[    3.767318] Inside regulator_set_voltage min = 3300000 max = 3400000
[    3.773712] MMC0: Inside mmc_regulator_set_ocr regulator OCR set = 0
[    3.780090] MMC0: Inside omap_hsmmc_enable_supply interface voltage needed
[    3.787029] Inside regulator_disable
[    3.790617] Inside regulator_disable its always_on
[    3.795440] Inside regulator_set_voltage min = 1800000 max = 1800000
[    3.801825] Inside palmas_ldo_read addr = 50 dest = 0
[    3.807573] Inside regulator_get_voltage_sel_regmap
[    3.812630] Inside regulator_get_voltage_sel_regmap vsel-51 val-2b
[    3.819265] Inside regulator_set_voltage_sel_regmap vsel-51 sel-13
[    3.825753] Inside regulator_enable
[    3.829255] MMC0: Inside omap_hsmmc_set_pbias
[    3.833731] MMC0: Inside omap_hsmmc_set_pbias power_on
[    3.838977] MMC0: Inside omap_hsmmc_set_pbias calling regulator_set_voltage uvoltage = 0x1b7740
[    3.847810] Inside regulator_set_voltage min = 1800000 max = 1800000
[    3.854203] Inside regulator_get_voltage_sel_regmap
[    3.859102] Inside regulator_get_voltage_sel_regmap vsel-e00 val-1
[    3.865318] Inside regulator_set_voltage_sel_regmap vsel-e00 sel-0
[    3.871526] MMC0: Inside omap_hsmmc_set_pbias pbias set voltage fine
[    3.878002] Inside regulator_enable
[    3.893281] MMC0:Inside mmc_set_signal_voltage Setting clock = 400000
[    3.899751] Inside mmc_set_ios: mmc0: clock 400000Hz busmode 2 powermode 2 cs 0 Vdd 21 width 0 timing 0
[    3.910426] MMC0:Inside mmc_set_signal_voltage card not busy err = 0
[    3.916841] MMC0:not a SPI host
[    3.920080] Inside mmc_all_send_cid
[    3.924755] Error CMD-2 err = 0xffffff92
[    3.928695] mmc0: error -110 whilst initialising SD card
[    3.934045] Inside mmc_set_ios: mmc0: clock 400000Hz busmode 1 powermode 2 cs 0 Vdd 21 width 0 timing 0
[    3.943856] Inside mmc_set_ios: mmc0: clock 0Hz busmode 2 powermode 0 cs 0 Vdd 0 width 0 timing 0
[    3.952766] MMC0: Inside omap_hsmmc_set_power
[    3.957241] MMC0: Inside omap_hsmmc_set_power calling set_pbias
[    3.963184] MMC0: Inside omap_hsmmc_set_pbias
[    3.967656] MMC0: Inside omap_hsmmc_set_pbias power_off pbias_enabled state = 1
[    3.975005] Inside regulator_disable
[    3.978594] Inside _regulator_disable use_count = 1
[    3.983766] MMC0:Inside omap_hsmmc_set_pbias pbias-disabled
[    3.989360] MMC0: Inside omap_hsmmc_set_power power_off
[    3.994619] Inside regulator_disable
[    3.998206] Inside regulator_disable its always_on
[    4.003014] MMC0: Inside mmc_regulator_set_ocr vdd_bit = 0
[    4.008535] Inside regulator_disable
[    4.012122] Inside regulator_disable its always_on
[    4.016944] MMC0: Inside mmc_regulator_set_ocr regulator OCR set = 0

I observed that voltage at R226, R227 is 2.54V instead of 1.8V, what  could be the reason, here is part of the schematics

Thanks,

Vamshi G.