From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796288659; b=41MRdqEtTvrrcdjdp9NPZqwMKB7RRVnnjpUbSL0PA+tZjmZw0XtJjFhNe5ZWbuNZxktR gav3MG+isQU+VGlysiTKX47/SSiV3V5MFLPBz1Ua/pu3NEg8o7RS1cr5H9KoR6iHxuYPT Nlbf57F4Wf9WpaevFDCb3TerIu7rR1lxVCb9943g83XCQ9DSLM+b3B9MaR0Kk6kHpo9A4 H/SrwyOJkyYcPT7u8skzqnweFR7Zw8WqvGBZUo1nJorl5fljltSq/VfmhoIxA8ybJZr6y YnqHSiKf2m1zmfm1nrzUg/0wYa0n6Bz7N+DT0ch9EiUfjtOIJZufqn860O+0lmvUH7A== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796288659; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=0vjKiOOzCQaAeaTAhL8OYytDUZ/zGB36SW85G2eUoK8=; b=yEeAUN0FOwkiV/BWMtI37HK8Gh1ioyZqhPOl8g90XEqClHKbPC6ofyeb1rNmfESwkIal WcZVVCmplwp952+syaAP0vSGp+mc2QIPdmhrowjoBo7Osr6Js1H69Qb9BkqsouMuD4euA GwbIMNF6Fp5qdGLa6MyijCDHhiQd69enAcTdx9TAIcmQ2ktJSUOeF0m+EK2oCGHWqjsOJ 7vT09DrbaP0lPgfiQAID9e6iyUeNLwqQGC/vE4/ytBp6pkZVQatc40s1U/wBD4ELYrbs1 3n5OwRxkw5V+Igtv/U3DZcM2cdnukUvSMMab6FgBTXn/ZeCTkFURbFUgoeuFggPA9wg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YikSjoLh; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 036E9606A322; Thu, 3 Dec 2026 09:04:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YikSjoLh Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796288658; b=vNsYYRFZ9qKBFCY2lOTSkmNtzWdcK+pUGUis/n70JL7vmKkVt+ogXTo5oXKGZBkf6mjl Pkt5spJpGgYztagXt/vsohL/TbmF0fdHo1Q4yp90s2200WU8Nr8ZZwSgaWHekf5nRynN2 UGqtH+70yi+b6lg6QpnUGOBXUuhgDaN2xpXpyol+U1UorqRAD7A+nQ0i51sWqERb1pPAn fKrz8jhbdRlMc0rCf4Fovm+mLNEtGgX4QG4rmtmas+bHNyB2cHxxN3jSHWIfofbqcAK1Y FhZUpmIc9aW8S//r7rXuUPxidFiS1IzrBuQ8MR+Dp0QQ0UdegP1/mFFTmZMvPFCy6EA== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796288658; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=0vjKiOOzCQaAeaTAhL8OYytDUZ/zGB36SW85G2eUoK8=; b=CsnHccj+GHP9W7Bt3aIIhY8oy8y5ASw8iWjVhbQE0GSalicLGejTQdeO9enKRqhNRiBX Eb3WU/2hnL1U2ipS8axqX2KuQ2+x4DyQVftJMX5GNg4CuhQeEMlU1y6uPqaffR/mWf1Nv ZG9C4WVv4fmSdF9H9sOpVj9eN30UyFL8Uve/UXJK6hLEKUq3YV3xGmyT8Per4VX4v92uG xsAE8iwoj15JUYtlYhcsJsaHF2O1SKghRGw848YzwwtneM4vhSFcbVBPFe6E+Lz28cD/o dUVXulgge30wZT8FvdqdJc81JvAs6MIN6qQG3/LKx+tlrR+tEIyaN1WCBEaAYW10+GA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id 2096D1F00893; Thu, 3 Dec 2026 09:04:17 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796288658; bh=0vjKiOOzCQaAeaTAhL8OYytDUZ/zGB36SW85G2eUoK8=; h=From:Subject:Date:To:Cc:Reply-To; b=YikSjoLhfTJophXmusYwa31f13M9SSIkcDfOVsqocHFgnOAt/8xTzasoeVVcfABBO 6CDcILszxt6Wu8yBnsuqeZlIN24o394alAEYWckQXKakevPbMR7Qfk6i7nCfMzZLN+ 2TX1Zi+Mwu6qU9nDFuFwopoNUqvncPmaYZxuejM0dDMaGP8BcaMHmbpB3QupKDoFgo GDnhv8jzo0F+hvOhhU/YKnBCnLs9WVbE1JZ9wx1mEIsyfy/tRWiuryLnLUPiWqDL60 MtnA9gsSB8DCtd7JrgmC005jsTZXm7wcS1ckpIMXhkuWdcHzAxkbXuZSpYJKz2zpRW sc4AP8YXGdB8g== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 904AA4F898; Thu, 3 Dec 2026 09:04:16 +0000 (UTC) From: Ivan Pfarher via B4 Relay Subject: [PATCH v2 0/4] ARM: dts: allwinner: orangepi-zero-plus2: Fix Bluetooth and USB gadget Date: Thu, 03 Dec 2026 10:04:14 +0100 Message-Id: <20261203-orangepi-zero-plus2-fixes-v2-0-286df6b782f4@gmail.com> X-Mailing-List: devicetree@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAI4wEWsC/42NQQ6CMBBFr0Jm7Zh2EsS68h6EBZYpTAKUtNqoh LtbOIHL93/e/ytEDsIRbsUKgZNE8XMGOhVgh3buGaXLDKToojUp9GFPF8EvB4/L+IqETt4c0VD Hylj9KF0J2V8CH0XW6ybzIPHpw+e4SnpP/1lNGhWy7SpD+mocVfd+amU8Wz9Bs23bD4UL5ijCA AAA To: Rob Herring , Krzysztof Kozlowski , Conor Dooley , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, Ivan Pfarher X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796288655; l=3336; i=ipfarher@gmail.com; s=20261120; h=from:subject:message-id; bh=wumvV2luISlz5eoEWMGoiXYv4NYPyJuNDFKlhQFX8wc=; b=SRUcZayJ2GWgR2Zdw5ueSHC6PqPT6dZ/EYY4oj1FM2p7syrl35zSD4nOBVPz5xH+6JXDwEtUu fwGGaHj6ix0AzFlVqHAEQUV+cmbBjT50nk6yPn9m91J2PtSQ119Fmgy X-Developer-Key: i=ipfarher@gmail.com; a=ed25519; pk=3DMYyz/xl+KRAx2TNGJpheG+5QUm7lqHhKXFqVu2TmY= X-Endpoint-Received: by B4 Relay for ipfarher@gmail.com/20261120 with auth_id=1582 X-Original-From: Ivan Pfarher Reply-To: ipfarher@gmail.com 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