ST migration

From OMAPpedia

Revision as of 20:02, 23 September 2011 by Pavan savoy (Talk | contribs)
Jump to: navigation, search

Contents

Migration from Dedicated UART to Shared Transport

Newer combo connectivity chipsets (WL128x & WL18xx family) include other wireless technologies such as FM, NFC, GPS and ANT which share the same UART as that of Bluetooth. Linux Bluetooth or BlueZ stack solution as of today, do not provide a standard way to share the UART with other technologies. Linux Bluetooth solution for chipsets interfaced with UART provide a dedicated line discipline N_HCI managed in user-space by tool hciattach, which owns the UART for its purpose only.

To make use of other technologies which share the same UART, a new line discipline driver TI-ST 'aka shared transport driver needs to be made use of.

The dedicated UART Bluetooth solution makes use of the N_HCI line discipline, whereas the Shared Transport solution makes use of the N_TI_WL line discipline. Dedicated UART Bluetooth makes use of the User-Space tool called "hciattach" to install and maintain the N_HCI line discipline, where as the Shared Transport uses the UIM tool to perform the same with minor differences in functionality.

For more details, please also refer to http://omappedia.org/wiki/Device_Driver_Interface_of_WiLink_Solution

Enabling TI-ST driver

The Shared Transport driver (TI-ST) driver needs to be enabled to provide the N_TI_WL functionality for the BTWiLink driver

Device Drivers  --->
   [*] Misc devices  --->
      Texas Instruments shared transport line discipline  --->
         [*] Shared transport core driver

Note: ONLY upon enabling this driver, few other drivers such as the BTWiLink driver, FM V4L2 Radio driver are visible in the menuconfig.

Disable HCI UART and Enable BTWiLink

This requires you to make menuconfig and opt for BTWILINK driver instead of the HCI UART driver

-- Networking support
    Bluetooth subsystem support  --->
       Bluetooth device drivers  --->
           HCI UART driver                                     
                       [ ]   UART (H4) protocol support  
                       [ ]   BCSP protocol support  
                       [ ]   Atheros AR300x serial support 
                       [ ]   HCILL protocol support 
                       < > HCI BCM203x USB driver 
                       < > HCI BPA10x USB driver 
                       < > HCI BlueFRITZ! USB driver 
                       < > HCI VHCI (Virtual HCI device) driver 
                       < > Marvell Bluetooth driver support 
                       <*> Texas Instruments WiLink7 driver  

User Space Line Discipline Installer

'hciattach is a BlueZ utility which enables the HCI_UART and acts as the maintainer of the line discipline. It can constitute manufacturer specific code to perform manufacturer specific initialization including firmware download.

Since for a combo-connectivity chip-set the firmware download needs to be happen for other technologies apart from Bluetooth, Shared Transport driver takes care of firmware download from kernel.
To maintain Shared Transport line discipline and also modify the baud-rate in which communication happen, A tool UIM has been introduced.

The tool UIM needs to replace the hciattach service in the init.<board>.rc for Android or other start-up scripts depending upon the distribution.

#shared transport user space mgr service for Bluetooth, FM and GPS
service uim /system/bin/uim-sysfs
        class core
        user bluetooth
        group bluetooth net_bt_admin

The service needs to run at boot by default, so as to enable various technologies to turn On/Off independent of Bluetooth service.

The existing hciattach service in init.<board>.rc can be commented out or replaced with the following,

service hciattach /system/bin/hciattach -l
    user root
# changing user to root from bluetooth is a potential security issue
# service hciattach_legacy is used instead of hciattach because, we dont
# have nodes named ttyHS0
    group bluetooth net_bt_admin misc
    disabled
    oneshot

Above service upon enabling, only prints out the list of manufacturers that hciattach support, along with it 'help' and quits.

Android rfkill Bluetooth dependency

Android makes use of rfkill sub-system entries /sys/class/rfkill/rfkill0 to indicate a turn On or a turn Off of Bluetooth chipset. Therefore it would be required for a dedicated UART based solution to provide an rfkill driver to toggle the BT_EN gpio. One such example can be found at drivers/misc/wl127x-rfkill.c.

Note: BT_EN is the chip power enable line interfaced with one of the GPIOs on OMAP (or apps processor) and is part of TI-ST platform data.

However since Shared Transport (TI-ST) driver is responsible to toggle the BT_EN gpio, rfkill driver like the wl127x-rfkill.c needs to be disabled from the kernel build to switch from dedicated UART to Shared Transport solution.

From the make menuconfig, It can be disabled at,

Device Drivers  --->
   [*] Misc devices  --->
      < >   Bluetooth power control driver for TI wl127x

Support Contacts

If you have any questions, doubts or suggestions please send them to: WCG Leads.

Back to Connectivity Home Page

Personal tools
Namespaces
Variants
Actions
Navigation
Toolbox