I tried to use a GPIO pin documented in the iMX233-OLINUXINO-MICRO
without success and noting postings about GPIO pins in the forum,
so i determined by experiment what the pin maps are, for my board
at least.
I wrote a PERL program to determine the mapping between Linux GPIO
pins and the CON1/CON2 pads on the OLinuXino Micro board. I picked
a pin that i knew worked as a sense pin and used to check the other
pads. For each pad, in turn, i made each of the GPIO lines that
Linux would allow me to write into an output. I read the sense pin
immediately after doing that, and then after writing a "0" and a "1".
The results were consistent for many pads, and for most documented
pads, only one GPIO pin (that Linux knew about) would affect that
pad. A few documented did not respond to any Linux pins and those
are enclosed in []. One pin of those responded before this testing
and it is enclosed in ().
L3 32
L4 33
L5 34
L6 35
L7 36
L8 37
L9 38 R9 [20]
L10 39
L11 [0]
L12 1
L13 2
L14 [3]
L15 4
L16 5
L17 6
L18 7
L19 16
L20 [17]
L21 54
L22 57
L23 56
L24 55 R24 92
L25 50 R25 91
L26 52 R26 23
L27 51 R27 (25)
L28 53 R28 60
Unreadable: 17, 65
Sorted by Linux pin number, to match the Olimex documentation, we have:
0 [L11]
1 L12
2 L13
3 [L14]
4 L15
5 L16
6 L17
7 L18
16 L19
17 [L20]
20 [R9]
23 R26
25 (R27)
32* L3
33* L4
34* L5
35* L6
36* L7
37* L8
38* L9
39* L10
50* L25
51 L27
52 L26
53 L28
54* L21
55 L24
56 L23
57* L22
60* R28
91 R25
92 R24
Pins with "*" are not in Revision J of the documentation (January 2013).
Linux pins 32:39 are documented as being used by the LCD, which i have
not compiled into my kernel, so they might not be usable as GPIO lines
if you have that feature enabled.
Doing this allowed me to select two pins which will suit our application
and were not in the original documentation. I hope this is helpful to
someone else as well.