U-Boot support for Dragonboard410c?

Thanks! I’ll try this out as soon as I get non-USB-serial console working on my board, just waiting on parts now.

Hi labrat,

I didnt have the time to validate your port but in any case, do you plan to upstream your development to u-boot ?. I think it would be a good thing for everyone.

TIA!

1 Like

@ldts-jro

I’m not sure about labrat, but I definitely plan to upstream, but first I want to make USB working as it will help many people.

sorry Mateusz, my previous comment should have been addressed to you :slight_smile: cheers.

1 Like

Hi Mateusz,

I am having trouble with my usb-less serial output. It turns out that the 1.8V pin on the low speed header (Pin 35) is not powered until the kernel starts. Is it possible to turn that on in u-boot? If so I can use it to power my level shifter and get serial working in u-boot.

Thanks!

It will be possible as soon as I implement pmic - I didn’t expected anyone may need it (I use Odroid UART and once seeed package arrives I will switch to Sonic Screwdriver that are both USB/host powered).

I can take a look at it (pmic may be pretty straightforward and - at least regulator support may be matter of few hours) but you have to wait few days (perhaps end of this week or next week depending on my time)

Please put that request at the bottom of the list, well below USB support :slight_smile:
as I will create a 1.8v power source from somewhere else for now

Hi again,

I built your u-boot tree and flashed it onto my dragonboard.
Have successfully booted a kernel from a FAT partition and no issues so far. Thanks!
I hope the USB support is going well :slight_smile:

Aaaaand… next release is ready :slight_smile:

You can get it from my github: https://github.com/hallor/u-boot/tree/dragonboard-2015.11.08, commit c13f4b8df73

New things:

  • USB works in host mode
  • PMIC driver - vol- and power buttons, GPIO; @labrat: Regulators are not working

Things that I know don’t work (perfectly):

  • Writing to eMMC/SD
  • Overall performance of SDHCI controller is poor
  • My ASIX usb network card sometimes generates EHCI timeouts when downloading via tftp.
    Perhaps it’s driver/card issue and it’s probably not a big deal (after a short timeout controller retries and transmission goes properly)

As for the USB controller: it automatically switches between device and host mode. You don’t have to unplug device cable.
“usb start” switches to host mode
“usb stop” switches back to device mode

Please remember that this is persistent during warmboot - so if you want fastboot to be able to talk to you PC - do ‘usb stop’ before doing ‘reset’.

Does anyone need any other specific driver in u-boot urgently?

I’ve pushed two new commits - Linux should boot properly now.

One enables booti that is needed to boot aarch64 kernel Image, other adds example scripts to load/boot the kernel.

It’s released under tag dragonboard-2015.11.10

Another small update; Changes:

  • Write to eMMC/SD works
  • eMMC works in 8-bit mode
  • eMMC/SD performance improvement (both ~3.6MiB/s)
  • Added reflash script that will do something similar to “flashall” over network
  • Cleaned up environment a bit
  • Merged latest mainline code

Note for reflash: it assumes files are on tftp in dragonboard/ directory; It also flashes u-boot into boot partition (but it can be simply changed by editing dragonboard.h)

Available on github / dragonboard branch or tagged as dragonboard-2015.11.17:

Small bugfix today:

Changes:

  • Fixed booting of older kernels (pre 4.1-rc5)
  • Added script to reflash uboot
  • Added simple kernel cmdline

Thanks to labrat and tyler-baker for reporting and bisecting Linux (so I didn’t have to do that).

@Mateusz
Can your modified u-boot find boot partition from USB hard drive?

@rickyzhang: I so no reason why it should not - ethernet is working, hard drive should work as well.

It should be even enabled - difference is, there is no “probe” message, but it should be visible after you type usb start:

dragonboard410c => usb start
starting USB…
USB0: USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for ethernet devices… 0 Ethernet Device(s) found
dragonboard410c => usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 14800.0 MB = 14.4 GB (30310400 x 512)
dragonboard410c => fatls usb 0:1
296 wmpinfo.xml

The same goes for “stable” branches (dragonboard/dragonboard-dev):
=> usb start
starting USB…
USB0: USB EHCI 1.00
scanning bus 0 for devices… 3 USB Device(s) found
scanning usb for storage devices… 1 Storage Device(s) found
scanning usb for ethernet devices… 0 Ethernet Device(s) found
=> usb storage
Device 0: Vendor: Kingston Rev: PMAP Prod: DataTraveler 3.0
Type: Removable Hard Disk
Capacity: 14800.0 MB = 14.4 GB (30310400 x 512)
=> fatls usb 0:1
296 wmpinfo.xml

Only possible issue I can expect is that your hdd is usb powered and output of dragonboard is not enough - but first please test it like I did above :slight_smile:

@Mateusz:
That sounds awesome. Thanks so much for your contribution. I hate to wear out my SD card or MMC.
Could you please clarify:

(1) uBoot replace APPSBL in aboot partition or kernel in boot partition.
(2) There are several branch and release tag. Can you give me a brief description on them so that I can use it?
(3) Should uBoot compile as 32bit or 64bit?

Thanks in advance!

Sorry, I found my answer in https://github.com/hallor/u-boot/blob/dragonboard/dragonboard.txt

I add my modification on your dragonboard-dev branch. But it failed to boot from USB hard drive.

I tried to connect my USBtoSerial board and voltage level shifter board (convert between 3.3v and 1.8v) to pin 5 and pin 7 on dragonboard UART0. But I saw nothing in my PC. Could you recommend how to debug u-boot?

`
diff --git a/include/configs/dragonboard.h b/include/configs/dragonboard.h
index 30cfc84…4c7c60f 100644
— a/include/configs/dragonboard.h
+++ b/include/configs/dragonboard.h
@@ -83,6 +83,9 @@
#define CONFIG_USB_ETHER_MCS7830
#define CONFIG_USB_ETHER_SMSC95XX

+/File System/
+#define CONFIG_CMD_EXT4 /* EXT4 support /
+
/
Libraries */
#define CONFIG_MD5

@@ -127,7 +130,7 @@
#define CONFIG_BOOTP_BOOTFILESIZE

/* Environment - Boot*/
-#define CONFIG_BOOTDELAY -1 /* autoboot after 5 seconds /
+#define CONFIG_BOOTDELAY 5 /
autoboot after 5 seconds */

#define CONFIG_SERVERIP 10.0.0.1
#define CONFIG_IPADDR 10.0.0.2
@@ -135,8 +138,8 @@
#define CONFIG_NFSBOOTCOMMAND “”
#define CONFIG_ROOTPATH “/home/nfs/dragonboard”
#define CONFIG_BOOTFILE “dragonboard/linux.itb”
-#define CONFIG_BOOTCOMMAND “usb start && tftp && usb stop && bootm”
-#define CONFIG_BOOTARGS “console=ttyMSM0,115200n8”
+#define CONFIG_BOOTCOMMAND “usb start; usb storage; ext4load usb 0:1 0x90000000 /boot/uImage; ext4load usb 0:1 0x89000000 /boot/apq8016-sbc.dtb; bootm 0x90000000 – 0x89000000”
+#define CONFIG_BOOTARGS “root=UUID=ae5fa761-95be-469b-b7dc-a355d080ed23 rw rootwait console=tty0 console=ttyMSM0,115200n8 rootfs=ext4 noinitrd selinux=0”

/* Does what recovery does */
#define REFLASH(file, part) \

  • Uboot is 64bit,

  • Safest branches are dragonboard-dev/dragonboard, you can also try other but I’m updating some of them for v2 now so may be less stable (and have issue with 4.9 linaro gcc).

As for UART - I use 96boards adapter and it works flawlessly.

Does fastboot prints on your UART anything (before you start u-boot)?

Make sure it was 1.8 v converter (not 1.8v tolerant). Also - check because perhaps it needs vcc_io from dragonboard (check adapter datasheet).

As for general debugging:
easy way: uart
hard way: jtag + openocd (at least partial support is there)

If you still have a problems - please let me know.

I found that it is URAT1 as serial console. I got the following message but hangs there:

U-Boot 2016.01-rc1-dirty (Jan 22 2016 - 11:23:01 -0500)
Qualcomm-DragonBoard 410C

DRAM: 986 MiB
MMC: msm_sdhci: 0, msm_sdhci: 1
Using default environment

In: serial
Out: serial
Err: serial
Net: Net Initialization Skipped
No ethernet found.
Hit any key to stop autoboot: 0
=>

Which branch are you using?

Are you sure it’s hanged? It seems you get to u-boot console. Perhaps RX wire of dragonboard is not connected (and it doesn’t hang in fact)?