[Soekris] 4801 GPIO
sjf at ctrlsft.com
Wed Jan 17 17:22:19 UTC 2007
On Jan 17, 2007, at 6:42 , Poul-Henning Kamp wrote:
> In message <FA89AD7D-E1A5-4507-9A3D-2EADA9650423 at ctrlsft.com>,
> Steven Finnegan
>> For the last two days, I have been searching for information
>> regarding accessing the GPIO pins from within FreeBSD (for the
>> purpose of driving LEDs). I found an old message from Poul-Henning
>> Kamp that talked about support for the "error" LED -- that also
>> stated that creating additional LEDs was fairly straight-forward, but
>> it did not describe the process.
>> This is to request any information regarding this subject. Poul, if
>> you're still offereing this info by email (???), I would appreciate
>> your response.
> Sorry, I'm a bit snowed under right now.
> The code you are looking for is in sys/i386/i386/geode.c around
> line 185
> You basically need configure the GPIO pins you want and add more
> led_create() calls.
> Poul-Henning Kamp | UNIX since Zilog Zeus 3.20
> phk at FreeBSD.ORG | TCP/IP since RFC 956
> FreeBSD committer | BSD since 4.3-tahoe
> Never attribute to malice what can adequately be explained by
Thanks for your help.
Is there something that needs to be done to program the GPIO pins as
outputs? Also, the "output bit numbers" (values put into "ledxb") are
not obvious. The 4801 manual shows the pc87366 pins mapped to GPIO
pins, with several apparent typos (GPIO24 and GPIO26 are listed
twice). I've tried both versions below, but neither seems to work.
Also, the error led is "20", which if the pc87366 bit numbers are
used would be GPIO 0 on pin #3. Although I can flash the error led,
NONE of the GPIO pins on JP5 are moving
//led2b = 20; // if using pc87366 GPIO 20
led2b = 0; // if using GPIO 0
led2 = led_create(led_func, &led2b, "gpio0");
//led3b = 21;
led3b = 1;
led3 = led_create(led_func, &led3b, "gpio1");
A little more help would be greatly appreciated
More information about the Soekris-tech