devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH V2 0/3] Add UFS host controller and Phy nodes for sc7280
@ 2023-09-26 16:20 Nitin Rawat
  2023-09-26 16:20 ` [PATCH V2 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string Nitin Rawat
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Nitin Rawat @ 2023-09-26 16:20 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree, Nitin Rawat

This patch adds UFS host controller and Phy nodes for Qualcomm sc7280 SOC
and sc7280 Board.

Changes from v1:
- Addressed mani comment to separate soc and board change.
- Addressed mani comment to sort ufs node in ascending order.

Nitin Rawat (3):
  scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string
  arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc
  arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board

 .../devicetree/bindings/ufs/qcom,ufs.yaml     |  2 +
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi      | 19 ++++++
 arch/arm64/boot/dts/qcom/sc7280.dtsi          | 64 +++++++++++++++++++
 3 files changed, 85 insertions(+)

--
2.17.1


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

* [PATCH V2 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string
  2023-09-26 16:20 [PATCH V2 0/3] Add UFS host controller and Phy nodes for sc7280 Nitin Rawat
@ 2023-09-26 16:20 ` Nitin Rawat
  2023-09-26 16:20 ` [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Nitin Rawat
  2023-09-26 16:20 ` [PATCH V2 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board Nitin Rawat
  2 siblings, 0 replies; 7+ messages in thread
From: Nitin Rawat @ 2023-09-26 16:20 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree, Nitin Rawat

Document the compatible string for the UFS found on SC7280.

Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
Acked-by: Manivannan Sadhasivam <mani@kernel.org>
---
 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..802640efa956 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,sc7280-ufshc
           - qcom,sc8280xp-ufshc
           - qcom,sdm845-ufshc
           - qcom,sm6115-ufshc
@@ -117,6 +118,7 @@ allOf:
             enum:
               - qcom,msm8998-ufshc
               - qcom,sa8775p-ufshc
+              - qcom,sc7280-ufshc
               - qcom,sc8280xp-ufshc
               - qcom,sm8250-ufshc
               - qcom,sm8350-ufshc
--
2.17.1


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

* [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc
  2023-09-26 16:20 [PATCH V2 0/3] Add UFS host controller and Phy nodes for sc7280 Nitin Rawat
  2023-09-26 16:20 ` [PATCH V2 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string Nitin Rawat
@ 2023-09-26 16:20 ` Nitin Rawat
  2023-09-26 18:31   ` Konrad Dybcio
  2023-09-26 16:20 ` [PATCH V2 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board Nitin Rawat
  2 siblings, 1 reply; 7+ messages in thread
From: Nitin Rawat @ 2023-09-26 16:20 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree, Nitin Rawat

Add UFS host controller and PHY nodes for sc7280 soc.

Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sc7280.dtsi | 64 ++++++++++++++++++++++++++++
 1 file changed, 64 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
index 66f1eb83cca7..3be8ea090ade 100644
--- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
@@ -3353,6 +3353,70 @@
 			};
 		};

+		ufs_mem_hc: ufs@1d84000 {
+			compatible = "qcom,sc7280-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 GCC_UFS_PHY_GDSC>;
+			required-opps = <&rpmhpd_opp_nom>;
+
+			iommus = <&apps_smmu 0x80 0x0>;
+			dma-coherent;
+
+			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>,
+				 <&rpmhcc RPMH_CXO_CLK>,
+				 <&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>,
+				<0 0>,
+				<0 0>,
+				<0 0>,
+				<0 0>;
+			status = "disabled";
+		};
+
+		ufs_mem_phy: phy@1d87000 {
+			compatible = "qcom,sc7280-qmp-ufs-phy";
+			reg = <0x0 0x01d87000 0x0 0xe00>;
+			clocks = <&rpmhcc RPMH_CXO_CLK>,
+				 <&gcc GCC_UFS_PHY_PHY_AUX_CLK>,
+				 <&gcc GCC_UFS_1_CLKREF_EN>;
+			clock-names = "ref", "ref_aux", "qref";
+
+			resets = <&ufs_mem_hc 0>;
+			reset-names = "ufsphy";
+
+			#clock-cells = <1>;
+			#phy-cells = <0>;
+
+			status = "disabled";
+
+		};
+
 		usb_1_hsphy: phy@88e3000 {
 			compatible = "qcom,sc7280-usb-hs-phy",
 				     "qcom,usb-snps-hs-7nm-phy";
--
2.17.1


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

* [PATCH V2 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board
  2023-09-26 16:20 [PATCH V2 0/3] Add UFS host controller and Phy nodes for sc7280 Nitin Rawat
  2023-09-26 16:20 ` [PATCH V2 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string Nitin Rawat
  2023-09-26 16:20 ` [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Nitin Rawat
@ 2023-09-26 16:20 ` Nitin Rawat
  2023-09-26 18:32   ` Konrad Dybcio
  2 siblings, 1 reply; 7+ messages in thread
From: Nitin Rawat @ 2023-09-26 16:20 UTC (permalink / raw)
  To: agross, andersson, konrad.dybcio, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree, Nitin Rawat

Add UFS host controller and PHY nodes for sc7280 IDP board.

Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
---
 arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
index 2ff549f4dc7a..a0059527d9e4 100644
--- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
+++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
@@ -499,6 +499,25 @@
 	status = "okay";
 };

+&ufs_mem_hc {
+	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
+	vcc-supply = <&vreg_l7b_2p9>;
+	vcc-max-microamp = <800000>;
+	vccq-supply = <&vreg_l9b_1p2>;
+	vccq-max-microamp = <900000>;
+	vccq2-supply = <&vreg_l9b_1p2>;
+	vccq2-max-microamp = <900000>;
+
+	status = "okay";
+};
+
+&ufs_mem_phy {
+	vdda-phy-supply = <&vreg_l10c_0p8>;
+	vdda-pll-supply = <&vreg_l6b_1p2>;
+
+	status = "okay";
+};
+
 &usb_1 {
 	status = "okay";
 };
--
2.17.1


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

* Re: [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc
  2023-09-26 16:20 ` [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Nitin Rawat
@ 2023-09-26 18:31   ` Konrad Dybcio
  2023-09-27  8:21     ` Nitin Rawat
  0 siblings, 1 reply; 7+ messages in thread
From: Konrad Dybcio @ 2023-09-26 18:31 UTC (permalink / raw)
  To: Nitin Rawat, agross, andersson, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree

On 26.09.2023 18:20, Nitin Rawat wrote:
> Add UFS host controller and PHY nodes for sc7280 soc.
> 
> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280.dtsi | 64 ++++++++++++++++++++++++++++
>  1 file changed, 64 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> index 66f1eb83cca7..3be8ea090ade 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
> @@ -3353,6 +3353,70 @@
>  			};
>  		};
> 
> +		ufs_mem_hc: ufs@1d84000 {
> +			compatible = "qcom,sc7280-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 GCC_UFS_PHY_GDSC>;
> +			required-opps = <&rpmhpd_opp_nom>;
> +
> +			iommus = <&apps_smmu 0x80 0x0>;
> +			dma-coherent;
> +
> +			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";
As discussed, property-names is preferred to come after
property, just like in the other node you're adding.

[...]

> +		ufs_mem_phy: phy@1d87000 {
> +			compatible = "qcom,sc7280-qmp-ufs-phy";
> +			reg = <0x0 0x01d87000 0x0 0xe00>;
> +			clocks = <&rpmhcc RPMH_CXO_CLK>,
> +				 <&gcc GCC_UFS_PHY_PHY_AUX_CLK>,
> +				 <&gcc GCC_UFS_1_CLKREF_EN>;
> +			clock-names = "ref", "ref_aux", "qref";
> +
> +			resets = <&ufs_mem_hc 0>;
> +			reset-names = "ufsphy";
> +
> +			#clock-cells = <1>;
> +			#phy-cells = <0>;
> +
> +			status = "disabled";
> +
> +		};
Stray newline above.

Konrad

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

* Re: [PATCH V2 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board
  2023-09-26 16:20 ` [PATCH V2 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board Nitin Rawat
@ 2023-09-26 18:32   ` Konrad Dybcio
  0 siblings, 0 replies; 7+ messages in thread
From: Konrad Dybcio @ 2023-09-26 18:32 UTC (permalink / raw)
  To: Nitin Rawat, agross, andersson, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree

On 26.09.2023 18:20, Nitin Rawat wrote:
> Add UFS host controller and PHY nodes for sc7280 IDP board.
> 
> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
> ---
>  arch/arm64/boot/dts/qcom/sc7280-idp.dtsi | 19 +++++++++++++++++++
>  1 file changed, 19 insertions(+)
> 
> diff --git a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> index 2ff549f4dc7a..a0059527d9e4 100644
> --- a/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> +++ b/arch/arm64/boot/dts/qcom/sc7280-idp.dtsi
> @@ -499,6 +499,25 @@
>  	status = "okay";
>  };
> 
> +&ufs_mem_hc {
> +	reset-gpios = <&tlmm 175 GPIO_ACTIVE_LOW>;
> +	vcc-supply = <&vreg_l7b_2p9>;
> +	vcc-max-microamp = <800000>;
> +	vccq-supply = <&vreg_l9b_1p2>;
> +	vccq-max-microamp = <900000>;
> +	vccq2-supply = <&vreg_l9b_1p2>;
> +	vccq2-max-microamp = <900000>;
Can you confirm VCCQ2 is in fact connected, to avoid the mistake
fixed in [1]?

Konrad

[1] https://lore.kernel.org/linux-arm-msm/20230906104744.163479-1-krzysztof.kozlowski@linaro.org/#b

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

* Re: [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc
  2023-09-26 18:31   ` Konrad Dybcio
@ 2023-09-27  8:21     ` Nitin Rawat
  0 siblings, 0 replies; 7+ messages in thread
From: Nitin Rawat @ 2023-09-27  8:21 UTC (permalink / raw)
  To: Konrad Dybcio, agross, andersson, mani, alim.akhtar, bvanassche,
	avri.altman, robh+dt, krzysztof.kozlowski+dt, conor+dt,
	cros-qcom-dts-watchers
  Cc: linux-arm-msm, linux-scsi, linux-kernel, devicetree



On 9/27/2023 12:01 AM, Konrad Dybcio wrote:
> On 26.09.2023 18:20, Nitin Rawat wrote:
>> Add UFS host controller and PHY nodes for sc7280 soc.
>>
>> Signed-off-by: Nitin Rawat <quic_nitirawa@quicinc.com>
>> ---
>>   arch/arm64/boot/dts/qcom/sc7280.dtsi | 64 ++++++++++++++++++++++++++++
>>   1 file changed, 64 insertions(+)
>>
>> diff --git a/arch/arm64/boot/dts/qcom/sc7280.dtsi b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> index 66f1eb83cca7..3be8ea090ade 100644
>> --- a/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> +++ b/arch/arm64/boot/dts/qcom/sc7280.dtsi
>> @@ -3353,6 +3353,70 @@
>>   			};
>>   		};
>>
>> +		ufs_mem_hc: ufs@1d84000 {
>> +			compatible = "qcom,sc7280-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 GCC_UFS_PHY_GDSC>;
>> +			required-opps = <&rpmhpd_opp_nom>;
>> +
>> +			iommus = <&apps_smmu 0x80 0x0>;
>> +			dma-coherent;
>> +
>> +			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";
> As discussed, property-names is preferred to come after
> property, just like in the other node you're adding.
Sure. Updated this in latest patchset and updated the binding as well.

> 
> [...]
> 
>> +		ufs_mem_phy: phy@1d87000 {
>> +			compatible = "qcom,sc7280-qmp-ufs-phy";
>> +			reg = <0x0 0x01d87000 0x0 0xe00>;
>> +			clocks = <&rpmhcc RPMH_CXO_CLK>,
>> +				 <&gcc GCC_UFS_PHY_PHY_AUX_CLK>,
>> +				 <&gcc GCC_UFS_1_CLKREF_EN>;
>> +			clock-names = "ref", "ref_aux", "qref";
>> +
>> +			resets = <&ufs_mem_hc 0>;
>> +			reset-names = "ufsphy";
>> +
>> +			#clock-cells = <1>;
>> +			#phy-cells = <0>;
>> +
>> +			status = "disabled";
>> +
>> +		};
> Stray newline above.
Removed this in latest Patchset

> 
> Konrad

Thanks,
Nitin

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

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

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-09-26 16:20 [PATCH V2 0/3] Add UFS host controller and Phy nodes for sc7280 Nitin Rawat
2023-09-26 16:20 ` [PATCH V2 1/3] scsi: ufs: qcom: dt-bindings: Add SC7280 compatible string Nitin Rawat
2023-09-26 16:20 ` [PATCH V2 2/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 soc Nitin Rawat
2023-09-26 18:31   ` Konrad Dybcio
2023-09-27  8:21     ` Nitin Rawat
2023-09-26 16:20 ` [PATCH V2 3/3] arm64: dts: qcom: sc7280: Add UFS nodes for sc7280 IDP board Nitin Rawat
2023-09-26 18:32   ` 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).