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

Problem detecting eMMC from uboot #166

Open
anho13 opened this issue Jun 20, 2023 · 0 comments
Open

Problem detecting eMMC from uboot #166

anho13 opened this issue Jun 20, 2023 · 0 comments

Comments

@anho13
Copy link

anho13 commented Jun 20, 2023

Hi, we have a board based on SAMA5D27-SOM1-EK where we have removed the SD Card slot and have a micron eMMC as SDMMC0.

When we build at91-bootstrap to run from QSPI and load u-boot from eMMC, at91bootstrap successfully reads the u-boot binary to memory and executes it. From that point we can not reach the eMMC anymore.

We modified the sdhc_init() function in /driver/sdhc.c to force card detect and activate high speed to get it working.
sdhc_writeb(SDMMC_MC1R, sdhc_readb(SDMMC_MC1R) | SDMMC_MC1R_FCD);
sdhc_writeb(SDMMC_HC1R, sdhc_readb(SDMMC_HC1R) | SDMMC_HC1R_HSEN);

When we try to build both at91bootstrap and u-boot to run from QSPI we have the same problem.

Any suggestions...?

`RomBOOT
ba_offset = 0xb ...

Dump DDRAMC Registers:
@address: 0x0 0x4 0x8 0xc
0xf000c000: 0x10 0x3004ff 0xd00039 0x22239337
0xf000c010: 0x2c81716 0x82482 0x33338 0x10000
0xf000c020: 0x16 0x50008 0x0 0x0
0xf000c030: 0x6 0xf6504 0x0 0x0
0xf000c040: 0x0 0x0 0x0 0x0
0xf000c050: 0x0 0x0 0x0 0x1
0xf000c060: 0x0 0x0 0x0 0x0
0xf000c070: 0x0 0x0 0x0 0x0
0xf000c080: 0x0 0x0 0x0 0x0
0xf000c090: 0x0 0x0 0x0 0x0
0xf000c0a0: 0x0 0x0 0x0 0x0
0xf000c0b0: 0x0 0x0 0x1 0x0
0xf000c0c0: 0x0 0x0 0x0 0x0
0xf000c0d0: 0x0 0x0 0x0 0x0
0xf000c0e0: 0x0 0x0 0x0 0x4000
0xf000c0f0: 0x484d5044 0x44524320 0x0 0x20301
0xf000c100: 0x0 0x0 0x4040404 0x3030303
0xf000c110: 0x0 0x1 0x4304301 0x0
0xf000c120: 0x0 0x0 0xd00 0xd00
0xf000c130: 0xd00 0xd00 0xe00 0xe00
0xf000c140: 0xe00 0xe00 0x11 0x11
0xf000c150: 0x11 0x11 0x10 0x0
Applying VDDSDMMC errata to ID: 0x33

AT91Bootstrap 4.0.6-rc1-dirty (2023-06-20 15:38:05)

All interrupts redirected to AIC
JUMP_ADDR: 0x23f00000
at91-qspi: cmd->inst = 0x66
at91-qspi: cmd->inst = 0x99
at91-qspi: cmd->inst = 0x66
at91-qspi: cmd->inst = 0x99
at91-qspi: cmd->inst = 0x9f
SF: Got Manufacturer and Device ID: bf2643
at91-qspi: cmd->inst = 0x6
at91-qspi: cmd->inst = 0x98
at91-qspi: cmd->inst = 0x5
at91-qspi: cmd->inst = 0x5a
at91-qspi: cmd->inst = 0x5a
at91-qspi: cmd->inst = 0x5a
at91-qspi: cmd->inst = 0x5a
at91-qspi: cmd->inst = 0x5a
at91-qspi: cmd->inst = 0x5a
at91-qspi: cmd->inst = 0x35
at91-qspi: cmd->inst = 0x5
at91-qspi: cmd->inst = 0x6
at91-qspi: cmd->inst = 0x1
at91-qspi: cmd->inst = 0x5
at91-qspi: cmd->inst = 0x35
SF: Copy 0xa0000 bytes from 0x8000 to 0x23f00000
at91-qspi: cmd->inst = 0xeb
SF: Done to load image

U-Boot 2023.04-01086-gbad2618b8c-dirty (Jun 20 2023 - 14:44:20 +0200)

CPU: SAMA5D27 1G bits DDR2 SDRAM
Crystal frequency: 24 MHz
CPU clock : 492 MHz
Master clock : 164 MHz
DRAM: 128 MiB
done setting gpios
Core: 131 devices, 24 uclasses, devicetree: separate
MMC: sdio-host@a0000000: 0, sdio-host@b0000000: 1

In: serial
Out: serial
Err: serial
Net: eth0: ethernet@f8008000
=> mmc list
sdio-host@a0000000: 0
sdio-host@b0000000: 1
=> mmc info
=>`

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

No branches or pull requests

1 participant