LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Embedded & Single-board computer (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/)
-   -   Enabling / reading from GPIO on GMB-N270G2-S6A1E (https://www.linuxquestions.org/questions/linux-embedded-and-single-board-computer-78/enabling-reading-from-gpio-on-gmb-n270g2-s6a1e-842496/)

leonard.s 11-05-2010 02:39 AM

Enabling / reading from GPIO on GMB-N270G2-S6A1E
 
I am very new to GPIO on Linux. I have an Advantech board GMB-N270G2-S6A1E and would like to make use of the on-board GPIO. According to the board datasheet, it is using NXP 9555 for the 16-bit GPIO.

What is supposed to be the proper way of detecting / confirming the GPIO chip from Linux, and how do I perform a test that the GPIO is indeed working?

I read about performing "echo some_value > /sys/class/gpio/export", but what should the some_value be?

leonard.s 11-05-2010 06:34 AM

An update: I saw some log in /var/log/messages that refers to the GPIO:

Nov 5 12:12:52 localhost kernel: [ 0.294492] pci 0000:00:1f.0: quirk: [io 0x0400-0x047f] claimed by ICH6 ACPI/GPIO/TCO
Nov 5 12:12:52 localhost kernel: [ 0.294514] pci 0000:00:1f.0: quirk: [io 0x0480-0x04bf] claimed by ICH6 GPIO
Nov 5 12:12:52 localhost kernel: [ 0.294535] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 1 PIO at 04e0 (mask 001f)
Nov 5 12:12:52 localhost kernel: [ 0.294558] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 3 PIO at 0290 (mask 000f)
Nov 5 12:12:52 localhost kernel: [ 0.294578] pci 0000:00:1f.0: ICH7 LPC Generic IO decode 4 PIO at 4700 (mask 000f)

But I've tried the values above for /sys/class/gpio/export and it says "echo: write error: Invalid argument"...

leonard.s 11-09-2010 10:28 PM

Further update: I have read the ICH7M datasheet which can be found in here: http://www.intel.com/assets/pdf/datasheet/307013.pdf

Could anyone point me on the right path to find out the base address (or for that matter, to make use of the GPIO)? On the datasheet page 369, it says about the GPIO offset base address register. But I've tried to set 48h and 4Bh (and also in decimal value) into the /sys/class/gpio/export, but I still get the same error "echo: write error: Invalid argument"


All times are GMT -5. The time now is 10:01 PM.