I am using pre-configured image of ubuntu to boot the beagle board . I need some GPIO pins to be configured as dedicated input pins and some to be dedicated output pins.
With the help /sys/class/gpio/ gpio(136-139), i am able to customize only four pins ( gpio136 – gpio139) to work as desired . Remaining pins are showing some default behaviour . I tested with (gpio130-gpio133) , changes which I make from inside /dev/class/gpio/gpio(130-133) are not reflected on the h/w pins . As these pins are designed to implement multiplexed behaviour, where should i make changes to make them work as dedicated I/P or O/P pins .
Check the board config file in your kernel sources (/arch/arm/mach-
omap2/board-omap3beagle.c) looking at the code maybe you can
understand how to expose such GPIO's to userspace
Check the board_mux array and calls to omap_mux_init_... functions for possible overrides.
Problem here is:
GPIOs 130-139 are shared with the second MMC interface. The mmc array in line 320ff defines the used MMC interfaces. The underlying mmc code automatically (re)sets the muxing depending on those settings.
MMC2 is defined with 4 data lines, so the pins MMC2_CLK, MMC2_CMD, MMC2_DAT0..3 get remuxed by the omap mmc implementation, so GPIO 130..135 can't be used as GPIO.
A quick fix would be to remove the second MMC interface from mmc[] (which is only needed for a bbtoys like WiFi card connected via the expansion header).
Thank you so much. Your reply made a lot of things more
clear .However, i don't want to tweak the kernel source . Is there any
other way to fix this issue.