Skip to contentSkip to conversation

phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on

PATCH In review Pali Rohár 3 participants 11 messages Sep 20, 2022 – Oct 17, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 phy: marvell: phy-mvebu-a3700-comphy: Reset COMPHY registers before USB 3.0 power on

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")

---
Shinichiro, could you please check that all USB functionality still works correctly on your board?

---
 drivers/phy/marvell/phy-mvebu-a3700-comphy.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/phy/marvell/phy-mvebu-a3700-comphy.c +3 -0
index 67712c77d806..d641b345afa3 100644
@@ -826,6 +826,9 @@ mvebu_a3700_comphy_usb3_power_on(struct mvebu_a3700_comphy_lane *lane)
 	if (ret)
 		return ret;
 
+	/* COMPHY register reset (cleared automatically) */
+	comphy_lane_reg_set(lane, COMPHY_SFT_RESET, SFT_RST, SFT_RST);
+
 	/*
 	 * 0. Set PHY OTG Control(0x5d034), bit 4, Power up OTG module The
 	 * register belong to UTMI module, so it is set in UTMI phy driver.
Signature · 7 lines
2.20.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
Tested-by on v1 1/1
#1 lore raw
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

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.

Signature · 5 lines
Shin'ichiro Kawasaki
-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
#2 lore raw
Quoted 30 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

Quoted 7 lines

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

Quoted 7 lines

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.

Signature · 1 line
Shin'ichiro Kawasaki
#3 lore raw
Quoted 39 lines · Pali Rohár
Quoted 30 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

Quoted 7 lines

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.

Quoted 5 lines

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

Ah, I see. For that check, I connected my USB 3.1 drive to the USB 3.0 port of my espressobin, then checked 'lsusb -vt' and sysfs:

$ lsusb -vt
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 0781:5583 SanDisk Corp. Ultra Fit
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=orion-ehci/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
$ cat /sys/bus/usb/devices/3-1/version 
 3.00

USB3 port is listed under the Bus 03, "3.0" root hub. According to sysfs, its USB version is 3.00. I observed same outputs with and without the patch for Turris MOX board.

Are these good enough? If other check is needed, please let me know.

Signature · 1 line
Shin'ichiro Kawasaki
#4 lore raw
Quoted 59 lines · On Wednesday 21 September 2022 12:44:58 Shinichiro Kawasaki wrote:
Quoted 39 lines · Pali Rohár
Quoted 30 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

Quoted 7 lines

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.

Quoted 5 lines

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

Ah, I see. For that check, I connected my USB 3.1 drive to the USB 3.0 port of my espressobin, then checked 'lsusb -vt' and sysfs:

$ lsusb -vt
/:  Bus 03.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 5000M
    ID 1d6b:0003 Linux Foundation 3.0 root hub
    |__ Port 1: Dev 2, If 0, Class=Mass Storage, Driver=usb-storage, 5000M
        ID 0781:5583 SanDisk Corp. Ultra Fit
/:  Bus 02.Port 1: Dev 1, Class=root_hub, Driver=xhci-hcd/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
/:  Bus 01.Port 1: Dev 1, Class=root_hub, Driver=orion-ehci/1p, 480M
    ID 1d6b:0002 Linux Foundation 2.0 root hub
Quoted 8 lines
$ cat /sys/bus/usb/devices/3-1/version 
 3.00

USB3 port is listed under the Bus 03, "3.0" root hub. According to sysfs, its USB version is 3.00. I observed same outputs with and without the patch for Turris MOX board.

Are these good enough? If other check is needed, please let me know.

Perfect, that is enough! If USB 3.1 drive is detected and working then everything is OK.

Signature · 3 lines
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
maintainer
#5 lore raw
In reply to Pali Rohár
Quoted 39 lines · Pali Rohár
Quoted 30 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

Quoted 7 lines

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.

Quoted 3 lines

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?

Quoted 10 lines

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

Quoted 7 lines

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.

Signature · 1 line
Shin'ichiro Kawasaki
Signature · 6 lines
~Vinod

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
#6 lore raw
Quoted 40 lines · On Saturday 24 September 2022 12:44:49 Vinod Koul wrote:
Quoted 39 lines · Pali Rohár
Quoted 37 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

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.

Quoted 5 lines
Quoted 3 lines

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?

Quoted 13 lines
Quoted 10 lines

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

Quoted 7 lines

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.

Signature · 1 line
Shin'ichiro Kawasaki
Signature · 1 line
~Vinod
#7 lore raw
Quoted 41 lines · On Saturday 24 September 2022 10:31:27 Pali Rohár wrote:
Quoted 40 lines · On Saturday 24 September 2022 12:44:49 Vinod Koul wrote:
Quoted 39 lines · Pali Rohár
Quoted 37 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 13 lines
Quoted 13 lines
Quoted 10 lines

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

Quoted 7 lines

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.

Signature · 1 line
Shin'ichiro Kawasaki
Signature · 1 line
~Vinod
Signature · 3 lines
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
#8 lore raw

Vinod: PING?

Quoted 66 lines · On Saturday 01 October 2022 01:45:41 Pali Rohár wrote:
Quoted 41 lines · On Saturday 24 September 2022 10:31:27 Pali Rohár wrote:
Quoted 40 lines · On Saturday 24 September 2022 12:44:49 Vinod Koul wrote:
Quoted 39 lines · Pali Rohár
Quoted 37 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

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.

Quoted 7 lines
Quoted 5 lines
Quoted 3 lines

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.

Quoted 13 lines
Quoted 13 lines
Quoted 10 lines

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

Quoted 7 lines

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.

Signature · 1 line
Shin'ichiro Kawasaki
Signature · 1 line
~Vinod
Signature · 3 lines
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
maintainer
#9 lore raw
In reply to Pali Rohár
Quoted 46 lines · Pali Rohár
Quoted 45 lines · On Saturday 24 September 2022 10:31:27 Pali Rohár wrote:
Quoted 44 lines · On Saturday 24 September 2022 12:44:49 Vinod Koul wrote:
Quoted 42 lines · Pali Rohár
Quoted 30 lines · On Wednesday 21 September 2022 05:03:01 Shinichiro Kawasaki wrote:
Quoted 19 lines · Pali Rohár

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.

Quoted 7 lines
Fixes 0a6fc70d76bd ("phy: marvell: phy-mvebu-a3700-comphy: Remove broken reset support")

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

Quoted 7 lines

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

Quoted 6 lines
Quoted 3 lines
Quoted 1 line

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

Signature · 6 lines
~Vinod

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
maintainer
#10 lore raw
Quoted 11 lines · Vinod Koul
Quoted 5 lines · Pali Rohár

On Saturday 24 September 2022 10:31:27 Pali Rohár wrote:

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

Applied now, thanks

Signature · 6 lines
~Vinod

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy