EHL - EMMC

Programming, for all ages and all languages.
Post Reply
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

EHL - EMMC

Post 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
Octocontrabass
Member
Member
Posts: 5531
Joined: Mon Mar 25, 2013 7:01 pm

Re: EHL - EMMC

Post 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.)
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

Re: EHL - EMMC

Post by ravi »

what a fantastic suggestion,,, Thanks Thanks

i got EMMC working with No DMA, SDMA and ADMA
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

Re: EHL - EMMC

Post 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
Octocontrabass
Member
Member
Posts: 5531
Joined: Mon Mar 25, 2013 7:01 pm

Re: EHL - EMMC

Post 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.
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

Re: EHL - EMMC

Post 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
User avatar
zaval
Member
Member
Posts: 656
Joined: Fri Feb 17, 2017 4:01 pm
Location: Ukraine, Bachmut
Contact:

Re: EHL - EMMC

Post 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.
ANT - NT-like OS for x64 and arm64.
efify - UEFI for a couple of boards (mips and arm). suspended due to lost of all the target park boards (russians destroyed our town).
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

Re: EHL - EMMC

Post by ravi »

Hello Octocontrabass

is tuning required for HS400 mode ?
Octocontrabass
Member
Member
Posts: 5531
Joined: Mon Mar 25, 2013 7:01 pm

Re: EHL - EMMC

Post 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).
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

Re: EHL - EMMC

Post 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
Octocontrabass
Member
Member
Posts: 5531
Joined: Mon Mar 25, 2013 7:01 pm

Re: EHL - EMMC

Post 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).
ravi
Member
Member
Posts: 105
Joined: Fri Sep 08, 2023 10:46 am

Re: EHL - EMMC

Post 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
Octocontrabass
Member
Member
Posts: 5531
Joined: Mon Mar 25, 2013 7:01 pm

Re: EHL - EMMC

Post 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.
Post Reply