Thanks.  The short version is it works very well now.

Bob Gustafson wrote:
> I was going to say that the GPIO pins had been covered in previous 
> postings to this list, but then I noticed you were one of those
> posters - on Jan 24 or so.

Yep. Just a bit slow.

>  I believe the upshot of the postings was that the GPIO chip must have
>  its pins enabled before they will be active...

Yes, that has to happen while OpenBSD is still in Securlevel 0.
I'm not quite clear, however, which settings for gpioctl map to which
pin on JP5.  Let me explain.

Here is an annotated excerpt from /etc/rc.secure:

        /usr/sbin/gpioctl gpio0 20 set out pp;  # error LED
        /usr/sbin/gpioctl gpio1 16 set out pp;  # JP5 pin 3
        /usr/sbin/gpioctl gpio1 18 set out pp;  # JP5 pin 5
        /usr/sbin/gpioctl gpio1 20 set out pp;  # JP5 pin 7
        /usr/sbin/gpioctl gpio1 22 set out pp;  # JP5 pin 9

so, with the above, I can toggle the onboard "Error" LED

        gpioctl gpio1 20 2

or pin 7 on JP5:

        gpioctl gpio1 20 2

However, my original confusion comes from how to map any of the above to
what is in the Soekris manual in section 3.5 "JP5, User I/O"
In that section of the manual the following pattern is given and I can't
figure out any correlation between the numbers below and the numbers I
found through trial and error above:

            A    B      C                 D
        PC87366 Pin   Function          JP5 Pin
        ------- ---   --------          -------
            --      +3.3V Power          1
        GPIO 20, 117   GPIO 0            3
        GPIO 22, 119   GPIO 2            5
        GPIO 24, 121   GPIO 4            7
        GPIO 26, 123   GPIO 6            9
            --         GND              11
         GPIO 5, 7     GPIO 9           13
        GPIO 13, 55    GPIO 10          15
                       GND              17
        SOUT 2,  107   TXD              19

Regards
-Lars
_______________________________________________
Soekris-tech mailing list
[email protected]
http://lists.soekris.com/mailman/listinfo/soekris-tech

Reply via email to