[U-Boot] Re : [U-Boot,BUG] snow: mmc: SD card access broken: unable to select a mode

2018-10-23 Thread Guillaume GARDET

Hi,

- Paweł Jarosz  a écrit :
> Hi Guillaume,
> 
> 
> Could you test this patch:
> 
> https://patchwork.ozlabs.org/patch/986180/
> 
> and tell me how it goes?

Unfortunately, it does not solve the problem.
The only solution I found so far is to disable MMC_MODE_HS and 
MMC_MODE_HS_52MHz.
See: 
https://github.com/openSUSE/u-boot/commit/ab0f592165628a43d304106ce8892375543285d4

Cheers,
Guillaume



> 
> 
> Cheers
> 
> Paweł
> 
> 

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [U-Boot, BUG] snow: mmc: SD card access broken: unable to select a mode

2018-10-23 Thread Paweł Jarosz

Hi Guillaume,


Could you test this patch:

https://patchwork.ozlabs.org/patch/986180/

and tell me how it goes?


Cheers

Paweł


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, BUG] snow: mmc: SD card access broken: unable to select a mode

2018-10-15 Thread Guillaume Gardet

Hi,

Le 16/05/2018 à 09:22, Guillaume Gardet a écrit :

Hi Jaehoon,


Le 26/04/2018 à 15:15, Guillaume Gardet a écrit :



Le 26/04/2018 à 12:31, Jaehoon Chung a écrit :

Hi,

On 04/09/2018 09:02 PM, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:



Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?

Sorry for late. Hmm. I will check your issue. Just disable MMC_MODE_HS, then 
it's working fine?
or HS_52MHz?


I tried to disable HS_52MHz only and it did not fix the problem. Then I tried 
to disable both HS and HS_52MHz and it fixed the problem.


Any progress on this problem?



Ping again.
The problem is still there in u-boot v2018.11-rc1.


Guillaume




Guillaume




Guillaume



Best Regards,
Jaehoon Chung



Guillaume

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

   cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
   }








___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, BUG] snow: mmc: SD card access broken: unable to select a mode

2018-05-16 Thread Guillaume Gardet

Hi Jaehoon,


Le 26/04/2018 à 15:15, Guillaume Gardet a écrit :



Le 26/04/2018 à 12:31, Jaehoon Chung a écrit :

Hi,

On 04/09/2018 09:02 PM, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:



Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?

Sorry for late. Hmm. I will check your issue. Just disable MMC_MODE_HS, then 
it's working fine?
or HS_52MHz?


I tried to disable HS_52MHz only and it did not fix the problem. Then I tried 
to disable both HS and HS_52MHz and it fixed the problem.


Any progress on this problem?

Guillaume




Guillaume



Best Regards,
Jaehoon Chung



Guillaume

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

   cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
   }







___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-26 Thread Guillaume Gardet



Le 26/04/2018 à 12:31, Jaehoon Chung a écrit :

Hi,

On 04/09/2018 09:02 PM, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:



Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?

Sorry for late. Hmm. I will check your issue. Just disable MMC_MODE_HS, then 
it's working fine?
or HS_52MHz?


I tried to disable HS_52MHz only and it did not fix the problem. Then I tried 
to disable both HS and HS_52MHz and it fixed the problem.


Guillaume



Best Regards,
Jaehoon Chung



Guillaume

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

   cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
   }





___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [U-Boot, BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-26 Thread Jaehoon Chung
Hi,

On 04/09/2018 09:02 PM, Guillaume Gardet wrote:
> Hi Jaehoon,
> 
> There are problems with SD card access on Samsung Chromebook (snow) with 
> latest master (and also 2018.05-rc1 and 2018.03).
> 
> eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If 
> I disable HS mode, I can access the SD card without problem:
> 
> 
> 
> Once we try to select HS mode, all access to SD card result in failure, even 
> when trying to setup a lower frequency mode, including SD legacy at 25 MHz.
> 
> Any idea what is going? Maybe you have fixes pending?

Sorry for late. Hmm. I will check your issue. Just disable MMC_MODE_HS, then 
it's working fine?
or HS_52MHz?

Best Regards,
Jaehoon Chung

> 
> 
> Guillaume
> 
> diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
> index 23f642980bf..28f4fa0f213 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;
> +    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
> mode' error */
> +//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;
> 
>   cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
>   }
> 

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Anand Moon
Hi Guillaume,

On 9 April 2018 at 21:59, Guillaume Gardet  wrote:
>
>
> Le 09/04/2018 à 18:02, Guillaume Gardet a écrit :
>>
>>
>>
>> Le 09/04/2018 à 17:18, Jean-Jacques Hiblot a écrit :
>>>
>>>
>>>
>>> On 09/04/2018 16:46, Guillaume Gardet wrote:



 Le 09/04/2018 à 16:21, Jean-Jacques Hiblot a écrit :
>
>
>
> On 09/04/2018 16:03, Guillaume Gardet wrote:
>>
>>
>>
>> Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :
>>>
>>>
>>>
>>> On 09/04/2018 14:02, Guillaume Gardet wrote:

 Hi Jaehoon,

 There are problems with SD card access on Samsung Chromebook (snow)
 with latest master (and also 2018.05-rc1 and 2018.03).

 eMMC is ok, but SD card access leads to 'unable to select a mode'
 problem. If I disable HS mode, I can access the SD card without 
 problem:

 
 diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
 index 23f642980bf..28f4fa0f213 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;
 +/* Temp workaround for Chromebook snow to avoid the 'unable to
 select a mode' error */
 +// cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

  cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
  }

 

 Once we try to select HS mode, all access to SD card result in
 failure, even when trying to setup a lower frequency mode, including SD
 legacy at 25 MHz.

 Any idea what is going? Maybe you have fixes pending?
>>>
>>>
>>> Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower
>>> max-frequency (<25MHz) ? It would be interesting to know if it could 
>>> come
>>> from a frequency limitation.
>>
>>
>> I already tried to change SD_HS freq (in mmc_mode2freq) from 5000
>> to 2500 with no difference.
>>
>>> Is there some pad configuration to do when using higher frequency?
>>
>>
>> I do not think so.
>
> Can you enable the debug output and post a log ?


 Here is the log from u-boot built from u-boot-mmc (latest commit:
 21c2ac32b845)
 Yes, I have no serial, so I retyped the messages, so I hope there is no
 typo:
 **
 selecting mode MMC legacy (freq : 0 MHz)
 selecting mode MMC legacy (freq : 25 MHz)
 sd card: widths [4, 1] modes [SD Legacy, SD High SPeed (50MHz)]
 host: widths [4, 1] modes [MMC legacy, SD Legacy, MMC High Speed
 (26MHz), SD High Speed (50MHz), MMC High Speed (52MHz), MMC DDR52 (52MHz)]
 trying mode SD High Speed (50MHz) width 4 (at 50 MHz)
 selecting mode SD High Speed (50 MHz) (freq : 50 MHz)
 unable to read ssr
 selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
 trying mode SD High Speed (50MHz) width 1 (at 50 MHz)
>>>
>>> So it fails either in sd_select_bus_width() or sd_set_card_speed()
>>> Can you try to limit the bus width to 1 ? Does it fail also at 50 MHz ?
>>
>>
>> Yes, it fails too.
>
>
> If I disable sd_set_card_speed, then it is working fine.
>
> Guillaume
>

Thanks for your investigation on this issue,
I feel their is some clk initialization for mmc for exynos platform is missing.

Best Regards
-Anand

>>
>> Guillaume
>>
>>>
 selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
 trying mode SD Legacy (25MHz) width 4 (at 25 MHz)
 selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
 trying mode SD Legacy (25MHz) width 1 (at 25 MHz)
 selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
 unable to select a mode
 mmc_init: -524, time 127
 ** Bad device mmc 1 **
 **

 Note that eMMC (on mmc 0) is working fine with MMC DDR52 (52MHz).

 Guillaume

>>>
>>>
>>
>
> ___
> U-Boot mailing list
> U-Boot@lists.denx.de
> https://lists.denx.de/listinfo/u-boot
___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Guillaume Gardet



Le 09/04/2018 à 18:02, Guillaume Gardet a écrit :



Le 09/04/2018 à 17:18, Jean-Jacques Hiblot a écrit :



On 09/04/2018 16:46, Guillaume Gardet wrote:



Le 09/04/2018 à 16:21, Jean-Jacques Hiblot a écrit :



On 09/04/2018 16:03, Guillaume Gardet wrote:



Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }


Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower max-frequency 
(<25MHz) ? It would be interesting to know if it could come from a frequency 
limitation.


I already tried to change SD_HS freq (in mmc_mode2freq) from 5000 to 
2500 with no difference.


Is there some pad configuration to do when using higher frequency?


I do not think so.

Can you enable the debug output and post a log ?


Here is the log from u-boot built from u-boot-mmc (latest commit: 21c2ac32b845)
Yes, I have no serial, so I retyped the messages, so I hope there is no typo:
**
selecting mode MMC legacy (freq : 0 MHz)
selecting mode MMC legacy (freq : 25 MHz)
sd card: widths [4, 1] modes [SD Legacy, SD High SPeed (50MHz)]
host: widths [4, 1] modes [MMC legacy, SD Legacy, MMC High Speed (26MHz), SD 
High Speed (50MHz), MMC High Speed (52MHz), MMC DDR52 (52MHz)]
trying mode SD High Speed (50MHz) width 4 (at 50 MHz)
selecting mode SD High Speed (50 MHz) (freq : 50 MHz)
unable to read ssr
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD High Speed (50MHz) width 1 (at 50 MHz)

So it fails either in sd_select_bus_width() or sd_set_card_speed()
Can you try to limit the bus width to 1 ? Does it fail also at 50 MHz ?


Yes, it fails too.


If I disable sd_set_card_speed, then it is working fine.

Guillaume



Guillaume




selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 4 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 1 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
unable to select a mode
mmc_init: -524, time 127
** Bad device mmc 1 **
**

Note that eMMC (on mmc 0) is working fine with MMC DDR52 (52MHz).

Guillaume








___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Guillaume Gardet



Le 09/04/2018 à 17:18, Jean-Jacques Hiblot a écrit :



On 09/04/2018 16:46, Guillaume Gardet wrote:



Le 09/04/2018 à 16:21, Jean-Jacques Hiblot a écrit :



On 09/04/2018 16:03, Guillaume Gardet wrote:



Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }


Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower max-frequency 
(<25MHz) ? It would be interesting to know if it could come from a frequency 
limitation.


I already tried to change SD_HS freq (in mmc_mode2freq) from 5000 to 
2500 with no difference.


Is there some pad configuration to do when using higher frequency?


I do not think so.

Can you enable the debug output and post a log ?


Here is the log from u-boot built from u-boot-mmc (latest commit: 21c2ac32b845)
Yes, I have no serial, so I retyped the messages, so I hope there is no typo:
**
selecting mode MMC legacy (freq : 0 MHz)
selecting mode MMC legacy (freq : 25 MHz)
sd card: widths [4, 1] modes [SD Legacy, SD High SPeed (50MHz)]
host: widths [4, 1] modes [MMC legacy, SD Legacy, MMC High Speed (26MHz), SD 
High Speed (50MHz), MMC High Speed (52MHz), MMC DDR52 (52MHz)]
trying mode SD High Speed (50MHz) width 4 (at 50 MHz)
selecting mode SD High Speed (50 MHz) (freq : 50 MHz)
unable to read ssr
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD High Speed (50MHz) width 1 (at 50 MHz)

So it fails either in sd_select_bus_width() or sd_set_card_speed()
Can you try to limit the bus width to 1 ? Does it fail also at 50 MHz ?


Yes, it fails too.

Guillaume




selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 4 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 1 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
unable to select a mode
mmc_init: -524, time 127
** Bad device mmc 1 **
**

Note that eMMC (on mmc 0) is working fine with MMC DDR52 (52MHz).

Guillaume






___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Jean-Jacques Hiblot



On 09/04/2018 16:46, Guillaume Gardet wrote:



Le 09/04/2018 à 16:21, Jean-Jacques Hiblot a écrit :



On 09/04/2018 16:03, Guillaume Gardet wrote:



Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook 
(snow) with latest master (and also 2018.05-rc1 and 2018.03).


eMMC is ok, but SD card access leads to 'unable to select a mode' 
problem. If I disable HS mode, I can access the SD card without 
problem:
 


diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable 
to select a mode' error */

+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }
 



Once we try to select HS mode, all access to SD card result in 
failure, even when trying to setup a lower frequency mode, 
including SD legacy at 25 MHz.


Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower 
max-frequency (<25MHz) ? It would be interesting to know if it 
could come from a frequency limitation.


I already tried to change SD_HS freq (in mmc_mode2freq) from 
5000 to 2500 with no difference.



Is there some pad configuration to do when using higher frequency?


I do not think so.

Can you enable the debug output and post a log ?


Here is the log from u-boot built from u-boot-mmc (latest commit: 
21c2ac32b845)
Yes, I have no serial, so I retyped the messages, so I hope there is 
no typo:

**
selecting mode MMC legacy (freq : 0 MHz)
selecting mode MMC legacy (freq : 25 MHz)
sd card: widths [4, 1] modes [SD Legacy, SD High SPeed (50MHz)]
host: widths [4, 1] modes [MMC legacy, SD Legacy, MMC High Speed 
(26MHz), SD High Speed (50MHz), MMC High Speed (52MHz), MMC DDR52 
(52MHz)]

trying mode SD High Speed (50MHz) width 4 (at 50 MHz)
selecting mode SD High Speed (50 MHz) (freq : 50 MHz)
unable to read ssr
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD High Speed (50MHz) width 1 (at 50 MHz)

So it fails either in sd_select_bus_width() or sd_set_card_speed()
Can you try to limit the bus width to 1 ? Does it fail also at 50 MHz ?


selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 4 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 1 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
unable to select a mode
mmc_init: -524, time 127
** Bad device mmc 1 **
**

Note that eMMC (on mmc 0) is working fine with MMC DDR52 (52MHz).

Guillaume



___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Guillaume Gardet



Le 09/04/2018 à 16:21, Jean-Jacques Hiblot a écrit :



On 09/04/2018 16:03, Guillaume Gardet wrote:



Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }


Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower max-frequency 
(<25MHz) ? It would be interesting to know if it could come from a frequency 
limitation.


I already tried to change SD_HS freq (in mmc_mode2freq) from 5000 to 
2500 with no difference.


Is there some pad configuration to do when using higher frequency?


I do not think so.

Can you enable the debug output and post a log ?


Here is the log from u-boot built from u-boot-mmc (latest commit: 21c2ac32b845)
Yes, I have no serial, so I retyped the messages, so I hope there is no typo:
**
selecting mode MMC legacy (freq : 0 MHz)
selecting mode MMC legacy (freq : 25 MHz)
sd card: widths [4, 1] modes [SD Legacy, SD High SPeed (50MHz)]
host: widths [4, 1] modes [MMC legacy, SD Legacy, MMC High Speed (26MHz), SD 
High Speed (50MHz), MMC High Speed (52MHz), MMC DDR52 (52MHz)]
trying mode SD High Speed (50MHz) width 4 (at 50 MHz)
selecting mode SD High Speed (50 MHz) (freq : 50 MHz)
unable to read ssr
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD High Speed (50MHz) width 1 (at 50 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 4 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
trying mode SD Legacy (25MHz) width 1 (at 25 MHz)
selecting mode SD Legacy (25 MHz) (freq : 25 MHz)
unable to select a mode
mmc_init: -524, time 127
** Bad device mmc 1 **
**

Note that eMMC (on mmc 0) is working fine with MMC DDR52 (52MHz).

Guillaume

___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Jean-Jacques Hiblot



On 09/04/2018 16:03, Guillaume Gardet wrote:



Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) 
with latest master (and also 2018.05-rc1 and 2018.03).


eMMC is ok, but SD card access leads to 'unable to select a mode' 
problem. If I disable HS mode, I can access the SD card without 
problem:
 


diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to 
select a mode' error */

+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }
 



Once we try to select HS mode, all access to SD card result in 
failure, even when trying to setup a lower frequency mode, including 
SD legacy at 25 MHz.


Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower 
max-frequency (<25MHz) ? It would be interesting to know if it could 
come from a frequency limitation.


I already tried to change SD_HS freq (in mmc_mode2freq) from 5000 
to 2500 with no difference.



Is there some pad configuration to do when using higher frequency?


I do not think so.

Can you enable the debug output and post a log ?


Guillaume





JJ




Guillaume











___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Guillaume Gardet



Le 09/04/2018 à 15:58, Jean-Jacques Hiblot a écrit :



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }


Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower max-frequency 
(<25MHz) ? It would be interesting to know if it could come from a frequency 
limitation.


I already tried to change SD_HS freq (in mmc_mode2freq) from 5000 to 
2500 with no difference.


Is there some pad configuration to do when using higher frequency?


I do not think so.

Guillaume





JJ




Guillaume








___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


Re: [U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Jean-Jacques Hiblot



On 09/04/2018 14:02, Guillaume Gardet wrote:

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) 
with latest master (and also 2018.05-rc1 and 2018.03).


eMMC is ok, but SD card access leads to 'unable to select a mode' 
problem. If I disable HS mode, I can access the SD card without problem:
 


diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to 
select a mode' error */

+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }
 



Once we try to select HS mode, all access to SD card result in 
failure, even when trying to setup a lower frequency mode, including 
SD legacy at 25 MHz.


Any idea what is going? Maybe you have fixes pending?


Can try with MMC_MODE_HS | MMC_MODE_HS_52MHz but with a lower 
max-frequency (<25MHz) ? It would be interesting to know if it could 
come from a frequency limitation.

Is there some pad configuration to do when using higher frequency?

JJ




Guillaume





___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot


[U-Boot] [BUG] snow: mmc: SD card access broken: unable to select a mode

2018-04-09 Thread Guillaume Gardet

Hi Jaehoon,

There are problems with SD card access on Samsung Chromebook (snow) with latest 
master (and also 2018.05-rc1 and 2018.03).

eMMC is ok, but SD card access leads to 'unable to select a mode' problem. If I 
disable HS mode, I can access the SD card without problem:

diff --git a/drivers/mmc/dw_mmc.c b/drivers/mmc/dw_mmc.c
index 23f642980bf..28f4fa0f213 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;
+    /* Temp workaround for Chromebook snow to avoid the 'unable to select a 
mode' error */
+//     cfg->host_caps |= MMC_MODE_HS | MMC_MODE_HS_52MHz;

 cfg->b_max = CONFIG_SYS_MMC_MAX_BLK_COUNT;
 }


Once we try to select HS mode, all access to SD card result in failure, even 
when trying to setup a lower frequency mode, including SD legacy at 25 MHz.

Any idea what is going? Maybe you have fixes pending?


Guillaume


___
U-Boot mailing list
U-Boot@lists.denx.de
https://lists.denx.de/listinfo/u-boot