| Message ID | 20261120-orangepi-zero-plus2-fixes-v1-3-ecd792189f27@gmail.com (mailing list archive) |
|---|---|
| State | New |
| Headers |
Return-Path: <linux-sunxi+bounces-27913-sunxi=pue.re@lists.linux.dev> X-Original-To: noreply@patchwork.local Delivered-To: noreply@patchwork.local Received: from sto.lore.kernel.org (sto.lore.kernel.org [172.232.135.74]) by mxe881.netcup.net (Postfix) with ESMTPS id 108581C5E32 for <noreply@patchwork.local>; Fri, 20 Nov 2026 12:41:01 +0100 (CET) Authentication-Results: mxe881; dkim=pass header.d=kernel.org; spf=pass (sender IP is 172.232.135.74) smtp.mailfrom=linux-sunxi+bounces-27913-noreply=patchwork.local@lists.linux.dev smtp.helo=sto.lore.kernel.org Received-SPF: pass (mxe881: domain of lists.linux.dev designates 172.232.135.74 as permitted sender) client-ip=172.232.135.74; envelope-from=linux-sunxi+bounces-27913-noreply=patchwork.local@lists.linux.dev; helo=sto.lore.kernel.org; Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92]) by sto.lore.kernel.org (Postfix) with ESMTP id 78B286188F8 for <noreply@patchwork.local>; Fri, 20 Nov 2026 11:40:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 ARC-Seal: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1795174858; b=T624HbWO9vl1A3nEJF/HvtzA5LVUwPS/lPf2oe/qHYcNnLNlw55YsTWzZRfLnhwlbPun fuObwq5WnLBQI4uMtYJFtHPeEJOonEaw/MAqhoycqLdw6D5+nzWw71XUleVOeLrnmutRw wfqy0ocC+RqLFeYFuk6+Gi303FkQKzIpxoe+GoU1A2696bSLtGlGnpBW/XTHG/b6Oe67a Pi57+lB7XX4e8IdbDDceslCwidK4BNiTjvGasQhpFCVCUbO6sMPJ0KkOhL/+pM7gql1id pXFF3SAUGgHKHAbau7kOlEF5xvFX9ijmO0pMLRlNsMXMAy3eOeUhlc+U/bW/CfdXbgw== ARC-Message-Signature: i=3; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795174858; h=X-Original-To:Received:Received:DKIM-Signature:Received:From:Date: Subject:X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe: List-Unsubscribe:List-Owner:Precedence: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=5sTfjmvRmInRg9bzSas7Pj5tLY1aYw/Q3j6D0qSG5DA=; b=4pUaWVbfxeTOw49oL0C42hzBpL3VyixsouMc/UiPw4F7BLvMu3huqUjHy6bVk/k353SR KeJFDx4tGlwv3aalXzv11oFJ5KfxXdC+OENLcjaNEraVyfBdThSTOHSkcMIbS3xAXBFdR PiRVrjBLRGJbGcYL1/78CK8iMi7jjxwy4QeK2++A2uzaw31Pq/xu9+YNlDv/vrF/ti/4D FBLKo6EQCFfyWRWksyO2Z7mnpimGeBR9mNbgL+JQdM+vYQoOSPBbLDU/l/rOy+pbuvC2b n7VskrAQy/wLRh7KueupIGwtEnDE5ablUKgHNZG9npY5XVJsG9IdsIwzgi982yNS/uA== ARC-Authentication-Results: i=3; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=R24ohYu5; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1 Received: from localhost.localdomain (localhost [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5CF40606A335; Fri, 20 Nov 2026 11:40:58 +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=R24ohYu5 X-Original-To: linux-sunxi@lists.linux.dev 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=1795174858; b=PLKhOfwb2hKyh4Tq65uYRSfLnnxAlr8b0ynrRdgQS5huwaxtdsiWZKdIdG+OGzchQRYB IwudBPC1U4eueTmOQSp4Zs3ro5p7A5IQRplCFu9wCMXQikWxZwJermlhok0cvlaHTcIMo 0DKA0hJiv68eKI/m0M+8b+MDalE6hXkD6Xj4CyN2FRsXDlFk2BkK30zO6UYazBIfzoeoV NaqQJOABPyFGUY3i0cnjlXxtzpXiP+0bRFX4JL+geD9itIkNCdZyU1oi70pI9L6ZvQ6PJ ihO9QaYUaE3nWNpCL1KX4BS3aTOQipdYvy8sTTFdDNfmwRz5U2Xto+3D4y2WKJ4Nfrw== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1795174858; 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=5sTfjmvRmInRg9bzSas7Pj5tLY1aYw/Q3j6D0qSG5DA=; b=11xVhuoRyjRk3yVsPqVprpujO68vxmOjfY8XCwHCeRtdvc/iyv0o34v68REkwK0SctiJ 1Rcz9zXyCCfwk5xfB18k32PxdXP/rnqexnf3McHoTGpnCBHPDmoMrSyeDfVTu3s+6zf8p nE4vi+XULMFfTRS1oQXC3jc2KYVjIZwVpP2DSfIgU0pAmKhCRFuCChD8i/vhiq5xWR9E5 YY38Jes8F/HNrCrO+9iydjrJFBGRekI9TfcdWEaRfoe8v7gBmpa+x6Z2LD9L+D5ClWQkl uGwfdJ0pH/SZwQQtA2M1LfycupT+MCf5+KRhOyxH1flmoXNH25irB1fa3vfket87J2Q== 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=R24ohYu5; 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 3AED6606A32C; Fri, 20 Nov 2026 11:40:58 +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=1795174857; b=fUGt+OKQRNKz/1th9wppEZt1u8YXemp90wMSR9TauROKSI9EWd19ntEayufc3xRf0wkY niFaACZZlBSUUSrUYdNqf3F3odmywYpf0pobgsF6PotoQjRfT75orYLfWeiY1MHb0XpzX 2Cr3Wx69TveAvWzUDkZl0G72T7i/M9k6tnrvGgZZQfkFnvvDjmS8W4b+zuqHjLbAUX8al 9eBAvoWOcn1TnD/XAi2FRn+IgJV0psCwaPEqijmNF9tnotAXv8aVUd0z4pCfucTMO2V6/ 9t524WrG3VJPGMmLoctGyhrtEZ/hBW+CBwF+VCyP5APO+5PKX7PLALxvlsDPpW07f1A== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1795174857; 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=5sTfjmvRmInRg9bzSas7Pj5tLY1aYw/Q3j6D0qSG5DA=; b=o41U0kZrcYis4PmfFam5gh0uK1m+Of+zV8EMIQhpL3DVVKPYuDLMXCb2mrPeWotGtg3j RrMKELRUMSj3IevzY9tDjUgy5BrYJdb3s9UlkCkgvUkC/7mfS0bhN7HZWQO3kic0A+VxS Q8wB8iCgBigBH3JKu1IJjVOHxtNK6g7cR4a8U0Juh8uQY3j+gaZ6o3/xf9Wd99ISNY/Gy 7k1x4pczKWcKQ2VMiaS65kITtjdZTdSmGq79yCexqBFGk+W5p2SacfkxwHGJ2nh8TphxM PAL9l96Bi3OKJHSv2bqniBekwBgzKdPhaLXkdXkM0CsopcjmZuCVUOjVvlxoKcbv3tw== 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 352CB1F000D8; Fri, 20 Nov 2026 11:40:47 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1795174857; bh=5sTfjmvRmInRg9bzSas7Pj5tLY1aYw/Q3j6D0qSG5DA=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To; b=R24ohYu5kb/29/Mjxeu6qbnW+AxltB3RBuDFqYc9cz9O+2PUIVz+CW8SfGWTA7I7p 3Wvp0HRdKK2OnxhUZBSS6yM8MPtMHQByDGg8vqUsjuOGdkqR/h19QTHdNoilLCCckA xMGl9f94+TSatX/2i/T9/i+zzOoULO0PIt+N9DUF5750Ga18xe6l6/cuOvGUz6vE30 VKdt/DWsqNxI3g4V5LX6wujxEW0uR7EOLyPd9ZVACsJtbd/U718LYKEgB8CCDVdGqn /0VoLij2eP/LfcNMdBywNI9flmQELRS1sBD9/sAH8JHc7598UXhxIpEBvtuvwS8XnV Ni3sY3SyswH9Q== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id C039E4986F; Fri, 20 Nov 2026 11:40:46 +0000 (UTC) From: Ivan Pfarher via B4 Relay <devnull+ipfarher.gmail.com@kernel.org> Date: Fri, 20 Nov 2026 12:40:47 +0100 Subject: [PATCH 3/4] arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix USB peripheral mode X-Mailing-List: linux-sunxi@lists.linux.dev List-Id: <linux-sunxi.lists.linux.dev> List-Post: <mailto:linux-sunxi@lists.linux.dev> List-Help: <mailto:linux-sunxi+help@lists.linux.dev> List-Subscribe: <mailto:linux-sunxi+subscribe@lists.linux.dev> List-Unsubscribe: <mailto:linux-sunxi+unsubscribe@lists.linux.dev> List-Owner: <mailto:linux-sunxi+owner@lists.linux.dev> Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Message-Id: <20261120-orangepi-zero-plus2-fixes-v1-3-ecd792189f27@gmail.com> References: <20261120-orangepi-zero-plus2-fixes-v1-0-ecd792189f27@gmail.com> In-Reply-To: <20261120-orangepi-zero-plus2-fixes-v1-0-ecd792189f27@gmail.com> To: Rob Herring <robh@kernel.org>, Krzysztof Kozlowski <krzk+dt@kernel.org>, Conor Dooley <conor+dt@kernel.org>, Chen-Yu Tsai <wens@kernel.org>, Jernej Skrabec <jernej.skrabec@gmail.com>, Samuel Holland <samuel@sholland.org> Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, Ivan Pfarher <ipfarher@gmail.com> X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1795174845; l=2079; i=ipfarher@gmail.com; s=20261120; h=from:subject:message-id; bh=xNp8GjP59av7t0jD0DKAR+qLGNBv0iVBKlMlHOJX/bQ=; b=LYdIeAg0Z6D9hFAlocH2PSZCyaBHHy6WLerO7QNpZyL8gPTX5MGhRlVA/p/PhMwtgBawPihCa rdmDDcSs/jAA4Ylcsg0pIyPD2nV8r7aCpwj4HNwPn8qfRJX8icDs9kq 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 <ipfarher@gmail.com> Reply-To: ipfarher@gmail.com Content-Transfer-Encoding: 7bit X-Rspamd-Server: rspamd-worker-8404 X-Spamd-Result: default: False [3.31 / 15.00]; RBL_SENDERSCORE(2.00)[172.232.135.74:from]; SUSPICIOUS_RECIPS(1.50)[]; MAILLIST(-0.18)[generic]; MIME_GOOD(-0.10)[text/plain]; BAD_REP_POLICIES(0.10)[]; HAS_LIST_UNSUB(-0.01)[]; FROM_HAS_DN(0.00)[]; FORGED_SENDER_MAILLIST(0.00)[]; R_DKIM_ALLOW(0.00)[kernel.org:s=k20260515]; TAGGED_RCPT(0.00)[dt]; FREEMAIL_REPLYTO(0.00)[gmail.com]; REPLYTO_DOM_NEQ_FROM_DOM(0.00)[]; RCVD_COUNT_FIVE(0.00)[6]; FREEMAIL_CC(0.00)[vger.kernel.org,lists.infradead.org,lists.linux.dev,gmail.com]; DBL_BLOCKED_OPENRESOLVER(0.00)[sto.lore.kernel.org:helo,sto.lore.kernel.org:rdns]; HAS_REPLYTO(0.00)[ipfarher@gmail.com]; FROM_NEQ_ENVFROM(0.00)[devnull@kernel.org,linux-sunxi@lists.linux.dev]; TAGGED_FROM(0.00)[bounces-27913-noreply=patchwork.local,ipfarher.gmail.com]; DKIM_TRACE(0.00)[kernel.org:+]; DMARC_POLICY_ALLOW(0.00)[kernel.org,quarantine]; R_SPF_ALLOW(0.00)[+ip4:172.232.135.74]; RECEIVED_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[100.77.114.92:received,100.80.115.77:received,100.103.45.18:received]; TO_DN_SOME(0.00)[]; ARC_ALLOW(0.00)[kernel.org:s=arc20260519:i=3]; RCPT_COUNT_SEVEN(0.00)[10]; FORGED_RECIPIENTS_MAILLIST(0.00)[]; ASN(0.00)[asn:63949, ipnet:172.232.128.0/19, country:SG]; FREEMAIL_TO(0.00)[kernel.org,gmail.com,sholland.org]; RCVD_TLS_LAST(0.00)[]; MIME_TRACE(0.00)[0:+]; RBL_SPAMHAUS_BLOCKED_OPENRESOLVER(0.00)[172.232.135.74:from] X-Rspamd-Queue-Id: 108581C5E32 X-MORS-Enabled: yes X-MORS-DOMAIN: patchwork.local X-MORS-HOSTING: hosting172546 X-MORS-USER: hosting172546 X-getmail-retrieved-from-mailbox: INBOX |
| Series |
arm64: dts: allwinner: h5: orangepi-zero-plus2: Fix Bluetooth and USB gadget
|
|
Commit Message
Ivan Pfarher via B4 Relay
Nov. 20, 2026, 11:40 a.m. UTC
From: Ivan Pfarher <ipfarher@gmail.com> 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") Signed-off-by: Ivan Pfarher <ipfarher@gmail.com> --- arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 8 -------- 1 file changed, 8 deletions(-)
Comments
On Fri, Nov 20, 2026 at 7:40 PM Ivan Pfarher via B4 Relay <devnull+ipfarher.gmail.com@kernel.org> wrote: > > From: Ivan Pfarher <ipfarher@gmail.com> > > 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. 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. > 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") > Signed-off-by: Ivan Pfarher <ipfarher@gmail.com> Reviewed-by: Chen-Yu Tsai <wens@kernel.org> > --- > arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-zero-plus2.dts | 8 -------- > 1 file changed, 8 deletions(-) > > 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 5697251b9..892723b46 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 > @@ -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 > >
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 5697251b9..892723b46 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 @@ -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>;