Linux ARM-MSM sub-architecture
 help / color / mirror / Atom feed
* [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS
@ 2026-09-09 17:13 Jan Paszkowski
  2026-09-09 17:13 ` [PATCH 1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS Jan Paszkowski
  2026-09-18  1:49 ` (subset) [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS Bjorn Andersson
  0 siblings, 2 replies; 4+ messages in thread
From: Jan Paszkowski @ 2026-09-09 17:13 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree
  Cc: marijn.suijten, Jan Paszkowski

This patch is about turning on the UFS for the sony xperia sagami
platform.

The patch is small, but due to the grave risk of the patch combined with
my inexperience I wanted to write this cover letter.

While digging through the reasons for the UFS bug in sony devices, I
stumbled upon a downstream workaround in the initial commit for
sm8250-sony-xperia devices [1]. The workaround did not mention the
sagami platform. Looking through android patches for UFS for the sony
sagami copyleft kernel, they seemed to be minor compared to previous
generations[2].

With that I got a spare pdx215 to try this on. I compiled a kernel with
postmarketOS tools. Normal flashing of pmOS on a single partition seemed
to not work, though the UFS device was visible when booting on the sd
card. That said both split flashing of pmOS onto two partitions and
formating partitions worked, at least for super and userdata with ext4.
The booted device detected the partitions and even worked without the sd
card. With that I wanted to send it to the mailing lists in case the bug
is gone this generation.

I guess that most likely I am missing something. If so please respond to
this series. I am happy to test  further to make sure it won't brick
anybody's device.

[1] https://github.com/kholk/kernel/commit/2e7a9ee1c91a016baa0b826a7752ec45663a0561
[2] https://github.com/sonyxperiadev/kernel-copyleft/tree/61.0.A.11.xxx


Jan Paszkowski (1):
  arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS

 .../dts/qcom/sm8350-sony-xperia-sagami.dtsi     | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

-- 
2.55.0


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

* [PATCH 1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS
  2026-09-09 17:13 [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS Jan Paszkowski
@ 2026-09-09 17:13 ` Jan Paszkowski
  2026-09-09 19:07   ` Dmitry Baryshkov
  2026-09-18  1:49 ` (subset) [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS Bjorn Andersson
  1 sibling, 1 reply; 4+ messages in thread
From: Jan Paszkowski @ 2026-09-09 17:13 UTC (permalink / raw)
  To: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree
  Cc: marijn.suijten, Jan Paszkowski

The UFS bug that haunted the Sony devices seems to be gone this
generation. This patch enables it for the ability to use internal
storage.

Signed-off-by: Jan Paszkowski <jan.m.paszkowski@gmail.com>
---
 .../dts/qcom/sm8350-sony-xperia-sagami.dtsi     | 17 ++++++++++++++---
 1 file changed, 14 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
index 4b62ee50da7b..969c8cb31df9 100644
--- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
@@ -893,9 +893,20 @@ sdc2_card_det_sleep: sd-card-det-sleep-state {
 	};
 };
 
-/* BIG WARNING! DO NOT TOUCH UFS, YOUR DEVICE WILL DIE! */
-&ufs_mem_hc { status = "disabled"; };
-&ufs_mem_phy { status = "disabled"; };
+&ufs_mem_hc {
+	status = "okay";
+	reset-gpios = <&tlmm 203 GPIO_ACTIVE_LOW>;
+	vcc-supply = <&pm8350_l7>;
+	vcc-max-microamp = <800000>;
+	vccq-supply = <&pm8350_l9>;
+	vcc-max-microamp = <900000>;
+};
+
+&ufs_mem_phy {
+	status = "okay";
+	vdda-phy-supply = <&pm8350_l5>;
+	vdda-pll-supply = <&pm8350_l6>;
+};
 
 &usb_1 {
 	status = "okay";
-- 
2.55.0


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

* Re: [PATCH 1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS
  2026-09-09 17:13 ` [PATCH 1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS Jan Paszkowski
@ 2026-09-09 19:07   ` Dmitry Baryshkov
  0 siblings, 0 replies; 4+ messages in thread
From: Dmitry Baryshkov @ 2026-09-09 19:07 UTC (permalink / raw)
  To: Jan Paszkowski
  Cc: andersson, konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm,
	devicetree, marijn.suijten

On Wed, Sep 09, 2026 at 07:13:12PM +0200, Jan Paszkowski wrote:
> The UFS bug that haunted the Sony devices seems to be gone this
> generation. This patch enables it for the ability to use internal
> storage.
> 
> Signed-off-by: Jan Paszkowski <jan.m.paszkowski@gmail.com>
> ---
>  .../dts/qcom/sm8350-sony-xperia-sagami.dtsi     | 17 ++++++++++++++---
>  1 file changed, 14 insertions(+), 3 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> index 4b62ee50da7b..969c8cb31df9 100644
> --- a/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sm8350-sony-xperia-sagami.dtsi
> @@ -893,9 +893,20 @@ sdc2_card_det_sleep: sd-card-det-sleep-state {
>  	};
>  };
>  
> -/* BIG WARNING! DO NOT TOUCH UFS, YOUR DEVICE WILL DIE! */

You were brave.


Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>



-- 
With best wishes
Dmitry

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

* Re: (subset) [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS
  2026-09-09 17:13 [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS Jan Paszkowski
  2026-09-09 17:13 ` [PATCH 1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS Jan Paszkowski
@ 2026-09-18  1:49 ` Bjorn Andersson
  1 sibling, 0 replies; 4+ messages in thread
From: Bjorn Andersson @ 2026-09-18  1:49 UTC (permalink / raw)
  To: konradybcio, robh, krzk+dt, conor+dt, linux-arm-msm, devicetree,
	Jan Paszkowski
  Cc: marijn.suijten


On Wed, 09 Sep 2026 19:13:11 +0200, Jan Paszkowski wrote:
> This patch is about turning on the UFS for the sony xperia sagami
> platform.
> 
> The patch is small, but due to the grave risk of the patch combined with
> my inexperience I wanted to write this cover letter.
> 
> While digging through the reasons for the UFS bug in sony devices, I
> stumbled upon a downstream workaround in the initial commit for
> sm8250-sony-xperia devices [1]. The workaround did not mention the
> sagami platform. Looking through android patches for UFS for the sony
> sagami copyleft kernel, they seemed to be minor compared to previous
> generations[2].
> 
> [...]

Applied, thanks!

[1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS
      commit: 8271e751016e30751a753916167d02b3fc27e8b2

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2026-09-18  1:49 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-09-09 17:13 [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS Jan Paszkowski
2026-09-09 17:13 ` [PATCH 1/1] arm64: dts: qcom: sm8350-sony-xperia-sagami: enable UFS Jan Paszkowski
2026-09-09 19:07   ` Dmitry Baryshkov
2026-09-18  1:49 ` (subset) [PATCH 0/1] arm64: dts: qcom: sm8350-sagami: UFS Bjorn Andersson

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