Skip to content

Commit

Permalink
cn9130-crb: Add a workaround for the MMC timeout issue in U-Boot
Browse files Browse the repository at this point in the history
For some reason, the controller disables the bus power sometime after
it was enabled by the driver. The reference manual says, in Table 645,
about the SD_BUS_POWER bit:

> ... It will be cleared if one of the following occurs: the
> sd_bus_vlt and the voltage support in the Capabilities Register 1 do
> not match or if a card removal state was detected.

Further investigation will be needed to find the (electrical?)
root-cause of this issue.
  • Loading branch information
wkz committed Aug 24, 2023
1 parent 7ca7ac1 commit 2a9d4f3
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions board/aarch64/cn9130-crb/uboot/cn9130-crb-env.dtsi
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
/ {
config {
environment {
/* After the MMC driver has enabled bus power,
* the controller seems to sometimes detect a
* card removal state , which causes it to
* disable power again. This hack re-enables the
* bus power in those cases.
*/
bootcmd = "
setexpr.b pwrctl *0xf2780029
setexpr pwrctl ${pwrctl} \"|\" 1
mw.b 0xf2780029 ${pwrctl}

run ixboot
";
boot_targets = "mmc1";
ethprime = "eth1";

Expand Down

0 comments on commit 2a9d4f3

Please sign in to comment.