Part Number: CC33XX-SOFTWARE
Other Parts Discussed in Thread: CC3301
Tool/software:
Hello,
I'm using a M2-CC3301 (MCU126A) on an "i.MX 8M Mini" host and try to get the btti_uart running.
I'm using driver version 1.0.0.7 so:
- Wireless driver version 1.7.0.128
- Wireless firmware version 1.7.0.188
- Wireless PHY version 1.2.39.5.44.67
My first try was to use the in-band sdio for Bluetooth, so I've just added the following to the mmc node in devicetree:
btti@1 {
reg = <1>;
compatible = "ti,cc33xxbt";
};
This worked just fine, and I was able to use the Bluetooth interface like described in the "software-examples" -> "ble-fundamentals" section of the "Linux CC33XX User's Guide".
Now I try to get this running on the uart interface, which looks a little more complicated.
I've added the following to the devicetree, like described in the "Migration Guide" of the "Linux CC33XX User's Guide":
cc33xx_supply: fixedregulator@1 {
compatible = "regulator-fixed";
regulator-name = "cc33xx_supply";
regulator-min-microvolt = <1800000>;
regulator-max-microvolt = <1800000>;
gpio = <&gpio_buff 1 GPIO_ACTIVE_HIGH>; /* Using WL REG ON as well here on #WDISABLE1 */
enable-active-high;
};
&uart1 { /* Bluetooth UART */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1>;
status = "okay";
assigned-clocks = <&clk IMX8MM_CLK_UART1>;
assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
resets = <&modem_reset>;
fsl,uart-has-rtscts;
bluetooth {
compatible = "ti,cc33xx-bt";
cc33xx-supply = <&cc33xx_supply>;
max-speed = <115200>;
};
};
When grep for Bluetooth in the dmesg I get the following output:
# dmesg | grep "Bluetooth" [ 0.078914] Bluetooth: Core ver 2.22 [ 0.078947] Bluetooth: HCI device and connection manager initialized [ 0.078954] Bluetooth: HCI socket layer initialized [ 0.078960] Bluetooth: L2CAP socket layer initialized [ 0.078970] Bluetooth: SCO socket layer initialized [ 1.730326] Bluetooth: RFCOMM TTY layer initialized [ 1.735218] Bluetooth: RFCOMM socket layer initialized [ 1.740383] Bluetooth: RFCOMM ver 1.11 [ 1.744143] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ 1.749460] Bluetooth: BNEP filters: protocol multicast [ 1.754693] Bluetooth: BNEP socket layer initialized [ 1.759663] Bluetooth: HIDP (Human Interface Emulation) ver 1.2 [ 1.765589] Bluetooth: HIDP socket layer initialized [ 6.256206] Bluetooth: [bt sdio] BLE SDIO init module [ 6.456486] Bluetooth: [bt sdio] PROBE vendor=0x97, device=0x4077, class=255, fn=1 0xffff0000048a9800 [ 6.465810] Bluetooth: [bt sdio] sdio device tree data not available
So it looks like, he is still trying to use the btti_sdio path? How can I switch between sdio and uart?
What I also tried is to debug the btti_uart.c a little more. When removing the module with rmmod and adding it again with insmod, I can see the following output:
[ 163.965415] btti serial0-0: Host wakeup NOT enabled [ 163.970391] btti serial0-0: SM: Got EVENT_PROBE_DONE, moving from STATE_PROBING to STATE_HW_OFF
When looking into the source code of btti_uart.c it looks like he's getting stuck after opening the serial successful. But now he's waiting for kind of "magic" packet from the CC3301 to register the hci device, but here isn't coming anything. So is there something I'm missing? How will the CC3301 know which interface should be used? Why is there nothing on the UART? I've also checked with logic analyzer, that there is nothing coming on the UART lines?
Any Ideas or thoughts?
Thanks a lot!
Best Regards,
SJ
