devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes
@ 2023-01-16 14:09 Abel Vesa
  2023-01-16 14:10 ` [PATCH v3 2/2] arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node Abel Vesa
  2023-01-17 18:24 ` (subset) [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes Bjorn Andersson
  0 siblings, 2 replies; 3+ messages in thread
From: Abel Vesa @ 2023-01-16 14:09 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: Linux Kernel Mailing List, devicetree, linux-arm-msm,
	Johan Hovold

Add UFS host controller and PHY nodes.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---

Changes since v2:
 * reversed phy clocks and changed their names to ref and ref_aux
 * dropped both address-cells and size-cells from phy node
 * dropped the extra newline
 * moved #clocks-cells above #phy-cells
 * dropped ranges property
 * renamed ufshc to ufs
 * replaced RPMH_LN_BB_CLK3 clock with TCSR_UFS_PAD_CLKREF_EN for the
   ufs host controller node
 * added required-opps property to the ufs host controller node

 arch/arm64/boot/dts/qcom/sm8550.dtsi | 73 ++++++++++++++++++++++++++--
 1 file changed, 70 insertions(+), 3 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/sm8550.dtsi b/arch/arm64/boot/dts/qcom/sm8550.dtsi
index 59756ec11564..3d47281a276b 100644
--- a/arch/arm64/boot/dts/qcom/sm8550.dtsi
+++ b/arch/arm64/boot/dts/qcom/sm8550.dtsi
@@ -649,9 +649,9 @@ gcc: clock-controller@100000 {
 				 <0>,
 				 <0>,
 				 <0>,
-				 <0>,
-				 <0>,
-				 <0>,
+				 <&ufs_mem_phy 0>,
+				 <&ufs_mem_phy 1>,
+				 <&ufs_mem_phy 2>,
 				 <0>;
 		};
 
@@ -1571,6 +1571,73 @@ crypto: crypto@1de0000 {
 			interconnect-names = "memory";
 		};
 
+		ufs_mem_phy: phy@1d80000 {
+			compatible = "qcom,sm8550-qmp-ufs-phy";
+			reg = <0x0 0x01d80000 0x0 0x2000>;
+			clocks = <&tcsr TCSR_UFS_CLKREF_EN>,
+				 <&gcc GCC_UFS_PHY_PHY_AUX_CLK>;
+			clock-names = "ref", "ref_aux";
+
+			power-domains = <&gcc UFS_MEM_PHY_GDSC>;
+
+			resets = <&ufs_mem_hc 0>;
+			reset-names = "ufsphy";
+
+			#clock-cells = <1>;
+			#phy-cells = <0>;
+
+			status = "disabled";
+		};
+
+		ufs_mem_hc: ufs@1d84000 {
+			compatible = "qcom,sm8550-ufshc", "qcom,ufshc",
+				     "jedec,ufs-2.0";
+			reg = <0x0 0x01d84000 0x0 0x3000>;
+			interrupts = <GIC_SPI 265 IRQ_TYPE_LEVEL_HIGH>;
+			phys = <&ufs_mem_phy>;
+			phy-names = "ufsphy";
+			lanes-per-direction = <2>;
+			#reset-cells = <1>;
+			resets = <&gcc GCC_UFS_PHY_BCR>;
+			reset-names = "rst";
+
+			power-domains = <&gcc UFS_PHY_GDSC>;
+			required-opps = <&rpmhpd_opp_nom>;
+
+			iommus = <&apps_smmu 0x60 0x0>;
+
+			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";
+			clock-names = "core_clk",
+				      "bus_aggr_clk",
+				      "iface_clk",
+				      "core_clk_unipro",
+				      "ref_clk",
+				      "tx_lane0_sync_clk",
+				      "rx_lane0_sync_clk",
+				      "rx_lane1_sync_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>,
+				 <&tcsr TCSR_UFS_PAD_CLKREF_EN>,
+				 <&gcc GCC_UFS_PHY_TX_SYMBOL_0_CLK>,
+				 <&gcc GCC_UFS_PHY_RX_SYMBOL_0_CLK>,
+				 <&gcc GCC_UFS_PHY_RX_SYMBOL_1_CLK>;
+			freq-table-hz =
+				<75000000 300000000>,
+				<0 0>,
+				<0 0>,
+				<75000000 300000000>,
+				<100000000 403000000>,
+				<0 0>,
+				<0 0>,
+				<0 0>;
+			status = "disabled";
+		};
+
 		tcsr_mutex: hwlock@1f40000 {
 			compatible = "qcom,tcsr-mutex";
 			reg = <0 0x01f40000 0 0x20000>;
-- 
2.34.1


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

* [PATCH v3 2/2] arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node
  2023-01-16 14:09 [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes Abel Vesa
@ 2023-01-16 14:10 ` Abel Vesa
  2023-01-17 18:24 ` (subset) [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Abel Vesa @ 2023-01-16 14:10 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Rob Herring,
	Krzysztof Kozlowski
  Cc: Linux Kernel Mailing List, devicetree, linux-arm-msm,
	Johan Hovold

Enable UFS host controller and PHY node on SM8550 MTP board.

Signed-off-by: Abel Vesa <abel.vesa@linaro.org>
---
 arch/arm64/boot/dts/qcom/sm8550-mtp.dts | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
index 8586e16d6079..81fcbdc6bdc4 100644
--- a/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
+++ b/arch/arm64/boot/dts/qcom/sm8550-mtp.dts
@@ -399,6 +399,25 @@ &uart7 {
 	status = "okay";
 };
 
+&ufs_mem_hc {
+	reset-gpios = <&tlmm 210 GPIO_ACTIVE_LOW>;
+	vcc-supply = <&vreg_l17b_2p5>;
+	vcc-max-microamp = <1300000>;
+	vccq-supply = <&vreg_l1g_1p2>;
+	vccq-max-microamp = <1200000>;
+	vccq2-supply = <&vreg_l3g_1p2>;
+	vccq2-max-microamp = <100>;
+
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l1d_0p88>;
+	vdda-pll-supply = <&vreg_l3e_1p2>;
+
+	status = "okay";
+};
+
 &xo_board {
 	clock-frequency = <76800000>;
 };
-- 
2.34.1


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

* Re: (subset) [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes
  2023-01-16 14:09 [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes Abel Vesa
  2023-01-16 14:10 ` [PATCH v3 2/2] arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node Abel Vesa
@ 2023-01-17 18:24 ` Bjorn Andersson
  1 sibling, 0 replies; 3+ messages in thread
From: Bjorn Andersson @ 2023-01-17 18:24 UTC (permalink / raw)
  To: abel.vesa, robh+dt, agross, krzysztof.kozlowski+dt, konrad.dybcio
  Cc: devicetree, linux-arm-msm, Linux Kernel Mailing List, johan

On Mon, 16 Jan 2023 16:09:59 +0200, Abel Vesa wrote:
> Add UFS host controller and PHY nodes.
> 
> 

Applied, thanks!

[1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes
      commit: 35cf1aaab169e0fd9c0ba5e0c0a5436ecb8081f0
[2/2] arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node
      commit: 6fa1a0f8cbfc3f4197434f63425853ac3bc16f68

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

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

end of thread, other threads:[~2023-01-17 19:12 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-01-16 14:09 [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes Abel Vesa
2023-01-16 14:10 ` [PATCH v3 2/2] arm64: dts: qcom: sm8550-mtp: Add UFS host controller and PHY node Abel Vesa
2023-01-17 18:24 ` (subset) [PATCH v3 1/2] arm64: dts: qcom: sm8550: Add UFS host controller and phy nodes 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).