AnsweredAssumed Answered

eSDHC UHS-1 Functionality

Question asked by Johh Boggs on Mar 27, 2019
Latest reply on Apr 4, 2019 by Yiping Wang

I am having trouble getting the eSDHC interface of the T1040 Processor on my board to operate in anything but the low speed default mode, when using a UHS-1 SD card. I have tried cards from two different vendors, both of which are UHS-1 cards rated for up to 100MB/s, and in each case the processor does not successfully negotiate the speed change.

I have the IRQ03/SDHC_VS line configured as SDHC_VS. The SDHC_VS pin is controlling a voltage switch. The switch sets the pull up voltage to Data, clock and command lines of the SD card, as well as the EVDD voltage into the T1040 to either 3.3V or 1.8V. The default (startup) state is 3.3V.  

We are using a 4.1.35 linux-qoriq kernel supplied to us from NXP’s 2.0 SDK with the 1703 patch. Inside of kernel-source/drivers/mmc, I can see the files that I believe are important to switching the voltage for the sd card. As a result, I’ve added logging to the following files:








I believe the function we really care about is esdhc_signal_voltage_switch (in sdhci-of-esdhc.c). In that function, if the variable signal_voltage is set to MMC_SIGNAL_VOLTAGE_330, but I think we want to set it to MMC_SIGNAL_VOLTAGE_180 since the case statement for VOLTAGE does everything that the T1040RM.pdf outlines in section POR sequence (PORESET), page 222. I see that signal_voltage is never set to MMC_SIGNAL_VOLTAGE_180 because of the mmc_power_up function in core.c (copied below).


if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_330) == 0)

                dev_dbg(mmc_dev(host), "Initial signal voltage of 3.3v\n");

else if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_180) == 0)

                dev_dbg(mmc_dev(host), "Initial signal voltage of 1.8v\n");

else if (__mmc_set_signal_voltage(host, MMC_SIGNAL_VOLTAGE_120) == 0)

                dev_dbg(mmc_dev(host), "Initial signal voltage of 1.2v\n");


Because of the “else if” statement, it never tires the lower voltage. I’ve modified the code above to try forcing it to MMC_SIGNAL_VOLTAGE_180.  With that code in place, using an oscilloscope I can see the voltage change from 3.3V to 1.8V, and data is present on the command line. The processor makes four attempts to communicate at the 1.8V level then then falls back to 3.3V operation. In the code, CMD5 seems to timeout (logs for the 3.3V case and the 1.8V case are attached).

I worry that we are configured as an MMC high speed device instead of an SD UHS-1 device that supports SDR50 or SDR104.


Our DTS file has the following entry:


        sdhc@114000 {

            compatible = "fsl,t1040-esdhc", "fsl,esdhc";

            reg = <0x114000 0x1000>;

            interrupts = <0x30 0x2 0x0 0x0>;

            clock-frequency = <0x0>;

            fsl,iommu-parent = <0x2f>;

            fsl,liodn-reg = <0x30 0x530>;


            rcpm-wakeup = <0xd 0x80>;



Thank you,

John Boggs