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=ZvpHk+WXLwBOWG0WYxhcsYENywEQF/z2iFz42DU92P/QXNdK+XM7CoGQRsqW5iVz1LrN XruAai7OcGHHjhC49WNkJtLoAXSjP6pqA3jK9AU7f5bRC72eJZzcH9O77PQW9vjV3D60q jm3J1DjClC5T8NfNkuyG1mx/dgq2GsXWRodCRgWeSiaGPNCAQNcGWAbRSHhgHoX23nJMU 5pquZHA5xTaC5/zNwybBJSjXyvhs7v/kLvrwgX6dCJkje2MiL+KQpS04eQ1i0uMXAXo7C 4KS5hDeNIUgnt4fYgS9eDpLV0PQe3X2Xj2I9cBz86O2M/Ut7b+t3v8yodG1efME51Hg== 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:Date:Subject:MIME-Version: Content-Type:Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=ReSKIQyD4kd6aveHBLUUpUYt/ehQrycWq3lZUB4WYMQ=; b=oqlEA0Oe3ua5c5CepCX08D+T9az9TozV92p3WnLjRi6sVQ3MiTN6uzdE+536/EM1oCA0 nrxOu6qy35G0LYi2OBNRX6CLqjLv8WuQnb3WFoQIvhR/c7+751ebKNkOEjjVzVomYuRT6 8Oc/5xD8YhWWlbxXCLG8F2eVGpCN0XiK96FYtlLFSGpueeFSZ3uAgAkLC1ivyAWcM7OwK k1sYlbPLss3+ereVO+JwJMwlkZUTzsRtv9rHMvlgDn/dNU4ViPNdBzaJR+sX49juRK3xW MS4Q1/KzJF1CP4J96pk4t1s8+psa3d7MkrDiGXuBJpiivCJbPS1WvaQuq9AiUgv0c/g== 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=elVTaDCp; 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 03796606A32F; 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=elVTaDCp 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=au/LS+woopleU2FAVa5yjjdcVjBVEpTGiuTL9aEWPB0AiYX+Vuc5yLPXxasFdRJajJIF ICDHcP/zBOFtzHk4bRmkjkqL+gFIaCpn3H0T/wmgD9hT5+FJVKlBSxdVYGQVuoaE5Rqv7 9UWCMSmTwAjO46ePDRrWnK4MUwYLvryPEyTc/UpIcHcHoG1DqYEAGk9CSLwej5hwq1f/4 dz7n0D6hBhJRZ6N9CQdEiKFo3+tDTdmiEpwXiSVckOOiIsv0iWxbVuMkwuiW7B5c5lgwC 0UT0JZ0fUdVlAOmIFNWl/A0a3KCQzVyx9S9IylX3UUeK6juD2UTOCS0Wr9hhPSJr+Qg== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796288658; h=DKIM-Signature:Received:From:Date:Subject:MIME-Version:Content-Type: Message-Id:References:In-Reply-To:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To:Content-Transfer-Encoding; bh=ReSKIQyD4kd6aveHBLUUpUYt/ehQrycWq3lZUB4WYMQ=; b=m+hgBSeTRGcedDbXQTDyfP83J+JZURojdBm2w7iCBr9TX/xRcA6z13i4j/39drydxLh0 kdAOh9B/sTRhpWFFH0+RYuuE7v9n6f/6x6LU7ylNBXb20JP3DCGwXN020Aj7bELVLWY02 YPOOnDlOVbyeifNbYrYnncmp6Blj2N6vlPv5gVN2GmW33iaAtfeWaT0SvaZupXKp4xZiZ Cmuwuu1dP+RlbXHIMVxQ2F3NBFGbZJyTcX+1pvlQZnV4epV7PzcQNCAgVEgI6sSeevBQr LNRjqlBrcZkH2TMu8/7mddfLqL93jIC221Ac7ZJ+E03f2MMzN6VE2Z1QG7VcQKlFwkg== 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 ABD511F00923; 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=ReSKIQyD4kd6aveHBLUUpUYt/ehQrycWq3lZUB4WYMQ=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=elVTaDCpHGiFrLKkF4PuHqPMAReyECHbuhfD9RheYT1ywWSZIG326cszZZr3dmPxY srtRwtEgzoCzPEL7WoH3CQaboqQEaKfE8Dy73Jv5g2B3VLT5Vk5E1RyGMwesUOZo9O RUm1zPVioG8cpT4N/y1/yK3PtTf/oIPWskSaKbajwsqKWbmw4ZFe8vSUJ1Hl1AOHAm PmRIjg1S12HG2M4EV9SSiCUNTSiWvYCk64XcJAeWSaJNTqMr/1xeRHEI4/I0IzEioN JlcLYUFo00XJ1JI6xuFfnIvRQxtRgCzR7rqe5lQooHKZHE0uIaqdD/xnQ9d0LRmeWq +B3Z/auhtRQPg== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 3860F4F8A3; Thu, 3 Dec 2026 09:04:17 +0000 (UTC) From: Ivan Pfarher via B4 Relay Date: Thu, 03 Dec 2026 10:04:18 +0100 Subject: [PATCH v2 4/4] ARM: dts: allwinner: orangepi-zero-plus2: Add AP6212 Bluetooth X-Mailing-List: linux-kernel@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" Message-Id: <20261203-orangepi-zero-plus2-fixes-v2-4-286df6b782f4@gmail.com> References: <20261203-orangepi-zero-plus2-fixes-v2-0-286df6b782f4@gmail.com> In-Reply-To: <20261203-orangepi-zero-plus2-fixes-v2-0-286df6b782f4@gmail.com> 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=3306; i=ipfarher@gmail.com; s=20261120; h=from:subject:message-id; bh=2Y6sD/OD+xEH27pxgQeNTucmmxSxKR6w/Q0GX5oauYY=; b=xKJ4kxdSXqeLkYDfnn8AAJABCce+n9hDcS73BNPIqMPmZ7gT6d1aEhX/sfpsnFuKLOTGC8vNd eMwHOtJDyo3BsYbtqYp3zlaYo6z/xpsMJWS51+VYMgjYJKYukuvoZnD 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 Content-Transfer-Encoding: 7bit From: 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 in the shared board dtsi, so both the H3 and the H5 version get it; UART1 was so far only enabled for the H5 version. Per the board schematic, BT_RST_N (BT_REG_ON) is connected to PA10, BT_WAKE (net AP-WAKE-BT) to PA20 and BT_HOST_WAKE (net BT-WAKE-AP) to PL2, which is used as the host-wakeup interrupt. The controller uses the same RTC LPO clock as the WiFi part. Tested on the H5 version of the board 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: Bluetooth: hci0: BCM43430A1 'brcm/BCM43430A1.hcd' Patch Bluetooth: hci0: BCM43438A1 26MHz AP6212A1_CL1 BT4.0 OTP-BD-0034 With the wake-up lines the controller runtime-suspends when idle (PA20 deasserted) and resumes for scans, and the host_wake interrupt on PL2 fires on controller activity. Classic inquiry and LE scans find nearby devices both from the suspended state and with runtime PM disabled. Not tested on the H3 version. 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. Signed-off-by: Ivan Pfarher --- .../dts/allwinner/sunxi-orangepi-zero-plus2.dtsi | 21 +++++++++++++++++++++ .../dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 6 ------ 2 files changed, 21 insertions(+), 6 deletions(-) diff --git a/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi b/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi index 763aaffaf..d468e188b 100644 --- a/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi +++ b/arch/arm/boot/dts/allwinner/sunxi-orangepi-zero-plus2.dtsi @@ -110,6 +110,27 @@ status = "okay"; }; +&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 = <®_vcc3v3>; + vddio-supply = <®_vcc3v3>; + shutdown-gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>; /* PA10 */ + device-wakeup-gpios = <&pio 0 20 GPIO_ACTIVE_HIGH>; /* PA20 */ + interrupt-parent = <&r_pio>; + interrupts = <0 2 IRQ_TYPE_EDGE_RISING>; /* PL2 */ + interrupt-names = "host-wakeup"; + }; +}; + &usb_otg { /* * According to schematics CN1 MicroUSB port can be used to take diff --git a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts index 10463ee6c..8c3425616 100644 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts @@ -14,9 +14,3 @@ &mmc0 { disable-wp; }; - -&uart1 { - pinctrl-names = "default"; - pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>; - status = "okay"; -}; -- 2.43.0