Message ID | 20240508111604.887466-1-emil.renner.berthing@canonical.com (mailing list archive) |
---|---|
Headers | show |
Series | riscv: dts: starfive: Enable Bluetooth on JH7100 boards | expand |
On Mai 08 2024, Emil Renner Berthing wrote: > This series enables the in-kernel Bluetooth driver to work with the > Broadcom Wifi/Bluetooth module on the BeagleV Starlight and StarFive > VisionFive V1 boards. That does not work for me: [ +0.369276] Bluetooth: hci0: command 0x1001 tx timeout [ +0.025545] Bluetooth: hci0: BCM: Reading local version info failed (-110)
Andreas Schwab wrote: > On Mai 08 2024, Emil Renner Berthing wrote: > > > This series enables the in-kernel Bluetooth driver to work with the > > Broadcom Wifi/Bluetooth module on the BeagleV Starlight and StarFive > > VisionFive V1 boards. > > That does not work for me: > > [ +0.369276] Bluetooth: hci0: command 0x1001 tx timeout > [ +0.025545] Bluetooth: hci0: BCM: Reading local version info failed (-110) Hi Andreas, You don't include any information useful for debugging this, but if it get's far enough to load the firmware could you at least make sure you run the version below, so that's at least the same. https://github.com/esmil/linux/blob/visionfive/firmware/brcm/BCM43430A1.hcd /Emil
On Mai 10 2024, Emil Renner Berthing wrote: > You don't include any information useful for debugging this, but if it get's > far enough to load the firmware could you at least make sure you run the > version below, so that's at least the same. > > https://github.com/esmil/linux/blob/visionfive/firmware/brcm/BCM43430A1.hcd That didn't change anything (and there are no messages related to firmware loading from hci_uart). [ +0.879623] Bluetooth: Core ver 2.22 [ +0.004843] NET: Registered PF_BLUETOOTH protocol family [ +0.008787] Bluetooth: HCI device and connection manager initialized [ +0.021944] Bluetooth: HCI socket layer initialized [ +0.008488] Bluetooth: L2CAP socket layer initialized [ +0.006333] Bluetooth: SCO socket layer initialized [ +0.097478] Bluetooth: HCI UART driver ver 2.3 [ +0.007943] Bluetooth: HCI UART protocol H4 registered [ +0.006066] Bluetooth: HCI UART protocol BCSP registered [ +0.006962] Bluetooth: HCI UART protocol LL registered [ +0.000015] Bluetooth: HCI UART protocol ATH3K registered [ +0.000084] Bluetooth: HCI UART protocol Three-wire (H5) registered [ +0.000247] Bluetooth: HCI UART protocol Intel registered [ +0.000455] Bluetooth: HCI UART protocol Broadcom registered [ +0.000084] Bluetooth: HCI UART protocol QCA registered [ +0.000008] Bluetooth: HCI UART protocol AG6XX registered [ +0.000057] Bluetooth: HCI UART protocol Marvell registered [ +0.051854] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator [ +0.000387] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator [ +0.094658] hci_uart_bcm serial0-0: No reset resource, using default baud rate [ +0.990297] Bluetooth: hci0: command 0x1001 tx timeout [ +0.022893] Bluetooth: hci0: BCM: Reading local version info failed (-110) [ +3.306159] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 [ +0.013336] Bluetooth: BNEP filters: protocol multicast [ +0.124262] Bluetooth: BNEP socket layer initialized
Emil, On Fri, May 10, 2024 at 11:35:34AM +0200, Andreas Schwab wrote: > On Mai 10 2024, Emil Renner Berthing wrote: > > > You don't include any information useful for debugging this, but if it get's > > far enough to load the firmware could you at least make sure you run the > > version below, so that's at least the same. > > > > https://github.com/esmil/linux/blob/visionfive/firmware/brcm/BCM43430A1.hcd > > That didn't change anything (and there are no messages related to > firmware loading from hci_uart). Looking at things to apply post -rc1, are you still looking into this issue? Thanks, Conor. > > [ +0.879623] Bluetooth: Core ver 2.22 > [ +0.004843] NET: Registered PF_BLUETOOTH protocol family > [ +0.008787] Bluetooth: HCI device and connection manager initialized > [ +0.021944] Bluetooth: HCI socket layer initialized > [ +0.008488] Bluetooth: L2CAP socket layer initialized > [ +0.006333] Bluetooth: SCO socket layer initialized > [ +0.097478] Bluetooth: HCI UART driver ver 2.3 > [ +0.007943] Bluetooth: HCI UART protocol H4 registered > [ +0.006066] Bluetooth: HCI UART protocol BCSP registered > [ +0.006962] Bluetooth: HCI UART protocol LL registered > [ +0.000015] Bluetooth: HCI UART protocol ATH3K registered > [ +0.000084] Bluetooth: HCI UART protocol Three-wire (H5) registered > [ +0.000247] Bluetooth: HCI UART protocol Intel registered > [ +0.000455] Bluetooth: HCI UART protocol Broadcom registered > [ +0.000084] Bluetooth: HCI UART protocol QCA registered > [ +0.000008] Bluetooth: HCI UART protocol AG6XX registered > [ +0.000057] Bluetooth: HCI UART protocol Marvell registered > [ +0.051854] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator > [ +0.000387] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator > [ +0.094658] hci_uart_bcm serial0-0: No reset resource, using default baud rate > [ +0.990297] Bluetooth: hci0: command 0x1001 tx timeout > [ +0.022893] Bluetooth: hci0: BCM: Reading local version info failed (-110) > [ +3.306159] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 > [ +0.013336] Bluetooth: BNEP filters: protocol multicast > [ +0.124262] Bluetooth: BNEP socket layer initialized > > -- > Andreas Schwab, schwab@linux-m68k.org > GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510 2552 DF73 E780 A9DA AEC1 > "And now for something completely different."
On Mai 28 2024, Conor Dooley wrote: > Looking at things to apply post -rc1, are you still looking into this > issue? I don't know what to look for.
On Tue, May 28, 2024 at 05:37:32PM +0200, Andreas Schwab wrote: > On Mai 28 2024, Conor Dooley wrote: > > > Looking at things to apply post -rc1, are you still looking into this > > issue? > > I don't know what to look for. Fortunately for you, it is Emil I was asking :) I thought I'd addressed the mail to him.
Andreas Schwab wrote: > On Mai 10 2024, Emil Renner Berthing wrote: > > > You don't include any information useful for debugging this, but if it get's > > far enough to load the firmware could you at least make sure you run the > > version below, so that's at least the same. > > > > https://github.com/esmil/linux/blob/visionfive/firmware/brcm/BCM43430A1.hcd > > That didn't change anything (and there are no messages related to > firmware loading from hci_uart). > > [ +0.879623] Bluetooth: Core ver 2.22 > [ +0.004843] NET: Registered PF_BLUETOOTH protocol family > [ +0.008787] Bluetooth: HCI device and connection manager initialized > [ +0.021944] Bluetooth: HCI socket layer initialized > [ +0.008488] Bluetooth: L2CAP socket layer initialized > [ +0.006333] Bluetooth: SCO socket layer initialized > [ +0.097478] Bluetooth: HCI UART driver ver 2.3 > [ +0.007943] Bluetooth: HCI UART protocol H4 registered > [ +0.006066] Bluetooth: HCI UART protocol BCSP registered > [ +0.006962] Bluetooth: HCI UART protocol LL registered > [ +0.000015] Bluetooth: HCI UART protocol ATH3K registered > [ +0.000084] Bluetooth: HCI UART protocol Three-wire (H5) registered > [ +0.000247] Bluetooth: HCI UART protocol Intel registered > [ +0.000455] Bluetooth: HCI UART protocol Broadcom registered > [ +0.000084] Bluetooth: HCI UART protocol QCA registered > [ +0.000008] Bluetooth: HCI UART protocol AG6XX registered > [ +0.000057] Bluetooth: HCI UART protocol Marvell registered > [ +0.051854] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator > [ +0.000387] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator > [ +0.094658] hci_uart_bcm serial0-0: No reset resource, using default baud rate > [ +0.990297] Bluetooth: hci0: command 0x1001 tx timeout > [ +0.022893] Bluetooth: hci0: BCM: Reading local version info failed (-110) > [ +3.306159] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 > [ +0.013336] Bluetooth: BNEP filters: protocol multicast > [ +0.124262] Bluetooth: BNEP socket layer initialized Oddly it doesn't work on my Starlight board either. I was thinking the firmware might set up pinconf differently, but comparing /sys/kernel/debug/pinctrl/11910000.pinctrl-pinctrl-starfive/pinconf-pins on the two boards shows no differences. I've also not been able to spot any differences in how the AP6236 module is connected in the schematics for the two boards, so not really sure how to proceed. If you're also testing on the Starlight board then I can update the patch to just enable Bluetooth on that I guess. /Emil
Emil Renner Berthing wrote: > Andreas Schwab wrote: > > On Mai 10 2024, Emil Renner Berthing wrote: > > > > > You don't include any information useful for debugging this, but if it get's > > > far enough to load the firmware could you at least make sure you run the > > > version below, so that's at least the same. > > > > > > https://github.com/esmil/linux/blob/visionfive/firmware/brcm/BCM43430A1.hcd > > > > That didn't change anything (and there are no messages related to > > firmware loading from hci_uart). > > > > [ +0.879623] Bluetooth: Core ver 2.22 > > [ +0.004843] NET: Registered PF_BLUETOOTH protocol family > > [ +0.008787] Bluetooth: HCI device and connection manager initialized > > [ +0.021944] Bluetooth: HCI socket layer initialized > > [ +0.008488] Bluetooth: L2CAP socket layer initialized > > [ +0.006333] Bluetooth: SCO socket layer initialized > > [ +0.097478] Bluetooth: HCI UART driver ver 2.3 > > [ +0.007943] Bluetooth: HCI UART protocol H4 registered > > [ +0.006066] Bluetooth: HCI UART protocol BCSP registered > > [ +0.006962] Bluetooth: HCI UART protocol LL registered > > [ +0.000015] Bluetooth: HCI UART protocol ATH3K registered > > [ +0.000084] Bluetooth: HCI UART protocol Three-wire (H5) registered > > [ +0.000247] Bluetooth: HCI UART protocol Intel registered > > [ +0.000455] Bluetooth: HCI UART protocol Broadcom registered > > [ +0.000084] Bluetooth: HCI UART protocol QCA registered > > [ +0.000008] Bluetooth: HCI UART protocol AG6XX registered > > [ +0.000057] Bluetooth: HCI UART protocol Marvell registered > > [ +0.051854] hci_uart_bcm serial0-0: supply vbat not found, using dummy regulator > > [ +0.000387] hci_uart_bcm serial0-0: supply vddio not found, using dummy regulator > > [ +0.094658] hci_uart_bcm serial0-0: No reset resource, using default baud rate > > [ +0.990297] Bluetooth: hci0: command 0x1001 tx timeout > > [ +0.022893] Bluetooth: hci0: BCM: Reading local version info failed (-110) > > [ +3.306159] Bluetooth: BNEP (Ethernet Emulation) ver 1.3 > > [ +0.013336] Bluetooth: BNEP filters: protocol multicast > > [ +0.124262] Bluetooth: BNEP socket layer initialized > > Oddly it doesn't work on my Starlight board either. I was thinking the firmware > might set up pinconf differently, but comparing > > /sys/kernel/debug/pinctrl/11910000.pinctrl-pinctrl-starfive/pinconf-pins > > on the two boards shows no differences. I've also not been able to spot any > differences in how the AP6236 module is connected in the schematics for the two > boards, so not really sure how to proceed. > > If you're also testing on the Starlight board then I can update the patch to just > enable Bluetooth on that I guess. * I meant update the patch to only enable bluetooth on the VisionFive V1 of course. /Emil
On Mai 29 2024, Emil Renner Berthing wrote: > Oddly it doesn't work on my Starlight board either. I was thinking the firmware > might set up pinconf differently, but comparing > > /sys/kernel/debug/pinctrl/11910000.pinctrl-pinctrl-starfive/pinconf-pins > > on the two boards shows no differences. I've also not been able to spot any > differences in how the AP6236 module is connected in the schematics for the two > boards, so not really sure how to proceed. I see no difference between Starlight and Visionfive boards, both fail the same way. I also see that sometimes the firmware greeting from brcmfmac occurs _after_ the timeout error from hci0: # journalctl -b -2 | grep -e brcmf_c_preinit_dcmds -e hci0: May 16 12:01:54 beaglev kernel: Bluetooth: hci0: command 0x1001 tx timeout May 16 12:01:54 beaglev kernel: Bluetooth: hci0: BCM: Reading local version info failed (-110) May 16 12:01:54 beaglev kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2021 01:12:21 version 7.45.98.118 (7d96287 CY) FWID 01-32059766 Is this perhaps a race with the firmware loading?
Hi Andreas, On 2024-05-29 10:53 AM, Andreas Schwab wrote: > On Mai 29 2024, Emil Renner Berthing wrote: > >> Oddly it doesn't work on my Starlight board either. I was thinking the firmware >> might set up pinconf differently, but comparing >> >> /sys/kernel/debug/pinctrl/11910000.pinctrl-pinctrl-starfive/pinconf-pins >> >> on the two boards shows no differences. I've also not been able to spot any >> differences in how the AP6236 module is connected in the schematics for the two >> boards, so not really sure how to proceed. > > I see no difference between Starlight and Visionfive boards, both fail > the same way. > > I also see that sometimes the firmware greeting from brcmfmac occurs > _after_ the timeout error from hci0: > > # journalctl -b -2 | grep -e brcmf_c_preinit_dcmds -e hci0: > May 16 12:01:54 beaglev kernel: Bluetooth: hci0: command 0x1001 tx timeout > May 16 12:01:54 beaglev kernel: Bluetooth: hci0: BCM: Reading local version info failed (-110) > May 16 12:01:54 beaglev kernel: brcmfmac: brcmf_c_preinit_dcmds: Firmware: BCM43430/1 wl0: Mar 30 2021 01:12:21 version 7.45.98.118 (7d96287 CY) FWID 01-32059766 > > Is this perhaps a race with the firmware loading? brcmfmac is the WiFi driver. The WiFi and Bluetooth parts of the module are functionally independent -- different drivers, different firmware, different DT nodes. So the brcmfmac line is not relevant to debugging Bluetooth issues. If the Bluetooth part has some dependency (pinconf, reset pin, clock, regulator, etc.), then such dependency must be declared specifically for the Bluetooth in the DT. Those seem to be correct, so maybe the issue is the maximum UART frequency, if the signal integrity is marginal. Have you tried reducing that? Regards, Samuel
On Mai 29 2024, Samuel Holland wrote: > If the Bluetooth part has some dependency (pinconf, reset pin, clock, regulator, > etc.), then such dependency must be declared specifically for the Bluetooth in > the DT. Those seem to be correct, so maybe the issue is the maximum UART > frequency, if the signal integrity is marginal. Have you tried reducing that? How to do that?