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

Bo Shen voice.shen at atmel.com
Tue Aug 20 03:49:55 CEST 2013


Hi Steven Rosenberg,

On 8/18/2013 22:55, Steven Rosenberg wrote:
> 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.

After reading the contents, I am not sure what do you want to implement. 
However, in mainline u-boot, we can use emac on sama5d31ek board and 
sama5d35ek board.
For Ethernet on sama5d33, d34, d35ek board, it needs gmac patch 
(http://patchwork.ozlabs.org/patch/254549/), after apply it, the 
Ethernet can work.

or if you get u-boot from: https://github.com/linux4sam/u-boot-at91

The Ethernet works on all the boards.

The Ethernet related command in u-boot, for example: tftp, nfs, ping, 
dhcp and etc can work.

> 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.

For this, temporary, I have no idea.

> Any help and guidance to get us started would be greatly appreciated.
>
> Thank you for your time and consideration.
>
> With Best Regards.
>
> Steven Rosenberg.

Best Regards,
Bo Shen



More information about the U-Boot mailing list