All of lore.kernel.org
 help / color / mirror / Atom feed
From: Vinod Koul <vkoul@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: "linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on
Date: Mon, 10 Oct 2022 10:49:35 +0530	[thread overview]
Message-ID: <Y0OrZ8d4GBC0Cp8q@matsya> (raw)
In-Reply-To: <20220930234541.hsf6ryketcdukpia@pali>

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 <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.
> > > > 
> > > > 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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

WARNING: multiple messages have this Message-ID (diff)
From: Vinod Koul <vkoul@kernel.org>
To: "Pali Rohár" <pali@kernel.org>
Cc: "linux-phy@lists.infradead.org" <linux-phy@lists.infradead.org>,
	"linux-kernel@vger.kernel.org" <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH] phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on
Date: Mon, 10 Oct 2022 10:49:35 +0530	[thread overview]
Message-ID: <Y0OrZ8d4GBC0Cp8q@matsya> (raw)
In-Reply-To: <20220930234541.hsf6ryketcdukpia@pali>

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 <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.
> > > > 
> > > > 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

  parent reply	other threads:[~2022-10-10  5:19 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-09-20 12:11 [PATCH] phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on Pali Rohár
2022-09-20 12:11 ` Pali Rohár
2022-09-21  5:03 ` Shinichiro Kawasaki
2022-09-21  5:03   ` Shinichiro Kawasaki
2022-09-21  8:05   ` Pali Rohár
2022-09-21  8:05     ` Pali Rohár
2022-09-21 12:44     ` Shinichiro Kawasaki
2022-09-21 12:44       ` Shinichiro Kawasaki
2022-09-21 12:57       ` Pali Rohár
2022-09-21 12:57         ` Pali Rohár
2022-09-24  7:14     ` Vinod Koul
2022-09-24  7:14       ` Vinod Koul
2022-09-24  8:31       ` Pali Rohár
2022-09-24  8:31         ` Pali Rohár
2022-09-30 23:45         ` Pali Rohár
2022-09-30 23:45           ` Pali Rohár
2022-10-09 12:07           ` Pali Rohár
2022-10-09 12:07             ` Pali Rohár
2022-10-10  5:19           ` Vinod Koul [this message]
2022-10-10  5:19             ` Vinod Koul
2022-10-17  5:39             ` Vinod Koul
2022-10-17  5:39               ` Vinod Koul

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=Y0OrZ8d4GBC0Cp8q@matsya \
    --to=vkoul@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=pali@kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.