Skip to content

Orangepi-5-max: Remove upstreamed patches and use mainline bluetooth.#9673

Merged
igorpecovnik merged 2 commits intoarmbian:mainfrom
fbernier:opi5max-bt
Apr 15, 2026
Merged

Orangepi-5-max: Remove upstreamed patches and use mainline bluetooth.#9673
igorpecovnik merged 2 commits intoarmbian:mainfrom
fbernier:opi5max-bt

Conversation

@fbernier
Copy link
Copy Markdown
Contributor

@fbernier fbernier commented Apr 14, 2026

Description

GitHub issue reference:
Jira reference number [AR-9999]

Documentation summary for feature / change

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

fbernier@orangepi5-max ~> sudo systemctl status ap6611s-bluetooth.service                          [sudo] password for fbernier:                                                                      WARNING: terminal is not fully functional
Press RETURN to continue
○ ap6611s-bluetooth.service - Bluetooth AP6611S
     Loaded: loaded (/usr/lib/systemd/system/ap6611s-bluetooth.service; disabled; preset: enabled)      Active: inactive (dead)
fbernier@orangepi5-max ~ [3]> bluetoothctl show                                                    Controller C0:F5:35:EE:19:34 (public)                                                                      Manufacturer: 0x0a76 (2678)                                                                        Version: 0x0c (12)
        Name: orangepi5-max                                                                                Alias: orangepi5-max                                                                               Class: 0x00400000 (4194304)                                                                        Powered: yes                                                                                       PowerState: on                                                                                     Discoverable: no                                                                                   DiscoverableTimeout: 0x000000b4 (180)
        Pairable: no
        UUID: Generic Attribute Profile (00001801-0000-1000-8000-00805f9b34fb)
        UUID: Generic Access Profile    (00001800-0000-1000-8000-00805f9b34fb)
        UUID: SIM Access                (0000112d-0000-1000-8000-00805f9b34fb)
        UUID: PnP Information           (00001200-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control Target (0000110c-0000-1000-8000-00805f9b34fb)
        UUID: A/V Remote Control        (0000110e-0000-1000-8000-00805f9b34fb)
        UUID: Device Information        (0000180a-0000-1000-8000-00805f9b34fb)
        Modalias: usb:v1D6Bp0246d0552
        Discovering: no
        Roles: central
        Roles: peripheral
Advertising Features:
        ActiveInstances: 0x00 (0)
        SupportedInstances: 0x10 (16)
        SupportedIncludes: tx-power
        SupportedIncludes: appearance
        SupportedIncludes: local-name
        SupportedSecondaryChannels: 1M
        SupportedSecondaryChannels: 2M
        SupportedSecondaryChannels: Coded
        SupportedCapabilities.MinTxPower: 0x0009 (9)
        SupportedCapabilities.MaxTxPower: 0xffffffeb (-21)
        SupportedCapabilities.MaxAdvLen: 0xfb (251)
        SupportedCapabilities.MaxScnRspLen: 0xfb (251)
        SupportedFeatures: CanSetTxPower
        SupportedFeatures: HardwareOffload
fbernier@orangepi5-max ~> sudo dmesg | rg Bluetooth
[    5.174706] Bluetooth: Core ver 2.22
[    5.175654] Bluetooth: HCI device and connection manager initialized
[    5.175669] Bluetooth: HCI socket layer initialized
[    5.175678] Bluetooth: L2CAP socket layer initialized
[    5.175700] Bluetooth: SCO socket layer initialized
[    5.233338] Bluetooth: HCI UART driver ver 2.3
[    5.233347] Bluetooth: HCI UART protocol H4 registered
[    5.233349] Bluetooth: HCI UART protocol BCSP registered
[    5.233380] Bluetooth: HCI UART protocol LL registered
[    5.233381] Bluetooth: HCI UART protocol ATH3K registered
[    5.233395] Bluetooth: HCI UART protocol Three-wire (H5) registered
[    5.233486] Bluetooth: HCI UART protocol Intel registered
[    5.233532] Bluetooth: HCI UART protocol Broadcom registered
[    5.233541] Bluetooth: HCI UART protocol QCA registered
[    5.233543] Bluetooth: HCI UART protocol AG6XX registered
[    5.233551] Bluetooth: HCI UART protocol Marvell registered
[    5.602741] Bluetooth: hci0: BCM: chip id 3
[    5.605039] Bluetooth: hci0: BCM: features 0x0f
[    5.630721] Bluetooth: hci0: SYN43711A0
[    5.630738] Bluetooth: hci0: BCM (001.001.030) build 0000
[    5.636389] Bluetooth: hci0: BCM 'brcm/BCM.xunlong,orangepi-5-max.hcd' Patch
[    5.958771] Bluetooth: BNEP (Ethernet Emulation) ver 1.3
[    5.958790] Bluetooth: BNEP filters: protocol multicast
[    5.958804] Bluetooth: BNEP socket layer initialized
[    7.026927] Bluetooth: hci0: BCM: features 0x0f
[    7.052904] Bluetooth: hci0: SYN43711 UART 37.4MHz AMPAK AP6611 sLNA iLNA [Version: 0005.1000]
[    7.052927] Bluetooth: hci0: BCM (001.001.030) build 1000
[    7.200552] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.204725] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.208778] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.212943] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.217083] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.221177] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.225263] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.229351] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.233448] Bluetooth: hci0: Failed to read codec capabilities (-22)
[    7.241525] Bluetooth: MGMT ver 1.23
[    7.276909] Bluetooth: RFCOMM TTY layer initialized
[    7.276941] Bluetooth: RFCOMM socket layer initialized
[    7.276960] Bluetooth: RFCOMM ver 1.11
fbernier@orangepi5-max ~>

Checklist:

Please delete options that are not relevant.

  • My code follows the style guidelines of this project
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • My changes generate no new warnings
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Bug Fixes

    • Prevented Bluetooth service from being enabled on edge-branch builds for Orange Pi 5 Max.
    • Restricted creation of a Bluetooth firmware symlink to edge-branch builds to ensure firmware lookup compatibility.
  • Revert

    • Removed previously added second HDMI output support.
    • Removed previously added HDMI audio and related sound interface configuration.

@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai bot commented Apr 14, 2026

📝 Walkthrough

Walkthrough

The PR updates Orange Pi 5 Max board tweaks: it prevents enabling the Bluetooth service on the "edge" branch and adds a symlink for Broadcom firmware lookup on edge kernels. It also removes two device-tree patches that added a second HDMI connector and enabled HDMI audio/I2S nodes.

Changes

Cohort / File(s) Summary
Bluetooth config
config/boards/orangepi5-max.csc
post_family_tweaks__orangepi5max_enable_bluetooth_service() now returns early (0) when BRANCH == "edge" (avoids enabling ap6611s-bluetooth.service). Added post_family_tweaks__orangepi5max_bt_firmware_symlink() to create "$SDCARD/lib/firmware/brcm" and symlink SYN43711A0.hcdBCM.xunlong,orangepi-5-max.hcd for edge kernel SerDev firmware lookup.
Removed DTS patches (HDMI / audio)
patch/kernel/archive/rockchip64-7.0/rk3588-1100-arm64-dts-rockchip-opi5-max-add-2nd-hdmi.patch, patch/kernel/archive/rockchip64-7.0/rk3588-1101-arm64-dts-rockchip-opi5-max-add-hdmi-sound.patch
Deleted Device Tree additions that added a second HDMI connector/endpoints and related HDMI graph wiring, and removed status = "okay" enablement for HDMI audio and 8-channel I2S nodes (&hdmi0_sound, &hdmi1_sound, &i2s5_8ch, &i2s6_8ch, plus &hdmi1/&hdptxphy1 settings).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I hop and patch with nimble paw,
I link the firmware—no more flaw.
HDMI echoes fade from sight,
Edge kernels hum through day and night,
A happy hop, my code's delight.

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main changes: removing kernel patches and transitioning to mainline Bluetooth support for OrangePi 5 Max.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions bot added size/medium PR with more then 50 and less then 250 lines 05 Milestone: Second quarter release Needs review Seeking for review Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... labels Apr 14, 2026
Copy link
Copy Markdown
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
config/boards/orangepi5-max.csc (1)

86-87: Use /lib/firmware/updates/ for the board-specific firmware override symlink.

At Line 86-87, placing the symlink directly in /lib/firmware/brcm can conflict with package-managed firmware contents. Prefer /lib/firmware/updates/brcm for overrides.

♻️ Proposed change
-	mkdir -p "$SDCARD/lib/firmware/brcm"
-	ln -sf SYN43711A0.hcd "$SDCARD/lib/firmware/brcm/BCM.xunlong,orangepi-5-max.hcd"
+	mkdir -p "$SDCARD/lib/firmware/updates/brcm"
+	ln -sf ../../brcm/SYN43711A0.hcd "$SDCARD/lib/firmware/updates/brcm/BCM.xunlong,orangepi-5-max.hcd"
Based on learnings: In the Armbian build system, when copying firmware files during family_tweaks_s(), use /lib/firmware/updates/ instead of /lib/firmware/ to avoid conflicts with the Armbian firmware package.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@config/boards/orangepi5-max.csc` around lines 86 - 87, Change the firmware
override path from /lib/firmware/brcm to the updates directory: create the
updates directory (mkdir -p "$SDCARD/lib/firmware/updates/brcm") and place the
board-specific symlink there (ln -sf SYN43711A0.hcd
"$SDCARD/lib/firmware/updates/brcm/BCM.xunlong,orangepi-5-max.hcd") so the
override won’t conflict with package-managed firmware; update the mkdir and ln
calls in the same block that currently uses "$SDCARD/lib/firmware/brcm".
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@config/boards/orangepi5-max.csc`:
- Around line 86-87: Change the firmware override path from /lib/firmware/brcm
to the updates directory: create the updates directory (mkdir -p
"$SDCARD/lib/firmware/updates/brcm") and place the board-specific symlink there
(ln -sf SYN43711A0.hcd
"$SDCARD/lib/firmware/updates/brcm/BCM.xunlong,orangepi-5-max.hcd") so the
override won’t conflict with package-managed firmware; update the mkdir and ln
calls in the same block that currently uses "$SDCARD/lib/firmware/brcm".

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d2054146-82fa-446e-bfa0-7d3f5de9ebcf

📥 Commits

Reviewing files that changed from the base of the PR and between ad4b5d9 and 6eef3e3.

📒 Files selected for processing (3)
  • config/boards/orangepi5-max.csc
  • patch/kernel/archive/rockchip64-7.0/rk3588-1100-arm64-dts-rockchip-opi5-max-add-2nd-hdmi.patch
  • patch/kernel/archive/rockchip64-7.0/rk3588-1101-arm64-dts-rockchip-opi5-max-add-hdmi-sound.patch
💤 Files with no reviewable changes (2)
  • patch/kernel/archive/rockchip64-7.0/rk3588-1101-arm64-dts-rockchip-opi5-max-add-hdmi-sound.patch
  • patch/kernel/archive/rockchip64-7.0/rk3588-1100-arm64-dts-rockchip-opi5-max-add-2nd-hdmi.patch

The AP6611S BT chip is supported natively by the mainline hci_bcm SerDev
driver on the edge kernel (Linux 7.0). The upstream DTS already provides
the full bluetooth node in rk3588-orangepi-5-compact.dtsi; no kernel
patches needed.

- Skip enabling ap6611s-bluetooth.service on edge (userspace patchram
  would conflict with hci_bcm both claiming /dev/ttyS7)
- Create BCM.xunlong,orangepi-5-max.hcd -> SYN43711A0.hcd firmware
  symlink so hci_bcm finds the firmware by compatible-string-derived name
Patches 1100 (2nd HDMI) and 1101 (HDMI sound) are now fully covered by
the upstream Linux 7.0 DTS, which was refactored to use
rk3588-orangepi-5-compact.dtsi. The patches no longer apply and were
silently skipped during builds.
Copy link
Copy Markdown
Member

@EvilOlaf EvilOlaf left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@github-actions
Copy link
Copy Markdown
Contributor

✅ This PR has been reviewed and approved — all set for merge!

@github-actions github-actions bot added Ready to merge Reviewed, tested and ready for merge and removed Needs review Seeking for review labels Apr 15, 2026
@igorpecovnik igorpecovnik merged commit 15d653a into armbian:main Apr 15, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

05 Milestone: Second quarter release Hardware Hardware related like kernel, U-Boot, ... Patches Patches related to kernel, U-Boot, ... Ready to merge Reviewed, tested and ready for merge size/medium PR with more then 50 and less then 250 lines

Development

Successfully merging this pull request may close these issues.

3 participants