Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bluetooth] Cannot be loaded normally #4

Closed
MichaelZhuxx opened this issue Apr 21, 2021 · 8 comments
Closed

[Bluetooth] Cannot be loaded normally #4

MichaelZhuxx opened this issue Apr 21, 2021 · 8 comments
Assignees
Labels
bluetooth bug Something isn't working network

Comments

@MichaelZhuxx
Copy link
Collaborator

Based on fedora image: Fedora-riscv64-vic7100-dev-raw-image-Rawhide-20210419121453.n.0-sda.raw

Input the following command in fedora shell,

[root@fedora-starfive /]# hciconfig hci0 up
[  880.671327] Bluetooth: Core ver 2.22
[  880.703333] NET: Registered protocol family 31
[  880.736030] Bluetooth: HCI device and connection manager initialized
[  880.770890] Bluetooth: HCI socket layer initialized
[  880.804406] Bluetooth: L2CAP socket layer initialized
[  880.837969] Bluetooth: SCO socket layer initialized
Can't get device info: No such device
@pdp7
Copy link
Collaborator

pdp7 commented Jun 3, 2021

Please try this again once the Fedora image has 5.13 kernel brcmfmac driver

@pdp7
Copy link
Collaborator

pdp7 commented Jun 10, 2021

FYI - I have tested and confirmed that this patch "drivers/tty/serial/8250: update driver for VIC7100" is not needed for the console (uart3) to function correctly. We are taking it out of the 5.13 kernel as this change is not done in a way that can be upstreamed:
esmil/linux#21

My goal is to get support into upstream Linux kernel for a minimum booting BeagleV Starlight JH7100 board.

At some point I imagine we will try to get Bluetooth working with the upstream kernel. I wanted to make note of starfive-tech/linux@26d688f as we may need to figure out how to achieve that same functional change in the correct way. It still remains unclear exactly why the hs_uart (uart0 and uart1) need this change. Is it just performance? Or did it not functional at all without it? These are questions that can be investigated in the future

cc @davidlt @esmil

@esmil
Copy link

esmil commented Jun 12, 2021

@pdp re bluetooth. The last two commits here is what I've tried, but it doesn't quite work yet: https://github.com/esmil/linux/commits/starlight-bt

@pdp7
Copy link
Collaborator

pdp7 commented Jun 12, 2021

@esmil do you think we are ok without the ifdef hack in starfive-tech/linux@26d688f ?

@esmil
Copy link

esmil commented Jun 13, 2021

@pdp7 Yeah, as I said on slack, to me it just looks like an optimization to make use of the full fifo. I'll just drop it when I rebase on rc6.

btw. "net: stmmac: Configure gtxclk based on speed" is another patch where ethernet seems to work fine without, but maybe not as efficient

@pdp7
Copy link
Collaborator

pdp7 commented Jul 7, 2021

@esmil any idea what we should try next? BT is still not working I think?

@esmil
Copy link

esmil commented Jul 8, 2021

@pdp7 I think a good next step would be to try those two commits and then look at the serial communication with a scope or other probe to see if it actually manages to send anything to the bluetooth module. It might be that pinmux/pinconf is not set up properly and the signal doesn't even make it out or maybe a clock is not setup properly and the bitrate is wrong.

@MichaelZhuxx
Copy link
Collaborator Author

MichaelZhuxx commented Sep 27, 2021

This issue has been fixed on latest linux kernel, you could try to follow the below two steps:

  1. Enable Bluetooth module: gpioset 0 35=1

  2. Load suitable firmware based on your chipset( you could get this info. from dmesg | grep brcm ):

    • For Chip: BCM43430/1: brcm_patchram_plus --enable_hci --no2bytes --tosleep 200000 --baudrate 115200 --patchram /path/to/BCM43430A1.hcd /dev/ttyS1

    • For Chip: BCM43430/2: brcm_patchram_plus --enable_hci --no2bytes --tosleep 200000 --baudrate 115200 --patchram /path/to/BCM4343B0.hcd /dev/ttyS1

Note: Please let us know if your board has a different chipset for Bluetooth module.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bluetooth bug Something isn't working network
Projects
None yet
Development

No branches or pull requests

4 participants