Bluetooth integration with IMX6Q Processor

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Bluetooth integration with IMX6Q Processor

1,166 Views
sanketparekh
Contributor II

Hi

Greetings,

I have custom board, that board have IMX6Q processor. I have on board chip of Wi-Fi + BLE. I have used Marvel kernel drivers for Wi-Fi as well as BLE. During system bootup i got below logs for download the firmware in that Wi-Fi chip.

--------------------------------------------------------------------------------------------------------------------------------------------------

vendor=0x02DF device=0x9135 class=0 function=1
SDIO: max_segs=128 max_seg_size=65535
rx_work=1 cpu_num=4
wlan: Enable TX SG mode
wlan: Enable RX SG mode
Request firmware: mrvl/sduart8887_combo_a2.bin
WLAN FW already running! Skip FW download
WLAN FW is active
ov5640_mipi 1-003e: no sensor pwdn pin available
ov5640_mipi: probe of 1-003e failed with error -22
imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_CSI0_DAT12 already requested by 21f0000.serial; cannot claim for 1-003d
imx6q-pinctrl 20e0000.iomuxc: pin-162 (1-003d) status -22
imx6q-pinctrl 20e0000.iomuxc: could not request pin 162 (MX6Q_PAD_CSI0_DAT12) from group i2c2-ov5642grp  on device 20e0000.iomuxc
ov5642 1-003d: Error applying setting, reverse things back
imx6q-pinctrl 20e0000.iomuxc: pin MX6Q_PAD_CSI0_DAT12 already requested by 21f0000.serial; cannot claim for 1-003d
imx6q-pinctrl 20e0000.iomuxc: pin-162 (1-003d) status -22
imx6q-pinctrl 20e0000.iomuxc: could not request pin 162 (MX6Q_PAD_CSI0_DAT12) from group i2c2-ov5642grp  on device 20e0000.iomuxc
ov5642 1-003d: Error applying setting, reverse things back
ov5642 1-003d: ov5642 setup pinctrl failed!
ov5642: probe of 1-003d failed with error -22
mxc_v4l_open: Mxc Camera no sensor ipu0/csi0
mxc_v4l_open: Mxc Camera no sensor ipu0/csi0
mxc_v4l_open: Mxc Camera no sensor ipu1/csi0
mxc_v4l_open: Mxc Camera no sensor ipu1/csi1
EXT4-fs (mmcblk0p3): mounted filesystem with ordered data mode. Opts: (null)
Timeout cmd id (1520327262.298414) = 0xa9, act = 0x0
a9 00 08 00 01 00 00 00 00 00 00 00 00 00 00 00
BSS type = 0 BSS role= 0
------------Dump info-----------
Commmand Timeout
pending command id: 0x3 ioctl_buf=  (null)
No pending scan command
mlan_processing =0
main_lock_flag =0
main_process_cnt =2
delay_task_flag =0
mlan_rx_processing =0
rx_pkts_queued=0
more_task_flag = 0
num_cmd_timeout = 1
dbg.num_cmd_timeout = 1
last_cmd_index = 1
last_cmd_id = 0x0 0xa9 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
last_cmd_act = 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
last_cmd_resp_index = 0
last_cmd_resp_id = 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
last_event_index = 0
last_event = 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0 0x0
num_data_h2c_failure = 0
num_cmd_h2c_failure = 0
num_data_c2h_failure = 0
num_cmdevt_c2h_failure = 0
num_int_read_failure = 0
last_int_status = 128
num_alloc_buffer_failure = 0
num_pkt_dropped = 0
num_no_cmd_node = 0
num_event_deauth = 0
num_event_disassoc = 0
num_event_link_lost = 0
num_cmd_deauth = 0
num_cmd_assoc_success = 0
num_cmd_assoc_failure = 0
cmd_resp_received=0
event_received=0
max_tx_buf_size=2048
tx_buf_size=2048
curr_tx_buf_size=2048
data_sent=1 cmd_sent=0
ps_mode=1 ps_state=0
wakeup_dev_req=0 wakeup_tries=0
hs_configured=0 hs_activated=0
pps_uapsd_mode=0 sleep_pd=0
tx_lock_flag = 0
scan_processing = 0
mp_rd_bitmap=0x0 curr_rd_port=0x0
mp_wr_bitmap=0x0 curr_wr_port=0x0
mp_invalid_update=0
last_recv_wr_bitmap=0x0 last_mp_index=0
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
mp_wr_bitmap: 0x0 mp_wr_ports=0x0 len=0 curr_wr_port=0x0
0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
bss_index = 0, tx_pkts_queued = 0
-------- Dump info End---------
Driver version = SD8887-0.0.0.p0-C3X15C216-GPL-(FP68)
main_state = 4
ioctl_pending = 0
tx_pending = 0
rx_pending = 0
lock_count = 28
malloc_count = 35
mbufalloc_count = 0
hs_skip_count = 0
hs_force_count = 0
SDIO Func0 (0x0-0x9): 43 03 02 02 03 00 08 02 03 00
SDIO Func1 (0x10-0x17): 00 00 00 00 ff ff 00 00
SDIO Func1: (0x8) c3 (0x58) 00 (0x5c) 08 (0x5d) 00 (0x60) 07 (0x61) 0c (0x62) 00 (0x64) 10 (0x65) 00 (0x66) 00 (0x68) 00 (0x69) 00 (0x6a) 00
SDIO Func1 (0x90-0x9a): dc fe 1b 00 d6 00 3f 01 01 02 00
SDIO Func1 (0x90-0x9a): dc fe 27 00 e0 00 3f 01 01 02 00
Firmware Init Failed
woal_add_card failed
wlan_sdio: probe of mmc2:0001:1 failed with error -1
wlan: Driver loaded successfully

--------------------------------------------------------------------------------------------------------------------------------------------------------------

I don't know what is actual reason behind this. After got this error when i reboot the system then mlan and sd8xxx driver was not loaded automatically.

Another issue is Wi-Fi driver was loaded successfully at bootup time, but driver for bluetooth was not loaded at bootup time. So after login prompt i have enable blutooth driver "hci_uart.ko". I got below logs.

-------------------------------------------------------------------------------------------------------------------------------------------------

[    0.924603] Bluetooth: HCI device and connection manager initialized
[    0.929676] Bluetooth: HCI socket layer initialized
[   13.246031] ahci-imx 2200000.sata: fsl,transmit-level-mV not specified, using 00000024
[   13.252666] ahci-imx 2200000.sata: fsl,transmit-boost-mdB not specified, using 00000480
[   13.259413] ahci-imx 2200000.sata: fsl,transmit-atten-16ths not specified, using 00002000
[   13.266328] ahci-imx 2200000.sata: fsl,receive-eq-mdB not specified, using 05000000
[   13.275775] ahci-imx 2200000.sata: failed to reset phy: -110
[   13.280201] ahci-imx: probe of 2200000.sata failed with error -110
[   13.394040] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[   13.399316] ehci-pci: EHCI PCI platform driver
[   13.575875] ci_hdrc ci_hdrc.1: EHCI Host Controller
[   13.604480] ci_hdrc ci_hdrc.1: USB 2.0 started, EHCI 1.00
[   13.743431] sdhci: Secure Digital Host Controller Interface driver
[   13.748375] sdhci: Copyright(c) Pierre Ossman
[   13.751478] sdhci-pltfm: SDHCI platform and OF driver helper
[   13.763380] sdhci-esdhc-imx 2198000.usdhc: could not get ultra high speed state, work on normal mode
[   13.772790] sdhci-esdhc-imx 2198000.usdhc: No vqmmc regulator found
[   13.825527] mmc2: SDHCI controller on 2198000.usdhc [2198000.usdhc] using ADMA
[   13.850610] sdhci-esdhc-imx 2198000.usdhc: no support for card's volts
[   13.860011] sdhci-esdhc-imx 219c000.usdhc: could not get ultra high speed state, work on normal mode
[   13.872351] sdhci-esdhc-imx 219c000.usdhc: No vqmmc regulator found
[   13.925540] mmc0: SDHCI controller on 219c000.usdhc [219c000.usdhc] using ADMA
[   13.951524] sdhci-esdhc-imx 2198000.usdhc: no support for card's volts
[   14.056194] sdhci-esdhc-imx 2198000.usdhc: no support for card's volts
[   14.153547] sdhci-esdhc-imx 2198000.usdhc: no support for card's volts
[  109.590539] HCI UART driver ver 2.2-M2614100
[  109.593978] HCI H4 protocol initialized
[  109.596937] HCILL protocol initialized
[  261.494511] Bluetooth: hci0 command 0x1003 tx timeout
[  263.494498] Bluetooth: hci0 command 0x1001 tx timeout
[  265.494479] Bluetooth: hci0 command 0x1009 tx timeout
[  483.134461] Bluetooth: hci0 command 0x1003 tx timeout
[  485.134462] Bluetooth: hci0 command 0x1001 tx timeout
[  487.134530] Bluetooth: hci0 command 0x1009 tx timeout
[ 1837.487024] HCI UART driver ver 2.2-M2614100
[ 1837.495551] HCI H4 protocol initialized
[ 1837.498409] HCILL protocol initialized

------------------------------------------------------------------------------------------------------------------------------------------------------

Our BLE Module was connected with UART interface, and that interface is "/dev/ttymxc1".

To enable chip as BLE, on our board one GPIO pin is there "BT_WACKUP_IN".

That i have enabled.

So i execute below command to attach the UART interface

               hciattach /dev/ttymxc1 any 3000000 flow

Then i have execute command "hciconfig -a"

It shows me below logs

--------------------------------------------------------------------------------------------------------------

hci0:    Type: Primary  Bus: UART
    BD Address: 00:00:00:00:00:00  ACL MTU: 0:0  SCO MTU: 0:0
    DOWN INIT RUNNING
    RX bytes:0 acl:0 sco:0 events:0 errors:0
    TX bytes:25 acl:0 sco:0 commands:5 errors:0
    Features: 0x00 0x00 0x00 0x00 0x00 0x00 0x00 0x00
    Packet type: DM1 DH1 HV1
    Link policy:
    Link mode: SLAVE ACCEPT

---------------------------------------------------------------------------------------------------------------

What is the issue behind this?

To up the hci0 interface, i have execute another command that is

            "hciconfig -a hci0 up"

It shows me below logs.

--------------------------------------------------------------------

Can't init device hci0: Connection timed out (110)

--------------------------------------------------------------------

Please give me suggestion related to above issues.

Thank you.

Sanket

Labels (1)
0 Kudos
1 Reply

809 Views
Bio_TICFSL
NXP TechSupport
NXP TechSupport

Hi Sanket,

Your system not recognize the driver, if that from marvel? you will have contact Marvel for this.

Regards

0 Kudos