Skip to content
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

SD card not detected on a M0 core #2

Open
takayuki-imada opened this issue Apr 3, 2023 · 0 comments
Open

SD card not detected on a M0 core #2

takayuki-imada opened this issue Apr 3, 2023 · 0 comments

Comments

@takayuki-imada
Copy link

Hi,

Thanks a lot for providing this u-boot porting to BL808.

I have followed the instruction described in https://github.com/openbouffalo/u-boot/releases/tag/bl808-2023-02-19 to use this u-boot porting on my Ox64 board.
(A compiler I used can be found at https://musl.cc/riscv32-linux-musl-cross.tgz.)

However, u-boot running on top of the M0 core cannot detect an inserted SD card on my board.

=> mmc list
mmc@20060000: 0
=> mmc info
=>

I have enabled the logging functionality of u-boot, and an obtained result indicates that mmc commands with "SD_CMD_APP_SEND_SCR" return some errors.

=> mmc dev
CMD_SEND:0
                ARG                      0x00000000
                MMC_RSP_NONE
CMD_SEND:8
                ARG                      0x000001aa
                MMC_RSP_R1,5,6,7         0x000001aa
CMD_SEND:55
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x00000120
CMD_SEND:41
                ARG                      0x40300000
                MMC_RSP_R3,4             0x00ff8000
...
...
CMD_SEND:55
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x00000120
CMD_SEND:41
                ARG                      0x40300000
                MMC_RSP_R3,4             0xc0ff8000
CMD_SEND:2
                ARG                      0x00000000
                MMC_RSP_R2               0x02544d53
                                         0x41303447
                                         0x1135d3d5
                                         0x3900d400

                                        DUMPING DATA
                                        000 - 02 54 4d 53
                                        004 - 41 30 34 47
                                        008 - 11 35 d3 d5
                                        012 - 39 00 d4 00
CMD_SEND:3
                ARG                      0x00000000
                MMC_RSP_R1,5,6,7         0x12340500
CMD_SEND:9
                ARG                      0x12340000
                MMC_RSP_R2               0x400e0032
                                         0x5b590000
                                         0x1d177f80
                                         0x0a400000

                                        DUMPING DATA
                                        000 - 40 0e 00 32
                                        004 - 5b 59 00 00
                                        008 - 1d 17 7f 80
                                        012 - 0a 40 00 00
CMD_SEND:7
                ARG                      0x12340000
                MMC_RSP_R1,5,6,7         0x00000700
CMD_SEND:55
                ARG                      0x12340000
                MMC_RSP_R1,5,6,7         0x00000920
CMD_SEND:51
                ARG                      0x00000000
                RET                      -70
CMD_SEND:51
                ARG                      0x00000000
                RET                      -110
CMD_SEND:51
                ARG                      0x00000000
                RET                      -110
CMD_SEND:51
                ARG                      0x00000000
                RET                      -110
mmc_init: -110, time 219

On the other hand, I found that u-boot running on top of the D0 core which is built for buildroot (https://github.com/openbouffalo/buildroot_bouffalo) can correctly detect the SD card. Therefore, my Ox64 board and SD card seem fine.

=> mmc list
mmc@20060000: 0 (SD)

=> mmc info
Device: mmc@20060000
Manufacturer ID: 2
OEM: 544d
Name: SA04G
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 3.6 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes

Many thanks,

--
Takayuki

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant