From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stefano Babic Date: Thu, 25 Mar 2010 17:51:32 +0100 Subject: [U-Boot] i.MX51 How to use and program LED's In-Reply-To: References: Message-ID: <4BAB9494.7000709@denx.de> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Carlo McKee wrote: > Hello, > > I need help on how to write a simple routine in C to turn on and off the > general purpose diagnostic LED's of the iMX51 EVK board. > I am developing under Linux. Any help appreciated. As I cann see from schematics, the diagnostic led is connected with GPIO2_6. At the moment, there are no accessors function to access the gpio, in the same way we have for i.MX31. It should be nice to have it, however ;) Anyway, you can directly access to the gpio controller with readl/writel accessors. You can see an example (read) in mx51evk.c in board_mmc_getcd(). Check the gpio controller part of the manual, you need at least to set the direction as output for the GPIO2_6 pin before setting it. Regards, Stefano Babic -- ===================================================================== DENX Software Engineering GmbH, MD: Wolfgang Denk & Detlev Zundel HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany Phone: +49-8142-66989-0 Fax: +49-8142-66989-80 Email: office at denx.de =====================================================================