phone-devel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/7] Add UFS support for SC7180/SM7125
@ 2023-10-07 13:58 David Wronek
  2023-10-07 13:58 ` [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
                   ` (6 more replies)
  0 siblings, 7 replies; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

This patchset introduces UFS storage support for SC7180 and SM7125, as
well as support for the Xiaomi Redmi Note 9S.

David Wronek (6):
  dt-bindings: ufs: qcom: Add SC7180 compatible string
  dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
  dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S
  phy: qcom: qmp-ufs: Add SC7180 support
  arm64: dts: qcom: sc7180: Add UFS nodes
  arm64: dts: qcom: sm7125-xiaomi-common: Add UFS nodes

Joe Mason (1):
  arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S

 .../devicetree/bindings/arm/qcom.yaml         |  1 +
 .../phy/qcom,sc8280xp-qmp-ufs-phy.yaml        |  1 +
 .../devicetree/bindings/ufs/qcom,ufs.yaml     |  2 +
 arch/arm64/boot/dts/qcom/Makefile             |  1 +
 arch/arm64/boot/dts/qcom/sc7180.dtsi          | 70 +++++++++++++++++++
 .../boot/dts/qcom/sm7125-xiaomi-common.dtsi   | 16 +++++
 .../boot/dts/qcom/sm7125-xiaomi-curtana.dts   | 16 +++++
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c       |  3 +
 8 files changed, 110 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts

-- 
2.42.0


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

* [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-09  8:44   ` Krzysztof Kozlowski
  2023-10-07 13:58 ` [PATCH 2/7] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
                   ` (5 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

Document the compatible for the UFS found on SC7180.

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
index 462ead5a1cec..f99a933cc217 100644
--- a/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
+++ b/Documentation/devicetree/bindings/ufs/qcom,ufs.yaml
@@ -27,6 +27,7 @@ properties:
           - qcom,msm8996-ufshc
           - qcom,msm8998-ufshc
           - qcom,sa8775p-ufshc
+          - qcom,sc7180-ufshc
           - qcom,sc8280xp-ufshc
           - qcom,sdm845-ufshc
           - qcom,sm6115-ufshc
@@ -210,6 +211,7 @@ allOf:
         compatible:
           contains:
             enum:
+              - qcom,sc7180-ufshc
               - qcom,sm6115-ufshc
     then:
       properties:
-- 
2.42.0


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

* [PATCH 2/7] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
  2023-10-07 13:58 ` [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-09  8:44   ` Krzysztof Kozlowski
  2023-10-07 13:58 ` [PATCH 3/7] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
                   ` (4 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

Document the QMP UFS PHY compatible for SC7180

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 .../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml       | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
index f3a3296c811c..f2eee8b5326f 100644
--- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
@@ -19,6 +19,7 @@ properties:
       - qcom,msm8996-qmp-ufs-phy
       - qcom,msm8998-qmp-ufs-phy
       - qcom,sa8775p-qmp-ufs-phy
+      - qcom,sc7180-qmp-ufs-phy
       - qcom,sc7280-qmp-ufs-phy
       - qcom,sc8180x-qmp-ufs-phy
       - qcom,sc8280xp-qmp-ufs-phy
-- 
2.42.0


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

* [PATCH 3/7] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
  2023-10-07 13:58 ` [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
  2023-10-07 13:58 ` [PATCH 2/7] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-09  8:45   ` Krzysztof Kozlowski
  2023-10-07 13:58 ` [PATCH 4/7] phy: qcom: qmp-ufs: Add SC7180 support David Wronek
                   ` (3 subsequent siblings)
  6 siblings, 1 reply; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

Document the Xiaomi Redmi Note 9S (curtana) smartphone, which is based
on the Qualcomm SM7125 SoC.

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 Documentation/devicetree/bindings/arm/qcom.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/arm/qcom.yaml b/Documentation/devicetree/bindings/arm/qcom.yaml
index 7f80f48a0954..42461b0f19a1 100644
--- a/Documentation/devicetree/bindings/arm/qcom.yaml
+++ b/Documentation/devicetree/bindings/arm/qcom.yaml
@@ -984,6 +984,7 @@ properties:
 
       - items:
           - enum:
+              - xiaomi,curtana
               - xiaomi,joyeuse
           - const: qcom,sm7125
 
-- 
2.42.0


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

* [PATCH 4/7] phy: qcom: qmp-ufs: Add SC7180 support
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
                   ` (2 preceding siblings ...)
  2023-10-07 13:58 ` [PATCH 3/7] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-07 13:58 ` [PATCH 5/7] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
                   ` (2 subsequent siblings)
  6 siblings, 0 replies; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

The SC7180 UFS PHY is identical to the one found on SM7150. Add a
compatible for it.

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index 514fa14df634..1919b8bf5a85 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -1787,6 +1787,9 @@ static const struct of_device_id qmp_ufs_of_match_table[] = {
 	}, {
 		.compatible = "qcom,sa8775p-qmp-ufs-phy",
 		.data = &sa8775p_ufsphy_cfg,
+	}, {
+		.compatible = "qcom,sc7180-qmp-ufs-phy",
+		.data = &sm7150_ufsphy_cfg,
 	}, {
 		.compatible = "qcom,sc7280-qmp-ufs-phy",
 		.data = &sc7280_ufsphy_cfg,
-- 
2.42.0


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

* [PATCH 5/7] arm64: dts: qcom: sc7180: Add UFS nodes
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
                   ` (3 preceding siblings ...)
  2023-10-07 13:58 ` [PATCH 4/7] phy: qcom: qmp-ufs: Add SC7180 support David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-09 21:12   ` Konrad Dybcio
  2023-10-07 13:58 ` [PATCH 6/7] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
  2023-10-07 13:58 ` [PATCH 7/7] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
  6 siblings, 1 reply; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

Add the UFS and QMP PHY nodes for the Qualcomm SC7180 SoC.

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 arch/arm64/boot/dts/qcom/sc7180.dtsi | 70 ++++++++++++++++++++++++++++
 1 file changed, 70 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
index 11f353d416b4..9f18be4fd61a 100644
--- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
@@ -1532,6 +1532,76 @@ mmss_noc: interconnect@1740000 {
 			qcom,bcm-voters = <&apps_bcm_voter>;
 		};
 
+		ufs_mem_hc: ufshc@1d84000 {
+			compatible = "qcom,sc7180-ufshc", "qcom,ufshc",
+				     "jedec,ufs-2.0";
+			reg = <0 0x01d84000 0 0x3000>,
+			      <0 0x01d90000 0 0x8000>;
+			reg-names = "std", "ice";
+			interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&ufs_mem_phy>;
+			phy-names = "ufsphy";
+			lanes-per-direction = <1>;
+			power-domains = <&gcc UFS_PHY_GDSC>;
+			#reset-cells = <1>;
+			resets = <&gcc GCC_UFS_PHY_BCR>;
+			reset-names = "rst";
+
+			iommus = <&apps_smmu 0xa0 0x0>;
+
+			clock-names =
+				"core_clk",
+				"bus_aggr_clk",
+				"iface_clk",
+				"core_clk_unipro",
+				"ref_clk",
+				"tx_lane0_sync_clk",
+				"rx_lane0_sync_clk",
+				"ice_core_clk";
+			clocks =
+				<&gcc GCC_UFS_PHY_AXI_CLK>,
+				<&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
+				<&gcc GCC_UFS_PHY_AHB_CLK>,
+				<&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>,
+				<&rpmhcc RPMH_CXO_CLK>,
+				<&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
+				<&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
+				<&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
+			freq-table-hz =
+				<50000000 200000000>,
+				<0 0>,
+				<0 0>,
+				<37500000 150000000>,
+				<0 0>,
+				<0 0>,
+				<0 0>,
+				<0 300000000>;
+
+			interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI1 0>,
+				<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>;
+			interconnect-names = "ufs-ddr", "cpu-ufs";
+
+			status = "disabled";
+		};
+
+		ufs_mem_phy: phy@1d87000 {
+			compatible = "qcom,sc7180-qmp-ufs-phy";
+			reg = <0 0x01d87000 0 0x1000>;
+
+			clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
+				<&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+			clock-names = "ref", "ref_aux";
+
+			power-domains = <&gcc UFS_PHY_GDSC>;
+
+			resets = <&ufs_mem_hc 0>;
+			reset-names = "ufsphy";
+
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
 		ipa: ipa@1e40000 {
 			compatible = "qcom,sc7180-ipa";
 
-- 
2.42.0


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

* [PATCH 6/7] arm64: dts: qcom: sm7125-xiaomi-common: Add UFS nodes
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
                   ` (4 preceding siblings ...)
  2023-10-07 13:58 ` [PATCH 5/7] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-09 21:15   ` Konrad Dybcio
  2023-10-07 13:58 ` [PATCH 7/7] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
  6 siblings, 1 reply; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

Enable the UFS found on the SM7125 Xiaomi smartphones.

Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 .../boot/dts/qcom/sm7125-xiaomi-common.dtsi      | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi
index e55cd83c19b8..22ad8a25217e 100644
--- a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-common.dtsi
@@ -398,6 +398,22 @@ sd-cd-pins {
 	};
 };
 
+&ufs_mem_hc {
+	vcc-supply = <&vreg_l19a_3p0>;
+	vcc-max-microamp = <600000>;
+	vccq2-supply = <&vreg_l12a_1p8>;
+	vccq2-max-microamp = <600000>;
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l4a_0p88>;
+	vdda-pll-supply = <&vreg_l3c_1p23>;
+	vdda-phy-max-microamp = <62900>;
+	vdda-pll-max-microamp = <18300>;
+	status = "okay";
+};
+
 &usb_1 {
 	qcom,select-utmi-as-pipe-clk;
 	status = "okay";
-- 
2.42.0


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

* [PATCH 7/7] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S
  2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
                   ` (5 preceding siblings ...)
  2023-10-07 13:58 ` [PATCH 6/7] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
@ 2023-10-07 13:58 ` David Wronek
  2023-10-09 21:16   ` Konrad Dybcio
  6 siblings, 1 reply; 14+ messages in thread
From: David Wronek @ 2023-10-07 13:58 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel, David Wronek

From: Joe Mason <buddyjojo06@outlook.com>

Add a device tree for the Xiaomi Redmi Note 9S (curtana) phone, based on
sm7125-xiaomi-common.dtsi.

Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
Signed-off-by: David Wronek <davidwronek@gmail.com>
---
 arch/arm64/boot/dts/qcom/Makefile                |  1 +
 .../boot/dts/qcom/sm7125-xiaomi-curtana.dts      | 16 ++++++++++++++++
 2 files changed, 17 insertions(+)
 create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts

diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
index d6cb840b7050..57974fb0c580 100644
--- a/arch/arm64/boot/dts/qcom/Makefile
+++ b/arch/arm64/boot/dts/qcom/Makefile
@@ -207,6 +207,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6350-sony-xperia-lena-pdx213.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx225.dtb
+dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-curtana.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-joyeuse.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
 dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
diff --git a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
new file mode 100644
index 000000000000..12f517a8492c
--- /dev/null
+++ b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
@@ -0,0 +1,16 @@
+// SPDX-License-Identifier: GPL-2.0
+/*
+ * Copyright (c) 2023, Joe Mason <buddyjojo06@outlook.com>
+ */
+
+/dts-v1/;
+
+#include "sm7125-xiaomi-common.dtsi"
+
+/ {
+	model = "Xiaomi Redmi Note 9S";
+	compatible = "xiaomi,curtana", "qcom,sm7125";
+
+	/* required for bootloader to select correct board */
+	qcom,board-id = <0x20022 1>;
+};
-- 
2.42.0


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

* Re: [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string
  2023-10-07 13:58 ` [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
@ 2023-10-09  8:44   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-09  8:44 UTC (permalink / raw)
  To: David Wronek, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel

On 07/10/2023 15:58, David Wronek wrote:
> Document the compatible for the UFS found on SC7180.
> 
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>  Documentation/devicetree/bindings/ufs/qcom,ufs.yaml | 2 ++
>  1 file changed, 2 insertions(+)

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 2/7] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180
  2023-10-07 13:58 ` [PATCH 2/7] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
@ 2023-10-09  8:44   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-09  8:44 UTC (permalink / raw)
  To: David Wronek, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel

On 07/10/2023 15:58, David Wronek wrote:
> Document the QMP UFS PHY compatible for SC7180
> 
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>  .../devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml       | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
> index f3a3296c811c..f2eee8b5326f 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-ufs-phy.yaml
> @@ -19,6 +19,7 @@ properties:
>        - qcom,msm8996-qmp-ufs-phy
>        - qcom,msm8998-qmp-ufs-phy
>        - qcom,sa8775p-qmp-ufs-phy
> +      - qcom,sc7180-qmp-ufs-phy

You also need to update the if: for clocks.

Best regards,
Krzysztof


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

* Re: [PATCH 3/7] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S
  2023-10-07 13:58 ` [PATCH 3/7] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
@ 2023-10-09  8:45   ` Krzysztof Kozlowski
  0 siblings, 0 replies; 14+ messages in thread
From: Krzysztof Kozlowski @ 2023-10-09  8:45 UTC (permalink / raw)
  To: David Wronek, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Rob Herring, Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel

On 07/10/2023 15:58, David Wronek wrote:
> Document the Xiaomi Redmi Note 9S (curtana) smartphone, which is based
> on the Qualcomm SM7125 SoC.

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof


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

* Re: [PATCH 5/7] arm64: dts: qcom: sc7180: Add UFS nodes
  2023-10-07 13:58 ` [PATCH 5/7] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
@ 2023-10-09 21:12   ` Konrad Dybcio
  0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-10-09 21:12 UTC (permalink / raw)
  To: David Wronek, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel



On 10/7/23 15:58, David Wronek wrote:
> Add the UFS and QMP PHY nodes for the Qualcomm SC7180 SoC.
> 
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>   arch/arm64/boot/dts/qcom/sc7180.dtsi | 70 ++++++++++++++++++++++++++++
>   1 file changed, 70 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7180.dtsi b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> index 11f353d416b4..9f18be4fd61a 100644
> --- a/arch/arm64/boot/dts/qcom/sc7180.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7180.dtsi
> @@ -1532,6 +1532,76 @@ mmss_noc: interconnect@1740000 {
>   			qcom,bcm-voters = <&apps_bcm_voter>;
>   		};
>   
> +		ufs_mem_hc: ufshc@1d84000 {
> +			compatible = "qcom,sc7180-ufshc", "qcom,ufshc",
> +				     "jedec,ufs-2.0";
> +			reg = <0 0x01d84000 0 0x3000>,
> +			      <0 0x01d90000 0 0x8000>;
> +			reg-names = "std", "ice";
Recently the ICE was separated into its own node

> +			interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
> +			phys = <&ufs_mem_phy>;
> +			phy-names = "ufsphy";
> +			lanes-per-direction = <1>;
> +			power-domains = <&gcc UFS_PHY_GDSC>;
> +			#reset-cells = <1>;
> +			resets = <&gcc GCC_UFS_PHY_BCR>;
> +			reset-names = "rst";
> +
> +			iommus = <&apps_smmu 0xa0 0x0>;
> +
> +			clock-names =
> +				"core_clk",
Remove the newline after the =, here and below

> +				"bus_aggr_clk",
> +				"iface_clk",
> +				"core_clk_unipro",
> +				"ref_clk",
> +				"tx_lane0_sync_clk",
> +				"rx_lane0_sync_clk",
> +				"ice_core_clk";
> +			clocks =
> +				<&gcc GCC_UFS_PHY_AXI_CLK>,
> +				<&gcc GCC_AGGRE_UFS_PHY_AXI_CLK>,
> +				<&gcc GCC_UFS_PHY_AHB_CLK>,
> +				<&gcc GCC_UFS_PHY_UNIPRO_CORE_CLK>,
> +				<&rpmhcc RPMH_CXO_CLK>,
> +				<&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
> +				<&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
> +				<&gcc GCC_UFS_PHY_ICE_CORE_CLK>;
> +			freq-table-hz =
> +				<50000000 200000000>,
> +				<0 0>,
> +				<0 0>,
> +				<37500000 150000000>,
> +				<0 0>,
> +				<0 0>,
> +				<0 0>,
> +				<0 300000000>;
> +
> +			interconnects = <&aggre1_noc MASTER_UFS_MEM 0 &mc_virt SLAVE_EBI1 0>,
> +				<&gem_noc MASTER_APPSS_PROC 0 &config_noc SLAVE_UFS_MEM_CFG 0>;
Please make the <s align and use QCOM_ICC_TAG_ALWAYS from 
include/dt-bindings/interconnect/qcom,icc.h like in sa8775p.dtsi
> +			interconnect-names = "ufs-ddr", "cpu-ufs";
> +
> +			status = "disabled";
> +		};
> +
> +		ufs_mem_phy: phy@1d87000 {
> +			compatible = "qcom,sc7180-qmp-ufs-phy";
> +			reg = <0 0x01d87000 0 0x1000>;
> +
> +			clocks = <&gcc GCC_UFS_MEM_CLKREF_CLK>,
> +				<&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
Please align the <s

Konrad

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

* Re: [PATCH 6/7] arm64: dts: qcom: sm7125-xiaomi-common: Add UFS nodes
  2023-10-07 13:58 ` [PATCH 6/7] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
@ 2023-10-09 21:15   ` Konrad Dybcio
  0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-10-09 21:15 UTC (permalink / raw)
  To: David Wronek, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel



On 10/7/23 15:58, David Wronek wrote:
> Enable the UFS found on the SM7125 Xiaomi smartphones.
> 
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
Reviewed-by: Konrad Dybcio <konrad.dybcio@linaro.org>

Konrad

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

* Re: [PATCH 7/7] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S
  2023-10-07 13:58 ` [PATCH 7/7] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
@ 2023-10-09 21:16   ` Konrad Dybcio
  0 siblings, 0 replies; 14+ messages in thread
From: Konrad Dybcio @ 2023-10-09 21:16 UTC (permalink / raw)
  To: David Wronek, Andy Gross, Bjorn Andersson, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Vinod Koul,
	Kishon Vijay Abraham I, Manivannan Sadhasivam, Alim Akhtar,
	Avri Altman, Bart Van Assche, Joe Mason
  Cc: cros-qcom-dts-watchers, linux-arm-msm, devicetree, linux-kernel,
	linux-phy, linux-scsi, hexdump0815, ~postmarketos/upstreaming,
	phone-devel



On 10/7/23 15:58, David Wronek wrote:
> From: Joe Mason <buddyjojo06@outlook.com>
> 
> Add a device tree for the Xiaomi Redmi Note 9S (curtana) phone, based on
> sm7125-xiaomi-common.dtsi.
> 
> Signed-off-by: Joe Mason <buddyjojo06@outlook.com>
> Signed-off-by: David Wronek <davidwronek@gmail.com>
> ---
>   arch/arm64/boot/dts/qcom/Makefile                |  1 +
>   .../boot/dts/qcom/sm7125-xiaomi-curtana.dts      | 16 ++++++++++++++++
>   2 files changed, 17 insertions(+)
>   create mode 100644 arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
> 
> diff --git a/arch/arm64/boot/dts/qcom/Makefile b/arch/arm64/boot/dts/qcom/Makefile
> index d6cb840b7050..57974fb0c580 100644
> --- a/arch/arm64/boot/dts/qcom/Makefile
> +++ b/arch/arm64/boot/dts/qcom/Makefile
> @@ -207,6 +207,7 @@ dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-sony-xperia-seine-pdx201.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sm6125-xiaomi-laurel-sprout.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sm6350-sony-xperia-lena-pdx213.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sm6375-sony-xperia-murray-pdx225.dtb
> +dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-curtana.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sm7125-xiaomi-joyeuse.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sm7225-fairphone-fp4.dtb
>   dtb-$(CONFIG_ARCH_QCOM)	+= sm8150-hdk.dtb
> diff --git a/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
> new file mode 100644
> index 000000000000..12f517a8492c
> --- /dev/null
> +++ b/arch/arm64/boot/dts/qcom/sm7125-xiaomi-curtana.dts
> @@ -0,0 +1,16 @@
> +// SPDX-License-Identifier: GPL-2.0
I have no idea if you can just include a bunch of bsd3 source and slap 
gpl2 atop your changes.. Somebody else could probably chime in

Konrad

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

end of thread, other threads:[~2023-10-09 21:17 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-10-07 13:58 [PATCH 0/7] Add UFS support for SC7180/SM7125 David Wronek
2023-10-07 13:58 ` [PATCH 1/7] dt-bindings: ufs: qcom: Add SC7180 compatible string David Wronek
2023-10-09  8:44   ` Krzysztof Kozlowski
2023-10-07 13:58 ` [PATCH 2/7] dt-bindings: phy: Add QMP UFS PHY compatible for SC7180 David Wronek
2023-10-09  8:44   ` Krzysztof Kozlowski
2023-10-07 13:58 ` [PATCH 3/7] dt-bindings: arm: qcom: Add Xiaomi Redmi Note 9S David Wronek
2023-10-09  8:45   ` Krzysztof Kozlowski
2023-10-07 13:58 ` [PATCH 4/7] phy: qcom: qmp-ufs: Add SC7180 support David Wronek
2023-10-07 13:58 ` [PATCH 5/7] arm64: dts: qcom: sc7180: Add UFS nodes David Wronek
2023-10-09 21:12   ` Konrad Dybcio
2023-10-07 13:58 ` [PATCH 6/7] arm64: dts: qcom: sm7125-xiaomi-common: " David Wronek
2023-10-09 21:15   ` Konrad Dybcio
2023-10-07 13:58 ` [PATCH 7/7] arm64: dts: qcom: Add support for Xiaomi Redmi Note 9S David Wronek
2023-10-09 21:16   ` Konrad Dybcio

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