Skip to content

Commit 1f5cd2d

Browse files
authored
orangepi5-ultra: enable Bluetooth on edge kernel via hci_bcm (#9697)
Here is the same patch with commit 76fc84a,because Orangepi 5 Ultra share the same AP6611s module with Orangepi 5 Max. Tested on the Ultra board, bluetooth just works with kernel 7.0.0
1 parent 4235718 commit 1f5cd2d

1 file changed

Lines changed: 16 additions & 0 deletions

File tree

config/boards/orangepi5-ultra.csc

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,23 @@ function post_family_tweaks_bsp__orangepi5ultra_bluetooth() {
4444
}
4545

4646
function post_family_tweaks__orangepi5ultra_enable_bluetooth_service() {
47+
# On the edge kernel, the mainline hci_bcm SerDev driver handles BT natively
48+
# via the DT bluetooth node. The user-space patchram service would conflict
49+
# with SerDev (both try to claim /dev/ttyS7), so we skip enabling it.
50+
[[ "$BRANCH" == "edge" ]] && return 0
51+
4752
display_alert "$BOARD" "Enabling ap6611s-bluetooth.service" "info"
4853
chroot_sdcard systemctl enable ap6611s-bluetooth.service
4954
return 0
5055
}
56+
57+
# On the edge kernel, hci_bcm constructs the firmware filename from the board
58+
# compatible string (BCM.<board>.hcd), not from the chip name. Create a symlink
59+
# so the driver finds the SYN43711A0 patchram firmware.
60+
function post_family_tweaks__orangepi5ultra_bt_firmware_symlink() {
61+
[[ "$BRANCH" != "edge" ]] && return 0
62+
display_alert "$BOARD" "Creating BT firmware symlink for edge kernel" "info"
63+
mkdir -p "$SDCARD/lib/firmware/brcm"
64+
ln -sf SYN43711A0.hcd "$SDCARD/lib/firmware/brcm/BCM.xunlong,orangepi-5-ultra.hcd"
65+
return 0
66+
}

0 commit comments

Comments
 (0)