Repository navigation
Bluetooth: btcentauri: Select the transport by PCIe host, not by machine - #2330
Draft
RyanTheTide wants to merge 1 commit into
Draft
RyanTheTide wants to merge 1 commit into
RyanTheTide wants to merge 1 commit into
Conversation
cen_probe() binds only when the machine compatible is apple,j813, apple,j815 or apple,j873g. The list grew one board at a time as each N1 machine came up; no board has a hardware reason to be refused. The one real split is between two transports for the same N1 Beta function (106b:1903): on T6050 the functions belong to btcentauri_t6050.c, which binds only behind an "apple,t6050-pcie" host bridge. Use that same selector here, as the generic Centauri Wi-Fi driver already does in centauri_pci.c: refuse a function whose host bridge parent node is "apple,t6050-pcie", keep the function 2 check, and leave the firmware state check (execution stage 2, unowned IPC) as the gate for whether there is anything to talk to. On the device trees in the tree today the result is the same: the only boards with an N1 behind a non-T6050 host are j813 and j815 (generic ECAM host) and j873g (apple,t8152-pcie); every T6050 board has its N1 behind apple,t6050-pcie and stays refused. A later board whose device tree describes its N1 port gets Bluetooth without a driver change. Fixes: a03e01f ("Bluetooth: add J813 N1 native transport and encrypted connection bring-up") Cc: Joshua Warren <816217+joshuaswarren@users.noreply.github.com> Cc: Nick <nekreshen@yandex.ru> Cc: Thomas Glanzmann <thomas@glanzmann.de> Signed-off-by: Ryan Murray <ryan@aurorasilicon.org>
This was referenced Nov 19, 2026
This was referenced Nov 19, 2026
Open
Contributor
|
J813 and J873g rows with this change applied:
No other btcentauri or Bluetooth errors in dmesg on either machine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
cen_probe()indrivers/bluetooth/btcentauri.c(line 1011 at 0abc2f3) binds only onapple,j813,apple,j815andapple,j873g. The list was added with the driver (a03e01f) and grew one board per bring-up (83b16cf / 019c0ab for J873g, cc2dfd9 for J815). None of those commits gives a hardware reason to refuse other boards. Every new N1 machine needs a driver edit, as in #2108, which addsapple,j804to this list.Change
The real split is between two transports for the same N1 Beta function (106b:1903). On T6050,
btcentauri_t6050.cowns it and binds only behind anapple,t6050-pciehost bridge.cen_probe()now uses that same selector, ascentauri_pci.calready does for Wi-Fi: it refuses a function whose host bridge node isapple,t6050-pcie, and keeps the function 2 check. The existing firmware check (execution stage 2, unowned IPC) still decides whether there is anything to talk to. A board whose N1 firmware is not started refuses with -EBUSY as before.With this, the
btcentauri.cline in #2108 is no longer needed. J804 gets Bluetooth once its N1 node and its Wi-Fi board entry land.Testing
drivers/bluetooth/btcentauri.o(arm64, clang 22, release config, W=1 flags) before and after: no warnings either way. It is the only file changed.cen_probe()goes ahead are the same before and after. Only j813 and j815 (generic ECAM host) and j873g (apple,t8152-pcie) have an N1 behind a non-T6050 host. Every T6050 board has its N1 behindapple,t6050-pcieand stays refused. Boards without an N1 (j700 MT7932, j704 and older Broadcom boards, j804/j833ct with no PCIe node yet) never enumerate a 106b:1903 function.Still to run
We have no T8142 or T8152 machine. @m0d16l14n1 (J815) and @sithglan (J873g), could you post a quick Bluetooth row with this applied?
dmesg | grep -i btcentauri,hciconfig -a(orbluetoothctl show) shows a powered controller, and one LE device pairs.Details
Old gate (0abc2f3, drivers/bluetooth/btcentauri.c:1011):
New gate:
pci_find_host_bridge(pdev->bus)->dev.parent->of_nodeis notapple,t6050-pcie, and the function number is 2. This is the same test ascentauri_pci.c:202-205and the inverse ofbtcentauri_t6050.c:936-939, so exactly one of the two drivers can bind any N1 Beta function.Per-board result (enabled PCIe host nodes found in each DTB, N1 = an N1 function or N1 port is described):
Left as is, for a separate change:
cen_suspend()(btcentauri.c:1167, from 507c53d) and the J813-only Wi-Fi suspend/resume incentauri_wifi.c:2713/2726. The commit says the protocol was verified with the J813 firmware and other boards need qualification. The right selector there is the firmware protocol version, not a board name, and it needs a row on J815/J873g first.centauri.h:74-92. Only part of it is in the device tree. On J873g the port and PHY addresses are theport0/phy0entries of the PCIe node and the PERST# pad isreset-gpios = <&pinctrl_ap 3 ...>, so those values match. On J813/J815 the host is described as a generic ECAM host: the port block appears only as the MSI controller'sreg, and the PHY and PERST# pad are not described at all. The firmware name, board word, root port ID and protocol flags have no device-tree source on T8142/T8152 (on T6050 they arefirmware-nameandapple,centauri-platform-idin the control node, but the binding forbids those forapple,t8142-centauri-control). Moving them needs binding and DTS changes, so it is not part of this change.Credit: the driver is by Acelogic and Thomas Glanzmann. J873g support is by Joshua Warren and Thomas Glanzmann, J815 by Nick.
Assisted-by: LLM (Claude:Opus 5.5)