devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers
@ 2022-10-24  9:15 Johan Hovold
  2022-10-24  9:15 ` [PATCH 1/4] arm64: dts: qcom: sm8150: " Johan Hovold
                   ` (4 more replies)
  0 siblings, 5 replies; 6+ messages in thread
From: Johan Hovold @ 2022-10-24  9:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Vinod Koul, Dmitry Baryshkov, linux-arm-msm, devicetree,
	linux-kernel, 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.

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/20221024090041.19574-1-johan+linaro@kernel.org/

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

-- 
2.37.3


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

* [PATCH 1/4] arm64: dts: qcom: sm8150: fix UFS PHY registers
  2022-10-24  9:15 [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers Johan Hovold
@ 2022-10-24  9:15 ` Johan Hovold
  2022-10-24  9:15 ` [PATCH 2/4] arm64: dts: qcom: sm8250: " Johan Hovold
                   ` (3 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2022-10-24  9:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Vinod Koul, Dmitry Baryshkov, linux-arm-msm, devicetree,
	linux-kernel, 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: 3834a2e92229 ("arm64: dts: qcom: sm8150: Add ufs nodes")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8150.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8150.dtsi b/arch/arm64/boot/dts/qcom/sm8150.dtsi
index cef8c4f4f0ff..4a527a64772b 100644
--- a/arch/arm64/boot/dts/qcom/sm8150.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8150.dtsi
@@ -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>;
 			};
 		};
-- 
2.37.3


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

* [PATCH 2/4] arm64: dts: qcom: sm8250: fix UFS PHY registers
  2022-10-24  9:15 [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers Johan Hovold
  2022-10-24  9:15 ` [PATCH 1/4] arm64: dts: qcom: sm8150: " Johan Hovold
@ 2022-10-24  9:15 ` Johan Hovold
  2022-10-24  9:15 ` [PATCH 3/4] arm64: dts: qcom: sm8350: " Johan Hovold
                   ` (2 subsequent siblings)
  4 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2022-10-24  9:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Vinod Koul, Dmitry Baryshkov, linux-arm-msm, devicetree,
	linux-kernel, 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")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8250.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8250.dtsi b/arch/arm64/boot/dts/qcom/sm8250.dtsi
index a5b62cadb129..0fd768a4f308 100644
--- a/arch/arm64/boot/dts/qcom/sm8250.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8250.dtsi
@@ -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>;
 			};
 		};
-- 
2.37.3


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

* [PATCH 3/4] arm64: dts: qcom: sm8350: fix UFS PHY registers
  2022-10-24  9:15 [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers Johan Hovold
  2022-10-24  9:15 ` [PATCH 1/4] arm64: dts: qcom: sm8150: " Johan Hovold
  2022-10-24  9:15 ` [PATCH 2/4] arm64: dts: qcom: sm8250: " Johan Hovold
@ 2022-10-24  9:15 ` Johan Hovold
  2022-10-24  9:15 ` [PATCH 4/4] arm64: dts: qcom: sm8450: " Johan Hovold
  2022-11-07  3:12 ` [PATCH 0/4] arm64: dts: qcom: " Bjorn Andersson
  4 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2022-10-24  9:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Vinod Koul, Dmitry Baryshkov, linux-arm-msm, devicetree,
	linux-kernel, 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")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8350.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8350.dtsi b/arch/arm64/boot/dts/qcom/sm8350.dtsi
index a86d9ea93b9d..a6270d97a319 100644
--- a/arch/arm64/boot/dts/qcom/sm8350.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8350.dtsi
@@ -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>;
 			};
 		};
-- 
2.37.3


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

* [PATCH 4/4] arm64: dts: qcom: sm8450: fix UFS PHY registers
  2022-10-24  9:15 [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers Johan Hovold
                   ` (2 preceding siblings ...)
  2022-10-24  9:15 ` [PATCH 3/4] arm64: dts: qcom: sm8350: " Johan Hovold
@ 2022-10-24  9:15 ` Johan Hovold
  2022-11-07  3:12 ` [PATCH 0/4] arm64: dts: qcom: " Bjorn Andersson
  4 siblings, 0 replies; 6+ messages in thread
From: Johan Hovold @ 2022-10-24  9:15 UTC (permalink / raw)
  To: Bjorn Andersson
  Cc: Andy Gross, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Vinod Koul, Dmitry Baryshkov, linux-arm-msm, devicetree,
	linux-kernel, 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")
Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 arch/arm64/boot/dts/qcom/sm8450.dtsi | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8450.dtsi b/arch/arm64/boot/dts/qcom/sm8450.dtsi
index d32f08df743d..dfc799244180 100644
--- a/arch/arm64/boot/dts/qcom/sm8450.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8450.dtsi
@@ -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>;
 			};
 		};
-- 
2.37.3


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

* Re: [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers
  2022-10-24  9:15 [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers Johan Hovold
                   ` (3 preceding siblings ...)
  2022-10-24  9:15 ` [PATCH 4/4] arm64: dts: qcom: sm8450: " Johan Hovold
@ 2022-11-07  3:12 ` Bjorn Andersson
  4 siblings, 0 replies; 6+ messages in thread
From: Bjorn Andersson @ 2022-11-07  3:12 UTC (permalink / raw)
  To: johan+linaro
  Cc: dmitry.baryshkov, devicetree, krzysztof.kozlowski+dt, Rob Herring,
	linux-arm-msm, vkoul, konrad.dybcio, linux-kernel, Andy Gross

On Mon, 24 Oct 2022 11:15:03 +0200, Johan Hovold wrote:
> 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,
-- 
Bjorn Andersson <andersson@kernel.org>

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

end of thread, other threads:[~2022-11-07  3:13 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-10-24  9:15 [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers Johan Hovold
2022-10-24  9:15 ` [PATCH 1/4] arm64: dts: qcom: sm8150: " Johan Hovold
2022-10-24  9:15 ` [PATCH 2/4] arm64: dts: qcom: sm8250: " Johan Hovold
2022-10-24  9:15 ` [PATCH 3/4] arm64: dts: qcom: sm8350: " Johan Hovold
2022-10-24  9:15 ` [PATCH 4/4] arm64: dts: qcom: sm8450: " Johan Hovold
2022-11-07  3:12 ` [PATCH 0/4] arm64: dts: qcom: " Bjorn Andersson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).