LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 11-05-2010, 02:39 AM   #1
leonard.s
LQ Newbie
 
Registered: Jan 2006
Posts: 5

Rep: Reputation: 0
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?
 
Old 11-05-2010, 06:34 AM   #2
leonard.s
LQ Newbie
 
Registered: Jan 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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"...
 
Old 11-09-2010, 10:28 PM   #3
leonard.s
LQ Newbie
 
Registered: Jan 2006
Posts: 5

Original Poster
Rep: Reputation: 0
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"
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Where is the GPIO function? ligang Linux - Embedded & Single-board computer 2 06-07-2010 11:46 PM
GPIO interfacing tomas632 Programming 1 01-13-2010 06:25 PM
Using GPIO (from kernel GPIO support) in MY application DannyGilbert Linux - Kernel 2 03-16-2009 07:52 AM
Gpio rash_f Linux - Newbie 1 08-31-2006 01:14 PM
Problem with reading/writing GPIO on video card with bttv compatible chip boky Linux - Hardware 0 10-13-2005 05:08 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 10:39 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration