All of lore.kernel.org
 help / color / mirror / Atom feed
From: Otto Meier <gf435@gmx.net>
To: u-boot@lists.denx.de
Subject: [BUG] U-boot does not detect emmc card in odroid-c2 for newer U-boot as 2020.04
Date: Thu, 26 Nov 2020 11:51:56 +0100	[thread overview]
Message-ID: <ef3cb589-9faf-9212-2bc3-b3b7c2e53e67@gmx.net> (raw)
In-Reply-To: <0259ad84-a403-c130-f86d-2750e2a45ea9@samsung.com>

Hi



Am 26.11.20 um 04:13 schrieb Jaehoon Chung:
> Hi,
> 
> On 11/19/20 11:39 PM, Otto Meier wrote:
>> Hi,
>>
>> with?these?modifications?i?get:
>>
>> U-Boot 2021.01-rc2-00047-g9324c9a823-dirty (Nov 19 2020 - 15:33:00 +0100)?odroid-c2
>>
>> Model:?Hardkernel?ODROID-C2
>> SoC:???Amlogic?Meson?GXBB?(S905)?Revision?1f:c?(0:1)
>> DRAM:??2?GiB
>> MMC:???mmc at 72000:?0,?mmc at 74000:?1
>> In:????serial
>> Out:???serial
>> Err:???serial
>> Net:???Could?not?get?PHY?for?ethernet at c9410000:?addr?-1
>> No?ethernet?found.
>>
>> Hit?any?key?to?stop?autoboot:??0
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2000
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?cdff0000
>> MESON?EMMC?status?=?01ff2800
>> meson_dm_mmc_send_cmd[226]
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2800
>> meson_dm_mmc_send_cmd[226]
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2000
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?cdff0000
>> MESON?EMMC?status?=?01ff2800
>> meson_dm_mmc_send_cmd[226]
>> Card?did?not?respond?to?voltage?select!?:?-110
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2000
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?cdff0000
>> MESON?EMMC?status?=?01ff2800
>> meson_dm_mmc_send_cmd[226]
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2800
>> meson_dm_mmc_send_cmd[226]
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2000
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?00ff2000
>> MESON?EMMC?status?=?c5ff0000
>> MESON?EMMC?status?=?01ff2800
>> meson_dm_mmc_send_cmd[226]
>> Card?did?not?respond?to?voltage?select!?:?-110
>> MMC?Device?2?not?found
>> no?mmc?device?at?slot?2
>> starting?USB...
>>
>> Hope?this?shed?more?light?on?the?issue.
> 
> Sorry for late. Did you check more? or Is its status same?
> If my understanding is correct, it seems that it's working fine with SD-card, right?
> When i have checked its register value, resp timeout bit[11] is set. Adnd Bus_fsm is 1100.
> I don't know what mean bus_fsm(0x1100)..
> According to my understanding, resp_timeout value can be increased with cmd's argument.
> Current u-boot is set to 4s. but maximum timeout value is 32.768s.
> 
> But i don't think that it's not affected with your target.. Because you mentioned that v2020.04 u-boot is working.
> So i'm checking what is different to u-boot v2020.04.
> 
> Best Regards,
> Jaehoon Chung
> 
>>
>> Best?regards
>>
>> Am?19.11.20?um?12:50?schrieb?Jaehoon?Chung:
>>> Hi,
> 
> 
Yes i have tried different things: i have tried uboot-2020.07, 2020.10 all do not work. SO
it started with 2020.07. A diff between 2020.04 and 2020.07 in meson_gx_mmc.c gives
the following don?t know if it shows some point.

--- u-boot-2020.04/drivers/mmc/meson_gx_mmc.c   2020-11-21 20:42:01.768860866 +0100
+++ u-boot-2020.07/drivers/mmc/meson_gx_mmc.c   2020-07-06 21:22:53.000000000 +0200
@@ -4,6 +4,7 @@
   */
  
  #include <common.h>
+#include <clk.h>
  #include <cpu_func.h>
  #include <dm.h>
  #include <fdtdec.h>
@@ -13,6 +14,7 @@
  #include <asm/io.h>
  #include <asm/gpio.h>
  #include <asm/arch/sd_emmc.h>
+#include <linux/delay.h>
  #include <linux/log2.h>
  
  static inline void *get_regbase(const struct mmc *mmc)
@@ -198,7 +200,7 @@
                 status = meson_read(mmc, MESON_SD_EMMC_STATUS);
         } while(!(status & STATUS_END_OF_CHAIN) && get_timer(start) < 10000);
  
-       if (!(status & STATUS_END_OF_CHAIN))
+       if (!(status & STATUS_END_OF_CHAIN))
                 ret = -ETIMEDOUT;
         else if (status & STATUS_RESP_TIMEOUT)
                 ret = -ETIMEDOUT;
@@ -241,12 +243,23 @@
         struct mmc_uclass_priv *upriv = dev_get_uclass_priv(dev);
         struct mmc *mmc = &pdata->mmc;
         struct mmc_config *cfg = &pdata->cfg;
+       struct clk_bulk clocks;
         uint32_t val;
+       int ret;
+
  #ifdef CONFIG_PWRSEQ
         struct udevice *pwr_dev;
-       int ret;
  #endif
  
+       /* Enable the clocks feeding the MMC controller */
+       ret = clk_get_bulk(dev, &clocks);
+       if (ret)
+               return ret;
+
+       ret = clk_enable_bulk(&clocks);
+       if (ret)
+               return ret;
+
         cfg->voltages = MMC_VDD_33_34 | MMC_VDD_32_33 |
                         MMC_VDD_31_32 | MMC_VDD_165_195;
         cfg->host_caps = MMC_MODE_8BIT | MMC_MODE_4BIT |

---------------------------------

SD Card is working, i can boot to u-boot command line , insert
an SD card and get with u-Boot git:

U-Boot 2021.01-rc2-00136-gd361eafe82-dirty (Nov 24 2020 - 16:23:10 +0100) odroid-c2

Model: Hardkernel ODROID-C2
SoC:   Amlogic Meson GXBB (S905) Revision 1f:c (0:1)
DRAM:  2 GiB
MMC:   mmc at 72000: 0, mmc at 74000: 1
In:    serial
Out:   serial
Err:   serial
Net:   eth0: ethernet at c9410000
Hit any key to stop autoboot:  0

only with emmc i get :

=> mmc info
Card did not respond to voltage select!
=> mmc dev 1
Card did not respond to voltage select!

after inserting SD Card i get:

=> mmc info
Device: mmc at 72000
Manufacturer ID: 74
OEM: 4a60
Name: USDU1
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 119.1 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> mmc dev 1
Card did not respond to voltage select!
=> mmc list
mmc at 72000: 0 (SD)
mmc at 74000: 1
=>


Any Idea where i can help further?

Best Regards

Otto

  reply	other threads:[~2020-11-26 10:51 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <CGME20201116155543epcas1p11eb1f56ace61fef6dc06758cf87f0982@epcas1p1.samsung.com>
2020-11-16 14:16 ` [BUG] U-boot does not detect emmc card in odroid-c2 for newer U-boot as 2020.04 Otto Meier
2020-11-16 22:39   ` Jaehoon Chung
2020-11-17 19:08     ` Otto Meier
2020-11-17 22:53       ` Jaehoon Chung
2020-11-18  8:12       ` Alexander Dahl
2020-11-18 11:44         ` Otto Meier
2020-11-18 12:23           ` Jaehoon Chung
2020-11-18 15:54             ` Otto Meier
2020-11-19 11:50               ` Jaehoon Chung
2020-11-19 14:39                 ` Otto Meier
2020-11-26  3:13                   ` Jaehoon Chung
2020-11-26 10:51                     ` Otto Meier [this message]
2020-11-19 15:52                 ` Otto Meier
2020-11-19 17:53                   ` Anand Moon
2020-11-20 13:48                     ` Otto Meier
     [not found]                   ` <6c15eac0-62a2-0f89-8f60-0c8286059805@samsung.com>
     [not found]                     ` <d9af1f3a-f9e2-1ebc-1a50-55d8ec50c639@gmx.net>
     [not found]                       ` <53ef94fd-2573-0cfa-5f98-3aa093d7fb27@samsung.com>
2020-11-26 13:46                         ` Otto Meier
2020-11-27 16:15                         ` Otto Meier
2020-11-18 17:09   ` Heinrich Schuchardt
2020-11-18 18:04     ` Otto Meier

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=ef3cb589-9faf-9212-2bc3-b3b7c2e53e67@gmx.net \
    --to=gf435@gmx.net \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.