U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Andrei Lalaev <andrey.lalaev@gmail.com>
To: Hiago De Franco <hfranco@baylibre.com>
Cc: u-boot@lists.denx.de, u-boot@lists.u-boot-project.org
Subject: Re: [PATCH v2 0/2] board: sophgo: add support for Milk-V Duo 256M
Date: Tue, 25 Aug 2026 20:01:37 +0200	[thread overview]
Message-ID: <e3ac37d0-be2a-470a-aaa1-0cdcb3b7b45b@gmail.com> (raw)
In-Reply-To: <ao2Iqsq-Xp4dQK4c@hiagonb>

On 25.08.26 14:24, Hiago De Franco wrote:
> Hi Andrei,
> 
> On Sat, Aug 22, 2026 at 11:15:10AM +0200, Andrei Lalaev wrote:
>> Hi Hiago,
>>
>> Thank you for the patches.
>>
>> From your cover letter I understood that SD card is supported.
>> However whatever I try, I always get the following error:
>>
>>     U-Boot 2026.07-00002-gbd5e3de2ed6a (Aug 22 2026 - 10:27:48 +0200)milkv_duo_256m
>>
>>     DRAM:  256 MiB
>>     Core:  20 devices, 13 uclasses, devicetree: separate
>>     MMC:   mmc@4310000: 0
>>     Loading Environment from nowhere... OK
>>     In:    serial@4140000
>>     Out:   serial@4140000
>>     Err:   serial@4140000
>>     Net:
>>     Warning: ethernet@4070000 (eth0) using random MAC address - 16:21:8c:10:cd:96
>>     eth0: ethernet@4070000
>>     Hit any key to stop autoboot: 0
>>     milkv_duo_256m# mmc info
>>     Card did not respond to voltage select! : -110
>>     milkv_duo_256m# mmc rescan
>>     Card did not respond to voltage select! : -110
>>
>>
>> I tried 2 different SD cards and got the same result.
>>
>> Am I doing something wrong, or is there something else I need to configure?
> 
> You are most likely missing this patch:
> 
> https://lore.kernel.org/all/20260507234836.284918-1-hfranco@baylibre.com/
> 
> This is needed in order to make the SD card work. This patch is already
> merged on main branch, as commit 3a4a8963aace ("mmc: cv1800b_sdhci:
> honor 'no-1-8-v' DT property").
> 
> Check this patch and let me know if it works now ;)

Thank you for your response:)

I also tried the latest main branch (so all patches are definitely included)
and had the same problem.

I guess I somehow managed to fix the problem, so below I'll describe what I did
and would like to hear your thoughts about it.


When I generated `fip.bin` using precompiled binaries from fiptool repo [1],
it started working most of the time. Previously I was using an FSBL manually generated
using official SDK [2]. However, I would still occasionally get
voltage select error and timeouts.

So I started comparing FSBL and U-boot from Sophgo (2021.10) and
I couldn't find any differences that could explain this behaviour.

Today I found out that the kernel DTS configures the SD0_CLK pin to a different value [3].
By default, we have 0x48 in IOBLK_G10_REG_SD0_CLK register, but if I set it to 0x84
like kernel does, it magically starts to work all the time.

I understand why increasing the drive strength fixed timeout issues, but I don't understand
why I don't see the same problem with the U-Boot from Sophgo (2021.10).

1 - https://github.com/sophgo/fiptool
2 - https://github.com/milkv-duo/duo-buildroot-sdk-v2/tree/main
3 - https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/arch/riscv/boot/dts/sophgo/sg2002-milkv-duo256m.dts#n68

>>
>>
>> Best regards,
>> Andrei Lalaev
> 
> Regards,
> Hiago.


-- 
Best regards,
Andrei Lalaev

  reply	other threads:[~2026-08-25 19:08 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-07-23 14:44 [PATCH v2 0/2] board: sophgo: add support for Milk-V Duo 256M Hiago De Franco
2026-07-23 14:44 ` [PATCH v2 1/2] board: sophgo: move ethernet driver to common directory Hiago De Franco
2026-08-05 15:29   ` Leo Liang via U-Boot
2026-07-23 14:44 ` [PATCH v2 2/2] board: sophgo: add support for Milk-V Duo 256M Hiago De Franco
2026-08-05 15:31   ` Leo Liang via U-Boot
2026-08-05 15:50 ` [PATCH v2 0/2] " Leo Liang via U-Boot
2026-08-22  9:15 ` Andrei Lalaev
2026-08-25 12:24   ` Hiago De Franco
2026-08-25 18:01     ` Andrei Lalaev [this message]
2026-08-27 13:30       ` Hiago De Franco
2026-08-27 16:04         ` Andrei Lalaev
2026-08-30 15:29           ` Andrei Lalaev
2026-09-04 20:29             ` Hiago De Franco
2026-09-05 13:34               ` Andrei Lalaev

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=e3ac37d0-be2a-470a-aaa1-0cdcb3b7b45b@gmail.com \
    --to=andrey.lalaev@gmail.com \
    --cc=hfranco@baylibre.com \
    --cc=u-boot@lists.denx.de \
    --cc=u-boot@lists.u-boot-project.org \
    /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