Skip to contentSkip to conversation

scsi|phy: Add SM8450 UFS & Phy support

PATCH In review Vinod Koul 4 participants 12 messages Dec 1, 2021 – Dec 13, 2021

Subsystems (4)
lore
Share & tools
lore

Vinod Koul

author maintainer
#0 lore raw

cover scsi|phy: Add SM8450 UFS & Phy support

Add the binding documentation for ufs SM8450 compatible, phy compatible and SM8450 UFS QMP Phy support.

Vinod Koul (3):
scsi: ufs: dt-bindings: Add SM8450 compatible strings
dt-bindings: phy: qcom,qmp: Add SM8450 UFS phy compatible
phy: qcom-qmp: Add SM8450 UFS QMP Phy

 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  1 +
 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt |  1 +
 drivers/phy/qualcomm/phy-qcom-qmp.c           | 32 +++++++++++++++++++
 3 files changed, 34 insertions(+)
Signature · 1 line
2.31.1
author maintainer
#1 lore raw

PATCH 1/3 scsi: ufs: dt-bindings: Add SM8450 compatible strings

Document "qcom,sm8450-ufshc" compatible string. "qcom,sm8450-ufshc" is for UFS HC found in SM8450 SoC.

---
 Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt +1 -0
index d8fd4df81743..d0fee78e6203 100644
@@ -16,6 +16,7 @@ Required properties:
 			    "qcom,sm8150-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
 			    "qcom,sm8250-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
 			    "qcom,sm8350-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
+			    "qcom,sm8450-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
 - interrupts        : <interrupt mapping for UFS host controller IRQ>
 - reg               : <registers mapping>
 
Signature · 1 line
2.31.1
Reviewed-by on v1 1/3
#2 lore raw

Re: [PATCH 1/3] scsi: ufs: dt-bindings: Add SM8450 compatible strings

Quoted 4 lines · Vinod Koul

Document "qcom,sm8450-ufshc" compatible string. "qcom,sm8450-ufshc" is for UFS HC found in SM8450 SoC.

Regards,
Bjorn

Quoted 19 lines
---
 Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/ufs/ufshcd-pltfrm.txt +1 -0
index d8fd4df81743..d0fee78e6203 100644
@@ -16,6 +16,7 @@ Required properties:
 			    "qcom,sm8150-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
 			    "qcom,sm8250-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
 			    "qcom,sm8350-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
+			    "qcom,sm8450-ufshc", "qcom,ufshc", "jedec,ufs-2.0"
 - interrupts        : <interrupt mapping for UFS host controller IRQ>
 - reg               : <registers mapping>
 
Signature · 1 line
2.31.1
Signature · 3 lines
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
author maintainer
#4 lore raw

PATCH 2/3 dt-bindings: phy: qcom,qmp: Add SM8450 UFS phy compatible

In reply to Vinod Koul

Document the UFS phy compatible for QMP UFS phy found in SM8450 SoC.

---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +1 -0
index 630ceaf915e2..c59bbca9a900 100644
@@ -50,6 +50,7 @@ properties:
       - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
+      - qcom,sm8450-qmp-ufs-phy
       - qcom,sdx55-qmp-pcie-phy
       - qcom,sdx55-qmp-usb3-uni-phy
 
Signature · 1 line
2.31.1
Reviewed-by on v1 2/3
#5 lore raw

Re: [PATCH 2/3] dt-bindings: phy: qcom,qmp: Add SM8450 UFS phy compatible

Quoted 2 lines · Vinod Koul

Document the UFS phy compatible for QMP UFS phy found in SM8450 SoC.

Regards,
Bjorn

Quoted 20 lines
---
 Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/phy/qcom,qmp-phy.yaml +1 -0
index 630ceaf915e2..c59bbca9a900 100644
@@ -50,6 +50,7 @@ properties:
       - qcom,sm8350-qmp-ufs-phy
       - qcom,sm8350-qmp-usb3-phy
       - qcom,sm8350-qmp-usb3-uni-phy
+      - qcom,sm8450-qmp-ufs-phy
       - qcom,sdx55-qmp-pcie-phy
       - qcom,sdx55-qmp-usb3-uni-phy
 
Signature · 1 line
2.31.1
author maintainer
#6 lore raw

PATCH 3/3 phy: qcom-qmp: Add SM8450 UFS QMP Phy

In reply to Vinod Koul

SM8450 UFS seems to use same sequence as SM8350, so reuse the sequence from SM8450. Add the new clock list for this phy and the new compatible

---
 drivers/phy/qualcomm/phy-qcom-qmp.c | 32 +++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
drivers/phy/qualcomm/phy-qcom-qmp.c +32 -0
index 456a59d8c7d0..a959c97a699f 100644
@@ -3091,6 +3091,10 @@ static const char * const qmp_v4_sm8250_usbphy_clk_l[] = {
 	"aux", "ref_clk_src", "com_aux"
 };
 
+static const char * const sm8450_ufs_phy_clk_l[] = {
+	"qref", "ref", "ref_aux",
+};
+
 static const char * const sdm845_ufs_phy_clk_l[] = {
 	"ref", "ref_aux",
 };
@@ -4087,6 +4091,31 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 };
 
+static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
+	.type			= PHY_TYPE_UFS,
+	.nlanes			= 2,
+
+	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
+	.serdes_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_serdes_tbl),
+	.tx_tbl			= sm8350_ufsphy_tx_tbl,
+	.tx_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_tx_tbl),
+	.rx_tbl			= sm8350_ufsphy_rx_tbl,
+	.rx_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_rx_tbl),
+	.pcs_tbl		= sm8350_ufsphy_pcs_tbl,
+	.pcs_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_pcs_tbl),
+	.clk_list		= sm8450_ufs_phy_clk_l,
+	.num_clks		= ARRAY_SIZE(sm8450_ufs_phy_clk_l),
+	.vreg_list		= qmp_phy_vreg_l,
+	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
+	.regs			= sm8150_ufsphy_regs_layout,
+
+	.start_ctrl		= SERDES_START,
+	.pwrdn_ctrl		= SW_PWRDN,
+	.phy_status		= PHYSTATUS,
+
+	.is_dual_lane_phy	= true,
+};
+
 static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
 	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
@@ -5745,6 +5774,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = {
 	}, {
 		.compatible = "qcom,sm8350-qmp-usb3-uni-phy",
 		.data = &sm8350_usb3_uniphy_cfg,
+	}, {
+		.compatible = "qcom,sm8450-qmp-ufs-phy",
+		.data = &sm8450_ufsphy_cfg,
 	}, {
 		.compatible = "qcom,qcm2290-qmp-usb3-phy",
 		.data = &qcm2290_usb3phy_cfg,
Signature · 7 lines
2.31.1


-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
Reviewed-by on v1 3/3
#7 lore raw

Re: [PATCH 3/3] phy: qcom-qmp: Add SM8450 UFS QMP Phy

Quoted 6 lines · Vinod Koul

SM8450 UFS seems to use same sequence as SM8350, so reuse the sequence from SM8450. Add the new clock list for this phy and the new compatible

Regards,
Bjorn

Quoted 64 lines
---
 drivers/phy/qualcomm/phy-qcom-qmp.c | 32 +++++++++++++++++++++++++++++
 1 file changed, 32 insertions(+)
drivers/phy/qualcomm/phy-qcom-qmp.c +32 -0
index 456a59d8c7d0..a959c97a699f 100644
@@ -3091,6 +3091,10 @@ static const char * const qmp_v4_sm8250_usbphy_clk_l[] = {
 	"aux", "ref_clk_src", "com_aux"
 };
 
+static const char * const sm8450_ufs_phy_clk_l[] = {
+	"qref", "ref", "ref_aux",
+};
+
 static const char * const sdm845_ufs_phy_clk_l[] = {
 	"ref", "ref_aux",
 };
@@ -4087,6 +4091,31 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 };
 
+static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
+	.type			= PHY_TYPE_UFS,
+	.nlanes			= 2,
+
+	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
+	.serdes_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_serdes_tbl),
+	.tx_tbl			= sm8350_ufsphy_tx_tbl,
+	.tx_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_tx_tbl),
+	.rx_tbl			= sm8350_ufsphy_rx_tbl,
+	.rx_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_rx_tbl),
+	.pcs_tbl		= sm8350_ufsphy_pcs_tbl,
+	.pcs_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_pcs_tbl),
+	.clk_list		= sm8450_ufs_phy_clk_l,
+	.num_clks		= ARRAY_SIZE(sm8450_ufs_phy_clk_l),
+	.vreg_list		= qmp_phy_vreg_l,
+	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
+	.regs			= sm8150_ufsphy_regs_layout,
+
+	.start_ctrl		= SERDES_START,
+	.pwrdn_ctrl		= SW_PWRDN,
+	.phy_status		= PHYSTATUS,
+
+	.is_dual_lane_phy	= true,
+};
+
 static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
 	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
@@ -5745,6 +5774,9 @@ static const struct of_device_id qcom_qmp_phy_of_match_table[] = {
 	}, {
 		.compatible = "qcom,sm8350-qmp-usb3-uni-phy",
 		.data = &sm8350_usb3_uniphy_cfg,
+	}, {
+		.compatible = "qcom,sm8450-qmp-ufs-phy",
+		.data = &sm8450_ufsphy_cfg,
 	}, {
 		.compatible = "qcom,qcm2290-qmp-usb3-phy",
 		.data = &qcm2290_usb3phy_cfg,
Signature · 1 line
2.31.1
#8 lore raw
In reply to Vinod Koul

Vinod,

Quoted 6 lines

Add the binding documentation for ufs SM8450 compatible, phy compatible and SM8450 UFS QMP Phy support.

 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  1 +
 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt |  1 +
 drivers/phy/qualcomm/phy-qcom-qmp.c           | 32 +++++++++++++++++++

No objections from me. However, these patches should go through the DT and phy trees.

Signature · 6 lines
Martin K. Petersen	Oracle Linux Engineering

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
author maintainer
#9 lore raw
Quoted 6 lines · Martin K. Petersen

Vinod,

Quoted 2 lines

Add the binding documentation for ufs SM8450 compatible, phy compatible and SM8450 UFS QMP Phy support.

Quoted 6 lines
Quoted 3 lines
 .../devicetree/bindings/phy/qcom,qmp-phy.yaml |  1 +
 .../devicetree/bindings/ufs/ufshcd-pltfrm.txt |  1 +
 drivers/phy/qualcomm/phy-qcom-qmp.c           | 32 +++++++++++++++++++

No objections from me. However, these patches should go through the DT and phy trees.

Ok I can pick these up wearing my phy maintainer hat, can u pls ack it...

Thanks

Signature · 1 line
~Vinod
#10 lore raw

Vinod,

Quoted 5 lines
Quoted 2 lines

No objections from me. However, these patches should go through the DT and phy trees.

Ok I can pick these up wearing my phy maintainer hat, can u pls ack it...

This series doesn't touch anything under SCSI. But it does look OK to me, so...

Signature · 6 lines
Martin K. Petersen	Oracle Linux Engineering

-- 
linux-phy mailing list
[email protected]
https://lists.infradead.org/mailman/listinfo/linux-phy
author maintainer
#11 lore raw
Quoted 11 lines · Martin K. Petersen

Vinod,

Quoted 5 lines
Quoted 2 lines

No objections from me. However, these patches should go through the DT and phy trees.

Ok I can pick these up wearing my phy maintainer hat, can u pls ack it...

This series doesn't touch anything under SCSI. But it does look OK to me, so...

I would consider scsi dt-update in your bucket :)

Quoted 2 lines

Thanks for that

I have picked the series now.

Signature · 1 line
~Vinod