Could not compile stylesheet for simplistic. Using last compiled stylesheet.
Question
0
I am trying to create an interrupt for AR1021 touch panel controller using a gpio on JA990. To test, using an "out of the box" igepv2 no wifi, I am wiring a button on a breadboard with one side of the button wired to 1.8v (JA990 Pin1) and the other side through a 1k resistor to pin12 (GPIO156) which also has a 10k pulldown resistor to GND. I always get /sys/class/gpio/gpio156/value=0 whether the button is pushed or not.
cd /sys/class/gpio/
echo 156 > export
cd gpio156
echo in > direction
cat value ==> expect 1 when button pressed but always get 0
Suggestions?
cd /sys/class/gpio/
echo 156 > export
cd gpio156
echo in > direction
cat value ==> expect 1 when button pressed but always get 0
Suggestions?
Accepted Answer
0
Hi Peter,
Your hardware setup is OK, but you will need to configure properly software side.
GPIOs like 156 and 158 are muxed as output signals. Before read values you will need to configure them as input/output. Type the following commands:
//Enable Kernel debug filesystem:
mount -t debugfs none /sys/kernel/debug
//Configure GPIO156:
echo 0x104 > /sys/kernel/debug/omap_mux/mcbsp1_clkr
//Configure GPIO158:
echo 0x104 > /sys/kernel/debug/omap_mux/mcbsp1_dx
If you program these GPIOs at kernel board file, commands above are not necessary.
More info at: http://labs.isee.biz/index.php/Mux_configuration
Cheers!
Your hardware setup is OK, but you will need to configure properly software side.
GPIOs like 156 and 158 are muxed as output signals. Before read values you will need to configure them as input/output. Type the following commands:
//Enable Kernel debug filesystem:
mount -t debugfs none /sys/kernel/debug
//Configure GPIO156:
echo 0x104 > /sys/kernel/debug/omap_mux/mcbsp1_clkr
//Configure GPIO158:
echo 0x104 > /sys/kernel/debug/omap_mux/mcbsp1_dx
If you program these GPIOs at kernel board file, commands above are not necessary.
More info at: http://labs.isee.biz/index.php/Mux_configuration
Cheers!
Responses (3)
-
Accepted Answer
-
Accepted Answer
0Thanks Pau. It works!
I assume adding
OMAP3_MUX(MCBSP1_CLKR, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
OMAP3_MUX(MCBSP1_DX, OMAP_MUX_MODE4 | OMAP_PIN_INPUT),
to
static struct omap_board_mux board_mux[] __initdata ={
in
(kernel sources)/arch/arm/mach-omap2/board-igep0020.c
will also work.
I did not see GPIO's MODE4 being set up in board-igep0020.c, or board-igep00x0.c or board-igep00x0.h. Is there another file where GPIO's are set up that I would be better to use?
Peter -
Accepted Answer
0Hi Peter,
Is the proper place to configure them. Take a look SMSC LAN IRQ configuration:
http://git.isee.biz/?p=pub/scm/linux-omap-2.6.git;a=blob;f=arch/arm/mach-omap2/board-igep0020.c;h=2c165ed3e0bc721c35a897effa72008e4e46e9ad;hb=refs/heads/linux-2.6.37.y#l473
Cheers!

Please login to post a reply
You will need to be logged in to be able to post a reply. Login using the form on the right or register an account if you are new here.
Register Here »