Quantcast

gpio pins with yocto image

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

gpio pins with yocto image

hobbesc7
I need to use the following header pins on my Overo: 10, 114, 148, 151, 163, 170, 171, 172, 184, and 185.

But under /sys/class/gpio I only see gpio15, 16, 144-5, 164, 168, and 250-5.

I'm building the gumstix-console-image with the latest yocto stuff.

How do I access these pins?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpio pins with yocto image

Ash Charles
Typically, the GPIOs are available but not necessarily exposed in
sysfs by the kernel e.g.
$ cd /sys/class/gpio
$ echo 10 > export
$ cd gpio10
This doesn't get around any problems where a pin is not correctly
mux'd. In this case, you'd need to set the correct mux mode in u-boot
first or use various devmem2 incantations to achieve the correct
mux'ing.

--ASh

On Wed, Feb 20, 2013 at 7:03 AM, hobbesc7 <[hidden email]> wrote:

> I need to use the following header pins on my Overo: 10, 114, 148, 151, 163,
> 170, 171, 172, 184, and 185.
>
> But under /sys/class/gpio I only see gpio15, 16, 144-5, 164, 168, and 250-5.
>
> I'm building the gumstix-console-image with the latest yocto stuff.
>
> How do I access these pins?
>
>
>
> --
> View this message in context: http://gumstix.8.n6.nabble.com/gpio-pins-with-yocto-image-tp4966854.html
> Sent from the Gumstix mailing list archive at Nabble.com.
>
> ------------------------------------------------------------------------------
> Everyone hates slow websites. So do we.
> Make your web apps faster with AppDynamics
> Download AppDynamics Lite for free today:
> http://p.sf.net/sfu/appdyn_d2d_feb
> _______________________________________________
> gumstix-users mailing list
> [hidden email]
> https://lists.sourceforge.net/lists/listinfo/gumstix-users

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpio pins with yocto image

hobbesc7
Ash Charles wrote
$ cd /sys/class/gpio
$ echo 10 > export
$ cd gpio10
This works well.  I also echo "out" to /sys/class/gpio/gpio10/direction.  I have a multimeter in pin 18, and when I echo 1 to /sys/class/gpio/gpio10/value, I see 1.8V.

I have two questions, however:

1.  What is the preferred way of doing the above at bootup?  When I reboot, gpio10 is gone.  Put something in /lib/systemd/system/?  Tmpfiles.d?

2.  Also, with my multimeter, I notice that pin18 goes to 1.8V for the first few seconds of boot time, then it drops to 0V.  I need this to stay at 0V unless I explicitly write a 1 to this pin.  Do I have to make a kernel or u-boot change to achieve this?
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpio pins with yocto image

Ash Charles
On Thu, Feb 21, 2013 at 7:57 AM, hobbesc7 <[hidden email]> wrote:
> 1.  What is the preferred way of doing the above at bootup?  When I reboot,
> gpio10 is gone.  Put something in /lib/systemd/system/?  Tmpfiles.d?
Typically, I'd just make the change by modifying the kernel directly
(see the gpio_export() calls in the board_overo.c file).  Certainly,
it be possible to make the change by issuing these commands in
userspace.
>
> 2.  Also, with my multimeter, I notice that pin18 goes to 1.8V for the first
> few seconds of boot time, then it drops to 0V.  I need this to stay at 0V
> unless I explicitly write a 1 to this pin.  Do I have to make a kernel or
> u-boot change to achieve this?
U-boot.  Look at the MUX_OVERO() define in overo.h

--Ash

------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_feb
_______________________________________________
gumstix-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/gumstix-users
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: gpio pins with yocto image

hobbesc7
Ash Charles wrote
> 2.  Also, with my multimeter, I notice that pin18 goes to 1.8V for the first
> few seconds of boot time, then it drops to 0V.  I need this to stay at 0V
> unless I explicitly write a 1 to this pin.  Do I have to make a kernel or
> u-boot change to achieve this?
U-boot.  Look at the MUX_OVERO() define in overo.h
So I made the change in overo.h to pull down pin18, (gpio10), instead of pulling it up.  This has improved things, but I notice that the pin still jumps to 1.8v briefly before u-boot starts?  Is there any way to prevent this?
Loading...