Hi
I am using IMX6 custom board which have android JB 4.2 with bluedroid stack, we r using wl1271 chip for wifi and bluetooth.
Wifi is working fine from linux as i ping to near system.
But BT is not working.Our bluetooth driver and ti-st driver is loaded as i seen in boot logs as well as it created entry in /sys/devices/platform/(kim and btwilink).
changes that i made in board file for Bluetooth.
static struct platform_device mxc_bt_rfkill = {
.name = "btwilink",
.id = -1,
};
static struct platform_device mxc_wlan_rfkill = {
.name = "kim",
.id = -1,
.dev.platform_data = &wilink_pdata,
};
struct ti_st_plat_data wilink_pdata = {
.nshutdown_gpio = SABRESD_BT_EN,
.dev_name = "/dev/ttymxc3",
.flow_cntrl = 1,
.baud_rate = 3000000,
.suspend = plat_kim_suspend,
.resume = plat_kim_resume,
.chip_enable = plat_kim_chip_enable,
.chip_disable = plat_kim_chip_disable,
};
bt_enable()
{
uart4_init() //uart 4 initilization
platform_device_register(&mxc_wlan_rfkill);
platform_device_register(&mxc_bt_rfkill);
}
I think before loading firmware to bluetooth ,ti-st driver first communicate with bluetooth device. So when we probe the Tx and Rx of UART, it should toggle for some time. But the TX and RX line of UART(uart4 in our case for bluetooth) are not toggled during the initialization(boot)of board and not even after .We checked BT_enable pin thats changes low to high as expected.
When we debugg the code then we found that inside the TI-ST driver (st_kim_start function) wait for the ldisc to be installed( in wait_for_completion_timeout() ) .It does not installed on first attempt and retry for 2-3 times and failed to install the ldisk. Which i think is necessary for BT driver to communicate with BT device.And after that android up.
I am attaching the board boot logs with ti-st debug message ON. So anyone can suggest us that what modification we have to done to solve the above mention problem.
Regards
Vikram