ALL-H3-CC-H5 goes straight into FEL mode

My ALL-H3-CC-H5 doesn’t boot from any of the available images from (micro) SD card, it always goes into FEL mode, regardless of an SD-card with a viable image being inserted or not.
Once in FEL mode I can detect it with sunxi-fel and load a self-compiled u-boot and from that u-boot boot from the micro-SD card. I can also boot with a different H5-SoC board (OPI PC2) from the same SD-card.
To see if it would boot from eMMC I purchased a 8GB eMMC card so I could write an image to that (using the distro I booted from in FEL mode). However that idea was thwarted as I get lots of errors even when booting (from FEL+SD-card) with the eMMC attached:

[    3.935365] sunxi-mmc 1c11000.mmc: Linked as a consumer to regulator.5
[ 3.977610] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 199.658761] sunxi-mmc 1c11000.mmc: Dropping the link to regulator.5
[ 202.939842] sunxi-mmc 1c11000.mmc: Linked as a consumer to regulator.5
[ 202.978671] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[ 203.144413] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.150855] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.156588] mmc1: switch to bus width 8 failed
[ 203.159818] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.166512] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.173910] mmc1: switch to bus width 4 failed
[ 203.174541] mmc1: new high speed MMC card at address 0001
[ 203.181724] mmcblk1: mmc1:0001 H8G4a2 7.28 GiB
[ 203.182909] mmcblk1boot0: mmc1:0001 H8G4a2 partition 1 4.00 MiB
[ 203.183954] mmcblk1boot1: mmc1:0001 H8G4a2 partition 2 4.00 MiB
[ 203.186110] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.194347] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.200818] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.208252] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.214703] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.221909] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.228417] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.234351] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.240812] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.332578] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.339022] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.346111] mmc1: switch to bus width 8 failed
[ 203.346675] sunxi-mmc 1c11000.mmc: data error, sending stop command
[ 203.353209] sunxi-mmc 1c11000.mmc: send stop command failed
[ 203.360477] mmc1: switch to bus width 4 failed
etc etc

I’m powering the board via the microUSB port with a 5V 4Amp PSU.

Any hints/suggestions what I could to to get it to boot from SD-card or fix the eMMC issue?

What eMMC module do you have? Try to push the u-boot button a couple times on the board. There might be rust buildup causing the button to be shorted resulting in FEL mode being activated.

The eMMC module is the 8GB 5.x one from you that I bought on Amazon.

I’ve pushed the u-boot button many times in a row now to no avail (creative thinking though :grin:). Also, when I read the UBOOT_SEL pin (VER_REG at 0x01C00024 bit 8) in FEL-mode I can see it changing to 0 when I press the uboot button and to 1 again when I release the uboot button.

Do you have any other ideas?

Does it go into FEL mode without any storage device attached? These are the ways FEL mode gets triggered: FEL - linux-sunxi.org

If you have no valid boot image, the board goes into FEL mode.

It goes into FEL mode with SD-card (with valid image) inserted and also without SD-card inserted.

The SD-card reader itself works, once I load u-boot via FEL I can boot Raspbian ( [2022-09-22-raspbian-bullseye-arm64-lite+all-h3-cc-h5.img.xz].

If I have the eMMC attached u-boot does not want to switch to it, it only sees the 16GB SD-card in the SD-card slot:

U-Boot 2021.04-armbian (May 06 2021 - 19:52:02 +0000) Allwinner Technology

CPU:   Allwinner H5 (SUN50I)
Model: Libre Computer Board ALL-H3-CC H5
DRAM:  2 GiB
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1
<snip>
=> mmc list
mmc@1c0f000: 0
mmc@1c11000: 1
=> mmc info
Device: mmc@1c0f000
Manufacturer ID: 2
OEM: 544d
Name: SA16G 
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> mmc dev 1
=> mmc info
Device: mmc@1c0f000
Manufacturer ID: 2
OEM: 544d
Name: SA16G 
Bus Speed: 50000000
Mode: SD High Speed (50MHz)
Rd Block Len: 512
SD version 3.0
High Capacity: Yes
Capacity: 14.4 GiB
Bus Width: 4-bit
Erase Group Size: 512 Bytes
=> 

Raspbian recognises it but has a lot of errors:

[    1.509066] sunxi-mmc 1c11000.mmc: Looking up vqmmc-supply from device tree
[    1.509079] sunxi-mmc 1c11000.mmc: Looking up vqmmc-supply property in node /soc/mmc@1c11000 failed
[    1.509680] sunxi-mmc 1c0f000.mmc: Got CD GPIO
[    1.534500] sunxi-mmc 1c11000.mmc: initialized, max. request size: 2048 KB, uses new timings mode
[    1.756428] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.764913] sunxi-mmc 1c11000.mmc: send stop command failed
[    1.776496] mmc1: switch to bus width 8 failed
[    1.790065] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.801054] sunxi-mmc 1c11000.mmc: send stop command failed
[    1.809946] mmc1: switch to bus width 4 failed
[    1.827489] mmc1: new high speed MMC card at address 0001
[    1.843819] mmcblk1: mmc1:0001 H8G4a2 7.28 GiB 
[    1.857924] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.869632] sunxi-mmc 1c11000.mmc: send stop command failed
[    1.879059] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.889757] sunxi-mmc 1c11000.mmc: send stop command failed
[    1.903835] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.916976] sunxi-mmc 1c11000.mmc: send stop command failed
[    1.928074] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.937701] sunxi-mmc 1c11000.mmc: send stop command failed
[    1.946412] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    1.958868] sunxi-mmc 1c11000.mmc: send stop command failed
[    2.059858] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    2.067701] sunxi-mmc 1c11000.mmc: send stop command failed
[    2.080666] mmc1: switch to bus width 8 failed
[    2.097501] sunxi-mmc 1c11000.mmc: data error, sending stop command
[    2.109455] sunxi-mmc 1c11000.mmc: send stop command failed

I can’t test the eMMC on my regular computer, it doesn’t fit any of the eMMC to USB adapters I have.

Are you using eMMC 5.x or 4.x?

I’m using eMMC 5.x
Libre eMMC 5.x

Per the product page, this is not compatible with your system.

Ah OK, that explains the eMMC issues. Where can I buy the appropriate 4.x eMMC with a connector compatible with the ALL-H3-CC-H5?

But my main problem is still that the board goes straight into FEL mode even without eMMC and an SD-car inserted with Raspbian ( [2022-09-22-raspbian-bullseye-arm64-lite+all-h3-cc-h5.img.xz].

If it does not find a proper boot sector, it will go into FEL mode. Did you extract the image before flashing it to the MicroSD card?

Yes, the SD-card has a valid image:

$ sudo hexdump -s 8192 -n 15 -C /dev/sdc
00002000  16 00 00 ea 65 47 4f 4e  2e 42 54 30 d0 66 0d     |....eGON.BT0.f.|
0000200f
$ sudo hexdump -s 0x7A00 -n 50 -C /dev/sdc
00007a00  55 2d 42 6f 6f 74 20 53  50 4c 20 32 30 32 32 2e  |U-Boot SPL 2022.|
00007a10  30 37 2b 20 28 44 65 63  20 30 36 20 32 30 32 32  |07+ (Dec 06 2022|
00007a20  20 2d 20 32 32 3a 32 35  3a 33 33 20 2d 30 35 30  | - 22:25:33 -050|
00007a30  30 29                                             |0)|
$ sudo fdisk -l /dev/sdc
Disk /dev/sdc: 59,63 GiB, 64021856256 bytes, 125042688 sectors
Disk model: SD  Transcend   
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x21e60f8c

Device     Boot  Start     End Sectors  Size Id Type
/dev/sdc1         8192  532479  524288  256M  c W95 FAT32 (LBA)
/dev/sdc2       532480 2875391 2342912  1,1G 83 Linux

I can even dump the uboot from it and upload that via FEL and it will boot from the SD-card:

$ sudo dd if=/dev/sdc of=uboot.bin bs=1024 skip=8 count=1024
1024+0 records in
1024+0 records out
1048576 bytes (1,0 MB, 1,0 MiB) copied, 0,00804595 s, 130 MB/s
$ sunxi-fel uboot uboot.bin

And then the log from the UART is:

U-Boot SPL 2022.07+ (Dec 06 2022 - 22:25:33 -0500)
DRAM: 2048 MiB
Trying to boot from FEL
NOTICE:  BL31: v2.7(release):v2.7-rc0-160-ga1a2b6d1e
NOTICE:  BL31: Built : 22:25:29, Dec  6 2022
NOTICE:  BL31: Detected Allwinner H5 SoC (1718)
NOTICE:  BL31: Found U-Boot DTB at 0x20cfda8, model: Libre Computer Board ALL-H3-CC H5
NOTICE:  PMIC: Assuming H5 reference regulator design
SCP/INF: Crust v0.5.10000


U-Boot 2022.07+ (Dec 06 2022 - 22:25:33 -0500) Libre Computer ALL-H3-CC H5

CPU:   Allwinner H5 (SUN50I)
Model: Libre Computer Board ALL-H3-CC H5
DRAM:  2 GiB
Core:  76 devices, 23 uclasses, devicetree: separate
WDT:   Not starting watchdog@1c20ca0
MMC:   mmc@1c0f000: 0, mmc@1c11000: 1
Loading Environment from FAT... Unable to read "uboot.env" from mmc0:1... 
Error (-2): cannot determine file size
In:    serial
Out:   serial
Err:   serial
Net:   phy interface1

Error: ethernet@1c30000 address not set.
No ethernet found.

starting USB...
Bus usb@1c1a000: USB EHCI 1.00
Bus usb@1c1a400: USB OHCI 1.0
Bus usb@1c1b000: USB EHCI 1.00
Bus usb@1c1b400: USB OHCI 1.0
Bus usb@1c1c000: USB EHCI 1.00
Bus usb@1c1c400: USB OHCI 1.0
Bus usb@1c1d000: USB EHCI 1.00
Bus usb@1c1d400: USB OHCI 1.0
scanning bus usb@1c1a000 for devices... 1 USB Device(s) found
scanning bus usb@1c1a400 for devices... 1 USB Device(s) found
scanning bus usb@1c1b000 for devices... 1 USB Device(s) found
scanning bus usb@1c1b400 for devices... 1 USB Device(s) found
scanning bus usb@1c1c000 for devices... 1 USB Device(s) found
scanning bus usb@1c1c400 for devices... 1 USB Device(s) found
scanning bus usb@1c1d000 for devices... 1 USB Device(s) found
scanning bus usb@1c1d400 for devices... 1 USB Device(s) found
       scanning usb for storage devices... 0 Storage Device(s) found
Hit any key to stop autoboot:  0 
Card did not respond to voltage select! : -110
switch to partitions #0, OK
mmc0 is current device
Scanning mmc 0:1...
No EFI system partition
phy interface1
mdio_register: non unique device name 'ethernet@1c30000'

Error: ethernet@1c30000 address not set.
phy interface1
mdio_register: non unique device name 'ethernet@1c30000'

Error: ethernet@1c30000 address not set.
BootOrder not defined
EFI boot manager: Cannot load any image
Found EFI removable media binary efi/boot/bootaa64.efi
856064 bytes read in 39 ms (20.9 MiB/s)
Booting /efi\boot\bootaa64.efi
No EFI system partition
Failed to persist EFI variables
Welcome to GRUB!
<snip>
Loading Linux 6.0.12-00858-gb98721ea4575 ...
Loading initial ramdisk ...
EFI stub: Booting Linux Kernel...
EFI stub: EFI_RNG_PROTOCOL unavailable
EFI stub: Using DTB from configuration table
EFI stub: Exiting boot services...
[    0.000000] Booting Linux on physical CPU 0x0000000000 [0x410fd034]
[    0.000000] Linux version 6.0.12-00858-gb98721ea4575 (autobuild@deb.libre.computer) (gcc (Debian 8.3.0-6) 8.3.0, GNU ld (GNU Binutils for Debian) 2.31.1) #1 SMP PREEMPT_DYNAMIC Thu Dec 8 19:08:19 UTC 2022
[    0.000000] Machine model: Libre Computer Board ALL-H3-CC H5
<snip>
Debian GNU/Linux 11 raspberrypi ttyS0

raspberrypi login:

If I put this SD-card in an Orange Pi PC2 it boots fine so the SD-card should be good.

@librecomputer Do you have any other ideas?

You only have one board right? It is difficult to determine if this is a board issue. FEL starts when there is no bootloader either read or able to be read. It could be a defective board or bad CD pin. Hard to determine the exact cause without two boards side by side.

Thanks. Yes I only have one board.

I checked the SD-card CD pin (PF6) in FEL mode, it does change from 1 (no SD-card inserted) to 0 (SD-card inserted). So that seems to work OK.

I guess I’ll put it down as defective board. It’s a pity I purchased the wrong eMMC :sweat_smile: it would be interesting to see if it does boot from eMMC. But with shipping costs of €29,90 for an 8GB eMMC of €9,95 I’m not sure if it is worth the risk just to satisfy my curiousity.

In the end I did order the eMMC 4.x. It sees that fine but doesn’t boot from that either. So still end of story I suppose.

Just ask the vendor you ordered from to send you another board since yours may be defective.

I’ve been experimenting with 4 different Libre SBC’s, Le Potato, Renegade, Sweet Potato and now Tritium and its been a learning curve for all of them. The first 3 types I added emmc memory and got them working after booting from a micro SD card.but so far, I can’t seem to get Tritium to boot off a micro sd card despite using the Ubuntu -H5 img extracted from the xy file. It just sits there with the red light and doing nothing.

However, I’ve noticed a lot of discussion about power supplies for these boards and I’ll add my observations. I have various 5 volt PSU’s including 2 amp & 3 amp versions and testing them out on Le Potato, Renegade & Sweet Potato, only a couple seem to work reliably to boot the SBC. Its my suspicion that the ramp up to 5 volts time constant is relatively long causing a rest to not function correctly.

I substituted the 5 volt power supply for USB power modules that cost a few dollars from China as the USB module uses a 12 volt 5 amp LED supply which is regulated down to 5 volts and has voltage & current LED display. They all worked flawlessly on Le Potato, Renegade & Sweet Potato but the Tritium is still lifeless and is drawing just 200 ma or so…

I also noted that the current drawn from a USB power module as around 0.5 amps on Sweet Potato without a HDMI monitor and 0.8 amps with a HDMI monitor connected. It seems that the HDMI electronics are not enabled if no monitor is present. It also seems that plugging a monitor in after it may have booted does not ‘kickstart’ the HDMI output as its not plug and play and may also explain different LED’s illuminated on the SBC depending on a monitor being present or not.

My conclusion – The 5 volts PSU has to be at least 2 amps but more importantly, it must reach 5 volts almost immediately else board reset is flawed. A HDMI monitor must be connected before the boot process starts after restet.

As for the Tritium failure to boot, its still a mystery as the regulated USB power supply didn’t fix the problem for the Tritium despite using ‘ubuntu-22.04.3-preinstalled-base-arm64+all-h3-cc-h5’.

The board came in a box with a H5 sticker on it so I can only assume thats the right image.

Any suggestions anyone ?

For the H5, try pressing the button on the board. If the button is depressed or stuck, it causes the board to boot into FEL mode. This goes into how FEL mode is triggered on the SoC and you should be able to see what is trigger FEL.

https://linux-sunxi.org/FEL

If no bootable devices are detected, the board goes into FEL mode.

As for your power supply issue, if the power supply cannot supply/maintain 5V or handle at least 1A inrush current adequately, then it is not adequate. Delayed voltage just means it cannot supply current (or possibly not using a switching power supply). You need a switching power supply capable of proper current delivery and this is covered in the basic troubleshooting guide on the download pages.