public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Przemyslaw Marczak <p.marczak@samsung.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] DWMMC crontroller in Exynos4412
Date: Thu, 08 Oct 2015 10:33:15 +0200	[thread overview]
Message-ID: <56162A4B.7030804@samsung.com> (raw)
In-Reply-To: <56158593.6050506@uclv.cu>

Hi Humberto,

On 10/07/2015 10:50 PM, Humberto L?pez Le?n wrote:
> 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
-- 
Przemyslaw Marczak
Samsung R&D Institute Poland
Samsung Electronics
p.marczak at samsung.com


> On 10/01/2015 07:24 AM, Przemyslaw Marczak wrote:
>> Hello Humberto,
>>
>> On 09/28/2015 03:27 PM, Humberto L?pez Le?n wrote:
>>> 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 :)
>>>
>>> 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.
>>
>>> On 08/27/2015 02:47 AM, Przemyslaw Marczak wrote:
>>>> Hi Humberto,
>>>>
>>>> On 08/26/2015 07:24 PM, Humberto L?pez Le?n wrote:
>>>>> Hi Przemyslaw,
>>>>>
>>>>> On 08/26/2015 10:12 AM, Przemyslaw Marczak wrote:
>>>>>> Hi Humberto,
>>>>>>
>>>>>> On 08/26/2015 03:40 PM, Humberto L?pez Le?n wrote:
>>>>>>> Hi community,
>>>>>>>
>>>>>>> thank you all for answering my questions.
>>>>>>>
>>>>>>> On 08/26/2015 02:53 AM, Przemyslaw Marczak wrote:
>>>>>>>> Hi,
>>>>>>>>
>>>>>>>> On 08/26/2015 08:23 AM, Jaehoon Chung wrote:
>>>>>>>>> On 08/26/2015 11:26 AM, Simon Glass wrote:
>>>>>>>>>> +Samsung people
>>>>>>>>>>
>>>>>>>>>> Hi,
>>>>>>>>>>
>>>>>>>>>> On 25 August 2015 at 13:10, Humberto L?pez Le?n
>>>>>>>>>> <humberto@uclv.cu>
>>>>>>>>>> wrote:
>>>>>>>>>>> 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)
>>>>>>>>>
>>>>>>>>
>>>>>>>> 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.
>>>>>>> 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?
>>>>> 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
>>>>>
>>>>
>>>> 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,
>
>

      reply	other threads:[~2015-10-08  8:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-25 19:10 [U-Boot] DWMMC crontroller in Exynos4412 Humberto López León
2015-08-26  2:26 ` Simon Glass
2015-08-26  6:23   ` Jaehoon Chung
2015-08-26  6:53     ` Przemyslaw Marczak
2015-08-26 13:40       ` Humberto López León
2015-08-26 14:12         ` Przemyslaw Marczak
2015-08-26 17:24           ` Humberto López León
2015-08-27  6:47             ` Przemyslaw Marczak
2015-09-28 13:27               ` Humberto López León
2015-10-01 11:24                 ` Przemyslaw Marczak
2015-10-07 13:44                   ` Humberto López León
2015-10-07 20:50                   ` Humberto López León
2015-10-08  8:33                     ` Przemyslaw Marczak [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=56162A4B.7030804@samsung.com \
    --to=p.marczak@samsung.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox