Devicetree
 help / color / mirror / Atom feed
* [PATCH v2 0/4] ARM: dts: allwinner: orangepi-zero-plus2: Fix Bluetooth and USB gadget
@ 2026-12-03  9:04 Ivan Pfarher via B4 Relay
  2026-12-03  9:04 ` [PATCH v2 1/4] ARM: dts: allwinner: orangepi-zero-plus2: Add LPO clock for AP6212 Ivan Pfarher via B4 Relay
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Ivan Pfarher via B4 Relay @ 2026-12-03  9:04 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Chen-Yu Tsai,
	Jernej Skrabec, Samuel Holland
  Cc: devicetree, linux-arm-kernel, linux-sunxi, linux-kernel,
	Ivan Pfarher

On the Orange Pi Zero Plus2, neither the Bluetooth part of the AP6212
module nor the micro USB port in peripheral mode work with the current
device trees. The board exists with an H3 and with an H5; it is the same
board, only the SoC differs. The H5 fixes from v1 have been applied
(bfa27cff7430, 4fb04f870eb6 in sunxi/dt-for-7.5). This series does the
same for the H3 version, moves the common parts to a shared dtsi and
then adds Bluetooth there:

1.   H3: the AP6212 needs the RTC 32.768 kHz clock (osc32k-out) as LPO.
     It is not referenced, so it gets disabled as unused, and the BT ROM
     then answers nothing but HCI_Reset.
2.   H3: EHCI0/OHCI0 share USB PHY 0 with the MUSB controller; when they
     register, the USB core switches the PHY to host mode, so the
     peripheral-only micro USB port never enumerates as a gadget.
3.   Move the common parts to sunxi-orangepi-zero-plus2.dtsi. No
     functional change.
4.   Describe the Bluetooth controller on UART1 (BT_RST_N on PA10,
     BT_WAKE on PA20, BT_HOST_WAKE on PL2), so hci_bcm can power it,
     load its firmware and use it at 1.5 Mbaud.

Testing: the H5 version was tested running Linux 6.6.160 with the same
DT content: Bluetooth comes up with firmware loaded, runtime-suspends
when idle and wakes up for scans, and the g_cdc gadget enumerates on a
PC. The H3 version was not tested on hardware. Against sunxi/dt-for-7.5
the series is build-tested only: dtc gives no warnings and dt-validate
reports nothing for both DTBs.

The issues were found and the patches drafted with the help of an AI
coding assistant (Claude by Anthropic), which also ran the diagnostics
on the board (raw HCI commands over the UART, GPIO and clock
experiments, USB PHY state). I reviewed and tested the changes.

Changes in v2:
- Rebased on sunxi/dt-for-7.5; dropped the H5 LPO and USB fixes, which
  were applied from v1.
- Describe the BT_WAKE (PA20) and BT_HOST_WAKE (PL2) lines from the
  schematic, as suggested in review; tested runtime suspend and
  wake-up on the board.
- The H3 and H5 versions are the same board, as pointed out in review:
  add the LPO and USB fixes for the H3 version too (patches 1-2), move
  the common parts to a shared dtsi (patch 3), and add Bluetooth there
  (patch 4) instead of to the H5 file.
- Drop the MMC aliases patch: sunxi does not use MMC aliases; root
  devices should be given by UUID or PARTUUID.
- Link to v1: https://lore.kernel.org/r/20261120-orangepi-zero-plus2-fixes-v1-0-ecd792189f27@gmail.com

---
Ivan Pfarher (4):
      ARM: dts: allwinner: orangepi-zero-plus2: Add LPO clock for AP6212
      ARM: dts: allwinner: orangepi-zero-plus2: Fix USB peripheral mode
      ARM: dts: allwinner: orangepi-zero-plus2: Share common board parts
      ARM: dts: allwinner: orangepi-zero-plus2: Add AP6212 Bluetooth

 .../dts/allwinner/sun8i-h3-orangepi-zero-plus2.dts | 127 +-----------------
 .../dts/allwinner/sunxi-orangepi-zero-plus2.dtsi   | 147 +++++++++++++++++++++
 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 125 +-----------------
 3 files changed, 149 insertions(+), 250 deletions(-)
---
base-commit: 7b78b5603bb6fa10848aa607d4298c7558765b1f
change-id: 20261120-orangepi-zero-plus2-fixes-92de09c1b5f5

Best regards,
-- 
Ivan Pfarher <ipfarher@gmail.com>



^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2026-12-03  9:04 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-03  9:04 [PATCH v2 0/4] ARM: dts: allwinner: orangepi-zero-plus2: Fix Bluetooth and USB gadget Ivan Pfarher via B4 Relay
2026-12-03  9:04 ` [PATCH v2 1/4] ARM: dts: allwinner: orangepi-zero-plus2: Add LPO clock for AP6212 Ivan Pfarher via B4 Relay
2026-12-03  9:04 ` [PATCH v2 2/4] ARM: dts: allwinner: orangepi-zero-plus2: Fix USB peripheral mode Ivan Pfarher via B4 Relay
2026-12-03  9:04 ` [PATCH v2 3/4] ARM: dts: allwinner: orangepi-zero-plus2: Share common board parts Ivan Pfarher via B4 Relay
2026-12-03  9:04 ` [PATCH v2 4/4] ARM: dts: allwinner: orangepi-zero-plus2: Add AP6212 Bluetooth Ivan Pfarher via B4 Relay

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox