4 Replies Latest reply on Sep 17, 2020 8:28 PM by GuCh_4754946

    BCM4339 Bluetooth initialization failure (Reset failed -110)

    GuCh_4754946

      Hi,

       

      Using Broadcom BCM4339 (SP-ZZ1CK-E, Tentative P/N :LBEE5ZZ1CK-TEMP), kernel 5.4, FW version 6.37.39.113, and observing initialization issues when the hci_uart driver loads. hci_bcm is modified to add a compatible string for "bcm4339-bt".

       

      Booting gives to the following log. Bluetooth initialization never completes because of reset timeout.

       

      # dmesg | egrep -i "blue|fw|bcm"

       

      [    1.206582] Bluetooth: Core ver 2.22

      [    1.206593] Bluetooth: Starting self testing

      [    1.228259] Bluetooth: ECDH test passed in 21146 usecs

      [    1.231990] Bluetooth: SMP test passed in 3570 usecs

      [    1.232015] Bluetooth: Finished self testing

      [    1.232127] Bluetooth: HCI device and connection manager initialized

      [    1.232152] Bluetooth: HCI socket layer initialized

      [    1.232160] Bluetooth: L2CAP socket layer initialized

      [    1.232174] Bluetooth: SCO socket layer initialized

      [    1.272577] Bluetooth: HCI UART driver ver 2.3

      [    1.272592] Bluetooth: HCI UART protocol H4 registered

      [    1.272840] Bluetooth: HCI UART protocol Broadcom registered

      [    1.302111] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator

      [    1.302186] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator

      [    1.383201] ccg3 0-0008: FW file version: 7A060132626E031A

      [    2.290791] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2

      [    2.540412] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2

      [    2.540836] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4339/2 wl0: Sep  5 2019 11:05:52 version 6.37.39.113 (r722271 CY)

      [    2.586762] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

      [    2.586778] Bluetooth: BNEP filters: protocol multicast

      [    2.586804] Bluetooth: BNEP socket layer initialized

      [    3.582719] Bluetooth: hci0: command 0x0c03 tx timeout

      [   11.742560] Bluetooth: hci0: BCM: Reset failed (-110)

       

      This worked correctly in the past using a 4.19 kernel patched with the upstream 5.1 bluetooth drivers.

       

      Any idea what could have changed or how to fix it?

       

      Thanks,

      Guillaume

        • 1. Re: BCM4339 Bluetooth initialization failure (Reset failed -110)
          VinayakS_26

          Hi,

           

          Could you post the dmesg of the successful initialization happening with 4.19 kernel.

          Meanwhile let me check the delta in the source.

           

          Regards

          • 2. Re: BCM4339 Bluetooth initialization failure (Reset failed -110)
            GuCh_4754946

            Hi,

             

            Thank you for your answer.

             

            successful initialization on 4.19:

             

            # dmesg | egrep -i "blue|fw|bcm"

            [    7.812864] Bluetooth: Core ver 2.22

            [    7.812875] Bluetooth: Starting self testing

            [    7.836905] Bluetooth: ECDH test passed in 23453 usecs

            [    7.841068] Bluetooth: SMP test passed in 3984 usecs

            [    7.841121] Bluetooth: Finished self testing

            [    7.841251] Bluetooth: HCI device and connection manager initialized

            [    7.841278] Bluetooth: HCI socket layer initialized

            [    7.841286] Bluetooth: L2CAP socket layer initialized

            [    7.841315] Bluetooth: SCO socket layer initialized

            [    7.888564] Bluetooth: HCI UART driver ver 2.3

            [    7.888580] Bluetooth: HCI UART protocol H4 registered

            [    7.888845] Bluetooth: HCI UART protocol Broadcom registered

            [    7.889002] hci_uart_bcm serial0-0: serial0-0 supply vbat not found, using dummy regulator

            [    7.889072] hci_uart_bcm serial0-0: Linked as a consumer to regulator.0

            [    7.889080] hci_uart_bcm serial0-0: serial0-0 supply vddio not found, using dummy regulator

            [    7.908503] ccg3 0-0008: FW file version: 7A060132626E031A

            [    8.142023] Bluetooth: hci0: BCM: chip id 86

            [    8.142842] Bluetooth: hci0: BCM: features 0x2f

            [    8.146196] Bluetooth: hci0: BCM4335C0

            [    8.146211] Bluetooth: hci0: BCM4335C0 (003.001.009) build 0000

            [    8.577113] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2

            [    8.818166] brcmfmac: brcmf_fw_alloc_request: using brcm/brcmfmac4339-sdio for chip BCM4339/2

            [    8.818904] brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM4339/2 wl0: Aug 11 2018 06:13:33 version 6.37.39.99 (r694622 CY)

            [    9.159868] Bluetooth: hci0: BCM4335C0 (003.001.009) build 0304

            [   10.407728] Bluetooth: BNEP (Ethernet Emulation) ver 1.3

            [   10.407740] Bluetooth: BNEP filters: protocol multicast

            [   10.407763] Bluetooth: BNEP socket layer initialized

             

            With further investigation I identified this commit as the culprit: serial: xilinx_uartps: Let get_mctrl return status · Xilinx/linux-xlnx@31caf3c · GitHub

             

            If I revert this commit, initialization works correctly on 5.4 (but the CTS pin state won't be read correctly, so this is not really a solution). Weirdly enough, if I add a 50ms sleep in `cdns_uart_get_mctrl`, initialization also works correctly on 5.4. The CTS pin is connected in the hw i'm using, so I'm not really sure what the underlying issue is.

            • 3. Re: BCM4339 Bluetooth initialization failure (Reset failed -110)
              VinayakS_26

              Let me try to replicate this issue.

              Is the result that you are observing consistent in multiple tries?

               

              BR,

              VinayakS_26

              • 4. Re: BCM4339 Bluetooth initialization failure (Reset failed -110)
                GuCh_4754946

                Hi,

                 

                Yes I can replicate on any boot. Let me know if you know more logs/informations.

                 

                Currently I'm using the "cts-override" [1] flag in my dts to avoid the issue (this is the equivalent of reverting the commit I pointed at earlier).

                 

                [1] linux/cdns,uart.txt at master · torvalds/linux · GitHub