-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
50 MHz SDIO bus not working for some SD cards #23
Comments
Is it possible this is a manifestation of #20 ? |
I see no traffic in dmesg so I don’t think so |
I'm getting the same performance. I tested the microsd card on another machine and for 25-30 MB/s but on the BeagleV, I am getting the same performance as @tommythorn. |
after update the frequency in dts as below:
the system will pop up the below message
|
@tekkamanninja @esmil @geertu interesting results from @MichaelZhuxx when changing the SD card frequency |
sorry for missing test data
|
That's great. I see similar numbers after raising the max frequency to 50MHz. |
Michael Zhu found that raising the max frequency on the SD Card controller to 50MHz seems to work and improve performance: starfive-tech/Fedora_on_StarFive#23 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
While it seems to work for both me and @mcd500, @teknoraver has issues with raising the max frequency to 50MHz: |
on yocto with 5.13-rc3
|
Michael Zhu found that raising the max frequency on the SD Card controller to 50MHz seems to work and improve performance: starfive-tech/Fedora_on_StarFive#23 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Confirm that I also now get 22+ MB/s with Akira-san's image ( Fedora-riscv64-vic7100-xfce-dev-Rawhide-20210516233526.n.0-sda-akira-5.13.rc3.raw.zst) |
@MichaelZhuxx @tekkamanninja it appears @teknoraver had trouble when increasing the frequency so maybe there is variance between different boards? #23 (comment) @esmil is that why you are keeping that frequency change out of https://github.com/starfive-tech/linux/tree/esmil_starlight ? |
Yes, that change broke sdcard for me. It boots, and then the card start making errors until it seems removed:
|
@pdp7 Yes, that's exactly why. After you found the missing It'd be cool if we could somehow figure out if it's just @teknoraver's board/card. I guess one way to do that would be to just re-apply the change and wait for more people to complain, but hopefully we can find a nicer solution. |
Michael Zhu found that raising the max frequency on the SD Card controller to 50MHz seems to work and improve performance: starfive-tech/Fedora_on_StarFive#23 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Michael Zhu found that raising the max frequency on the SD Card controller to 50MHz seems to work and improve performance: starfive-tech/Fedora_on_StarFive#23 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Beta developers who are having problems with SD card read/write, here is a suggestion that please add c_macro "_SET_SYSCON_REG_register50_SCFG_sdio0_cclk_dlychain_sel(v)" in INIT_FUNC_DEF(sdio0) to adjust delay shift between clk and data signal. the value of v is 0~31 which means the delay_shift(sel) = 0.16 * sel (ns). please have a try and sort out a appropriate value. thanks @mcd500, @teknoraver @pdp7 |
@teknoraver could you please try the fw_payload.bin.out that @mcd500 has linked in this post? We think it may improve the problems that some people have been having with SD card stability |
I can, but I didn't have stability with the SD card, except with the high frequency patch |
ANyway, with the new fw and the patch, I still get this:
|
@teknoraver Which patch is that exactly? That looks like mmc0 is probed twice.. |
@esmil well, when I get stability issues the card seems being inserted and removed continuously, even it it's always inserted, |
@MichaelZhuxx any suggestions given what Matteo Croce (@teknoraver) is seeing in that log? |
@teknoraver do you still seem performance issues with the newer SD cards that you have? I am trying to determine if there is anyone for which 50 MHz does not. |
I finally had a time to investigate the sd card. The log for working SD
The log for not working SD
The line in not working SD is suspicious.
I will look into it deeper. |
Indeed, some cards are failing. |
I will try 25MHz. The most difficulty was to find the sd cards which fails, only two out of all others I have. |
@teknoraver @mcd500 any updates? We still have some cards that can not hit 50MHz right? |
Yes, at least two models |
@mcd500 what manufacturer and model are those SD cards? @MichaelZhuxx would like to try to reproduce does not have a SD card that fails at 50 MHz |
For me, a Kingston 16 GB card, labeled SA16G |
could you please take a picture for this TF card, I can buy the same one for testing |
We were collecting picture of the cards, but I don't remember where. |
do you mean this link?https://forum.beagleboard.org/t/known-good-sd-cards/29958 |
This TF card is no longer available in the market. we have verified three type of TF card and no issue happened. |
Update: I add "_SET_SYSCON_REG_register50_SCFG_sdio0_cclk_dlychain_sel(12)" in INIT_FUNC_DEF(sdio0) for u-boot and run it with 50MHz patch. All above cards(SanDisk, SUMSUNG, TOSHIBA, KINGSTON, Lexar, aigo, etc.) are working well. @teknoraver please download the u-boot and dtb binary and try it. looking forward to hearing from your test result.
|
Michael Zhu found that raising the max frequency on the SD Card controller to 50MHz seems to work and improve performance: starfive-tech/Fedora_on_StarFive#23 Signed-off-by: Emil Renner Berthing <kernel@esmil.dk>
Verified in new Fedora Image Fedora-riscv64-developer-xfce-with-esp-Rawhide-20210822.n.0-sda.raw.zst, and test result is as below shown:
|
That URL doesn't work. |
It seems the day was bumped. See https://fedora.starfivetech.com/pub/downloads/BeagleV-release/ |
@tommythorn reports:
@tekkamanninja @MichaelZhuxx: The Seeed FAQ shows 22 MB/s with SD card. I presume this means it was Linux 4.19 that Seeed tested with? Maybe there is a problem with 5.10 on the Fedora image that is causing it to be 4.6 MB/s?
The text was updated successfully, but these errors were encountered: