2022-10-24 09:22:36

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 0/4] 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(-)

--
2.37.3


2022-10-24 09:40:18

by Johan Hovold

[permalink] [raw]
Subject: [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")
Signed-off-by: Johan Hovold <[email protected]>
---
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

2022-10-24 09:53:25

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 4/4] arm64: dts: qcom: sm8450: 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: 07fa917a335e ("arm64: dts: qcom: sm8450: add ufs nodes")
Signed-off-by: Johan Hovold <[email protected]>
---
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

2022-10-24 10:17:18

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 2/4] arm64: dts: qcom: sm8250: 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: b7e2fba06622 ("arm64: dts: qcom: sm8250: Add UFS controller and PHY")
Signed-off-by: Johan Hovold <[email protected]>
---
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

2022-10-24 10:22:14

by Johan Hovold

[permalink] [raw]
Subject: [PATCH 3/4] arm64: dts: qcom: sm8350: 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: 59c7cf814783 ("arm64: dts: qcom: sm8350: Add UFS nodes")
Signed-off-by: Johan Hovold <[email protected]>
---
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

2022-11-07 03:15:32

by Bjorn Andersson

[permalink] [raw]
Subject: Re: [PATCH 0/4] arm64: dts: qcom: fix UFS PHY registers

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 <[email protected]>