Soekris Stuff
I've recently been working with a Soekris net4826 under Linux. I had a hard time finding info about the GPIO on it, so I am putting some info about it up here.
In order to get it working, I did the following, using a vanilla 2.6.15.6 kernel:
modprobe scx200_gpio mkdir /dev/soekris cd /dev/soekris mknod error_led c 254 20 mknod gpio0 c 254 13 mknod gpio1 c 254 12 mknod gpio2 c 254 0 mknod gpio3 c 254 2 mknod gpio4 c 254 3
The following will get a net4801 working under 2.6.18, assuming you have the needed modules built
modprobe pc8736x_gpio modprobe scx200_gpio mkdir /dev/soekris cd /dev/soekris mknod error_led c 253 20 mknod gpio0 c 254 16 mknod gpio1 c 254 17 mknod gpio2 c 254 18 mknod gpio3 c 254 19 mknod gpio4 c 254 20 mknod gpio5 c 254 21 mknod gpio6 c 254 22 mknod gpio7 c 254 23 mknod gpio8 c 254 4 mknod gpio9 c 254 5 mknod gpio10 c 254 11 mknod gpio11 c 254 10
scx200_gpio and pc8736x_gpio use a dynamic major number, so check dmesg to make sure you are using the right one.
Characters you can echo to the device:
0: Set the pin low 1: Set the pin high O: Enable output on the pin o: Disable output on the pin T: Set pin output to push pull t: Set pin output to open drain P: Enable pull up on the pin p: Disable pull up on the pin v: printk the current pin settings
Reading a byte from the device will return 0 or 1 (in ascii) depending on if the pin is currently high or low.
Here's the pinout for JP3, pin 1 is marked on the board, and pin 2 is across from it:
pin no function SC1100 pin 1 +3.3V 2 +5V 3 GPIO0 / I2C SDA -> AB2D/GPIO13 (AD23) 4 GPIO1 / I2C SCL -> AB2C/GPIO12 (AE23) 5 GPIO2 -> GPIO0 (B22) 6 GPIO3 -> GPIO2 (B21) 7 GPIO4 -> GPIO3 (A22) 8 GND
<Previous | Top | Next>
©2009 Ryan Castellucci