Page 1 of 1

EHL - EMMC

Posted: Sun Oct 27, 2024 9:44 pm
by ravi
Hello Octocontrabass

i am working on the EMMC interface, i am able to bring up the interface, use commands like send CSD etc,, but unable to read and write,, i am not able to the find SDMA descriptor format, so that i populate and start the transactions

Re: EHL - EMMC

Posted: Sun Oct 27, 2024 10:52 pm
by Octocontrabass
The EMMC interface is a standard PCI SD Host Controller Interface. The specification is available here. The "simplified" specification includes the DMA descriptor format, and I think it has everything you need to write a driver for the host controller. (You may need to look elsewhere for information about which commands an EMMC device will understand.)

Re: EHL - EMMC

Posted: Wed Oct 30, 2024 7:02 pm
by ravi
what a fantastic suggestion,,, Thanks Thanks

i got EMMC working with No DMA, SDMA and ADMA

Re: EHL - EMMC

Posted: Fri Nov 01, 2024 11:23 am
by ravi
hello Octocontrabass

RDC_636112, section 19 says emmc version 5.1 i suppose,

but the Host version register(0xfe) says 0x1002, i.e version 3(PartA2_SD Host_Controller_Simplified_Specification_Ver4.20.pdf)

i am little confused here

Re: EHL - EMMC

Posted: Fri Nov 01, 2024 12:24 pm
by Octocontrabass
The Host Controller Version register only tells you which version of SDHCI it supports. It doesn't tell you anything about eMMC.

I think you can support eMMC 5.1 using SDHCI 3.0, but I don't know how to tell for sure.

Re: EHL - EMMC

Posted: Fri Nov 01, 2024 6:14 pm
by ravi
Sorry this is the first time using this interface,,, why is SDHC mixed with emmc(what is the relation between them), even when EHL has separate SD controller

Re: EHL - EMMC

Posted: Fri Nov 01, 2024 6:50 pm
by zaval
ravi wrote: Fri Nov 01, 2024 6:14 pm Sorry this is the first time using this interface,,, why is SDHC mixed with emmc(what is the relation between them), even when EHL has separate SD controller
eMMC specification doesn't establish any HC interface standard (unfortunately) and SDA does establish such, but it's optional, so you may end up with an absolutely vendor specific HC at all. fortunately, often it's the SDHCI one for SD. 2 standards are close to each other, some commands are the same, that's why they mix. Almost always HC IP cores handle both standards, you need to read your SoC/chipset manual on what and how is the HC supposed to do. and I believe, you might want also to check for the eMMC specification in addition to the SDA's ones.

Re: EHL - EMMC

Posted: Fri Nov 08, 2024 5:08 pm
by ravi
Hello Octocontrabass

is tuning required for HS400 mode ?

Re: EHL - EMMC

Posted: Fri Nov 08, 2024 9:20 pm
by Octocontrabass
ravi wrote: Fri Nov 08, 2024 5:08 pmis tuning required for HS400 mode ?
Usually no. The BIOS is supposed to do it for you.

If you want to try tuning the eMMC interface anyway, there's a tuning guide (document 641124).

Re: EHL - EMMC

Posted: Tue Nov 12, 2024 3:06 pm
by ravi
Hello Octocontrabass:

After i get control from bootloader, i haver reset EMMC controller and did init,,, Switched to hs:200 mode and used command 21 to tune it and then changed to hS400

is this all that is required?


i have seen in slim bootloader doing additional things
https://github.com/slimbootloader/slimb ... cTuningLib

Re: EHL - EMMC

Posted: Tue Nov 12, 2024 8:54 pm
by Octocontrabass
ravi wrote: Tue Nov 12, 2024 3:06 pmis this all that is required?
I think so. Resetting the eMMC controller shouldn't reset its tuning, so only the eMMC device needs to be tuned.
ravi wrote: Tue Nov 12, 2024 3:06 pmi have seen in slim bootloader doing additional things
It looks like it's tuning the eMMC controller. You can read about that in the tuning guide (document 641124).

Re: EHL - EMMC

Posted: Wed Nov 13, 2024 9:33 am
by ravi
1) sorry my question was incorrect

my intended question was after doing.. "i haver reset EMMC controller and did init,,, Switched to hs:200 mode and used command 21 to tune it and then changed to hS400"

is this DLL tuning what SBL is doing required ?

2) "Resetting the eMMC controller shouldn't reset its tuning, so only the eMMC device needs to be tune",, where is the tune data stored, that emmc can use after reset also

I have requested "document 641124" from intel,, thanks

Re: EHL - EMMC

Posted: Wed Nov 13, 2024 9:06 pm
by Octocontrabass
ravi wrote: Wed Nov 13, 2024 9:33 amis this DLL tuning what SBL is doing required ?
I don't think so, but I can't check the tuning guide right now.
ravi wrote: Wed Nov 13, 2024 9:33 amwhere is the tune data stored, that emmc can use after reset also
The eMMC host controller and the eMMC chip both have their own set of registers for tuning. The tune data is stored in those registers. As far as I know, resetting the eMMC host controller doesn't reset its tune registers, but resetting the eMMC device might reset its tune registers.

The BIOS might also save a copy of the tune data for fast boot, but I don't know if you could use it.