Can't access mmc #0 on mt7623 when booted from external SD
David Woodhouse
dwmw2 at infradead.org
Tue Jun 16 18:13:30 CEST 2020
The Banana Pi R2 bootloader will load U-Boot from either the internal
eMMC, or the external SD card if the latter is present.
If booted from the eMMC (and an SD card is subsequently inserted), both
work from U-Boot. Both also work from Linux, whichever device is booted
from.
If booted from SD, the internal eMMC cannot be accessed from U-Boot.
This makes it slightly difficult for me to write a U-Boot script which
installs OpenWRT from the SD card to the internal eMMC...
From SD:
U-Boot 2020.07-rc4-00057-gc622afb087 (Jun 16 2020 - 17:05:55 +0100)
CPU: MediaTek MT7623 E3
DRAM: 2 GiB
WDT: Started with servicing (60s timeout)
MMC: mmc at 11230000: 0, mmc at 11240000: 1
Loading Environment from FAT... ** No device specified **
## Warning: Unknown environment variable type 'i'
## Warning: Unknown environment variable type 'i'
## Warning: Unknown environment variable type 'i'
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
U-Boot> mmc list
mmc at 11230000: 0
mmc at 11240000: 1
U-Boot> mmc dev 0
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:8
ARG 0x000001aa
RET -110
CMD_SEND:55
ARG 0x00000000
RET -110
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:1
ARG 0x00000000
MMC_RSP_R3,4 0xffffffff
CMD_SEND:2
ARG 0x00000000
RET -110
U-Boot> mmc dev 1
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 0x80ff8000
CMD_SEND:2
ARG 0x00000000
MMC_RSP_R2 0x744a6055
0x53442020
0x104059f3
0x34013be5
DUMPING DATA
000 - 74 4a 60 55
004 - 53 44 20 20
008 - 10 40 59 f3
012 - 34 01 3b e5
CMD_SEND:3
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x59b40520
CMD_SEND:9
ARG 0x59b40000
MMC_RSP_R2 0x007f0032
0x5b5a83bd
0x6db7ff80
0x0a80008d
DUMPING DATA
000 - 00 7f 00 32
004 - 5b 5a 83 bd
008 - 6d b7 ff 80
012 - 0a 80 00 8d
CMD_SEND:7
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000700
CMD_SEND:55
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:51
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:6
ARG 0x00fffff1
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:55
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:6
ARG 0x00000002
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:6
ARG 0x80fffff1
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:55
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:13
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:16
ARG 0x00000200
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:17
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000900
switch to partitions #0, OK
mmc1 is current device
From MMC:
U-Boot 2020.07-rc4-00057-gc622afb087 (Jun 16 2020 - 17:05:55 +0100)
CPU: MediaTek MT7623 E3
DRAM: 2 GiB
WDT: Started with servicing (60s timeout)
MMC: mmc at 11230000: 0, mmc at 11240000: 1
Loading Environment from FAT... ** No device specified **
## Warning: Unknown environment variable type 'i'
## Warning: Unknown environment variable type 'i'
## Warning: Unknown environment variable type 'i'
In: serial
Out: serial
Err: serial
Hit any key to stop autoboot: 0
U-Boot> mmc list
mmc at 11230000: 0
mmc at 11240000: 1
U-Boot> mmc dev 0
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:8
ARG 0x000001aa
RET -110
CMD_SEND:55
ARG 0x00000000
RET -110
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:1
ARG 0x00000000
MMC_RSP_R3,4 0x40ff8080
CMD_SEND:1
ARG 0x40300000
MMC_RSP_R3,4 0x40ff8080
CMD_SEND:0
ARG 0x00000000
MMC_RSP_NONE
CMD_SEND:1
ARG 0x40300000
MMC_RSP_R3,4 0x40ff8080
CMD_SEND:1
ARG 0x40300000
MMC_RSP_R3,4 0xc0ff8080
CMD_SEND:2
ARG 0x00000000
MMC_RSP_R2 0x15010038
0x47544634
0x5206071b
0x48de461d
DUMPING DATA
000 - 15 01 00 38
004 - 47 54 46 34
008 - 52 06 07 1b
012 - 48 de 46 1d
CMD_SEND:3
ARG 0x00010000
MMC_RSP_R1,5,6,7 0x00000500
CMD_SEND:9
ARG 0x00010000
MMC_RSP_R2 0xd0270132
0x0f5903ff
0xf6dbffef
0x8e40400d
DUMPING DATA
000 - d0 27 01 32
004 - 0f 59 03 ff
008 - f6 db ff ef
012 - 8e 40 40 0d
CMD_SEND:7
ARG 0x00010000
MMC_RSP_R1,5,6,7 0x00000700
CMD_SEND:8
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:6
ARG 0x03b70200
MMC_RSP_R1b 0x00000900
CMD_SEND:13
ARG 0x00010000
MMC_RSP_R1,5,6,7 0x00000900
CURR STATE:4
CMD_SEND:6
ARG 0x03b90100
MMC_RSP_R1b 0x00000900
CMD_SEND:13
ARG 0x00010000
MMC_RSP_R1,5,6,7 0x00000900
CURR STATE:4
CMD_SEND:8
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:8
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:16
ARG 0x00000200
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:17
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000900
switch to partitions #0, OK
mmc0(part 0) is current device
U-Boot> mmc dev 1
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 0x00ff8000
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 0x00ff8000
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 0x80ff8000
CMD_SEND:2
ARG 0x00000000
MMC_RSP_R2 0x744a6055
0x53442020
0x104059f3
0x34013be5
DUMPING DATA
000 - 74 4a 60 55
004 - 53 44 20 20
008 - 10 40 59 f3
012 - 34 01 3b e5
CMD_SEND:3
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x59b40520
CMD_SEND:9
ARG 0x59b40000
MMC_RSP_R2 0x007f0032
0x5b5a83bd
0x6db7ff80
0x0a80008d
DUMPING DATA
000 - 00 7f 00 32
004 - 5b 5a 83 bd
008 - 6d b7 ff 80
012 - 0a 80 00 8d
CMD_SEND:7
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000700
CMD_SEND:55
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:51
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:6
ARG 0x00fffff1
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:55
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:6
ARG 0x00000002
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:6
ARG 0x80fffff1
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:55
ARG 0x59b40000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:13
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000920
CMD_SEND:16
ARG 0x00000200
MMC_RSP_R1,5,6,7 0x00000900
CMD_SEND:17
ARG 0x00000000
MMC_RSP_R1,5,6,7 0x00000900
switch to partitions #0, OK
mmc1 is current device
U-Boot>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 5174 bytes
Desc: not available
URL: <https://lists.denx.de/pipermail/u-boot/attachments/20200616/4b911fb4/attachment.bin>
More information about the U-Boot
mailing list