Other Parts Discussed in Thread: WL1271
Hi,
We have integrated the TI DM8168 with our video processor & we have connected certain GP0 & GP1 pins to our wireless module. We are seeing that we're unable to control specifically GP1_IO11 gpio for some reason & we don't even see it exported in our /sys/class/gpio/.
Here's our board-ti8168evm.c portion of the file for the GPIO initialization:
static struct omap_board_mux board_mux[] __initdata = {
......
TI816X_MUX(SC0_DATA, OMAP_MUX_MODE2), /* gp1_io12 */
TI816X_MUX(SC0_CLK, OMAP_MUX_MODE2), /* gp1_io11 */
};
.......
#define GP1_IO11 (43)
#define GP1_IO12 (44)
static void bii_wl1271_io_init( void )
{
int ret;
omap_mux_init_signal( "sc0_clk", TI81XX_MUX_PULLDIS );
//omap_mux_init_gpio ("gp1_io11", 0);
//ret = gpio_request( GP1_IO11, "bt_host_wake" );
ret = gpio_request( GP1_IO11, "sc0_clk" );
if( ret == 0 ) {
ret = gpio_direction_output( GP1_IO11, 0 );
}
if ( ret == 0 ) {
/* Export to SYSFS */
ret = gpio_export(GP1_IO11, true);
gpio_export (43, true);
}
//GP1_IO12 - WLAN_CLK_REQ
omap_mux_init_signal( "gp1_io12", TI81XX_MUX_PULLDIS );
ret = gpio_request( GP1_IO12, "wlclkreq" );
if( ret == 0 ) {
ret = gpio_direction_output( GP1_IO12, 0 );
}
if ( ret == 0 ) {
/* Export to SYSFS */
ret = gpio_export(GP1_IO12, true);
}
}
......
On bootup on our board:
root@arago:~# ls /sys/class/gpio/ -l
--w------- 1 root root 4096 Jan 1 2000 export
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio11 -> ../../devices/virtual/gpio/gpio11
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio12 -> ../../devices/virtual/gpio/gpio12
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio13 -> ../../devices/virtual/gpio/gpio13
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio14 -> ../../devices/virtual/gpio/gpio14
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio21 -> ../../devices/virtual/gpio/gpio21
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio44 -> ../../devices/virtual/gpio/gpio44
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpio6 -> ../../devices/virtual/gpio/gpio6
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpiochip0 -> ../../devices/virtual/gpio/gpiochip0
lrwxrwxrwx 1 root root 0 Jan 1 2000 gpiochip32 -> ../../devices/virtual/gpio/gpiochip32
--w------- 1 root root 4096 Jan 1 2000 unexport
root@arago:~#
We're not able to figure out why this is happening because we want to control GP1_IO11 pin to toggle the way we like. We tried doing it the way described here for GP1_IO11 & didn't work: http://processors.wiki.ti.com/index.php/GPIO_Driver_Guide#Sysfs_entries_configuration. Any help would be very much appreciated. Thanks for all the wonderful tips in this forum.
Bharadwaj