From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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.subspace.kernel.org (Postfix) with ESMTPS id AFFC5606A338 for ; Thu, 3 Dec 2026 09:04:30 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=WwX8xPcZ; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=YikSjoLh DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:Reply-To:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To: Content-Transfer-Encoding:Content-Type:MIME-Version:Message-Id:Date:Subject: From:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Unsubscribe-Post:List-Owner; bh=0vjKiOOzCQaAeaTAhL8OYytDUZ/zGB36SW85G2eUoK8=; b=WwX8xPcZkcSXGzOcYSDq6jDLdi b5YBuOU2oMy/agwbu8vBoSZOi6iAAapWP9UEyWuKvjf5+4T+fwMJ129VXgW46tuSWdjFa8aYCZXsr coatCtWswQkyksbtqKtX3DRNVQIEXdiehaU7AMvgCyVh4Dip4vzRu60hmnWzEVKH2Ttn7SIdYUPjJ qkziQ9SwyBUpFhdg8UBXtRK2/cJQi9DR7aWcWtHDYZS7Il52O+g3wlkf47nq4L5qdnJZgbsw/3JO9 7q9PBO0TIqEdUb/ETFKHzrMTohRPH1PqqXLWQZndo1X9v+h+sqos536m1yuecCeGOCic19QZXKEZ/ EtPC4Gtg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2jm-0000000Dw1D-3AUw; Thu, 03 Dec 2026 09:04:22 +0000 Received: from tor.source.kernel.org ([172.105.4.254]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2jj-0000000Dvzs-2pMU for linux-arm-kernel@lists.infradead.org; Thu, 03 Dec 2026 09:04:19 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by tor.source.kernel.org (Postfix) with ESMTP id D8559618F1; Thu, 3 Dec 2026 09:04:18 +0000 (UTC) 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-Archived-By: 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 X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Archive: List-Post: List-Help: List-Subscribe: , Reply-To: ipfarher@gmail.com Sender: "linux-arm-kernel" X-Spam-Status: No, score=-13.9 required=3.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham autolearn_force=no version=4.0.1 X-Spam-Checker-Version: SpamAssassin 4.0.1 (2024-03-26) on aws-us-west-2-korg-listserv-alma10-1 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