~ >: dmesg | head -n 4
[ 0.000000] Linux version 3.0.0 (wenjing@centos6.localdomain) (gcc version 4.3.5 (Buildroot 2011.02) ) SVN318 Wed Feb 22 14:22:01 CST 2012
[ 0.000000] CPU: ARM926EJ-S [41069265] revision 5 (ARMv5TEJ), cr=00053177
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] Machine: Atmel AT91SAM9260-EK
~ >:
~ >: uname -a
Linux Atmel 3.0.0 SVN318 Wed Feb 22 14:22:01 CST 2012 armv5tejl unknown
~ >:
~ >: df -h
Filesystem Size Used Available Use% Mounted on
/dev/root 9.7M 4.8M 4.9M 49% /
~ >:
~ >: mount -t debugfs none /sys/kernel/debug
~ >:
~ >: mount
~ >:
rootfs on / type rootfs (rw)
/dev/root on / type ext2 (rw,relatime,errors=continue)
proc on /proc type proc (rw,relatime)
devpts on /dev/pts type devpts (rw,relatime,gid=5,mode=620)
ramfs on /tmp type ramfs (rw,relatime)
sysfs on /sys type sysfs (rw,relatime)
none on /sys/kernel/debug type debugfs (rw,relatime)
~ >:
~ >: cat /sys/kernel/debug/gpio
GPIOs 32-63, A:
[sda] GPIOA23: [gpio] set
[scl] GPIOA24: [gpio] set
GPIOs 64-95, B:
GPIOs 96-127, C:
~ >:
~ >: cat /proc/filesystems
nodev sysfs
nodev rootfs
nodev bdev
nodev proc
nodev tmpfs
nodev debugfs
nodev sockfs
nodev usbfs
nodev pipefs
nodev anon_inodefs
nodev rpc_pipefs
nodev devpts
ext2
nodev ramfs
vfat
msdos
nodev nfs
nodev jffs2
nodev mtd_inodefs
nodev ubifs
~ >:
# 32-127 //All pin maps
# 32-63 //should be from PA0-PA31
# 64-95 //should be from PB0-PB31
# 96-127 //should be from PC0-PC31
# So here gpio94 will operate PB30, which connect with one of LED, low voltage will power on Led
~ >: cd /sys/class/gpio/
/sys/class/gpio >: echo 94 > export
/sys/class/gpio >: cd gpio94/
/sys/devices/virtual/gpio/gpio94 >:
/sys/devices/virtual/gpio/gpio94 >:
/sys/devices/virtual/gpio/gpio94 >: cat value
1
/sys/devices/virtual/gpio/gpio94 >: cat direction
in
/sys/devices/virtual/gpio/gpio94 >: echo "high" > direction
/sys/devices/virtual/gpio/gpio94 >: cat direction
out
/sys/devices/virtual/gpio/gpio94 >: echo 0 > value
/sys/devices/virtual/gpio/gpio94 >: cat value
0
/sys/devices/virtual/gpio/gpio94 >:
~ >:
~ >: cat /sys/kernel/debug/gpio
GPIOs 32-63, A:
[sda] GPIOA23: [gpio] set
[scl] GPIOA24: [gpio] set
GPIOs 64-95, B:
[sysfs] GPIOB30: [gpio] clear
GPIOs 96-127, C:
~ >: