* [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek
@ 2013-08-18 14:55 Steven Rosenberg
2013-08-20 1:49 ` Bo Shen
0 siblings, 1 reply; 5+ messages in thread
From: Steven Rosenberg @ 2013-08-18 14:55 UTC (permalink / raw)
To: u-boot
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.
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek
2013-08-18 14:55 [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek Steven Rosenberg
@ 2013-08-20 1:49 ` Bo Shen
0 siblings, 0 replies; 5+ messages in thread
From: Bo Shen @ 2013-08-20 1:49 UTC (permalink / raw)
To: u-boot
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
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek
[not found] <0DB6E3D37041564ABBD7F219EBFF1ABFE905EB@HERCULES.wf.local>
@ 2013-08-20 5:46 ` Bo Shen
2013-08-20 7:25 ` Michael Trimarchi
[not found] ` <0DB6E3D37041564ABBD7F219EBFF1ABFE9161A@HERCULES.wf.local>
0 siblings, 2 replies; 5+ messages in thread
From: Bo Shen @ 2013-08-20 5:46 UTC (permalink / raw)
To: u-boot
Hi Steven,
On 8/20/2013 12:51, Steven Rosenberg wrote:
> Hi Bo
>
> To clarify we need to run when booting with no human intervention and to
> be able to use gmac so the questions are mainly for the procedures on
> how to create a driver under uboot
I am still not fully get what you mean.
what you mean 'run when booting with no human intervention and to be
able to use gmac'? Using it for tftp, nfs, or anything else?
Which driver do you want to create under uboot? GMAC driver? or anything
else?
> We would also need to call into the current ethernet drivers as well and
> I did notice a gmacb driver but the main issue now seems to be how to
> create a driver in uboot
Again, Which driver do you want to create under uboot? GMAC driver? or
anything else?
> The procedures for creating a driver seems complex and some guidance
> would be appreciated
For different driver, you can check different subsystem in uboot for
more detail information.
> Thank you for the link to the patch
>
> With Best Regards
>
> Steven
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek
2013-08-20 5:46 ` Bo Shen
@ 2013-08-20 7:25 ` Michael Trimarchi
[not found] ` <0DB6E3D37041564ABBD7F219EBFF1ABFE9161A@HERCULES.wf.local>
1 sibling, 0 replies; 5+ messages in thread
From: Michael Trimarchi @ 2013-08-20 7:25 UTC (permalink / raw)
To: u-boot
Hi
On Tue, Aug 20, 2013 at 01:46:55PM +0800, Bo Shen wrote:
> Hi Steven,
>
> On 8/20/2013 12:51, Steven Rosenberg wrote:
> >Hi Bo
> >
> >To clarify we need to run when booting with no human intervention and to
> >be able to use gmac so the questions are mainly for the procedures on
> >how to create a driver under uboot
>
> I am still not fully get what you mean.
> what you mean 'run when booting with no human intervention and to be
> able to use gmac'? Using it for tftp, nfs, or anything else?
> Which driver do you want to create under uboot? GMAC driver? or
> anything else?
>
I dont' know if I understand correclty but I think that he wants to use the
driver from a binary that is lunched from uboot. What I don't understand if he wants to run in parallel with
the bootloader.
Michael
> >We would also need to call into the current ethernet drivers as well and
> >I did notice a gmacb driver but the main issue now seems to be how to
> >create a driver in uboot
>
> Again, Which driver do you want to create under uboot? GMAC driver?
> or anything else?
>
> >The procedures for creating a driver seems complex and some guidance
> >would be appreciated
>
> For different driver, you can check different subsystem in uboot for
> more detail information.
>
> >Thank you for the link to the patch
> >
> >With Best Regards
> >
> >Steven
>
> Best Regards,
> Bo Shen
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 5+ messages in thread
* [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek
[not found] ` <0DB6E3D37041564ABBD7F219EBFF1ABFE9161A@HERCULES.wf.local>
@ 2013-08-20 10:04 ` Bo Shen
0 siblings, 0 replies; 5+ messages in thread
From: Bo Shen @ 2013-08-20 10:04 UTC (permalink / raw)
To: u-boot
Hi Steven,
On 8/20/2013 14:04, Steven Rosenberg wrote:
> Hi Bo,
>
> To keep it simple, we need a microcontroller driver that accesses a few peripherals on the board, not just Ethernet(GMAC), also UART, GPIO, I2C, etc. No human intervention. One boots on power up and the driver would need to load and run at boot time and access the hardware (hopefully by interfacing with existing dedicated drivers or by replacing them).
I think the peripherals you mentioned are working with the mainline
u-boot. If the one you tested doesn't work, please just let us know that.
> Hence the questions on creating a device driver under uboot. If you can point to specific documentation (possibly a miscellaneous driver category) we would greatly appreciate it. Creating a device tree file from scratch (because atmel did not provide one) seemed like a good deal of work without proper examples and we were looking for more tutorial.
>
> Thank you for your help.
>
> With Best Regards.
>
> Steven.
Best Regards,
Bo Shen
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2013-08-20 10:04 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-08-18 14:55 [U-Boot] U-Boot Driver Development on Atmel's sama5d3xek Steven Rosenberg
2013-08-20 1:49 ` Bo Shen
[not found] <0DB6E3D37041564ABBD7F219EBFF1ABFE905EB@HERCULES.wf.local>
2013-08-20 5:46 ` Bo Shen
2013-08-20 7:25 ` Michael Trimarchi
[not found] ` <0DB6E3D37041564ABBD7F219EBFF1ABFE9161A@HERCULES.wf.local>
2013-08-20 10:04 ` Bo Shen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox