Skip to contentSkip to conversation

DWMMC crontroller in Exynos4412

U-Boot Humberto López León 4 participants 13 messages Aug 25, 2015 – Oct 8, 2015

lore
Share & tools
lore
#0 lore raw

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework GenodeOS. I think you could help me with your experience in this type of implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Thank you for your help

#1 lore raw

+Samsung people

Hi,

Quoted 10 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework GenodeOS. I think you could help me with your experience in this type of implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Thank you for your help

I'm not really sure - the compatible string for that node is:

compatible = "samsung,exynos4412-dw-mshc";

which is different from what exynos5 uses.

Possibly Lukasz / Przemyslaw know about this.

Regards,
Simon

#2 lore raw
Quoted 13 lines · Simon Glass

+Samsung people

Hi,

Quoted 8 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework GenodeOS. I think you could help me with your experience in this type of implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO. And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

Quoted 8 lines
Quoted 2 lines

Thank you for your help

I'm not really sure - the compatible string for that node is:

compatible = "samsung,exynos4412-dw-mshc";

which is different from what exynos5 uses.

As i know, Some register are difference..but i know it doesn't implemented for those registers at u-boot side. If it should be implemented for upper mode than DDR50, it needs to check the compatible.

Best Regards,
Jaehoon Chung

Quoted 10 lines

Possibly Lukasz / Przemyslaw know about this.

Regards,
Simon
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#3 lore raw

Hi,

Quoted 15 lines · Jaehoon Chung
Quoted 13 lines · Simon Glass

+Samsung people

Hi,

Quoted 8 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework GenodeOS. I think you could help me with your experience in this type of implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Quoted 3 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO. And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

Best regards,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
Quoted 27 lines
Quoted 8 lines
Quoted 2 lines

Thank you for your help

I'm not really sure - the compatible string for that node is:

compatible = "samsung,exynos4412-dw-mshc";

which is different from what exynos5 uses.

As i know, Some register are difference..but i know it doesn't implemented for those registers at u-boot side. If it should be implemented for upper mode than DDR50, it needs to check the compatible.

Best Regards,
Jaehoon Chung

Quoted 10 lines

Possibly Lukasz / Przemyslaw know about this.

Regards,
Simon
_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

Hi community,

thank you all for answering my questions.

Quoted 35 lines · Przemyslaw Marczak

Hi,

Quoted 18 lines · Jaehoon Chung
Quoted 16 lines · Simon Glass

+Samsung people

Hi,

Quoted 10 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 5 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

This information is valuable to me, but now I would help if you tell me where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver, but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Thank you very much for your collaboration.

#5 lore raw

Hi Humberto,

Quoted 45 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 35 lines · Przemyslaw Marczak

Hi,

Quoted 18 lines · Jaehoon Chung
Quoted 16 lines · Simon Glass

+Samsung people

Hi,

Quoted 10 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 5 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

Quoted 11 lines

This information is valuable to me, but now I would help if you tell me where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver, but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Thank you very much for your collaboration.

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Best regards,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#6 lore raw

Hi Przemyslaw,

Quoted 61 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 46 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 36 lines · Przemyslaw Marczak

Hi,

Quoted 19 lines · Jaehoon Chung
Quoted 17 lines · Simon Glass

+Samsung people

Hi,

Quoted 11 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 5 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

Quoted 11 lines

This information is valuable to me, but now I would help if you tell me where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver, but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)
but I'm not sure.
What do you think?

Thanks again.

Humberto

#7 lore raw

Hi Humberto,

Quoted 80 lines · Humberto L?pez Le?n

Hi Przemyslaw,

Quoted 61 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 46 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 36 lines · Przemyslaw Marczak

Hi,

Quoted 19 lines · Jaehoon Chung
Quoted 17 lines · Simon Glass

+Samsung people

Hi,

Quoted 11 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 5 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

Quoted 11 lines

This information is valuable to me, but now I would help if you tell me where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver, but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)
but I'm not sure.
What do you think?

Quoted 4 lines

Thanks again.

Humberto

Yes, this is the right file. Also remember about the pinmux setting for sd/mmc.
In U-Boot: arch/arm/mach-exynos/pinmux.c
In kernel: drivers/pinctrl/pinctrl-exynos.c

Best regards,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#8 lore raw

Hi Przemyslaw,

With the information you gave me I managed to implement an important part of SDHCI controller. Currently the driver detects the SD card correctly but I have a problem with writing operations. With the help of linux command dd I found that the driver reads correctly but fails when trying to write. I studied implementations of SDHCI controller in the Linux kernel and the U-boot, but there are things I do not understand.

You have a document that explains how works the SDHCI controller ?

I've also been working on the implementation of DWMMC controller to manage the eMMC in ODROID-X2 (Exynos4412). Currently this driver detects the eMMC card but fails to calculate the capacity of the card. The read and write operations are not yet implemented.

You have a document that explains how works the DWMMC controller?

Thank you for your help!!
Humberto

Quoted 98 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 81 lines · Humberto L?pez Le?n

Hi Przemyslaw,

Quoted 64 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 56 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 37 lines · Przemyslaw Marczak

Hi,

Quoted 20 lines · Jaehoon Chung
Quoted 18 lines · Simon Glass

+Samsung people

Hi,

Quoted 12 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI
controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 5 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

This information is valuable to me, but now I would help if you tell me
where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I
was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver, but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Quoted 4 lines

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)

Quoted 7 lines

but I'm not sure.
What do you think?

Thanks again.

Humberto

Yes, this is the right file. Also remember about the pinmux setting for sd/mmc.
In U-Boot: arch/arm/mach-exynos/pinmux.c
In kernel: drivers/pinctrl/pinctrl-exynos.c

Best regards,

#9 lore raw

Hello Humberto,

Quoted 10 lines · Humberto L?pez Le?n

Hi Przemyslaw,

With the information you gave me I managed to implement an important part of SDHCI controller. Currently the driver detects the SD card correctly but I have a problem with writing operations. With the help of linux command dd I found that the driver reads correctly but fails when trying to write. I studied implementations of SDHCI controller in the Linux kernel and the U-boot, but there are things I do not understand.

You have a document that explains how works the SDHCI controller ?

Please register at Jedec.org, and get this:

https://www.jedec.org/standards-documents/results/JESD84-B451

for eMMC 4.51, there are also older versions.

For SD card:

https://www.sdcard.org/downloads/pls/index.html

Try to find: SDCardStandardv1.9.pdf on the internet :)

Quoted 11 lines

I've also been working on the implementation of DWMMC controller to manage the eMMC in ODROID-X2 (Exynos4412). Currently this driver detects the eMMC card but fails to calculate the capacity of the card. The read and write operations are not yet implemented.

You have a document that explains how works the DWMMC controller?

Thank you for your help!!
Humberto

Which U-Boot version do you use? There was an issue in the mainline with device-tree, which results in eMMC/SD card detection issue. I think, that in few days my patches with fixes can be merged.

Quoted 93 lines · Przemyslaw Marczak
Quoted 92 lines

Hi Humberto,

Quoted 88 lines · Humberto L?pez Le?n

Hi Przemyslaw,

Quoted 64 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 56 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 37 lines · Przemyslaw Marczak

Hi,

Quoted 20 lines · Jaehoon Chung
Quoted 18 lines · Simon Glass

+Samsung people

Hi,

Quoted 12 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2 (exynos4412). I use the DWMMC contoller, but I'm not sure if this is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI
controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 5 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use sdhci controller.

This information is valuable to me, but now I would help if you tell me
where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I
was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver, but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Quoted 4 lines

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)

but I'm not sure.
What do you think?

Thanks again.

Humberto

Quoted 8 lines
Quoted 6 lines

Yes, this is the right file. Also remember about the pinmux setting for sd/mmc.
In U-Boot: arch/arm/mach-exynos/pinmux.c
In kernel: drivers/pinctrl/pinctrl-exynos.c

Best regards,

Best regards,

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
#10 lore raw

Hi Przemyslaw,

Thanks for the documents suggested by you. Now I understand better the SDHCI controller implementations. The U-boot version I'm using the downloaded from
https://github.com/hardkernel/u-boot/commits/odroid-v2010.12. From where I can download the version you're fixing?

Thank you very much for your collaboration.
Humberto

Quoted 150 lines · Przemyslaw Marczak

Hello Humberto,

Quoted 10 lines · Humberto L?pez Le?n

Hi Przemyslaw,

With the information you gave me I managed to implement an important part of SDHCI controller. Currently the driver detects the SD card correctly but I have a problem with writing operations. With the help of linux command dd I found that the driver reads correctly but fails when trying to write. I studied implementations of SDHCI controller in the Linux kernel and the U-boot, but there are things I do not understand.

You have a document that explains how works the SDHCI controller ?

Please register at Jedec.org, and get this:

https://www.jedec.org/standards-documents/results/JESD84-B451

for eMMC 4.51, there are also older versions.

For SD card:

https://www.sdcard.org/downloads/pls/index.html

Try to find: SDCardStandardv1.9.pdf on the internet :)

Quoted 11 lines

I've also been working on the implementation of DWMMC controller to manage the eMMC in ODROID-X2 (Exynos4412). Currently this driver detects the eMMC card but fails to calculate the capacity of the card. The read and write operations are not yet implemented.

You have a document that explains how works the DWMMC controller?

Thank you for your help!!
Humberto

Which U-Boot version do you use? There was an issue in the mainline with device-tree, which results in eMMC/SD card detection issue. I think, that in few days my patches with fixes can be merged.

Quoted 100 lines · Przemyslaw Marczak
Quoted 99 lines

Hi Humberto,

Quoted 95 lines · Humberto L?pez Le?n

Hi Przemyslaw,

Quoted 69 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 61 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 40 lines · Przemyslaw Marczak

Hi,

Quoted 23 lines · Jaehoon Chung
Quoted 21 lines · Simon Glass

+Samsung people

Hi,

Quoted 14 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2
(exynos4412). I use the DWMMC contoller, but I'm not sure if this
is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI
controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 6 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use
sdhci controller.

This information is valuable to me, but now I would help if you tell me
where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I
was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver,
but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Quoted 4 lines

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file
should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)

but I'm not sure.
What do you think?

Thanks again.

Humberto

Quoted 8 lines
Quoted 6 lines

Yes, this is the right file. Also remember about the pinmux setting for sd/mmc.
In U-Boot: arch/arm/mach-exynos/pinmux.c
In kernel: drivers/pinctrl/pinctrl-exynos.c

Best regards,

Best regards,

#11 lore raw
In reply to Przemyslaw Marczak

Hi Przemyslaw,

the version of the U-boot on which you made the corrections in the SDHCI controller is at
https://github.com/hardkernel/u-boot/commits/odroid-v2015.10?

Regards,
Humberto

Quoted 151 lines · Przemyslaw Marczak

Hello Humberto,

Quoted 10 lines · Humberto L?pez Le?n

Hi Przemyslaw,

With the information you gave me I managed to implement an important part of SDHCI controller. Currently the driver detects the SD card correctly but I have a problem with writing operations. With the help of linux command dd I found that the driver reads correctly but fails when trying to write. I studied implementations of SDHCI controller in the Linux kernel and the U-boot, but there are things I do not understand.

You have a document that explains how works the SDHCI controller ?

Please register at Jedec.org, and get this:

https://www.jedec.org/standards-documents/results/JESD84-B451

for eMMC 4.51, there are also older versions.

For SD card:

https://www.sdcard.org/downloads/pls/index.html

Try to find: SDCardStandardv1.9.pdf on the internet :)

Quoted 11 lines

I've also been working on the implementation of DWMMC controller to manage the eMMC in ODROID-X2 (Exynos4412). Currently this driver detects the eMMC card but fails to calculate the capacity of the card. The read and write operations are not yet implemented.

You have a document that explains how works the DWMMC controller?

Thank you for your help!!
Humberto

Which U-Boot version do you use? There was an issue in the mainline with device-tree, which results in eMMC/SD card detection issue. I think, that in few days my patches with fixes can be merged.

Quoted 100 lines · Przemyslaw Marczak
Quoted 99 lines

Hi Humberto,

Quoted 95 lines · Humberto L?pez Le?n

Hi Przemyslaw,

Quoted 69 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 61 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 40 lines · Przemyslaw Marczak

Hi,

Quoted 23 lines · Jaehoon Chung
Quoted 21 lines · Simon Glass

+Samsung people

Hi,

Quoted 14 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2
(exynos4412). I use the DWMMC contoller, but I'm not sure if this
is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI
controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 6 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use
sdhci controller.

This information is valuable to me, but now I would help if you tell me
where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I
was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver,
but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Quoted 4 lines

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file
should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)

but I'm not sure.
What do you think?

Thanks again.

Humberto

Quoted 8 lines
Quoted 6 lines

Yes, this is the right file. Also remember about the pinmux setting for sd/mmc.
In U-Boot: arch/arm/mach-exynos/pinmux.c
In kernel: drivers/pinctrl/pinctrl-exynos.c

Best regards,

Best regards,

#12 lore raw

Hi Humberto,

Quoted 9 lines · Humberto L?pez Le?n

Hi Przemyslaw,

the version of the U-boot on which you made the corrections in the SDHCI controller is at
https://github.com/hardkernel/u-boot/commits/odroid-v2015.10?

Regards,
Humberto

The U-Boot from your link is a Hardkernel's version, and it's very old.

Please check the mainline/master tree. On the top, there are few changes, which fixes the sdhci/mmc issue on Exynos. The problem was in device tree "reg" property parsing.

The mainline config for U3/X2 is "odroid_defconfig".

Best regards

Signature · 4 lines
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com
Quoted 154 lines · Przemyslaw Marczak
Quoted 151 lines

Hello Humberto,

Quoted 10 lines · Humberto L?pez Le?n

Hi Przemyslaw,

With the information you gave me I managed to implement an important part of SDHCI controller. Currently the driver detects the SD card correctly but I have a problem with writing operations. With the help of linux command dd I found that the driver reads correctly but fails when trying to write. I studied implementations of SDHCI controller in the Linux kernel and the U-boot, but there are things I do not understand.

You have a document that explains how works the SDHCI controller ?

Please register at Jedec.org, and get this:

https://www.jedec.org/standards-documents/results/JESD84-B451

for eMMC 4.51, there are also older versions.

For SD card:

https://www.sdcard.org/downloads/pls/index.html

Try to find: SDCardStandardv1.9.pdf on the internet :)

Quoted 11 lines

I've also been working on the implementation of DWMMC controller to manage the eMMC in ODROID-X2 (Exynos4412). Currently this driver detects the eMMC card but fails to calculate the capacity of the card. The read and write operations are not yet implemented.

You have a document that explains how works the DWMMC controller?

Thank you for your help!!
Humberto

Which U-Boot version do you use? There was an issue in the mainline with device-tree, which results in eMMC/SD card detection issue. I think, that in few days my patches with fixes can be merged.

Quoted 100 lines · Przemyslaw Marczak
Quoted 99 lines

Hi Humberto,

Quoted 95 lines · Humberto L?pez Le?n

Hi Przemyslaw,

Quoted 69 lines · Przemyslaw Marczak

Hi Humberto,

Quoted 61 lines · Humberto L?pez Le?n

Hi community,

thank you all for answering my questions.

Quoted 40 lines · Przemyslaw Marczak

Hi,

Quoted 23 lines · Jaehoon Chung
Quoted 21 lines · Simon Glass

+Samsung people

Hi,

Quoted 14 lines · Humberto L?pez Le?n

Hi Simon,
I'm working on implementing a driver for SD/MMC cards in the framework
GenodeOS. I think you could help me with your experience in this type of
implementation in the u-boot.
The hardware platform on which the driver will work is a ODROID-x2
(exynos4412). I use the DWMMC contoller, but I'm not sure if this
is the
right controller to handle SD/MMC cards in Exynos4412 SoC. The SDHCI
controller is most appropriate?

Quoted 5 lines

If you're using exynos4412 board, you can choose sdhci or dwmmc controller for eMMC, not SD/SDIO.
And in my experiment, dwmmc controller is more appropriate than sdhci.(ex, performance)

It depends which mmc channel is used. In Exynos4412, there are 5 channels, but some channel configurations shares GPIO pins:
- MMC0 - sdhci
- MMC1 - sdhci, or MMC0 8-bit
- MMC2 - sdhci - Odroid SD card, 4-bit mode
- MMC3 - sdhci - or MMC2 8-bit
- MMC4 - dwmmc, uses MMC0 pins for 4-bit, and MMC0-1 for 8-bit mode

Quoted 6 lines

Odroid is using MMC2(sdhci) and MMC0/4(sdhci or dwmmc).

So for eMMC cards you can use the dwmmc, and as Jaehoon wrote it is recommended for the better performance, but for SD card you must use
sdhci controller.

This information is valuable to me, but now I would help if you tell me
where I can find the code of SDHCI controller for the SD card of Exynos4412 in U-boat 2015.04-rc2 for a implementationtation reference. I
was reviewing the file exynos_dw_mmc.c as reference of DWMMC driver,
but now I have no idea what the file where the SDHCI driver for the exynos4412 is implemented.

Quoted 4 lines

Thank you very much for your collaboration.

Quoted 5 lines

Please check those files:
- drivers/mmc/s5p_sdhci.c
- drivers/mmc/sdhci.c

But, isn't the kernel a better reference for you?

Thanks for your time to answer my questions. I have reviewed the implementation of SDHCI controller in the Linux kernel for Odroid
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/), but have not been able to identify the specific implementation that is used for handling of SD cards in exynos4412.
You know in what file this controller is implemented? I think the file
should be drivers/mmc/host/sdhci-s3c.c
(https://github.com/hardkernel/linux/blob/odroid-3.0.y/drivers/mmc/host/sdhci-s3c.c)

but I'm not sure.
What do you think?

Thanks again.

Humberto

Quoted 8 lines
Quoted 6 lines

Yes, this is the right file. Also remember about the pinmux setting for sd/mmc.
In U-Boot: arch/arm/mach-exynos/pinmux.c
In kernel: drivers/pinctrl/pinctrl-exynos.c

Best regards,

Best regards,