lkml.org 
[lkml]   [2022]   [Sep]   [21]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectRe: [PATCH] phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on
Date
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 <kabel@kernel.org>
> Signed-off-by: Pali Rohár <pali@kernel.org>
> ---
> 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 <shinichiro.kawasaki@wdc.com>

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.

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
\
 
 \ /
  Last update: 2022-09-21 07:03    [W:0.071 / U:0.404 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site