0
Fan KunPeng

espressobin u-boot can't detect emmc

Recommended Posts

The u-boot I used is flash-image-1g-2cs-800_800.bin. It can boot linux from usb and in linux, it can detect my emmc.

root@espressobin:~# dmesg|grep -i mmc
[    4.266090] mmc0: SDHCI controller on d00d8000.sdhci [d00d8000.sdhci] using ADMA
[    4.308521] mmc0: new DDR MMC card at address 0001
[    4.309517] mmcblk0: mmc0:0001 SEM04G 3.69 GiB
[    4.310228] mmcblk0boot0: mmc0:0001 SEM04G partition 1 2.00 MiB
[    4.310928] mmcblk0boot1: mmc0:0001 SEM04G partition 2 2.00 MiB
[    4.311176] mmcblk0rpmb: mmc0:0001 SEM04G partition 3 2.00 MiB, chardev (243:0)
[    4.311340] mmc1: SDHCI controller on d00d0000.sdhci [d00d0000.sdhci] using ADMA
[    4.316565]  mmcblk0: p1

But u-boot can't detect emmc and boot from it:

U-Boot 2018.03-devel-18.12.3-gc9aa92c-armbian (Dec 26 2018 - 13:45:06 +0100)

Model: Marvell Armada 3720 Community Board ESPRESSOBin
       CPU     800 [MHz]
       L2      800 [MHz]
       TClock  200 [MHz]
       DDR     800 [MHz]
DRAM:  1 GiB
Comphy chip #0:
Comphy-0: USB3          5 Gbps
Comphy-1: PEX0          2.5 Gbps
Comphy-2: SATA0         6 Gbps
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs
PCIE-0: Link down
MMC:   sdhci@d0000: 0
Loading Environment from SPI Flash... SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
OK
Model: Marvell Armada 3720 Community Board ESPRESSOBin
Net:   eth0: neta@30000 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> mmc list
sdhci@d0000: 0
Marvell>> mmc dev 0
Card did not respond to voltage select!
Marvell>> mmc dev 1
MMC Device 1 not found
no mmc device at slot 1

Looks mmc dev0 is sd card and dev1 is emmc. This is different with boot script.

Share this post


Link to post
Share on other sites

The current u-boot can be found here. It includes DDR3 (V5 EspressoBins) or DDR4 (V7 EspressoBins) in the name.

Please use the correct one and post the output and the details about your board.

Share this post


Link to post
Share on other sites
2 hours ago, Fan KunPeng said:
 

The u-boot I used is flash-image-1g-2cs-800_800.bin. It can boot linux from usb and in linux, it can detect my emmc.


root@espressobin:~# dmesg|grep -i mmc
[    4.266090] mmc0: SDHCI controller on d00d8000.sdhci [d00d8000.sdhci] using ADMA
[    4.308521] mmc0: new DDR MMC card at address 0001
[    4.309517] mmcblk0: mmc0:0001 SEM04G 3.69 GiB
[    4.310228] mmcblk0boot0: mmc0:0001 SEM04G partition 1 2.00 MiB
[    4.310928] mmcblk0boot1: mmc0:0001 SEM04G partition 2 2.00 MiB
[    4.311176] mmcblk0rpmb: mmc0:0001 SEM04G partition 3 2.00 MiB, chardev (243:0)
[    4.311340] mmc1: SDHCI controller on d00d0000.sdhci [d00d0000.sdhci] using ADMA
[    4.316565]  mmcblk0: p1

But u-boot can't detect emmc and boot from it:


U-Boot 2018.03-devel-18.12.3-gc9aa92c-armbian (Dec 26 2018 - 13:45:06 +0100)

Model: Marvell Armada 3720 Community Board ESPRESSOBin
       CPU     800 [MHz]
       L2      800 [MHz]
       TClock  200 [MHz]
       DDR     800 [MHz]
DRAM:  1 GiB
Comphy chip #0:
Comphy-0: USB3          5 Gbps
Comphy-1: PEX0          2.5 Gbps
Comphy-2: SATA0         6 Gbps
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs
PCIE-0: Link down
MMC:   sdhci@d0000: 0
Loading Environment from SPI Flash... SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
OK
Model: Marvell Armada 3720 Community Board ESPRESSOBin
Net:   eth0: neta@30000 [PRIME]
Hit any key to stop autoboot:  0
Marvell>> mmc list
sdhci@d0000: 0
Marvell>> mmc dev 0
Card did not respond to voltage select!
Marvell>> mmc dev 1
MMC Device 1 not found
no mmc device at slot 1

Looks mmc dev0 is sd card and dev1 is emmc. This is different with boot script.

Your u-boot DTB file does not have second controller enabled.

Once both controllers are enabled in this DTB file, you will see them during uboot init phase

TIM-1.0
WTMI-devel-18.12.0-a0a1cb8
WTMI: system early-init
SVC REV: 4, CPU VDD voltage: 1.108V
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v2.0(release):v2.0-313-gea14b3d53 (Marvell-devel-18.12.0)
NOTICE:  BL1: Built : 18:37:55, Nov 29 2018
NOTICE:  BL1: Booting BL2
NOTICE:  BL2: v2.0(release):v2.0-313-gea14b3d53 (Marvell-devel-18.12.0)
NOTICE:  BL2: Built : 18:37:56, Nov 29 2018
NOTICE:  BL1: Booting BL31
NOTICE:  BL31: v2.0(release):v2.0-313-gea14b3d53 (Marvell-devel-18.12.0)
NOTICE:  BL31: Built : 18:3

U-Boot 2018.03-devel-18.12.2-00315-g1d4ab62367 (Nov 29 2018 - 18:34:51 +0200)

Model: Marvell Armada 3720 Community Board ESPRESSOBin (eMMC)
       CPU    @ 1000 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 800 [MHz]
DRAM:  1 GiB
Comphy chip #0:
Comphy-0: USB3          5 Gbps    
Comphy-1: PEX0          2.5 Gbps  
Comphy-2: SATA0         6 Gbps    
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs 
PCIE-0: Link down
MMC:   sdhci@d0000: 0, sdhci@d8000: 1                                                                       
Loading Environment from MMC... OK                                                                          
Model: Marvell Armada 3720 Community Board ESPRESSOBin (eMMC)                                               
Net:   eth0: neta@30000 [PRIME]                                                                             
Hit any key to stop autoboot:  0                                                                            
Marvell>>

 

Share this post


Link to post
Share on other sites
8 hours ago, ebin-dev said:

The current u-boot can be found here. It includes DDR3 (V5 EspressoBins) or DDR4 (V7 EspressoBins) in the name.

Please use the correct one and post the output and the details about your board.

Yes, I used the u-boot from the link. flash-image-DDR3-1g-2cs-800_800.bin. It can't detect emmc. Bug?

 

7 hours ago, kostap said:

Your u-boot DTB file does not have second controller enabled.

Once both controllers are enabled in this DTB file, you will see them during uboot init phase


TIM-1.0
WTMI-devel-18.12.0-a0a1cb8
WTMI: system early-init
SVC REV: 4, CPU VDD voltage: 1.108V
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v2.0(release):v2.0-313-gea14b3d53 (Marvell-devel-18.12.0)
NOTICE:  BL1: Built : 18:37:55, Nov 29 2018
NOTICE:  BL1: Booting BL2
NOTICE:  BL2: v2.0(release):v2.0-313-gea14b3d53 (Marvell-devel-18.12.0)
NOTICE:  BL2: Built : 18:37:56, Nov 29 2018
NOTICE:  BL1: Booting BL31
NOTICE:  BL31: v2.0(release):v2.0-313-gea14b3d53 (Marvell-devel-18.12.0)
NOTICE:  BL31: Built : 18:3

U-Boot 2018.03-devel-18.12.2-00315-g1d4ab62367 (Nov 29 2018 - 18:34:51 +0200)

Model: Marvell Armada 3720 Community Board ESPRESSOBin (eMMC)
       CPU    @ 1000 [MHz]
       L2     @ 800 [MHz]
       TClock @ 200 [MHz]
       DDR    @ 800 [MHz]
DRAM:  1 GiB
Comphy chip #0:
Comphy-0: USB3          5 Gbps    
Comphy-1: PEX0          2.5 Gbps  
Comphy-2: SATA0         6 Gbps    
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs 
PCIE-0: Link down
MMC:   sdhci@d0000: 0, sdhci@d8000: 1                                                                       
Loading Environment from MMC... OK                                                                          
Model: Marvell Armada 3720 Community Board ESPRESSOBin (eMMC)                                               
Net:   eth0: neta@30000 [PRIME]                                                                             
Hit any key to stop autoboot:  0                                                                            
Marvell>>

 

 

Looks your u-boot version is older than mine. Where can I download it?

Share this post


Link to post
Share on other sites
7 hours ago, Fan KunPeng said:

Yes, I used the u-boot from the link. flash-image-DDR3-1g-2cs-800_800.bin. It can't detect emmc. Bug?

 

 

Looks your u-boot version is older than mine. Where can I download it?

You cannot  download it :-) This is my private build and I even do not remember saving it somewhere after burning to the board eMMC. This is not even "boot from SPI" case. I sent the DTS content required for enabling eMMC in u-boot to ebin-dev. If he decide,  you may have such build in the official Armbian set. As an option, you may build the flash image by yourself enabling second SDHCI controller in DTS.

 

Share this post


Link to post
Share on other sites

I directly use code https://github.com/MarvellEmbeddedProcessors/u-boot-marvell with blew modification:

 

diff --git a/arch/arm/dts/armada-3720-espressobin.dts b/arch/arm/dts/armada-3720-espressobin.dts
index 2ab039c..5922da0 100644
--- a/arch/arm/dts/armada-3720-espressobin.dts
+++ b/arch/arm/dts/armada-3720-espressobin.dts
@@ -118,7 +118,8 @@
        marvell,pad-type = "fixed-1-8v";
        pinctrl-names = "default";
        pinctrl-0 = <&mmc_pins>;
-       status = "disabled";
+       #status = "disabled";
+       status = "okay";
 
        #address-cells = <1>;
        #size-cells = <0>;

It works well. It would be a bug of armbian build script, since upstream has added support of emmc and dts code changed.

Share this post


Link to post
Share on other sites
47 minutes ago, ebin-dev said:

@kostap @Fan KunPeng I have manually enabled the second controller as suggested in u-boot/arch/arm/dts/armada-3720-espressobin.dts and rebuilt the images (see here). If you have time to test, please let me know if the mmc device is now detected by u-boot (I don't have an eMMC-EspressoBin for testing):


Marvell>> mmc dev 1

Will be glad to run this test, but my access to dropbox is blocked

 

Share this post


Link to post
Share on other sites

@ebin-dev - tested your last flash image and it was working on my board:

TIM-1.0
WTMI-devel-18.12.0-a0a1cb8
WTMI: system early-init
SVC REV: 4, CPU VDD voltage: 1.108V
NOTICE:  Booting Trusted Firmware
NOTICE:  BL1: v1.5(release):1f8ca7e (Marvell-devel-18.12.2)
NOTICE:  BL1: Built : 09:50:21, Feb 20 2019
NOTICE:  BL1: Booting BL2
NOTICE:  BL2: v1.5(release):1f8ca7e (Marvell-devel-18.12.2)
NOTICE:  BL2: Built : 09:50:23, Feb 20 2019
NOTICE:  BL1: Booting BL31
NOTICE:  BL31: v1.5(release):1f8ca7e (Marvell-devel-18.12.2)
NOTICE:  BL31: Built : 09:5

U-Boot 2018.03-devel-18.12.3-gc9aa92c-armbian (Feb 20 2019 - 09:45:04 +0100)

Model: Marvell Armada 3720 Community Board ESPRESSOBin
       CPU     1000 [MHz]
       L2      800 [MHz]
       TClock  200 [MHz]
       DDR     800 [MHz]
DRAM:  1 GiB
Comphy chip #0:
Comphy-0: USB3          5 Gbps    
Comphy-1: PEX0          2.5 Gbps  
Comphy-2: SATA0         6 Gbps    
SATA link 0 timeout.
AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode
flags: ncq led only pmp fbss pio slum part sxs 
PCIE-0: Link down
MMC:   sdhci@d0000: 0, sdhci@d8000: 1
Loading Environment from SPI Flash... SF: Detected w25q32dw with page size 256 Bytes, erase size 4 KiB, total 4 MiB
OK
Model: Marvell Armada 3720 Community Board ESPRESSOBin
Net:   eth0: neta@30000 [PRIME]
Hit any key to stop autoboot:  0 
Marvell>> mmcinfo 
Card did not respond to voltage select!
Marvell>> mmc dev 1
switch to partitions #0, OK
mmc1(part 0) is current device
Marvell>> mmcinfo 
Device: sdhci@d8000
Manufacturer ID: 45
OEM: 100
Name: SEM08 
Bus Speed: 52000000
Mode : MMC High Speed (52MHz)
Rd Block Len: 512
MMC version 4.5
High Capacity: Yes
Capacity: 7.3 GiB
Bus Width: 8-bit
Erase Group Size: 512 KiB
HC WP Group Size: 16 MiB
User Capacity: 7.3 GiB WRREL
Boot Capacity: 2 MiB
RPMB Capacity: 2 MiB
Marvell>> 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
0