[U-Boot] U-Boot Driver Development on Atmel's sama5d3xek

Steven Rosenberg Steven at waterfall-security.com
Sun Aug 18 16:55:40 CEST 2013


Dear Personnel,

We are investigating using U-Boot Driver samples for development on the Atmel's sama5dxek boards and could use some guidance.

I have reviewed the following:

http://www.chromium.org/chromium-os/u-boot-porting-guide/u-boot-drivers

We are interested in the Ethernet example, but could also use a referral to a simple example to get started as well. The steps seem to be as follows:


  *   Implement the APIs specified in the driver class header file.
  *   Add config option(s) for the peripheral to the board configuration file in include/configs.
  *   Add a node for the driver to the device tree file<http://www.chromium.org/chromium-os/u-boot-porting-guide/2-concepts> (.dts), specifying its properties and values as well as any additional devices that are connected to it.

The first one I assume refers to the header of the driver (such as the include/asm-generic/gpio.h file for gpio or the include/net.h file for the Ethernet project). Please confirm or clarify.

The second seems to be referring to the include/configs/sama5dxek.h file for the card of interest which does exist. It's just not clear which CONFIG define to set and what the values would be. They do seem to correlate with the Makefile definitions in some of the samples. For example we may be interested in CONFIG_RMMI or CONFIG_RGMII for the Ethernet sample, but it's not clear what to define them to. Similar examples would help.

The third is the device tree. I did see some samples, but the board/atmel/dts directory is missing as is the board/atmel/sama5d3xek/dts directory. Actually, only a few vendors actually give samples.

The usage for setting up device trees is described here:

http://devicetree.org/Device_Tree_Usage

I was wondering if there was an atmel dts example already that we could use at least as a template rather than creating something from scratch and which directory it should reside in (board/atmel/ or board/atmel/sama5d3xek/ ?)

The Ethernet example given is not included in the U-Boot installation. It seems one needs to create a directory under drivers, move the files in and compile the whole u-boot installation. Then it seems the drivers are part of the uboot.bin and when the u-boot is loaded by the bootstrap the u-boot will know how to load the drivers via the device tree. If so, the missing dts for atmel would mean that the default u-boot isn't loading any drivers for an atmel installation by default. Clarifications and/or corrections please.

Any help and guidance to get us started would be greatly appreciated.

Thank you for your time and consideration.

With Best Regards.

Steven Rosenberg.




More information about the U-Boot mailing list