Reputation: 51
I am using devkit8000 which is similar to beagle board.
How to enable CONFIG_OMAP_MUX inside? Somehow I can't find it via menuconfig. or I am looking at the wrong place?
Upvotes: 0
Views: 378
Reputation: 729
Refer to OMAP35x Technical Reference Manual (Rev. W)
To use GPIO130 you need to make sure the register is in the correct mode for GPIO.
You can use devmem2
to peek and poke the registers.
[pg 778] Ensure bit 0
of 0x48002158
is set to 4 = Mode 4 for GPIO
Each GPIO module provides 32 dedicated general-purpose pins with input and output capabilities; thus, the general-purpose interface supports up to 192 (6 x 32) pins. - [pg 3358]
By that computation GPIO 130 should be in GPIO bank 5 bit 2 (plz check math).
(Assuming math is correct)
Check GPIO_OE
register 0x49056034
bit 2
to ensure the direction is correct. (0=output 1=input
)
Now you can set DATA_OUT at 0x4905603C
bit 2
or read DATA_IN at 0x49056038
bit 2
as you need.
Once you verify that the GPIO is setup correctly and you are able to peek and poke the values you can use either set it up in your boot-loader or the kernel so it sticks at startup or you can modify it in user space using mmap
or /sys/class/gpio/gpio130/..
(if exported) to get/set the values.
Upvotes: 1