Search

Technical Discussion Group Forum

This forum is provided for user discussion. While Beacon EmbeddedWorks support staff and engineers participate, Beacon EmbeddedWorks does not guarantee the accuracy of all information within in the Technical Discussion Group (TDG).

The "Articles" forums provide brief Articles written by Beacon EmbeddedWorks engineers that address the most frequently asked technical questions.

To receive email notifications when updates are posted for a Beacon EmbeddedWorks product download, please subscribe to the TDG Forum of interest.

TDG Forum

PrevPrev Go to previous topic
NextNext Go to next topic
Last Post 12 May 2014 08:52 AM by  Louie Earle
setting GPIOs in u-boot
 3 Replies
Sort:
You are not authorized to post a reply.
Author Messages
Louie Earle
New Member
New Member
Posts:12


--
28 Apr 2014 02:44 PM

    Hello all,

     I am trying to set a few GPIOs in u-boot prior to the linux kernel being loaded. I am using a Torpedo + Wireless SOM on a custom board. In the past, I have just set gpios from linux userspace, but with the latest spin of the board, I need to manage a few switches to a USB hub before the kernel starts now.  My project uses the Torpedo + Wireless dev kit's board file.

    I am new to u-boot and don't see much of anything in the help for setting GPIOs or even changing the state of muxed pins. The mux_config command looks like it dumps the current status of all pins, but I don't see how to change them.

    I tried adding

    #define CONFIG_CMD_GPIO  1

    to the file /rpm/BUILD/u-boot-2011.06/include/configs/omap3logic.h, but it would not compile, giving me the error:

    error: asm/gpio.h: No such file or directory

    Can someone please point me to a good resource for getting u-boot to play nice with GPIOs?

    Thank you!

    Louie Earle
    New Member
    New Member
    Posts:12


    --
    28 Apr 2014 02:48 PM
    Oh - I should also note that I'm using 2.3.2 of the linux BSP. I know 2.4.2 is out, but this is my first linux development effort, so I've been terrified of changing over when everything else has been working OK so far.
    bradb
    Basic Member
    Basic Member
    Posts:203


    --
    29 Apr 2014 01:43 PM

    In the Linux 2.4-2 BSP you can reference the use of  function pin_set_gpio_dataout() in the board/ti/logic/Logic-i2c.c file as an example of setting the level of a GPIO.  The function pin_set_gpio_dataout() is defined in board/ti/logic/Logic-gpio.c.    It is likely this same function also exist in Linux 2.3-2 BSP as well.

    Louie Earle
    New Member
    New Member
    Posts:12


    --
    12 May 2014 08:52 AM
    Thanks for the tip!
    You are not authorized to post a reply.