[U-Boot] mmc1 not working on Samsung snow chromebook

Jaehoon Chung jh80.chung at samsung.com
Wed Jan 17 10:05:11 UTC 2018


Hi Guillaume,

On 01/09/2018 11:37 PM, Guillaume Gardet wrote:
> Hi,
> 
> 
> Le 17/11/2017 à 10:48, Jaehoon Chung a écrit :
>> Hi,
>>
>> On 2017년 11월 16일 21:29, Guillaume Gardet wrote:
>>> I found a workaround. If I disable MMC_MODE_HS_52MHz, then it is working fine.
>>>
>>> I guess there is a better way to implement the following patch ?
>>>
>>> **********************************************************************
>>> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
>>> index 23f642980b..a6a0934eef 100644
>>> --- a/drivers/mmc/dw_mmc.c
>>> +++ b/drivers/mmc/dw_mmc.c
>>> @@ -508,7 +508,8 @@ void dwmci_setup_cfg(struct mmc_config *cfg, struct dwmci_host *host,
>>>                  cfg->host_caps |= MMC_MODE_4BIT;
>>>                  cfg->host_caps &= ~MMC_MODE_8BIT;
>>>          }
>>> -       cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
>>> +       /* MMC_MODE_HS_52MHz is broken (at least) on Samsung Snow, so disbale it for now */
>>> +       cfg->host_caps |= MMC_MODE_HS;
>> It means that card is running the lower clock frequency..it's not solution.
>> Timing issue and some problems should be fixed with lowest frequency.
>>
>> Now, i can't test and check more detail. After back to my office or home, i will check what main cause.
> 
> Any progress on this topic ?

Sorry for late. It seems that is related with mmc_power_cycle().

commit 2e7410d76ad11856d09284c18d262d0bb2a3da0c
Author: Kishon Vijay Abraham I <kishon at ti.com>
Date:   Thu Sep 21 16:30:04 2017 +0200

    mmc: disable the mmc clock during power off
    
    There is no point in having the mmc clock enabled during
    power off. Disable the mmc clock. This is similar to how it's
    programmed in Linux Kernel.
    
    Signed-off-by: Kishon Vijay Abraham I <kishon at ti.com>
    Signed-off-by: Vignesh R <vigneshr at ti.com>
    Signed-off-by: Jean-Jacques Hiblot <jjhiblot at ti.com>
    Reviewed-by: Simon Glass <sjg at chromium.org>

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 664b71affd..be68d8d930 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -1971,6 +1971,7 @@ static int mmc_power_on(struct mmc *mmc)
 
 static int mmc_power_off(struct mmc *mmc)
 {
+       mmc_set_clock(mmc, 1, true);
 #if CONFIG_IS_ENABLED(DM_MMC) && CONFIG_IS_ENABLED(DM_REGULATOR)
        if (mmc->vmmc_supply) {
                int ret = regulator_set_enable(mmc->vmmc_supply, false);

Current, I'm looking for fixing it.

Could you test with removing its code?

Best Regards,
Jaehoon Chung

> 
> Guillaume
> 
>>
>> Best Regards,
>> Jaehoon Chung
>>
>>>          cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
>>>   }
>>> **********************************************************************
>>>
>>>
>>> Guillaume
>>>
>>>
>>>
>>> Le 15/11/2017 à 11:27, Guillaume Gardet a écrit :
>>>>
>>>> Le 15/11/2017 à 11:22, Guillaume Gardet a écrit :
>>>>> Forgot to Cc ML. Done now.
>>>>>
>>>>>
>>>>> Le 15/11/2017 à 11:14, Guillaume Gardet a écrit :
>>>>>> Hello,
>>>>>>
>>>>>> I tested U-Boot v2017.09 on a Samsung Snow (Chromebook ARM) and while mmc0 (internal eMMC) is working fine, mmc1 (external SD slot) does not work.
>>>>>> I get the following error for 'mmc dev 1' command:
>>>>>>      mmc_init: -110, time 30
>>>> Please also note that on boot (or on 1st 'mmc dev 1' cmd if I stop auto-boot), I firstly get:
>>>>      mmc_init: -5, time 39
>>>>
>>>> Then, all next attempts retruns:
>>>>      mmc_init: -110, time 30
>>>>
>>>>
>>>> Guillaume
>>>>
>>>>
>>>>>> Any idea what could be wrong?
>>>>>>
>>>>>> Guillaume
>>>>>>
>>>>>>
>>> _______________________________________________
>>> U-Boot mailing list
>>> U-Boot at lists.denx.de
>>> https://lists.denx.de/listinfo/u-boot
> 
> 
> 
> 



More information about the U-Boot mailing list