此文是用来记录最近在3568上调试蓝牙遇到的坑以及自己的一点总结。
现在网上关于rk平台调试蓝牙的帖子有很多,而且SDK下也有专门的文档介绍,这里就直接贴配置好了
kernel配置
wireless_bluetooth: wireless-bluetooth {
compatible = "bluetooth-platdata";
clocks = <&hym8563>;
clock-names = "ext_clock";
//wifi-bt-power-toggle;
uart_rts_gpios = <&gpio2 RK_PB1 GPIO_ACTIVE_LOW>;
pinctrl-names = "default", "rts_gpio";
pinctrl-0 = <&uart8m0_rtsn>, <&bt_power>;
pinctrl-1 = <&uart8_gpios>;
BT,reset_gpio = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
status = "okay";
};
&uart8 {
status = "okay";
pinctrl-names = "default";
pinctrl-0 = <&uart8m0_xfer &uart8m0_ctsn>;
};
这里有两个值得注意的地方
一个是BT,reset_gpio = <&gpio4 RK_PC0 GPIO_ACTIVE_HIGH>;
这里reset可以改成power,跟踪代码发现这两个功能一样都是根据硬件引脚有关。