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 3F79F606A32C for ; Thu, 3 Dec 2026 09:04:32 +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=AfJthahs; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=elVTaDCp 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: Content-Transfer-Encoding:Cc:To:In-Reply-To:References:Message-Id: Content-Type:MIME-Version:Subject:Date:From:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=ReSKIQyD4kd6aveHBLUUpUYt/ehQrycWq3lZUB4WYMQ=; b=AfJthahsPkDGcuI71D2WBJCqno V/P/p3xoEqA+5gwm5IsFFYgiHoBW5vc2lcUxGAeVbcp8+CWgbVGTyqmuKap96hfHRcNW3u5CXN3iU zvD+u5MO95iqUglTGgoGXRiRYULhZ+FYyFQ37cnk5+AILQRd/i+1akSe+VKqYWbEcPAdYthMWAI0W 15oTrZVnjCzVP9z6cUTa+/azicc/FPRvNU8fuXv0+CdgoXlrFgrVQMAonvjoFXRoOV4NLe6fR/bNn YScBD1YADYCN7mk9mfensJbZKcP9ai/h6elBov363mE6i2NyGuAn2AStrgVMcwHrvtlxjMVWe1cPA OBu3nW1g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2jk-0000000Dw0L-1uEN; Thu, 03 Dec 2026 09:04:20 +0000 Received: from sea.source.kernel.org ([172.234.252.31]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZ2jj-0000000Dvzr-1n5x 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 sea.source.kernel.org (Postfix) with ESMTP id E643D413F2; 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=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-Archived-By: 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 Content-Transfer-Encoding: 7bit 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=-18.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_CR_TRAILER,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 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