U-Boot support for Dragonboard410c?

Is anyone working on this? Should we expect it?

LK is a steaming pile and I don’t want to require a USB connection to boot different kernels.

U-Boot made the Hikey useful, it would do the same for the Dragonboard…

Peter.Griffin, save us!

Hi labrat,

I’m playing with it right now - I expect to do first release this weekend (i.e. clean and push my code to github).

But it will support only eMMC controller - usb is not ready yet.

BR
Mateusz

Good news! I am very grateful for your effort.

Obviously USB support would be nice in the future because that enables tftp boot over ethernet, but I’m happy to be a tester of any release.

I’ve cleaned-up u-boot code and (if you want to) you can give it a try.

It’s on github: https://github.com/hallor/u-boot/tree/dragonboard-2015.11.01
Commit Id: 8e0b5c44b9

Currently it has to be loaded with little-kernel.

What is working:

  • UART,
  • SD (~2MiB/s transfers)
  • eMMC (~1MiB/s transfers, 4-bit only)
  • GPIO (SoC ones)
  • Reset

It’s not much but good start.

Next on todo list is to get EHCI working as I know some are waiting for it.

Detailed build/run instructions are in top-level dragonboard.txt file.

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