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 6220F606A32D for ; Fri, 4 Dec 2026 03:23:49 +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=vl6SaQau; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.a=rsa-sha256 header.s=korg header.b=Vw2LFmzX DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:In-Reply-To:Content-Type: MIME-Version:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Unsubscribe-Post:List-Owner; bh=Dvia8DZymqTwZjNQn4D642W9uXFgkYr5yGNh4lp1IxI=; b=vl6SaQaueYq8+urr79YU1DGUr1 Olfz5+4eGnCp52AC4VzOrH1APxG7FbUi8PVtQYFclLymY3SJbGwpQaojR8yxeRBxlZGEnj/seMtbz GFqKounMc0vAMTNkQjymN/wWtN68csZjCnNb9/99VBaeE6acqFCrlAUVVZ37iLEaCNKDj6dTmBeEp WZMgpc4F3G7LLT8AU8uyAej/lL6RTSc86hXjrdukjEWDw2gCVlQHgMfagCRtIgCxBXXQXhYGJ7D91 PdazpOZBqiU38yTTA41SOSNu+QTi/8suQVzbUGyz5pUiMAi12Fgy4llIRNxvS+EXlhyrOrAKp6/v8 Axu31FDw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZJtP-0000000GWSS-3Wf5; Fri, 04 Dec 2026 03:23:27 +0000 Received: from sea.source.kernel.org ([2600:3c0a:e001:78e:0:1991:8:25]) by bombadil.infradead.org with esmtps (Exim 4.100.1 #2 (Red Hat Linux)) id 1xZJtJ-0000000GWRL-00yO; Fri, 04 Dec 2026 03:23:24 +0000 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) by sea.source.kernel.org (Postfix) with ESMTP id B3CB842475; Fri, 4 Dec 2026 03:23:20 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 0629A1F000C2; Fri, 4 Dec 2026 03:23:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1796354600; bh=Dvia8DZymqTwZjNQn4D642W9uXFgkYr5yGNh4lp1IxI=; h=Date:From:To:Cc:Subject:References:In-Reply-To; b=Vw2LFmzXardasZ97N8qXIxhj8bdjsm5fDtnsKx66H371xsDHuTtXVP+Vvs/uW6gNB wT/EV1ZkgHwrFCX7S1Jt9Y69Q6TPmdZSg8u7L1eAvH6Andf/MMpSOcEYDwvXdALnIb M+Szzcw43WctjfriFeiFOXC7ta6tBUhPhcGqAiZk= Date: Thu, 3 Dec 2026 18:49:19 +0100 From: Greg Kroah-Hartman To: admin@roadbobek.com Cc: Bin Liu , Chen-Yu Tsai , Jernej Skrabec , Samuel Holland , Philipp Zabel , Vinod Koul , Neil Armstrong , Manivannan Sadhasivam , Hans de Goede , Felipe Balbi , Kishon Vijay Abraham I , Maxime Ripard , Andre Przywara , linux-usb@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-sunxi@lists.linux.dev, linux-kernel@vger.kernel.org, linux-phy@lists.infradead.org Subject: Re: [PATCH v2 1/3] usb: musb: sunxi: Assert reset before deasserting on init Message-ID: <2026120358-doorbell-isolation-91c8@gregkh> References: <20261123-usb-sunxi-reset-fix-v2-0-4e51d3a64964@roadbobek.com> <20261123-usb-sunxi-reset-fix-v2-1-4e51d3a64964@roadbobek.com> X-Archived-By: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20261123-usb-sunxi-reset-fix-v2-1-4e51d3a64964@roadbobek.com> 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: , Sender: "linux-arm-kernel" X-Spam-Status: No, score=-14.8 required=3.0 tests=BAYES_00,DATE_IN_PAST_06_12, 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 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 Mon, Nov 23, 2026 at 06:54:07AM +0000, Bobek Brzeczyszczykiewicz via B4 Relay wrote: > From: Bobek Brzeczyszczykiewicz > > When a bootloader such as U-Boot (for example with > CONFIG_USB_MUSB_HOST=y) initializes MUSB and boots Linux without > stopping USB first, the controller reset line is already deasserted at > probe time. > > In that case reset_control_deassert() in sunxi_musb_init() is a no-op > and stale MUSB register state persists across boot. On Allwinner A33, > MUSB stays wedged in a_wait_bcon with DevCtl=0x99, Power=0xf0, and a > frozen Frame counter even across hot-unplug and replug. > > Request exclusive reset control via devm_reset_control_get_exclusive() > and assert glue->rst briefly before deasserting it when > SUNXI_MUSB_FL_HAS_RESET is set so MUSB starts cleanly. > > Tested on an Allwinner A33 Q8 tablet (Laser MID-786). > > Fixes: 132e23775779 ("usb: musb: sunxi: Add support for musb controller in A31 SoC") > Signed-off-by: Bobek Brzeczyszczykiewicz > --- > drivers/usb/musb/sunxi.c | 5 ++++- > 1 file changed, 4 insertions(+), 1 deletion(-) > > diff --git a/drivers/usb/musb/sunxi.c b/drivers/usb/musb/sunxi.c > index a17b1c150626..5f63d519237b 100644 > --- a/drivers/usb/musb/sunxi.c > +++ b/drivers/usb/musb/sunxi.c > @@ -9,6 +9,7 @@ > */ > > #include > +#include > #include > #include > #include > @@ -239,6 +240,8 @@ static int sunxi_musb_init(struct musb *musb) > goto error_sram_release; > > if (test_bit(SUNXI_MUSB_FL_HAS_RESET, &glue->flags)) { > + reset_control_assert(glue->rst); > + usleep_range(10, 20); fsleep()? And check the result of reset_control_assert()? thanks, greg k-h