Skip to contentSkip to conversation

arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix Bluetooth and USB gadget

PATCH Applied Ivan Pfarher 2 participants 12 messages Nov 20

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

cover arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix Bluetooth and USB gadget

On the Orange Pi Zero Plus2 (H5), neither the Bluetooth part of the AP6212 module nor the micro USB port in peripheral mode work with the current device tree. This series fixes both and adds MMC aliases:

1. 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. Describe the Bluetooth controller on UART1 (BT_REG_ON on PA10), so hci_bcm can power it, load its firmware and use it at 1.5 Mbaud.
3. 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. Drop them, as the port cannot supply VBUS anyway.
4. Add MMC aliases so the microSD card and the eMMC keep fixed numbers.

About patch 3: the root cause is that phy-sun4i-usb accepts the host-mode request from the HCD even though the PHY's dr_mode is fixed to "peripheral". Changing the PHY driver would also cover other boards, but that is a separate discussion; this series only fixes the board DT. The H3 version of the board (sun8i-h3-orangepi-zero-plus2.dts) has the same USB and AP6212 setup and very likely the same problems, but it is not changed here because I could not test it.

Testing: all four changes were tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 (Yocto scarthgap, meta-sunxi) with the same DT
changes: Bluetooth comes up with firmware loaded and scans, the g_cdc gadget enumerates on a PC, and the board boots with the microSD card as mmcblk0 and the eMMC as mmcblk1. Against current mainline the series is build-tested only: dtc gives no new warnings and dt-validate reports nothing for the resulting DTB.

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.

---
Ivan Pfarher (4):
arm64: dts: allwinner: h5: orangepi-zero-plus2: Add LPO clock for AP6212
arm64: dts: allwinner: h5: orangepi-zero-plus2: Add AP6212 Bluetooth
arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix USB peripheral mode
arm64: dts: allwinner: h5: orangepi-zero-plus2: Add MMC aliases

 .../allwinner/sun50i-h5-orangepi-zero-plus2.dts    | 25 +++++++++++++++-------
 1 file changed, 17 insertions(+), 8 deletions(-)

---
base-commit: 65e4fd942f72a9dba0e4e257290c4fa1aa756854
change-id: 20261120-orangepi-zero-plus2-fixes-92de09c1b5f5

Best regards,

Signature · 1 line
Ivan Pfarher <[email protected]>
#1 lore raw

PATCH 1/4 arm64: dts: allwinner: h5: orangepi-zero-plus2: Add LPO clock for AP6212

The AP6212 WiFi/BT module needs a 32.768 kHz low power oscillator (LPO) clock, which on this board comes from the RTC clock output (osc32k-out). Nothing in the device tree references that clock, so it is disabled as unused during late boot.

WiFi keeps working without it, but the Bluetooth core does not: with the LPO gated, the BCM43430A1 ROM answers HCI_Reset and nothing else (no Read Local Version, no firmware download), so the controller can never be brought up. Turning the clock output on by hand (RTC LOSC_OUT_GATING) makes the controller answer normally.

Reference the clock from the WiFi power sequence, as other boards using the same module do (e.g. sun8i-h2-plus-bananapi-m2-zero.dts).

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: osc32k-out stays enabled and the Bluetooth controller answers HCI commands. Build-tested only against current mainline.

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

Fixes cf8e19e1ec15 ("arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo")
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +3 -0
index 3eb986c35..34d6c1468 100644
@@ -5,6 +5,7 @@
 
 #include "sun50i-h5.dtsi"
 
+#include <dt-bindings/clock/sun6i-rtc.h>
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -54,6 +55,8 @@
 
 	wifi_pwrseq: pwrseq {
 		compatible = "mmc-pwrseq-simple";
+		clocks = <&rtc CLK_OSC32K_FANOUT>;
+		clock-names = "ext_clock";
 		reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
 		post-power-on-delay-ms = <200>;
 	};
Signature · 1 line
2.43.0
maintainer
#2 lore raw

Re: [PATCH 1/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add LPO clock for AP6212

Quoted 14 lines · On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay…

From: Ivan Pfarher <[email protected]>

The AP6212 WiFi/BT module needs a 32.768 kHz low power oscillator (LPO) clock, which on this board comes from the RTC clock output (osc32k-out). Nothing in the device tree references that clock, so it is disabled as unused during late boot.

WiFi keeps working without it, but the Bluetooth core does not: with the LPO gated, the BCM43430A1 ROM answers HCI_Reset and nothing else (no Read Local Version, no firmware download), so the controller can never be brought up. Turning the clock output on by hand (RTC LOSC_OUT_GATING) makes the controller answer normally.

Quoted 6 lines

Reference the clock from the WiFi power sequence, as other boards using the same module do (e.g. sun8i-h2-plus-bananapi-m2-zero.dts).

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: osc32k-out stays enabled and the Bluetooth controller answers HCI commands. Build-tested only against current mainline.

It stays enabled only if the mmc stuff is working. So besides the changes in this patch (which technically only covers the WiFi side), you should add a proper bluetooth node under uart1 with all the resource references.

Quoted 36 lines

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

Fixes cf8e19e1ec15 ("arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo")
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +3 -1
index 3eb986c35..34d6c1468 100644
@@ -5,6 +5,7 @@
 
 #include "sun50i-h5.dtsi"
 
+#include <dt-bindings/clock/sun6i-rtc.h>
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -54,6 +55,8 @@
 
        wifi_pwrseq: pwrseq {
                compatible = "mmc-pwrseq-simple";
+               clocks = <&rtc CLK_OSC32K_FANOUT>;
+               clock-names = "ext_clock";
                reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
                post-power-on-delay-ms = <200>;
        };
 
--

2.43.0

maintainer
#3 lore raw

Re: [PATCH 1/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add LPO clock for AP6212

Quoted 20 lines · Chen-Yu Tsai
Quoted 17 lines · On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay…

From: Ivan Pfarher <[email protected]>

The AP6212 WiFi/BT module needs a 32.768 kHz low power oscillator (LPO) clock, which on this board comes from the RTC clock output (osc32k-out). Nothing in the device tree references that clock, so it is disabled as unused during late boot.

WiFi keeps working without it, but the Bluetooth core does not: with the LPO gated, the BCM43430A1 ROM answers HCI_Reset and nothing else (no Read Local Version, no firmware download), so the controller can never be brought up. Turning the clock output on by hand (RTC LOSC_OUT_GATING) makes the controller answer normally.

Reference the clock from the WiFi power sequence, as other boards using the same module do (e.g. sun8i-h2-plus-bananapi-m2-zero.dts).

Quoted 7 lines
Quoted 3 lines

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: osc32k-out stays enabled and the Bluetooth controller answers HCI commands. Build-tested only against current mainline.

It stays enabled only if the mmc stuff is working. So besides the changes in this patch (which technically only covers the WiFi side), you should add a proper bluetooth node under uart1 with all the resource references.

And that's the next patch. Sorry for the noise.

Quoted 36 lines
Quoted 36 lines

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

Fixes cf8e19e1ec15 ("arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo")
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +3 -1
index 3eb986c35..34d6c1468 100644
@@ -5,6 +5,7 @@
 
 #include "sun50i-h5.dtsi"
 
+#include <dt-bindings/clock/sun6i-rtc.h>
 #include <dt-bindings/gpio/gpio.h>
 
 / {
@@ -54,6 +55,8 @@
 
        wifi_pwrseq: pwrseq {
                compatible = "mmc-pwrseq-simple";
+               clocks = <&rtc CLK_OSC32K_FANOUT>;
+               clock-names = "ext_clock";
                reset-gpios = <&pio 0 9 GPIO_ACTIVE_LOW>; /* PA9 */
                post-power-on-delay-ms = <200>;
        };
 
--

2.43.0

maintainer Reviewed-by on v1 1/4
#4 lore raw

Re: [PATCH 1/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add LPO clock for AP6212

In reply to Ivan Pfarher
Quoted 21 lines · On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay…

From: Ivan Pfarher <[email protected]>

The AP6212 WiFi/BT module needs a 32.768 kHz low power oscillator (LPO) clock, which on this board comes from the RTC clock output (osc32k-out). Nothing in the device tree references that clock, so it is disabled as unused during late boot.

WiFi keeps working without it, but the Bluetooth core does not: with the LPO gated, the BCM43430A1 ROM answers HCI_Reset and nothing else (no Read Local Version, no firmware download), so the controller can never be brought up. Turning the clock output on by hand (RTC LOSC_OUT_GATING) makes the controller answer normally.

Reference the clock from the WiFi power sequence, as other boards using the same module do (e.g. sun8i-h2-plus-bananapi-m2-zero.dts).

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: osc32k-out stays enabled and the Bluetooth controller answers HCI commands. Build-tested only against current mainline.

Quoted 6 lines

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

Fixes cf8e19e1ec15 ("arm64: dts: orange-pi-zero-plus2: enable AP6212a WiFi/BT combo")
#5 lore raw

PATCH 2/4 arm64: dts: allwinner: h5: orangepi-zero-plus2: Add AP6212 Bluetooth

In reply to Ivan Pfarher

UART1 is connected to the Bluetooth part of the AP6212 module, but the controller itself is not described, so nothing powers it up and the kernel never registers it.

Add it as a serdev child of UART1. BT_REG_ON is connected to PA10:
on the board, driving PA10 low makes the controller drop CTS and stop answering, driving it high brings it back. It uses the same RTC LPO clock as the WiFi part. The wake-up lines are not described because they could not be identified.

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: hci_bcm powers the controller, loads brcm/BCM43430A1.hcd, switches the UART to 1.5 Mbaud and the adapter works with BlueZ (scan finds nearby devices):

Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch
Bluetooth: hci0: BCM43438A1 26MHz AP6212A1_CL1 BT4.0 OTP-BD-0034

Build-tested only against current mainline.

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

---
 .../boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts      | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +11 -0
index 34d6c1468..5697251b9 100644
@@ -128,7 +128,18 @@
 &uart1 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+	uart-has-rtscts;
 	status = "okay";
+
+	bluetooth {
+		compatible = "brcm,bcm43438-bt";
+		max-speed = <1500000>;
+		clocks = <&rtc CLK_OSC32K_FANOUT>;
+		clock-names = "lpo";
+		vbat-supply = <&reg_vcc3v3>;
+		vddio-supply = <&reg_vcc3v3>;
+		shutdown-gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
+	};
 };
 
 &usb_otg {
Signature · 1 line
2.43.0
maintainer
#6 lore raw

Re: [PATCH 2/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add AP6212 Bluetooth

Quoted 7 lines · On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay…

From: Ivan Pfarher <[email protected]>

UART1 is connected to the Bluetooth part of the AP6212 module, but the controller itself is not described, so nothing powers it up and the kernel never registers it.

Quoted 5 lines

Add it as a serdev child of UART1. BT_REG_ON is connected to PA10:
on the board, driving PA10 low makes the controller drop CTS and stop answering, driving it high brings it back. It uses the same RTC LPO clock as the WiFi part. The wake-up lines are not described because they could not be identified.

The pins are called BT_WAKE and BT_HOST_WAKE. The lines are labeled BT-WAKE-AP and AP-WAKE-BT, which go to PL2 and PA20, respectively.

Please add them.

Quoted 47 lines

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: hci_bcm powers the controller, loads brcm/BCM43430A1.hcd, switches the UART to 1.5 Mbaud and the adapter works with BlueZ (scan finds nearby devices):

Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch
Bluetooth: hci0: BCM43438A1 26MHz AP6212A1_CL1 BT4.0 OTP-BD-0034

Build-tested only against current mainline.

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

---
 .../boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts      | 11 +++++++++++
 1 file changed, 11 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +11 -1
index 34d6c1468..5697251b9 100644
@@ -128,7 +128,18 @@
 &uart1 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
+       uart-has-rtscts;
        status = "okay";
+
+       bluetooth {
+               compatible = "brcm,bcm43438-bt";
+               max-speed = <1500000>;
+               clocks = <&rtc CLK_OSC32K_FANOUT>;
+               clock-names = "lpo";
+               vbat-supply = <&reg_vcc3v3>;
+               vddio-supply = <&reg_vcc3v3>;
+               shutdown-gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */
+       };
 };
 
 &usb_otg {
 
--

2.43.0

#7 lore raw

PATCH 3/4 arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix USB peripheral mode

In reply to Ivan Pfarher

The micro USB port is set to dr_mode = "peripheral" because it cannot supply VBUS, but EHCI0/OHCI0, which share USB PHY 0 with the MUSB controller, are enabled too.

When they register, usb_add_hcd() asks the shared PHY for host mode (since commit e671765e521c ("usb: core: Try generic PHY_MODE_USB_HOST if usb_phy_roothub_set_mode fails")), and phy-sun4i-usb switches PHY 0 to host ("Changing dr_mode to 1"). MUSB then stays in a_wait_vrise, the UDC stays "not attached", and a gadget never shows up on the host.

The port cannot work as a host on this board anyway, so drop EHCI0 and OHCI0.

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: g_cdc enumerates on the PC (CDC ECM + ACM), the UDC state is "configured" and MUSB is in b_peripheral. Build-tested only against current mainline.

The H3 version of the board (sun8i-h3-orangepi-zero-plus2.dts) has the same setup from the same commit but is not changed here, as it could not be tested.

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

Fixes 43aad09c7928 ("ARM: dts: orange-pi-zero-plus2: enable USB OTG port")
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 8 --------
 1 file changed, 8 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +0 -8
index 5697251b9..892723b46 100644
@@ -66,10 +66,6 @@
 	status = "okay";
 };
 
-&ehci0 {
-	status = "okay";
-};
-
 &hdmi {
 	status = "okay";
 };
@@ -115,10 +111,6 @@
 	status = "okay";
 };
 
-&ohci0 {
-	status = "okay";
-};
-
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pa_pins>;
Signature · 1 line
2.43.0
maintainer Reviewed-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix USB peripheral mode

Quoted 16 lines · On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay…

From: Ivan Pfarher <[email protected]>

The micro USB port is set to dr_mode = "peripheral" because it cannot supply VBUS, but EHCI0/OHCI0, which share USB PHY 0 with the MUSB controller, are enabled too.

When they register, usb_add_hcd() asks the shared PHY for host mode (since commit e671765e521c ("usb: core: Try generic PHY_MODE_USB_HOST if usb_phy_roothub_set_mode fails")), and phy-sun4i-usb switches PHY 0 to host ("Changing dr_mode to 1"). MUSB then stays in a_wait_vrise, the UDC stays "not attached", and a gadget never shows up on the host.

The port cannot work as a host on this board anyway, so drop EHCI0 and OHCI0.

Quoted 8 lines

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: g_cdc enumerates on the PC (CDC ECM + ACM), the UDC state is "configured" and MUSB is in b_peripheral. Build-tested only against current mainline.

The H3 version of the board (sun8i-h3-orangepi-zero-plus2.dts) has the same setup from the same commit but is not changed here, as it could not be tested.

Just want to point out that the board is actually the same. H3 and H5 are pin compatible so they just swap out the SoC. This board should have a shared .dtsi file.

Quoted 6 lines

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

Fixes 43aad09c7928 ("ARM: dts: orange-pi-zero-plus2: enable USB OTG port")
Quoted 35 lines
---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 8 --------
 1 file changed, 8 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +0 -9
index 5697251b9..892723b46 100644
@@ -66,10 +66,6 @@
        status = "okay";
 };
 
-&ehci0 {
-       status = "okay";
-};
-
 &hdmi {
        status = "okay";
 };
@@ -115,10 +111,6 @@
        status = "okay";
 };
 
-&ohci0 {
-       status = "okay";
-};
-
 &uart0 {
        pinctrl-names = "default";
        pinctrl-0 = <&uart0_pa_pins>;
 
--

2.43.0

#9 lore raw

PATCH 4/4 arm64: dts: allwinner: h5: orangepi-zero-plus2: Add MMC aliases

In reply to Ivan Pfarher

sunxi-mmc probes asynchronously, so without aliases the microSD card, the SDIO WiFi and the eMMC get their mmc numbers in probe order. A boot script using root=/dev/mmcblk0p2 for the microSD card can then end up on the eMMC instead.

Add aliases so that the microSD card is always mmc0 and the eMMC mmc1, matching the numbering U-Boot uses on this board, with the SDIO WiFi as mmc2.

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: the microSD card is mmcblk0 and the eMMC mmcblk1, booting from either. Build-tested only against current mainline.

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +3 -0
index 892723b46..4a26863e8 100644
@@ -13,6 +13,9 @@
 	compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5";
 
 	aliases {
+		mmc0 = &mmc0;
+		mmc1 = &mmc2;
+		mmc2 = &mmc1;
 		serial0 = &uart0;
 	};
 
Signature · 1 line
2.43.0
maintainer
#10 lore raw

Re: [PATCH 4/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add MMC aliases

Quoted 7 lines · On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay…

From: Ivan Pfarher <[email protected]>

sunxi-mmc probes asynchronously, so without aliases the microSD card, the SDIO WiFi and the eMMC get their mmc numbers in probe order. A boot script using root=/dev/mmcblk0p2 for the microSD card can then end up on the eMMC instead.

For sunxi we do not add MMC aliases. You are encouraged to use UUID or PARTUUID for specifying root devices.

Quoted 36 lines

Add aliases so that the microSD card is always mmc0 and the eMMC mmc1, matching the numbering U-Boot uses on this board, with the SDIO WiFi as mmc2.

Tested on an Orange Pi Zero Plus2 (H5) running Linux 6.6.160 with this change applied: the microSD card is mmcblk0 and the eMMC mmcblk1, booting from either. Build-tested only against current mainline.

This problem was investigated, and the patch drafted, in an interactive session with an AI coding assistant (Claude by Anthropic). The submitter reviewed the change and ran the tests described above.

---
 arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 3 +++
 1 file changed, 3 insertions(+)
arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +3 -1
index 892723b46..4a26863e8 100644
@@ -13,6 +13,9 @@
        compatible = "xunlong,orangepi-zero-plus2", "allwinner,sun50i-h5";
 
        aliases {
+               mmc0 = &mmc0;
+               mmc1 = &mmc2;
+               mmc2 = &mmc1;
                serial0 = &uart0;
        };
 
 
--

2.43.0

maintainer Applied
#11 lore raw

Re: (subset) [PATCH 0/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix Bluetooth and USB gadget

In reply to Ivan Pfarher
Quoted 15 lines · Ivan Pfarher

On the Orange Pi Zero Plus2 (H5), neither the Bluetooth part of the AP6212 module nor the micro USB port in peripheral mode work with the current device tree. This series fixes both and adds MMC aliases:

1. 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. Describe the Bluetooth controller on UART1 (BT_REG_ON on PA10), so hci_bcm can power it, load its firmware and use it at 1.5 Mbaud.
3. 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. Drop them, as the port cannot supply VBUS anyway.
4. Add MMC aliases so the microSD card and the eMMC keep fixed numbers.

Quoted 1 line

[...]

Applied to sunxi/dt-for-7.5 in sunxi, thanks!

[1/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Add LPO clock for AP6212

      https://git.kernel.org/sunxi/linux/c/bfa27cff7430
[3/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix USB peripheral mode
      https://git.kernel.org/sunxi/linux/c/4fb04f870eb6

I changed the subject for this patch to "Disable USB hosts".

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>