Linux SCSI subsystem development
 help / color / mirror / Atom feed
* [PATCH v2] scsi: ufs: drockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item
@ 2026-03-12  0:51 Shawn Lin
  2026-03-12 14:27 ` Bart Van Assche
  0 siblings, 1 reply; 4+ messages in thread
From: Shawn Lin @ 2026-03-12  0:51 UTC (permalink / raw)
  To: James E . J . Bottomley, Martin K . Petersen, Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-scsi, linux-rockchip, Shawn Lin

Add the mphy reset property to the devicetree bindings for the Rockchip
RK3576 UFS host controller. The mphy reset signal is used to reset the
physical adapter. Resetting other components while leaving the mphy
unreset may occasionally prevent the UFS controller from successfully
linking up with the device.

This addresses an intermittent hardware bug where the UFS link fails to
establish under specific timing conditions with certain chips. While
difficult to reproduce initially, this issue was consistently observed in
downstream testing and requires explicit mphy reset control for full
stability.

Although this change increases the maxItems for resets and adds a new
entry (which technically alters the binding ABI), it does not break
compatibility for existing Linux systems. The driver uses
devm_reset_control_array_get_exclusive() to manage resets, allowing it
to function correctly with both older Device Trees (without the mphy
entry) and newer ones.

Fixes: d90e92023771 ("scsi: ufs: dt-bindings: Document Rockchip UFS host controller")
Signed-off-by: Shawn Lin <shawn.lin@rock-chips.com>
---

Changes in v2:
- update commit msg to indicate Linux is not affected and describe the
  what is happended(Krzysztof)

 Documentation/devicetree/bindings/ufs/rockchip,rk3576-ufshc.yaml | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/ufs/rockchip,rk3576-ufshc.yaml b/Documentation/devicetree/bindings/ufs/rockchip,rk3576-ufshc.yaml
index c7d17cf4..e738153 100644
--- a/Documentation/devicetree/bindings/ufs/rockchip,rk3576-ufshc.yaml
+++ b/Documentation/devicetree/bindings/ufs/rockchip,rk3576-ufshc.yaml
@@ -41,7 +41,7 @@ properties:
     maxItems: 1
 
   resets:
-    maxItems: 4
+    maxItems: 5
 
   reset-names:
     items:
@@ -49,6 +49,7 @@ properties:
       - const: sys
       - const: ufs
       - const: grf
+      - const: mphy
 
   reset-gpios:
     maxItems: 1
@@ -98,8 +99,8 @@ examples:
             interrupts = <GIC_SPI 361 IRQ_TYPE_LEVEL_HIGH>;
             power-domains = <&power RK3576_PD_USB>;
             resets = <&cru SRST_A_UFS_BIU>, <&cru SRST_A_UFS_SYS>, <&cru SRST_A_UFS>,
-                     <&cru SRST_P_UFS_GRF>;
-            reset-names = "biu", "sys", "ufs", "grf";
+                     <&cru SRST_P_UFS_GRF>, <&cru SRST_MPHY_INIT>;
+            reset-names = "biu", "sys", "ufs", "grf", "mphy";
             reset-gpios = <&gpio4 RK_PD0 GPIO_ACTIVE_LOW>;
         };
     };
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] scsi: ufs: drockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item
  2026-03-12  0:51 [PATCH v2] scsi: ufs: drockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item Shawn Lin
@ 2026-03-12 14:27 ` Bart Van Assche
  2026-03-12 17:56   ` Conor Dooley
  2026-03-13  2:12   ` Shawn Lin
  0 siblings, 2 replies; 4+ messages in thread
From: Bart Van Assche @ 2026-03-12 14:27 UTC (permalink / raw)
  To: Shawn Lin, James E . J . Bottomley, Martin K . Petersen,
	Heiko Stuebner
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	linux-scsi, linux-rockchip


On 3/11/26 5:51 PM, Shawn Lin wrote:
> Add the mphy reset property to the devicetree bindings for the Rockchip
> RK3576 UFS host controller. The mphy reset signal is used to reset the
> physical adapter. Resetting other components while leaving the mphy
> unreset may occasionally prevent the UFS controller from successfully
> linking up with the device.

I see "drockchip" in the patch subject instead of "rockchip". Is that 
perhaps a typo?

Bart.

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] scsi: ufs: drockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item
  2026-03-12 14:27 ` Bart Van Assche
@ 2026-03-12 17:56   ` Conor Dooley
  2026-03-13  2:12   ` Shawn Lin
  1 sibling, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-03-12 17:56 UTC (permalink / raw)
  To: Bart Van Assche
  Cc: Shawn Lin, James E . J . Bottomley, Martin K . Petersen,
	Heiko Stuebner, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-scsi, linux-rockchip

[-- Attachment #1: Type: text/plain, Size: 764 bytes --]

On Thu, Mar 12, 2026 at 07:27:37AM -0700, Bart Van Assche wrote:
> 
> On 3/11/26 5:51 PM, Shawn Lin wrote:
> > Add the mphy reset property to the devicetree bindings for the Rockchip
> > RK3576 UFS host controller. The mphy reset signal is used to reset the
> > physical adapter. Resetting other components while leaving the mphy
> > unreset may occasionally prevent the UFS controller from successfully
> > linking up with the device.
> 
> I see "drockchip" in the patch subject instead of "rockchip". Is that
> perhaps a typo?
> 
The whole $subject is a bit of a mess I feel. "scsi: ufs: dt-bindings"
is fine, a few subsystems use that instead of "dt-bindings: scsi: ufs",
but putting the compatible/filename before "dt-bindings:" is not right.


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH v2] scsi: ufs: drockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item
  2026-03-12 14:27 ` Bart Van Assche
  2026-03-12 17:56   ` Conor Dooley
@ 2026-03-13  2:12   ` Shawn Lin
  1 sibling, 0 replies; 4+ messages in thread
From: Shawn Lin @ 2026-03-13  2:12 UTC (permalink / raw)
  To: Bart Van Assche, James E . J . Bottomley, Martin K . Petersen,
	Heiko Stuebner
  Cc: shawn.lin, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree, linux-scsi, linux-rockchip

在 2026/03/12 星期四 22:27, Bart Van Assche 写道:
> 
> On 3/11/26 5:51 PM, Shawn Lin wrote:
>> Add the mphy reset property to the devicetree bindings for the Rockchip
>> RK3576 UFS host controller. The mphy reset signal is used to reset the
>> physical adapter. Resetting other components while leaving the mphy
>> unreset may occasionally prevent the UFS controller from successfully
>> linking up with the device.
> 
> I see "drockchip" in the patch subject instead of "rockchip". Is that 
> perhaps a typo?

Ah, my bad. Thanks for noticing this. Will fix it.

> 
> Bart.
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip
> 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-03-13  2:12 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-12  0:51 [PATCH v2] scsi: ufs: drockchip,rk3576-ufshc: dt-bindings: Add new mphy reset item Shawn Lin
2026-03-12 14:27 ` Bart Van Assche
2026-03-12 17:56   ` Conor Dooley
2026-03-13  2:12   ` Shawn Lin

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox