Received: by 2002:a05:6358:1087:b0:cb:c9d3:cd90 with SMTP id j7csp249139rwi; Sun, 9 Oct 2022 22:51:11 -0700 (PDT) X-Google-Smtp-Source: AMsMyM6E8wHs1eZzcSOYC9FOoWVGunaUA/jEXuwZR4MrzTIEa9cg4Y7UPdjRGjusn8d9D+K0+9Hz X-Received: by 2002:aa7:cd4f:0:b0:458:6077:c3ac with SMTP id v15-20020aa7cd4f000000b004586077c3acmr16395250edw.32.1665381071022; Sun, 09 Oct 2022 22:51:11 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1665381071; cv=none; d=google.com; s=arc-20160816; b=gDqPTdZfMG0VTR81p7JG8QybBy263Gh09D55hC6yaClHel4mJfXuNSGjgpfJ4FpV4Z wcp4zNtuGt2ZFI3d9shUpYYu6xPn+Q0mOf0+MRTUGd1TVqBFerYFQxVo33UUabl1jIQw SxTuxpirF/Wq7TMHQxYIRr7mthxiB+DIBkMWzX8LpUDgqWJGjIzUPqYsCWJ9ZzVloXQT IzfubK7KTZ9YwnIx9LFAGTPoga8PnlOGx0UlPX4PVZi2B1mt5bsSUYjtAeTApI9acLSM 2n7QsKGLlkq5a78CIePtJx9zXs8Q+qvfy13qKbD6xbWcxwNyleIPFYxVw6F8iZEmQ4jN GviQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=BvNP4xbQKc1bUsOWjn8XHiczfhz1iMLqJDOofz5PmWQ=; b=RdYM5Cizf8mH6yY3WLp3yWTUAURLYLKKSLf5MKnTQHNuA3uVTXNLDOfqjlTIWWRrQZ RV+AniOhfU6eRQG2H2LWNTaTqjdNiTBAytqsF9u2LxKCHsfGJbI2ReVis/iYcS0Hugpp eqYs5FcqklhCrORfvCNjTW5k/bzU8t+MzNtnlRlkLrvo6pyI4LCDvZAMzggfiEN+scrC /PdwMIiYLbnWACswRugs8FXXbrng2R/wqKtHogpffWBEaxz79kNTpc538tA1wsfPsQq3 xJcW5+s+nXK0U5shHAsD/bba1+dDZjLQkRmzzfOVseM/rMiSp4ZpNnFSJMabsiroYl/z nzVg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rx0Ath96; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id hr29-20020a1709073f9d00b0077bbac643c7si11765555ejc.879.2022.10.09.22.50.45; Sun, 09 Oct 2022 22:51:11 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=rx0Ath96; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230510AbiJJFTp (ORCPT + 99 others); Mon, 10 Oct 2022 01:19:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55690 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230253AbiJJFTn (ORCPT ); Mon, 10 Oct 2022 01:19:43 -0400 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 55C396152 for ; Sun, 9 Oct 2022 22:19:40 -0700 (PDT) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by dfw.source.kernel.org (Postfix) with ESMTPS id 5AC3D60D14 for ; Mon, 10 Oct 2022 05:19:40 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id DE54BC433C1; Mon, 10 Oct 2022 05:19:38 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1665379179; bh=HaGmHno5erThB6Bn0fYha6MKL7fBwTI32d41TKkMykY=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=rx0Ath96VHMbEDYGaqMT2zQ13EDipPadTQEx2jmANH0z+EqDnRXyJ5jCfUSQR39l4 hM2hAOgxZJxZVGzZCm2vfqJ40g4iZNSTl5F/8KKsaaz8oaOrhwNbIOI+0nNr3O8uZm CxUZagacTpkavKoBpguBEz+13vr8LprmR7bbCW7KHKJrVnhd/yi3p7V7oHJ4ZpK4wI PpQLeOF5EYovk6x67XoPzeZ9ao/LHq8wXeWZ7IzoSzZooEOUnoKq3En7fPal+bxmWB n57dJTtkCirZRO8b4/JdSGJQcC+z4mpAllzBL/FSZOndJPt0NyoL/pFejO5BEj15Dy MIJE0rBJWSUBQ== Date: Mon, 10 Oct 2022 10:49:35 +0530 From: Vinod Koul To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: "linux-phy@lists.infradead.org" , "linux-kernel@vger.kernel.org" Subject: Re: [PATCH] phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on Message-ID: References: <20220920121154.30115-1-pali@kernel.org> <20220921050300.riwyofdncxscrwe3@shindev> <20220921080557.jdg5wywpa5qxcyo2@pali> <20220924083127.oht57ivvsr4obrjr@pali> <20220930234541.hsf6ryketcdukpia@pali> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220930234541.hsf6ryketcdukpia@pali> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On 01-10-22, 01:45, Pali Roh?r wrote: > On Saturday 24 September 2022 10:31:27 Pali Roh?r wrote: > > On Saturday 24 September 2022 12:44:49 Vinod Koul wrote: > > > On 21-09-22, 10:05, Pali Roh?r wrote: > > > > On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote: > > > > > On Sep 20, 2022 / 14:11, Pali Roh?r wrote: > > > > > > Turris MOX board with older ARM Trusted Firmware version v1.5 is not able > > > > > > to detect any USB 3.0 device connected to USB-A port on Mox-A module after > > > > > > commit 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken > > > > > > reset support"). On the other hand USB 2.0 devices connected to the same > > > > > > USB-A port are working fine. > > > > > > > > > > > > It looks as if the older firmware configures COMPHY registers for USB 3.0 > > > > > > somehow incompatibly for kernel driver. Experiments show that resetting > > > > > > COMPHY registers via setting SFT_RST auto-clearing bit in COMPHY_SFT_RESET > > > > > > register fixes this issue. > > > > > > > > > > > > Reset the COMPHY in mvebu_a3700_comphy_usb3_power_on() function as a first > > > > > > step after selecting COMPHY lane and USB 3.0 function. With this change > > > > > > Turris MOX board can successfully detect USB 3.0 devices again. > > > > > > > > > > > > Before the above mentioned commit this reset was implemented in PHY reset > > > > > > method, so this is the reason why there was no issue with older firmware > > > > > > version then. > > > > > > > > > > > > Fixes: 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support") > > > > > > Reported-by: Marek Beh?n > > > > > > Signed-off-by: Pali Roh?r > > > > > > --- > > > > > > Shinichiro, could you please check that all USB functionality still > > > > > > works correctly on your board? > > > > > > --- > > > > > > > > > > Sure. TL;DR, this patch works ok for my espressobin v7 board. > > > > > > > > > > Tested-by: Shin'ichiro Kawasaki > > > > > > > > > > I prepared base kernel v5.19.10 applying the commit 0a6fc70d76bd. Regardless > > > > > whether this fix patch for Turrix MOX board is applied or not, two USB ports on > > > > > my esprssobin v7 board worked as expected. I confirmed it by using USB thumb > > > > > drive. The drive was detected and its partition was mounted successfully using > > > > > either of the two USB ports. > > > > > > > > Thank you for testing! Anyway, please check that USB 3.0 device is > > > > working fine. Because as I wrote in commit message, on Turris Mox was > > > > USB 2.0 device working fine, but USB 3.0 not. And maybe check in system > > > > > > update the log now? > > > > What do you want to update? > > Vinod, could you describe a bit more what is needed to update? Because > this patch fixes regression - USB 3.0 support on Turris Mox board. Sorry to have missed this... Somehow I misunderstood that the USB 3.0 was not working and log needs update... I will apply this once merge window closes -- ~Vinod