Received: by 2002:a05:6359:c8b:b0:c7:702f:21d4 with SMTP id go11csp1982824rwb; Sat, 24 Sep 2022 00:25:20 -0700 (PDT) X-Google-Smtp-Source: AMsMyM61KCczqPLgEek4X00hAnQP3haBaEKCvQfjJUe0KwjKx3ZwysgLtDVZzXI8LLO3D+2PQRY8 X-Received: by 2002:a17:90b:1918:b0:200:ab1a:f47 with SMTP id mp24-20020a17090b191800b00200ab1a0f47mr13484216pjb.33.1664004320294; Sat, 24 Sep 2022 00:25:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1664004320; cv=none; d=google.com; s=arc-20160816; b=fTBzt91uMekeR8GASUKFdBMPbJ14IdL6vEdeUnL49eCvVftSdhfFXaTdxQ/O3mLSKJ yVXna9OsQQYtuZHquRT1LMwgPdImLhK02I8zynSUsrqvD+a5+scxX+kx4mwBfAxc6X17 eJD9U56y28k+txHgnpGwHfx8gnzRL68m2akHQwD3Y1VlVAUxvmyyxi21n3UqDmAamgjB q2DJvztO7BkIMVBorwJgPfY5S6dzmzNsYpoRbBSmG02+mBfkpyFu3zEOyRN6u3i1syFJ HgyVY3gW35WlXJ2gqUYHWpjWnTFm69lYPH6wqZBvItqd73yGwe8EkEu8dQ3oMLLF1sUh kaOQ== 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=y4pNVci/VSvAmlWakqGMmwAXofYgGwWGuVXXKF+HXc0=; b=x/242Q+jAUECZJQV1EVuSsaHfinbVTwnan+M2ClCOYWuzZ7wlVgAROT1cmEAdmWT/e BUHCyo2+8UkUWWScy8zjVQElh68lCOUAKK1uZ0ynq/ToIs6AWtysnZ8F1MYYhu1x2nsT kRsryrpxX4kUPW5plynMJWrREERPx4MlM6ve6vGzcbpvfyIzRTGRL8wJLHp4cyM+G27S eW2K52Bcyv33yfOESsEtUrsZHZ6Sj3b63VO5jlXbhaZkfQrU0GJoEKINjwaNR4NdegFp b0ynsqnI394T0p8D58qIBA67eP6H0wxYC7t4r2xC0Gy+JHcq9A2IC1MHMWzmbZ/4wq1Z H/nQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=nY+K2jom; 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 j3-20020a170903028300b0017824f38242si6181656plr.75.2022.09.24.00.24.59; Sat, 24 Sep 2022 00:25:20 -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=nY+K2jom; 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 S233294AbiIXHPA (ORCPT + 99 others); Sat, 24 Sep 2022 03:15:00 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:47832 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229556AbiIXHO5 (ORCPT ); Sat, 24 Sep 2022 03:14:57 -0400 Received: from ams.source.kernel.org (ams.source.kernel.org [IPv6:2604:1380:4601:e00::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 7F88B1CB29 for ; Sat, 24 Sep 2022 00:14:55 -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 ams.source.kernel.org (Postfix) with ESMTPS id 32133B80D83 for ; Sat, 24 Sep 2022 07:14:54 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 503F7C433C1; Sat, 24 Sep 2022 07:14:52 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1664003692; bh=yFTm/FVYOxOnX82hlQYnJ9zyQLMQStELUrkKWp1iBOU=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=nY+K2jomYMCfKj7L0KM9IkUlMAIE4FpVCt1dwg1e7k2TKImmhwsppEKH3KNjxfczz ObroygEtNfJqyL07zQ+Nh2NjzOL6Iib9TvttHlMgWIU8j0S1h2YSidHaO04QAjX9y1 O14zCg9CpuYBT3+iVmvn59pGZvs/NoYf19m6p+c68jRoyddoKDdZoBmGddo2BCK6Mi Nxdq/3iQHqZGQ0DfoHflCvr4AwdHr/+GgsFB7eT9mfg+Hspk/63dXWoqHnxxcz4UFu dXgiQZzcNY2l/OOUBJNjClYt/7qQA03NTKktxYvf6I1cJSaZHdO4Vw6mOPpSjMJSir 3wJgJthUxgSkw== Date: Sat, 24 Sep 2022 12:44:49 +0530 From: Vinod Koul To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Shinichiro Kawasaki , Miquel Raynal , Kishon Vijay Abraham I , "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> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220921080557.jdg5wywpa5qxcyo2@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 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? > (lsusb) that USB 3.0 device was really detected as USB 3.0 because USB > 3.0 devices have supported also fallback USB 2.0/1.x legacy mode. > > > I also confirmed SATA port is ok (my SSD card was detected without error > > message) and three network ports works ok ("Link is Up" message on network cable > > connection). I did same confirmations with the latest firmware (TF-A and U-boot) > > and old firmware (with version date in 2017). All looks good for me. > > > > -- > > Shin'ichiro Kawasaki -- ~Vinod