Yocto mickledore Bluetooth bringup

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

Yocto mickledore Bluetooth bringup

Jump to solution
2,201 Views
PavanNittala
Contributor II

I am not able to bring up bluetooth on imx8mm-c2 board ,  I am using AMPAK firmware BCM4362A2_001.003.006.1132.1255.hcd , this is my dts file change 

&uart3 { /* BT */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
assigned-clocks = <&clk IMX8MMN(CLK_UART3)>;
assigned-clock-parents = <&clk IMX8MMN(SYS_PLL1_80M)>;
uart-has-rtscts;
status = "okay";

bluetooth {
compatible = "brcm,bcm43438-bt";
enable-gpios = GP_BT_ENABLE;
max-speed = <3000000>;
};
};

[ 186.437564] Bluetooth: HCI UART driver ver 2.3
[ 186.442064] Bluetooth: HCI UART protocol H4 registered
[ 186.447244] Bluetooth: HCI UART protocol BCSP registered
[ 186.452582] Bluetooth: HCI UART protocol ATH3K registered
[ 186.458350] Bluetooth: HCI UART protocol Broadcom registered
[ 186.458475] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator
[ 186.464121] Bluetooth: HCI UART protocol QCA registered
[ 186.471653] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator
[ 186.484319] hci_uart_bcm serial0-0: No reset resource, using default baud rate
[ 188.734730] Bluetooth: hci0: command 0x0c03 tx timeout
[ 196.830734] Bluetooth: hci0: BCM: Reset failed (-110)

root@nitrogen8mm:~# hciconfig
hci0: Type: Primary Bus: UART
BD Address: 00:00:00:00:00:00 ACL MTU: 0:0 SCO MTU: 0:0
DOWN
RX bytes:0 acl:0 sco:0 events:0 errors:0
TX bytes:4 acl:0 sco:0 commands:1 errors:0

 

 

0 Kudos
Reply
1 Solution
2,109 Views
PavanNittala
Contributor II

Thanks to grok3, the new AI tool, i was able to resolve this . Now i have to bring down rfkill and up it again to make bluetooth work

+#if 0
pinctrl_uart3: uart3grp {
fsl,pins = <
MX8MMN(IOMUXC_ECSPI1_SCLK_UART3_DCE_RX, 0x140)
@@ -320,6 +321,17 @@ MX8MMN(IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B, 0x140)
MX8MMN(IOMUXC_NAND_DQS_GPIO3_IO14, 0x119)
>;
};
+#else
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX 0x49
+ MX8MM_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX 0x49
+ MX8MM_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B 0x49
+ MX8MM_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B 0x49
+ MX8MM_IOMUXC_NAND_DQS_GPIO3_IO14 0x19 /* BT_REG_ON */
+ >;
+ };
+#endif

+#if 0
&uart3 { /* BT */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
@@ -1259,15 +1272,29 @@ &uart3 { /* BT */
assigned-clock-parents = <&clk IMX8MMN(SYS_PLL1_80M)>;
uart-has-rtscts;
status = "okay";
-#if 1
- 1 {
+ bluetooth {
compatible = "brcm,bcm43438-bt";
brcm,bt-pcm-int-params = [01 02 00 01 01];
enable-gpios = GP_BT_ENABLE;
max-speed = <2000000>;
};
-#endif
};
+#else
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ assigned-clocks = <&clk IMX8MM_CLK_UART3>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
+ uart-has-rtscts; /* Flow control for AP6275S */
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm43438-bt"; /* AP6275S */
+ max-speed = <3000000>;
+ shutdown-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; /* BT_REG_ON */
+ };
+};
+#endif

 

View solution in original post

0 Kudos
Reply
4 Replies
2,110 Views
PavanNittala
Contributor II

Thanks to grok3, the new AI tool, i was able to resolve this . Now i have to bring down rfkill and up it again to make bluetooth work

+#if 0
pinctrl_uart3: uart3grp {
fsl,pins = <
MX8MMN(IOMUXC_ECSPI1_SCLK_UART3_DCE_RX, 0x140)
@@ -320,6 +321,17 @@ MX8MMN(IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B, 0x140)
MX8MMN(IOMUXC_NAND_DQS_GPIO3_IO14, 0x119)
>;
};
+#else
+ pinctrl_uart3: uart3grp {
+ fsl,pins = <
+ MX8MM_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX 0x49
+ MX8MM_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX 0x49
+ MX8MM_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B 0x49
+ MX8MM_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B 0x49
+ MX8MM_IOMUXC_NAND_DQS_GPIO3_IO14 0x19 /* BT_REG_ON */
+ >;
+ };
+#endif

+#if 0
&uart3 { /* BT */
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart3>;
@@ -1259,15 +1272,29 @@ &uart3 { /* BT */
assigned-clock-parents = <&clk IMX8MMN(SYS_PLL1_80M)>;
uart-has-rtscts;
status = "okay";
-#if 1
- 1 {
+ bluetooth {
compatible = "brcm,bcm43438-bt";
brcm,bt-pcm-int-params = [01 02 00 01 01];
enable-gpios = GP_BT_ENABLE;
max-speed = <2000000>;
};
-#endif
};
+#else
+&uart3 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&pinctrl_uart3>;
+ assigned-clocks = <&clk IMX8MM_CLK_UART3>;
+ assigned-clock-parents = <&clk IMX8MM_SYS_PLL1_80M>;
+ uart-has-rtscts; /* Flow control for AP6275S */
+ status = "okay";
+
+ bluetooth {
+ compatible = "brcm,bcm43438-bt"; /* AP6275S */
+ max-speed = <3000000>;
+ shutdown-gpios = <&gpio3 14 GPIO_ACTIVE_HIGH>; /* BT_REG_ON */
+ };
+};
+#endif

 

0 Kudos
Reply
2,161 Views
PavanNittala
Contributor II

Hi @joanxie , Thanks for the reply ,  Vendor asked to check using Scope which i don't have at the moment.

Some more info below , i am not able to see /dev/ttymxc2 , I think that's the issue ??

root@nitrogen8mm:~# dmesg |grep -iE 'tty'
[ 0.000000] Kernel command line: console=ttymxc1,115200 consoleblank=0 rootwait fixrtc root=/dev/mmcblk0p2 snd.slots=,snd-soc-imx-hdmi
[ 0.090110] 30880000.serial: ttymxc2 at MMIO 0x30880000 (irq = 185, base_baud = 5000000) is a IMX
[ 0.090237] serial serial0: tty port ttymxc2 registered
[ 0.090740] 30890000.serial: ttymxc1 at MMIO 0x30890000 (irq = 186, base_baud = 1500000) is a IMX
[ 0.821277] printk: console [ttymxc1] enabled

0 Kudos
Reply
2,143 Views
joanxie
NXP TechSupport
NXP TechSupport

you can use ls /dev/ttymxc* to check, and to confirm if you load the module correctly or not, pls refer to the link as below as reference

Bluetooth NXP UART Driver Linux BSP 6.1.22 btnxpuart - NXP Community

2,175 Views
joanxie
NXP TechSupport
NXP TechSupport

refer to the log, maybe this issue is related to your module, did you contact the BT vendor to double confirm this?

0 Kudos
Reply
%3CLINGO-SUB%20id%3D%22lingo-sub-2043109%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3EYocto%20mickledore%20Bluetooth%20bringup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2043109%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EI%20am%20not%20able%20to%20bring%20up%20bluetooth%20on%20imx8mm-c2%20board%20%2C%26nbsp%3B%20I%20am%20using%20AMPAK%20firmware%26nbsp%3BBCM4362A2_001.003.006.1132.1255.hcd%20%2C%20this%20is%20my%20dts%20file%20change%26nbsp%3B%3C%2FP%3E%3CP%3E%26amp%3Buart3%20%7B%20%2F*%20BT%20*%2F%3CBR%20%2F%3Epinctrl-names%20%3D%20%22default%22%3B%3CBR%20%2F%3Epinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart3%26gt%3B%3B%3CBR%20%2F%3Eassigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MMN(CLK_UART3)%26gt%3B%3B%3CBR%20%2F%3Eassigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MMN(SYS_PLL1_80M)%26gt%3B%3B%3CBR%20%2F%3Euart-has-rtscts%3B%3CBR%20%2F%3Estatus%20%3D%20%22okay%22%3B%3C%2FP%3E%3CP%3Ebluetooth%20%7B%3CBR%20%2F%3Ecompatible%20%3D%20%22brcm%2Cbcm43438-bt%22%3B%3CBR%20%2F%3Eenable-gpios%20%3D%20GP_BT_ENABLE%3B%3CBR%20%2F%3Emax-speed%20%3D%20%26lt%3B3000000%26gt%3B%3B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%7D%3B%3C%2FP%3E%3CP%3E%5B%20186.437564%5D%20Bluetooth%3A%20HCI%20UART%20driver%20ver%202.3%3CBR%20%2F%3E%5B%20186.442064%5D%20Bluetooth%3A%20HCI%20UART%20protocol%20H4%20registered%3CBR%20%2F%3E%5B%20186.447244%5D%20Bluetooth%3A%20HCI%20UART%20protocol%20BCSP%20registered%3CBR%20%2F%3E%5B%20186.452582%5D%20Bluetooth%3A%20HCI%20UART%20protocol%20ATH3K%20registered%3CBR%20%2F%3E%5B%20186.458350%5D%20Bluetooth%3A%20HCI%20UART%20protocol%20Broadcom%20registered%3CBR%20%2F%3E%5B%20186.458475%5D%20hci_uart_bcm%20serial0-0%3A%20supply%20vbat%20not%20found%2C%20using%20dummy%20regulator%3CBR%20%2F%3E%5B%20186.464121%5D%20Bluetooth%3A%20HCI%20UART%20protocol%20QCA%20registered%3CBR%20%2F%3E%5B%20186.471653%5D%20hci_uart_bcm%20serial0-0%3A%20supply%20vddio%20not%20found%2C%20using%20dummy%20regulator%3CBR%20%2F%3E%5B%20186.484319%5D%20hci_uart_bcm%20serial0-0%3A%20No%20reset%20resource%2C%20using%20default%20baud%20rate%3CBR%20%2F%3E%5B%20188.734730%5D%20Bluetooth%3A%20hci0%3A%20command%200x0c03%20tx%20timeout%3CBR%20%2F%3E%5B%20196.830734%5D%20Bluetooth%3A%20hci0%3A%20BCM%3A%20Reset%20failed%20(-110)%3C%2FP%3E%3CP%3Eroot%40nitrogen8mm%3A~%23%20hciconfig%3CBR%20%2F%3Ehci0%3A%20Type%3A%20Primary%20Bus%3A%20UART%3CBR%20%2F%3EBD%20Address%3A%2000%3A00%3A00%3A00%3A00%3A00%20ACL%20MTU%3A%200%3A0%20SCO%20MTU%3A%200%3A0%3CBR%20%2F%3EDOWN%3CBR%20%2F%3ERX%20bytes%3A0%20acl%3A0%20sco%3A0%20events%3A0%20errors%3A0%3CBR%20%2F%3ETX%20bytes%3A4%20acl%3A0%20sco%3A0%20commands%3A1%20errors%3A0%3C%2FP%3E%3CBR%20%2F%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2050077%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Yocto%20mickledore%20Bluetooth%20bringup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2050077%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EThanks%20to%20grok3%2C%20the%20new%20AI%20tool%2C%20i%20was%20able%20to%20resolve%20this%20.%20Now%20i%20have%20to%20bring%20down%20rfkill%20and%20up%20it%20again%20to%20make%20bluetooth%20work%3C%2FP%3E%3CP%3E%2B%23if%200%3CBR%20%2F%3Epinctrl_uart3%3A%20uart3grp%20%7B%3CBR%20%2F%3Efsl%2Cpins%20%3D%20%26lt%3B%3CBR%20%2F%3EMX8MMN(IOMUXC_ECSPI1_SCLK_UART3_DCE_RX%2C%200x140)%3CBR%20%2F%3E%40%40%20-320%2C6%20%2B321%2C17%20%40%40%20MX8MMN(IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B%2C%200x140)%3CBR%20%2F%3EMX8MMN(IOMUXC_NAND_DQS_GPIO3_IO14%2C%200x119)%3CBR%20%2F%3E%26gt%3B%3B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%2B%23else%3CBR%20%2F%3E%2B%20pinctrl_uart3%3A%20uart3grp%20%7B%3CBR%20%2F%3E%2B%20fsl%2Cpins%20%3D%20%26lt%3B%3CBR%20%2F%3E%2B%20MX8MM_IOMUXC_ECSPI1_SCLK_UART3_DCE_RX%200x49%3CBR%20%2F%3E%2B%20MX8MM_IOMUXC_ECSPI1_MOSI_UART3_DCE_TX%200x49%3CBR%20%2F%3E%2B%20MX8MM_IOMUXC_ECSPI1_SS0_UART3_DCE_RTS_B%200x49%3CBR%20%2F%3E%2B%20MX8MM_IOMUXC_ECSPI1_MISO_UART3_DCE_CTS_B%200x49%3CBR%20%2F%3E%2B%20MX8MM_IOMUXC_NAND_DQS_GPIO3_IO14%200x19%20%2F*%20BT_REG_ON%20*%2F%3CBR%20%2F%3E%2B%20%26gt%3B%3B%3CBR%20%2F%3E%2B%20%7D%3B%3CBR%20%2F%3E%2B%23endif%3C%2FP%3E%3CP%3E%2B%23if%200%3CBR%20%2F%3E%26amp%3Buart3%20%7B%20%2F*%20BT%20*%2F%3CBR%20%2F%3Epinctrl-names%20%3D%20%22default%22%3B%3CBR%20%2F%3Epinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart3%26gt%3B%3B%3CBR%20%2F%3E%40%40%20-1259%2C15%20%2B1272%2C29%20%40%40%20%26amp%3Buart3%20%7B%20%2F*%20BT%20*%2F%3CBR%20%2F%3Eassigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MMN(SYS_PLL1_80M)%26gt%3B%3B%3CBR%20%2F%3Euart-has-rtscts%3B%3CBR%20%2F%3Estatus%20%3D%20%22okay%22%3B%3CBR%20%2F%3E-%23if%201%3CBR%20%2F%3E-%201%20%7B%3CBR%20%2F%3E%2B%20bluetooth%20%7B%3CBR%20%2F%3Ecompatible%20%3D%20%22brcm%2Cbcm43438-bt%22%3B%3CBR%20%2F%3Ebrcm%2Cbt-pcm-int-params%20%3D%20%5B01%2002%2000%2001%2001%5D%3B%3CBR%20%2F%3Eenable-gpios%20%3D%20GP_BT_ENABLE%3B%3CBR%20%2F%3Emax-speed%20%3D%20%26lt%3B2000000%26gt%3B%3B%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E-%23endif%3CBR%20%2F%3E%7D%3B%3CBR%20%2F%3E%2B%23else%3CBR%20%2F%3E%2B%26amp%3Buart3%20%7B%3CBR%20%2F%3E%2B%20pinctrl-names%20%3D%20%22default%22%3B%3CBR%20%2F%3E%2B%20pinctrl-0%20%3D%20%26lt%3B%26amp%3Bpinctrl_uart3%26gt%3B%3B%3CBR%20%2F%3E%2B%20assigned-clocks%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MM_CLK_UART3%26gt%3B%3B%3CBR%20%2F%3E%2B%20assigned-clock-parents%20%3D%20%26lt%3B%26amp%3Bclk%20IMX8MM_SYS_PLL1_80M%26gt%3B%3B%3CBR%20%2F%3E%2B%20uart-has-rtscts%3B%20%2F*%20Flow%20control%20for%20AP6275S%20*%2F%3CBR%20%2F%3E%2B%20status%20%3D%20%22okay%22%3B%3CBR%20%2F%3E%2B%3CBR%20%2F%3E%2B%20bluetooth%20%7B%3CBR%20%2F%3E%2B%20compatible%20%3D%20%22brcm%2Cbcm43438-bt%22%3B%20%2F*%20AP6275S%20*%2F%3CBR%20%2F%3E%2B%20max-speed%20%3D%20%26lt%3B3000000%26gt%3B%3B%3CBR%20%2F%3E%2B%20shutdown-gpios%20%3D%20%26lt%3B%26amp%3Bgpio3%2014%20GPIO_ACTIVE_HIGH%26gt%3B%3B%20%2F*%20BT_REG_ON%20*%2F%3CBR%20%2F%3E%2B%20%7D%3B%3CBR%20%2F%3E%2B%7D%3B%3CBR%20%2F%3E%2B%23endif%3C%2FP%3E%3CBR%20%2F%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2046941%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Yocto%20mickledore%20Bluetooth%20bringup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2046941%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Eyou%20can%20use%26nbsp%3B%3CSPAN%3Els%20%2Fdev%2Fttymxc*%20to%20check%2C%20and%20to%20confirm%20if%20you%20load%20the%20module%20correctly%20or%20not%2C%20pls%20refer%20to%20the%20link%20as%20below%20as%20reference%3C%2FSPAN%3E%3C%2FP%3E%0A%3CP%3E%3CSPAN%3E%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fi-MX-Processors-Knowledge-Base%2FBluetooth-NXP-UART-Driver-Linux-BSP-6-1-22-btnxpuart%2Fta-p%2F1708588%22%20target%3D%22_blank%22%3EBluetooth%20NXP%20UART%20Driver%20Linux%20BSP%206.1.22%20btnxpuart%20-%20NXP%20Community%3C%2FA%3E%3C%2FSPAN%3E%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2045224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Yocto%20mickledore%20Bluetooth%20bringup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2045224%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3EHi%26nbsp%3B%3CA%20href%3D%22https%3A%2F%2Fcommunity.nxp.com%2Ft5%2Fuser%2Fviewprofilepage%2Fuser-id%2F39586%22%20target%3D%22_blank%22%3E%40joanxie%3C%2FA%3E%26nbsp%3B%2C%20Thanks%20for%20the%20reply%20%2C%26nbsp%3B%20Vendor%20asked%20to%20check%20using%20Scope%20which%20i%20don't%20have%20at%20the%20moment.%3C%2FP%3E%3CP%3ESome%20more%20info%20below%20%2C%20i%20am%20not%20able%20to%20see%20%2Fdev%2Fttymxc2%20%2C%20I%20think%20that's%20the%20issue%20%3F%3F%3C%2FP%3E%3CP%3Eroot%40nitrogen8mm%3A~%23%20dmesg%20%7Cgrep%20-iE%20'tty'%3CBR%20%2F%3E%5B%200.000000%5D%20Kernel%20command%20line%3A%20console%3Dttymxc1%2C115200%20consoleblank%3D0%20rootwait%20fixrtc%20root%3D%2Fdev%2Fmmcblk0p2%20snd.slots%3D%2Csnd-soc-imx-hdmi%3CBR%20%2F%3E%5B%200.090110%5D%2030880000.serial%3A%20ttymxc2%20at%20MMIO%200x30880000%20(irq%20%3D%20185%2C%20base_baud%20%3D%205000000)%20is%20a%20IMX%3CBR%20%2F%3E%5B%200.090237%5D%20serial%20serial0%3A%20tty%20port%20ttymxc2%20registered%3CBR%20%2F%3E%5B%200.090740%5D%2030890000.serial%3A%20ttymxc1%20at%20MMIO%200x30890000%20(irq%20%3D%20186%2C%20base_baud%20%3D%201500000)%20is%20a%20IMX%3CBR%20%2F%3E%5B%200.821277%5D%20printk%3A%20console%20%5Bttymxc1%5D%20enabled%3C%2FP%3E%3C%2FLINGO-BODY%3E%3CLINGO-SUB%20id%3D%22lingo-sub-2044483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3ERe%3A%20Yocto%20mickledore%20Bluetooth%20bringup%3C%2FLINGO-SUB%3E%3CLINGO-BODY%20id%3D%22lingo-body-2044483%22%20slang%3D%22en-US%22%20mode%3D%22CREATE%22%3E%3CP%3Erefer%20to%20the%20log%2C%20maybe%20this%20issue%20is%20related%20to%20your%20module%2C%20did%20you%20contact%20the%20BT%20vendor%20to%20double%20confirm%20this%3F%3C%2FP%3E%3C%2FLINGO-BODY%3E