Skip to contentSkip to conversation

arm64: dts: qcom: fix UFS PHY registers

PATCH Applied Johan Hovold 2 participants 6 messages Oct 24, 2022 – Nov 7, 2022

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

cover arm64: dts: qcom: fix UFS PHY registers

When working on the updated QMP binding for SC8280XP, I noticed that the UFS PHY register definitions for most platforms are wrong. Apparently the register region sizes have just been copied verbatim from the original SDM845.

As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor drivers.

Note that SC8280XP also suffers from this, but that problem will soon go away when the UFS nodes are updated to match the new binding:

	https://lore.kernel.org/lkml/[email protected]/

Johan

Johan Hovold (4):
arm64: dts: qcom: sm8150: fix UFS PHY registers
arm64: dts: qcom: sm8250: fix UFS PHY registers
arm64: dts: qcom: sm8350: fix UFS PHY registers
arm64: dts: qcom: sm8450: fix UFS PHY registers

 arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 +++++-----
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +++++-----
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 10 +++++-----
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 10 +++++-----
 4 files changed, 20 insertions(+), 20 deletions(-)
Signature · 1 line
2.37.3
#1 lore raw

PATCH 1/4 arm64: dts: qcom: sm8150: fix UFS PHY registers

The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.

As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.

Fixes 3834a2e92229 ("arm64: dts: qcom: sm8150: Add ufs nodes")
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8150.dtsi +5 -5
index cef8c4f4f0ff..4a527a64772b 100644
@@ -2032,11 +2032,11 @@ ufs_mem_phy: phy@1d87000 {
 			status = "disabled";
 
 			ufs_mem_phy_lanes: phy@1d87400 {
-				reg = <0 0x01d87400 0 0x108>,
-				      <0 0x01d87600 0 0x1e0>,
-				      <0 0x01d87c00 0 0x1dc>,
-				      <0 0x01d87800 0 0x108>,
-				      <0 0x01d87a00 0 0x1e0>;
+				reg = <0 0x01d87400 0 0x16c>,
+				      <0 0x01d87600 0 0x200>,
+				      <0 0x01d87c00 0 0x200>,
+				      <0 0x01d87800 0 0x16c>,
+				      <0 0x01d87a00 0 0x200>;
 				#phy-cells = <0>;
 			};
 		};
Signature · 1 line
2.37.3
#2 lore raw

PATCH 2/4 arm64: dts: qcom: sm8250: fix UFS PHY registers

In reply to Johan Hovold

The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.

As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.

Fixes b7e2fba06622 ("arm64: dts: qcom: sm8250: Add UFS controller and PHY")
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8250.dtsi +5 -5
index a5b62cadb129..0fd768a4f308 100644
@@ -2179,11 +2179,11 @@ ufs_mem_phy: phy@1d87000 {
 			status = "disabled";
 
 			ufs_mem_phy_lanes: phy@1d87400 {
-				reg = <0 0x01d87400 0 0x108>,
-				      <0 0x01d87600 0 0x1e0>,
-				      <0 0x01d87c00 0 0x1dc>,
-				      <0 0x01d87800 0 0x108>,
-				      <0 0x01d87a00 0 0x1e0>;
+				reg = <0 0x01d87400 0 0x16c>,
+				      <0 0x01d87600 0 0x200>,
+				      <0 0x01d87c00 0 0x200>,
+				      <0 0x01d87800 0 0x16c>,
+				      <0 0x01d87a00 0 0x200>;
 				#phy-cells = <0>;
 			};
 		};
Signature · 1 line
2.37.3
#3 lore raw

PATCH 3/4 arm64: dts: qcom: sm8350: fix UFS PHY registers

In reply to Johan Hovold

The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.

As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.

Fixes 59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes")
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8350.dtsi +5 -5
index a86d9ea93b9d..a6270d97a319 100644
@@ -2142,11 +2142,11 @@ ufs_mem_phy: phy@1d87000 {
 			status = "disabled";
 
 			ufs_mem_phy_lanes: phy@1d87400 {
-				reg = <0 0x01d87400 0 0x108>,
-				      <0 0x01d87600 0 0x1e0>,
-				      <0 0x01d87c00 0 0x1dc>,
-				      <0 0x01d87800 0 0x108>,
-				      <0 0x01d87a00 0 0x1e0>;
+				reg = <0 0x01d87400 0 0x188>,
+				      <0 0x01d87600 0 0x200>,
+				      <0 0x01d87c00 0 0x200>,
+				      <0 0x01d87800 0 0x188>,
+				      <0 0x01d87a00 0 0x200>;
 				#phy-cells = <0>;
 			};
 		};
Signature · 1 line
2.37.3
#4 lore raw

PATCH 4/4 arm64: dts: qcom: sm8450: fix UFS PHY registers

In reply to Johan Hovold

The sizes of the UFS PHY register regions are too small and does specifically not cover all registers used by the Linux driver.

As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor driver.

Fixes 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes")
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)
arch/arm64/boot/dts/qcom/sm8450.dtsi +5 -5
index d32f08df743d..dfc799244180 100644
@@ -3161,11 +3161,11 @@ ufs_mem_phy: phy@1d87000 {
 			status = "disabled";
 
 			ufs_mem_phy_lanes: phy@1d87400 {
-				reg = <0 0x01d87400 0 0x108>,
-				      <0 0x01d87600 0 0x1e0>,
-				      <0 0x01d87c00 0 0x1dc>,
-				      <0 0x01d87800 0 0x108>,
-				      <0 0x01d87a00 0 0x1e0>;
+				reg = <0 0x01d87400 0 0x188>,
+				      <0 0x01d87600 0 0x200>,
+				      <0 0x01d87c00 0 0x200>,
+				      <0 0x01d87800 0 0x188>,
+				      <0 0x01d87a00 0 0x200>;
 				#phy-cells = <0>;
 			};
 		};
Signature · 1 line
2.37.3
maintainer Applied
#5 lore raw
In reply to Johan Hovold
Quoted 9 lines · Johan Hovold

When working on the updated QMP binding for SC8280XP, I noticed that the UFS PHY register definitions for most platforms are wrong. Apparently the register region sizes have just been copied verbatim from the original SDM845.

As Linux maps these regions as full pages this is currently not an issue on Linux, but let's update the sizes to match the vendor drivers.

[...]

Applied, thanks!

[1/4] arm64: dts: qcom: sm8150: fix UFS PHY registers

      commit: 36a31b3a8d9ba1707a23de8d8dc1ceaef4eda695
[2/4] arm64: dts: qcom: sm8250: fix UFS PHY registers
      commit: 7f8b37dd4e7bf50160529530d9789b846153df71
[3/4] arm64: dts: qcom: sm8350: fix UFS PHY registers
      commit: b3c7839b698cc617e97dd2e4f1eeb4adc280fe58
[4/4] arm64: dts: qcom: sm8450: fix UFS PHY registers
      commit: 7af949211a0554bbc06163b081fc2cb516674880

Best regards,

Signature · 1 line
Bjorn Andersson <[email protected]>