linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 00/17] phy: qcom-qmp: config and misc clean ups
@ 2022-09-20  7:38 Johan Hovold
  2022-09-20  7:38 ` [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config Johan Hovold
                   ` (17 more replies)
  0 siblings, 18 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Here's the next and hopefully last set of QMP driver cleanups for a
while.

These patches drops further configuration parameters that are unused or
redundant since the QMP driver split.

This notably includes consolidating the lane configuration, which for
legacy reasons was inconsistent.

Johan


Johan Hovold (17):
  phy: qcom-qmp-pcie: drop unused type from config
  phy: qcom-qmp-pcie-msm8996: drop unused type from config
  phy: qcom-qmp-ufs: drop unused type from config
  phy: qcom-qmp-usb: drop unused type from config
  phy: qcom-qmp-pcie: drop init and exit wrappers
  phy: qcom-qmp-usb: drop init and exit wrappers
  phy: qcom-qmp: drop unused forward declarations
  phy: qcom-qmp-pcie-msm8996: drop unused kernel doc
  phy: qcom-qmp-pcie: drop unused mode field
  phy: qcom-qmp-pcie: drop unused config field
  phy: qcom-qmp: drop unused index field
  phy: qcom-qmp-pcie: consolidate lane config
  phy: qcom-qmp-pcie-msm8996: rename nlanes config
  phy: qcom-qmp-combo: consolidate lane config
  phy: qcom-qmp-ufs: consolidate lane config
  phy: qcom-qmp-usb: consolidate lane config
  phy: qcom-qmp-combo: drop redundant DP config flag

 drivers/phy/qualcomm/phy-qcom-qmp-combo.c     | 104 +++++-----------
 .../phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c  |  14 +--
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c      |  90 ++++----------
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c       |  44 ++-----
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c       | 112 ++++--------------
 5 files changed, 89 insertions(+), 275 deletions(-)

-- 
2.35.1


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

* [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:50   ` Neil Armstrong
  2022-09-22 14:30   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
                   ` (16 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

The configuration PHY type is no longer used since the QMP driver split
so drop it from the configurations.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 4939edcd8cb1..d25f9215b86f 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1304,8 +1304,6 @@ struct qmp_phy;
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* phy-type - PCIE/UFS/USB */
-	unsigned int type;
 	/* number of lanes provided by phy */
 	int nlanes;
 
@@ -1470,7 +1468,6 @@ static const char * const sdm845_pciephy_reset_l[] = {
 };
 
 static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
-	.type			= PHY_TYPE_PCIE,
 	.nlanes			= 1,
 
 	.serdes_tbl		= ipq8074_pcie_serdes_tbl,
@@ -1499,7 +1496,6 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
-	.type			= PHY_TYPE_PCIE,
 	.nlanes			= 1,
 
 	.serdes_tbl		= ipq8074_pcie_gen3_serdes_tbl,
@@ -1529,7 +1525,6 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
 };
 
 static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
-	.type			= PHY_TYPE_PCIE,
 	.nlanes			= 1,
 
 	.serdes_tbl		= ipq6018_pcie_serdes_tbl,
@@ -1559,7 +1554,6 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 1,
 
 	.serdes_tbl		= sdm845_qmp_pcie_serdes_tbl,
@@ -1590,7 +1584,6 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 1,
 
 	.serdes_tbl		= sdm845_qhp_pcie_serdes_tbl,
@@ -1619,7 +1612,6 @@ static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 1,
 
 	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
@@ -1658,7 +1650,6 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 2,
 
 	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
@@ -1698,7 +1689,6 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
-	.type			= PHY_TYPE_PCIE,
 	.nlanes			= 1,
 
 	.serdes_tbl		= msm8998_pcie_serdes_tbl,
@@ -1723,7 +1713,6 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 1,
 
 	.serdes_tbl		= sc8180x_qmp_pcie_serdes_tbl,
@@ -1753,7 +1742,6 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 2,
 
 	.serdes_tbl		= sdx55_qmp_pcie_serdes_tbl,
@@ -1785,7 +1773,6 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 1,
 
 	.serdes_tbl		= sm8450_qmp_gen3x1_pcie_serdes_tbl,
@@ -1816,7 +1803,6 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
-	.type = PHY_TYPE_PCIE,
 	.nlanes = 2,
 
 	.serdes_tbl		= sm8450_qmp_gen4x2_pcie_serdes_tbl,
-- 
2.35.1


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

* [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: drop unused type from config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
  2022-09-20  7:38 ` [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:50   ` Neil Armstrong
  2022-09-22 14:31   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 03/17] phy: qcom-qmp-ufs: " Johan Hovold
                   ` (15 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

The configuration PHY type is no longer used since the QMP driver split
so drop it from the configuration.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 245f6dc1710e..20a76b1b23a2 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -188,8 +188,6 @@ struct qmp_phy;
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* phy-type - PCIE/UFS/USB */
-	unsigned int type;
 	/* number of lanes provided by phy */
 	int nlanes;
 
@@ -323,7 +321,6 @@ static const char * const qmp_phy_vreg_l[] = {
 };
 
 static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
-	.type			= PHY_TYPE_PCIE,
 	.nlanes			= 3,
 
 	.serdes_tbl		= msm8996_pcie_serdes_tbl,
-- 
2.35.1


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

* [PATCH 03/17] phy: qcom-qmp-ufs: drop unused type from config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
  2022-09-20  7:38 ` [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config Johan Hovold
  2022-09-20  7:38 ` [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 14:31   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 04/17] phy: qcom-qmp-usb: " Johan Hovold
                   ` (14 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

The configuration PHY type is no longer used since the QMP driver split
so drop it from the configuration.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 8 --------
 1 file changed, 8 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index 7b335b50b4a1..e5c8d3a4fdaa 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -535,8 +535,6 @@ struct qmp_phy;
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* phy-type - PCIE/UFS/USB */
-	unsigned int type;
 	/* number of lanes provided by phy */
 	int nlanes;
 
@@ -668,7 +666,6 @@ static const char * const qmp_phy_vreg_l[] = {
 };
 
 static const struct qmp_phy_cfg msm8996_ufs_cfg = {
-	.type			= PHY_TYPE_UFS,
 	.nlanes			= 1,
 
 	.serdes_tbl		= msm8996_ufs_serdes_tbl,
@@ -694,7 +691,6 @@ static const struct qmp_phy_cfg msm8996_ufs_cfg = {
 };
 
 static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
-	.type			= PHY_TYPE_UFS,
 	.nlanes			= 2,
 
 	.serdes_tbl		= sdm845_ufsphy_serdes_tbl,
@@ -720,7 +716,6 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
-	.type			= PHY_TYPE_UFS,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm6115_ufsphy_serdes_tbl,
@@ -744,7 +739,6 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
-	.type			= PHY_TYPE_UFS,
 	.nlanes			= 2,
 
 	.serdes_tbl		= sm8150_ufsphy_serdes_tbl,
@@ -769,7 +763,6 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
-	.type			= PHY_TYPE_UFS,
 	.nlanes			= 2,
 
 	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
@@ -794,7 +787,6 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
-	.type			= PHY_TYPE_UFS,
 	.nlanes			= 2,
 
 	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
-- 
2.35.1


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

* [PATCH 04/17] phy: qcom-qmp-usb: drop unused type from config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (2 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 03/17] phy: qcom-qmp-ufs: " Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 14:33   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers Johan Hovold
                   ` (13 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

The configuration PHY type is no longer needed since the QMP driver
split so drop it from the configuration and suspend callbacks.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 26 -------------------------
 1 file changed, 26 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 93994f1a46e2..03481b6f1c35 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -1431,8 +1431,6 @@ struct qmp_phy;
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* phy-type - PCIE/UFS/USB */
-	unsigned int type;
 	/* number of lanes provided by phy */
 	int nlanes;
 
@@ -1609,7 +1607,6 @@ static const char * const qmp_phy_vreg_l[] = {
 };
 
 static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= ipq8074_usb3_serdes_tbl,
@@ -1634,7 +1631,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= msm8996_usb3_serdes_tbl,
@@ -1659,7 +1655,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
@@ -1691,7 +1686,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
@@ -1723,7 +1717,6 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sc8280xp_usb3_uniphy_serdes_tbl,
@@ -1752,7 +1745,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= qmp_v3_usb3_uniphy_serdes_tbl,
@@ -1781,7 +1773,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
-	.type                   = PHY_TYPE_USB3,
 	.nlanes                 = 1,
 
 	.serdes_tbl             = msm8998_usb3_serdes_tbl,
@@ -1808,7 +1799,6 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
@@ -1844,7 +1834,6 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
@@ -1876,7 +1865,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
@@ -1911,7 +1899,6 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
@@ -1943,7 +1930,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
@@ -1975,7 +1961,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
@@ -2007,7 +1992,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
@@ -2042,7 +2026,6 @@ static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
@@ -2074,7 +2057,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
-	.type			= PHY_TYPE_USB3,
 	.nlanes			= 1,
 
 	.serdes_tbl		= qcm2290_usb3_serdes_tbl,
@@ -2432,10 +2414,6 @@ static int __maybe_unused qmp_usb_runtime_suspend(struct device *dev)
 
 	dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qphy->mode);
 
-	/* Supported only for USB3 PHY and luckily USB3 is the first phy */
-	if (cfg->type != PHY_TYPE_USB3)
-		return 0;
-
 	if (!qphy->phy->init_count) {
 		dev_vdbg(dev, "PHY not initialized, bailing out\n");
 		return 0;
@@ -2458,10 +2436,6 @@ static int __maybe_unused qmp_usb_runtime_resume(struct device *dev)
 
 	dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qphy->mode);
 
-	/* Supported only for USB3 PHY and luckily USB3 is the first phy */
-	if (cfg->type != PHY_TYPE_USB3)
-		return 0;
-
 	if (!qphy->phy->init_count) {
 		dev_vdbg(dev, "PHY not initialized, bailing out\n");
 		return 0;
-- 
2.35.1


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

* [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (3 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 04/17] phy: qcom-qmp-usb: " Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 06/17] phy: qcom-qmp-usb: " Johan Hovold
                   ` (12 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Drop the unnecessary PHY init and exit callback wrappers.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 29 ++++--------------------
 1 file changed, 4 insertions(+), 25 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index d25f9215b86f..525097e3b041 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1877,8 +1877,9 @@ static int qmp_pcie_serdes_init(struct qmp_phy *qphy)
 	return 0;
 }
 
-static int qmp_pcie_com_init(struct qmp_phy *qphy)
+static int qmp_pcie_init(struct phy *phy)
 {
+	struct qmp_phy *qphy = phy_get_drvdata(phy);
 	struct qcom_qmp *qmp = qphy->qmp;
 	const struct qmp_phy_cfg *cfg = qphy->cfg;
 	void __iomem *pcs = qphy->pcs;
@@ -1925,8 +1926,9 @@ static int qmp_pcie_com_init(struct qmp_phy *qphy)
 	return ret;
 }
 
-static int qmp_pcie_com_exit(struct qmp_phy *qphy)
+static int qmp_pcie_exit(struct phy *phy)
 {
+	struct qmp_phy *qphy = phy_get_drvdata(phy);
 	struct qcom_qmp *qmp = qphy->qmp;
 	const struct qmp_phy_cfg *cfg = qphy->cfg;
 
@@ -1939,20 +1941,6 @@ static int qmp_pcie_com_exit(struct qmp_phy *qphy)
 	return 0;
 }
 
-static int qmp_pcie_init(struct phy *phy)
-{
-	struct qmp_phy *qphy = phy_get_drvdata(phy);
-	struct qcom_qmp *qmp = qphy->qmp;
-	int ret;
-	dev_vdbg(qmp->dev, "Initializing QMP phy\n");
-
-	ret = qmp_pcie_com_init(qphy);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-
 static int qmp_pcie_power_on(struct phy *phy)
 {
 	struct qmp_phy *qphy = phy_get_drvdata(phy);
@@ -2060,15 +2048,6 @@ static int qmp_pcie_power_off(struct phy *phy)
 	return 0;
 }
 
-static int qmp_pcie_exit(struct phy *phy)
-{
-	struct qmp_phy *qphy = phy_get_drvdata(phy);
-
-	qmp_pcie_com_exit(qphy);
-
-	return 0;
-}
-
 static int qmp_pcie_enable(struct phy *phy)
 {
 	int ret;
-- 
2.35.1


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

* [PATCH 06/17] phy: qcom-qmp-usb: drop init and exit wrappers
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (4 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations Johan Hovold
                   ` (11 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Drop the unnecessary PHY init and exit callback wrappers.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 29 ++++---------------------
 1 file changed, 4 insertions(+), 25 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 03481b6f1c35..a42e13905c15 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -2125,8 +2125,9 @@ static int qmp_usb_serdes_init(struct qmp_phy *qphy)
 	return 0;
 }
 
-static int qmp_usb_com_init(struct qmp_phy *qphy)
+static int qmp_usb_init(struct phy *phy)
 {
+	struct qmp_phy *qphy = phy_get_drvdata(phy);
 	struct qcom_qmp *qmp = qphy->qmp;
 	const struct qmp_phy_cfg *cfg = qphy->cfg;
 	void __iomem *pcs = qphy->pcs;
@@ -2197,8 +2198,9 @@ static int qmp_usb_com_init(struct qmp_phy *qphy)
 	return ret;
 }
 
-static int qmp_usb_com_exit(struct qmp_phy *qphy)
+static int qmp_usb_exit(struct phy *phy)
 {
+	struct qmp_phy *qphy = phy_get_drvdata(phy);
 	struct qcom_qmp *qmp = qphy->qmp;
 	const struct qmp_phy_cfg *cfg = qphy->cfg;
 
@@ -2211,20 +2213,6 @@ static int qmp_usb_com_exit(struct qmp_phy *qphy)
 	return 0;
 }
 
-static int qmp_usb_init(struct phy *phy)
-{
-	struct qmp_phy *qphy = phy_get_drvdata(phy);
-	struct qcom_qmp *qmp = qphy->qmp;
-	int ret;
-	dev_vdbg(qmp->dev, "Initializing QMP phy\n");
-
-	ret = qmp_usb_com_init(qphy);
-	if (ret)
-		return ret;
-
-	return 0;
-}
-
 static int qmp_usb_power_on(struct phy *phy)
 {
 	struct qmp_phy *qphy = phy_get_drvdata(phy);
@@ -2316,15 +2304,6 @@ static int qmp_usb_power_off(struct phy *phy)
 	return 0;
 }
 
-static int qmp_usb_exit(struct phy *phy)
-{
-	struct qmp_phy *qphy = phy_get_drvdata(phy);
-
-	qmp_usb_com_exit(qphy);
-
-	return 0;
-}
-
 static int qmp_usb_enable(struct phy *phy)
 {
 	int ret;
-- 
2.35.1


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

* [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (5 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 06/17] phy: qcom-qmp-usb: " Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 14:31   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc Johan Hovold
                   ` (10 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Only the combo QMP driver needs a forward declaration of struct qmp_phy.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 --
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c         | 2 --
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c          | 2 --
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c          | 2 --
 4 files changed, 8 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 20a76b1b23a2..7e755213e9c5 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -184,8 +184,6 @@ static const struct qmp_phy_init_tbl msm8996_pcie_pcs_tbl[] = {
 	QMP_PHY_INIT_CFG(QPHY_V2_PCS_TXDEEMPH_M3P5DB_V0, 0x0e),
 };
 
-struct qmp_phy;
-
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
 	/* number of lanes provided by phy */
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 525097e3b041..666109a11329 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1300,8 +1300,6 @@ static const struct qmp_phy_init_tbl sm8450_qmp_gen4x2_pcie_pcs_misc_tbl[] = {
 	QMP_PHY_INIT_CFG(QPHY_V5_20_PCS_PCIE_G4_PRE_GAIN, 0x2e),
 };
 
-struct qmp_phy;
-
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
 	/* number of lanes provided by phy */
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index e5c8d3a4fdaa..cc49dec46df4 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -531,8 +531,6 @@ static const struct qmp_phy_init_tbl sm8350_ufsphy_pcs_tbl[] = {
 	QMP_PHY_INIT_CFG(QPHY_V5_PCS_UFS_MULTI_LANE_CTRL1, 0x02),
 };
 
-struct qmp_phy;
-
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
 	/* number of lanes provided by phy */
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index a42e13905c15..820062a95211 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -1427,8 +1427,6 @@ static const struct qmp_phy_init_tbl sc8280xp_usb3_uniphy_pcs_tbl[] = {
 	QMP_PHY_INIT_CFG(QPHY_V5_PCS_REFGEN_REQ_CONFIG1, 0x21),
 };
 
-struct qmp_phy;
-
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
 	/* number of lanes provided by phy */
-- 
2.35.1


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

* [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (6 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field Johan Hovold
                   ` (9 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Drop the removed mode field from the struct qmp_phy kernel doc.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index 7e755213e9c5..e261837aee32 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -238,7 +238,6 @@ struct qmp_phy_cfg {
  * @index: lane index
  * @qmp: QMP phy to which this lane belongs
  * @lane_rst: lane's reset controller
- * @mode: current PHY mode
  */
 struct qmp_phy {
 	struct phy *phy;
-- 
2.35.1


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

* [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (7 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field Johan Hovold
                   ` (8 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Drop the unused mode field from struct qmp_phy.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 --
 1 file changed, 2 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 666109a11329..65825ca41e96 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1374,7 +1374,6 @@ struct qmp_phy_cfg {
  * @pipe_clk: pipe clock
  * @index: lane index
  * @qmp: QMP phy to which this lane belongs
- * @mode: current PHY mode
  */
 struct qmp_phy {
 	struct phy *phy;
@@ -1389,7 +1388,6 @@ struct qmp_phy {
 	struct clk *pipe_clk;
 	unsigned int index;
 	struct qcom_qmp *qmp;
-	enum phy_mode mode;
 };
 
 /**
-- 
2.35.1


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

* [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (8 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:59   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 11/17] phy: qcom-qmp: drop unused index field Johan Hovold
                   ` (7 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Drop the unused mask_com_pcs_ready field from struct qmp_phy_cfg.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 -
 1 file changed, 1 deletion(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 65825ca41e96..d22d2cf2fc18 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1342,7 +1342,6 @@ struct qmp_phy_cfg {
 
 	unsigned int start_ctrl;
 	unsigned int pwrdn_ctrl;
-	unsigned int mask_com_pcs_ready;
 	/* bit offset of PHYSTATUS in QPHY_PCS_STATUS register */
 	unsigned int phy_status;
 
-- 
2.35.1


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

* [PATCH 11/17] phy: qcom-qmp: drop unused index field
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (9 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:59   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config Johan Hovold
                   ` (6 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Only the MSM8996 PCIe QMP driver uses the index field so drop it from
the other drivers.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 3 ---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c  | 3 ---
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c   | 3 ---
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c   | 3 ---
 4 files changed, 12 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 41f938126ff1..08e96e383a29 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -906,7 +906,6 @@ struct qmp_phy_combo_cfg {
  * @pcs_misc: iomapped memory space for lane's pcs_misc
  * @pcs_usb: iomapped memory space for lane's pcs_usb
  * @pipe_clk: pipe clock
- * @index: lane index
  * @qmp: QMP phy to which this lane belongs
  * @mode: current PHY mode
  * @dp_aux_cfg: Display port aux config
@@ -925,7 +924,6 @@ struct qmp_phy {
 	void __iomem *pcs_misc;
 	void __iomem *pcs_usb;
 	struct clk *pipe_clk;
-	unsigned int index;
 	struct qcom_qmp *qmp;
 	enum phy_mode mode;
 	unsigned int dp_aux_cfg;
@@ -2779,7 +2777,6 @@ static int qmp_combo_create(struct device *dev, struct device_node *np, int id,
 	}
 
 	qphy->phy = generic_phy;
-	qphy->index = id;
 	qphy->qmp = qmp;
 	qmp->phys[id] = qphy;
 	phy_set_drvdata(generic_phy, qphy);
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index d22d2cf2fc18..387abed33727 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1371,7 +1371,6 @@ struct qmp_phy_cfg {
  * @rx2: iomapped memory space for second lane's rx (in dual lane PHYs)
  * @pcs_misc: iomapped memory space for lane's pcs_misc
  * @pipe_clk: pipe clock
- * @index: lane index
  * @qmp: QMP phy to which this lane belongs
  */
 struct qmp_phy {
@@ -1385,7 +1384,6 @@ struct qmp_phy {
 	void __iomem *rx2;
 	void __iomem *pcs_misc;
 	struct clk *pipe_clk;
-	unsigned int index;
 	struct qcom_qmp *qmp;
 };
 
@@ -2264,7 +2262,6 @@ static int qmp_pcie_create(struct device *dev, struct device_node *np, int id,
 	}
 
 	qphy->phy = generic_phy;
-	qphy->index = id;
 	qphy->qmp = qmp;
 	qmp->phys[id] = qphy;
 	phy_set_drvdata(generic_phy, qphy);
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index cc49dec46df4..ca9a42250556 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -580,7 +580,6 @@ struct qmp_phy_cfg {
  * @tx2: iomapped memory space for second lane's tx (in dual lane PHYs)
  * @rx2: iomapped memory space for second lane's rx (in dual lane PHYs)
  * @pcs_misc: iomapped memory space for lane's pcs_misc
- * @index: lane index
  * @qmp: QMP phy to which this lane belongs
  */
 struct qmp_phy {
@@ -593,7 +592,6 @@ struct qmp_phy {
 	void __iomem *tx2;
 	void __iomem *rx2;
 	void __iomem *pcs_misc;
-	unsigned int index;
 	struct qcom_qmp *qmp;
 };
 
@@ -1149,7 +1147,6 @@ static int qmp_ufs_create(struct device *dev, struct device_node *np, int id,
 	}
 
 	qphy->phy = generic_phy;
-	qphy->index = id;
 	qphy->qmp = qmp;
 	qmp->phys[id] = qphy;
 	phy_set_drvdata(generic_phy, qphy);
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index 820062a95211..a34320738f60 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -1491,7 +1491,6 @@ struct qmp_phy_cfg {
  * @pcs_misc: iomapped memory space for lane's pcs_misc
  * @pcs_usb: iomapped memory space for lane's pcs_usb
  * @pipe_clk: pipe clock
- * @index: lane index
  * @qmp: QMP phy to which this lane belongs
  * @mode: current PHY mode
  */
@@ -1507,7 +1506,6 @@ struct qmp_phy {
 	void __iomem *pcs_misc;
 	void __iomem *pcs_usb;
 	struct clk *pipe_clk;
-	unsigned int index;
 	struct qcom_qmp *qmp;
 	enum phy_mode mode;
 };
@@ -2648,7 +2646,6 @@ int qmp_usb_create(struct device *dev, struct device_node *np, int id,
 	}
 
 	qphy->phy = generic_phy;
-	qphy->index = id;
 	qphy->qmp = qmp;
 	qmp->phys[id] = qphy;
 	phy_set_drvdata(generic_phy, qphy);
-- 
2.35.1


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

* [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (10 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 11/17] phy: qcom-qmp: drop unused index field Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 18:06   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config Johan Hovold
                   ` (5 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

For legacy reasons, there are two configuration parameters that describe
the number of lanes a PHY has.

Replace them both with a new field simply named "lanes".

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 39 ++++++++++--------------
 1 file changed, 16 insertions(+), 23 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
index 387abed33727..dde398105f03 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
@@ -1302,8 +1302,7 @@ static const struct qmp_phy_init_tbl sm8450_qmp_gen4x2_pcie_pcs_misc_tbl[] = {
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* number of lanes provided by phy */
-	int nlanes;
+	int lanes;
 
 	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
 	const struct qmp_phy_init_tbl *serdes_tbl;
@@ -1351,9 +1350,6 @@ struct qmp_phy_cfg {
 	int pwrdn_delay_min;
 	int pwrdn_delay_max;
 
-	/* true, if PHY has secondary tx/rx lanes to be configured */
-	bool is_dual_lane_phy;
-
 	/* QMP PHY pipe clock interface rate */
 	unsigned long pipe_clock_rate;
 };
@@ -1461,7 +1457,7 @@ static const char * const sdm845_pciephy_reset_l[] = {
 };
 
 static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= ipq8074_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_pcie_serdes_tbl),
@@ -1489,7 +1485,7 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= ipq8074_pcie_gen3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_pcie_gen3_serdes_tbl),
@@ -1518,7 +1514,7 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
 };
 
 static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= ipq6018_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(ipq6018_pcie_serdes_tbl),
@@ -1547,7 +1543,7 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
-	.nlanes = 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sdm845_qmp_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sdm845_qmp_pcie_serdes_tbl),
@@ -1577,7 +1573,7 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
-	.nlanes = 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sdm845_qhp_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sdm845_qhp_pcie_serdes_tbl),
@@ -1605,7 +1601,7 @@ static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
-	.nlanes = 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8250_qmp_pcie_serdes_tbl),
@@ -1643,7 +1639,7 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
-	.nlanes = 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8250_qmp_pcie_serdes_tbl),
@@ -1675,14 +1671,13 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
 	.pwrdn_ctrl		= SW_PWRDN | REFCLK_DRV_DSBL,
 	.phy_status		= PHYSTATUS,
 
-	.is_dual_lane_phy	= true,
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= 995,		/* us */
 	.pwrdn_delay_max	= 1005,		/* us */
 };
 
 static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= msm8998_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(msm8998_pcie_serdes_tbl),
@@ -1706,7 +1701,7 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
-	.nlanes = 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sc8180x_qmp_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sc8180x_qmp_pcie_serdes_tbl),
@@ -1735,7 +1730,7 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
-	.nlanes = 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sdx55_qmp_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sdx55_qmp_pcie_serdes_tbl),
@@ -1759,14 +1754,13 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
 	.pwrdn_ctrl		= SW_PWRDN,
 	.phy_status		= PHYSTATUS_4_20,
 
-	.is_dual_lane_phy	= true,
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= 995,		/* us */
 	.pwrdn_delay_max	= 1005,		/* us */
 };
 
 static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
-	.nlanes = 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8450_qmp_gen3x1_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8450_qmp_gen3x1_pcie_serdes_tbl),
@@ -1796,7 +1790,7 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
-	.nlanes = 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8450_qmp_gen4x2_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8450_qmp_gen4x2_pcie_serdes_tbl),
@@ -1820,7 +1814,6 @@ static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
 	.pwrdn_ctrl		= SW_PWRDN | REFCLK_DRV_DSBL,
 	.phy_status		= PHYSTATUS_4_20,
 
-	.is_dual_lane_phy	= true,
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= 995,		/* us */
 	.pwrdn_delay_max	= 1005,		/* us */
@@ -1959,7 +1952,7 @@ static int qmp_pcie_power_on(struct phy *phy)
 	qmp_pcie_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
 	qmp_pcie_configure_lane(tx, cfg->regs, cfg->tx_tbl_sec, cfg->tx_tbl_num_sec, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_pcie_configure_lane(qphy->tx2, cfg->regs, cfg->tx_tbl,
 					cfg->tx_tbl_num, 2);
 		qmp_pcie_configure_lane(qphy->tx2, cfg->regs, cfg->tx_tbl_sec,
@@ -1969,7 +1962,7 @@ static int qmp_pcie_power_on(struct phy *phy)
 	qmp_pcie_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
 	qmp_pcie_configure_lane(rx, cfg->regs, cfg->rx_tbl_sec, cfg->rx_tbl_num_sec, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_pcie_configure_lane(qphy->rx2, cfg->regs, cfg->rx_tbl,
 					cfg->rx_tbl_num, 2);
 		qmp_pcie_configure_lane(qphy->rx2, cfg->regs, cfg->rx_tbl_sec,
@@ -2225,7 +2218,7 @@ static int qmp_pcie_create(struct device *dev, struct device_node *np, int id,
 	if (IS_ERR(qphy->pcs))
 		return PTR_ERR(qphy->pcs);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
 		if (IS_ERR(qphy->tx2))
 			return PTR_ERR(qphy->tx2);
-- 
2.35.1


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

* [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (11 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:01   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config Johan Hovold
                   ` (4 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

The nlanes configuration parameter is really the number of PHYs provided
by this QMP block on MSM8996. Rename it accordingly.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
index e261837aee32..0f8e739936ab 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
@@ -186,8 +186,8 @@ static const struct qmp_phy_init_tbl msm8996_pcie_pcs_tbl[] = {
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* number of lanes provided by phy */
-	int nlanes;
+	/* number of PHYs provided by this block */
+	int num_phys;
 
 	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
 	const struct qmp_phy_init_tbl *serdes_tbl;
@@ -318,7 +318,7 @@ static const char * const qmp_phy_vreg_l[] = {
 };
 
 static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
-	.nlanes			= 3,
+	.num_phys		= 3,
 
 	.serdes_tbl		= msm8996_pcie_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(msm8996_pcie_serdes_tbl),
@@ -861,7 +861,7 @@ static int qmp_pcie_msm8996_probe(struct platform_device *pdev)
 	if (IS_ERR(serdes))
 		return PTR_ERR(serdes);
 
-	expected_phys = cfg->nlanes;
+	expected_phys = cfg->num_phys;
 
 	mutex_init(&qmp->phy_mutex);
 
-- 
2.35.1


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

* [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (12 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:01   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 15/17] phy: qcom-qmp-ufs: " Johan Hovold
                   ` (3 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

For legacy reasons, there are two configuration parameters that appear
to describe the number of lanes a PHY has, even if "nlanes" was actually
used for a different purpose.

Replace them both with a new field simply named "lanes".

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 38 ++++++++---------------
 1 file changed, 13 insertions(+), 25 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 08e96e383a29..417e0fcf1a9f 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -816,8 +816,7 @@ struct qmp_phy;
 struct qmp_phy_cfg {
 	/* phy-type - PCIE/UFS/USB */
 	unsigned int type;
-	/* number of lanes provided by phy */
-	int nlanes;
+	int lanes;
 
 	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
 	const struct qmp_phy_init_tbl *serdes_tbl;
@@ -879,8 +878,6 @@ struct qmp_phy_cfg {
 
 	/* true, if PHY has a separate DP_COM control block */
 	bool has_phy_dp_com_ctrl;
-	/* true, if PHY has secondary tx/rx lanes to be configured */
-	bool is_dual_lane_phy;
 
 	/* Offset from PCS to PCS_USB region */
 	unsigned int pcs_usb_offset;
@@ -1029,7 +1026,7 @@ static const char * const sc7180_usb3phy_reset_l[] = {
 
 static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
 	.type			= PHY_TYPE_USB3,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
@@ -1056,12 +1053,11 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
 	.type			= PHY_TYPE_DP,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v3_dp_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_dp_serdes_tbl),
@@ -1091,7 +1087,6 @@ static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
 	.regs			= qmp_v3_usb3phy_regs_layout,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 
 	.dp_aux_init = qcom_qmp_v3_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx,
@@ -1106,7 +1101,7 @@ static const struct qmp_phy_combo_cfg sc7180_usb3dpphy_cfg = {
 
 static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
 	.type			= PHY_TYPE_USB3,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
@@ -1133,7 +1128,6 @@ static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
@@ -1143,7 +1137,7 @@ static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
 
 static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
 	.type			= PHY_TYPE_USB3,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
@@ -1174,12 +1168,11 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
 	.type			= PHY_TYPE_DP,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v4_dp_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
@@ -1209,7 +1202,6 @@ static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
 	.regs			= qmp_v3_usb3phy_regs_layout,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 
 	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
@@ -1224,7 +1216,7 @@ static const struct qmp_phy_combo_cfg sc8180x_usb3dpphy_cfg = {
 
 static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
 	.type			= PHY_TYPE_USB3,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= sc8280xp_usb43dp_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sc8280xp_usb43dp_serdes_tbl),
@@ -1252,12 +1244,11 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
 	.type			= PHY_TYPE_DP,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v5_dp_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v5_dp_serdes_tbl),
@@ -1287,7 +1278,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
 	.regs			= qmp_v4_usb3phy_regs_layout,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 
 	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
@@ -1302,7 +1292,7 @@ static const struct qmp_phy_combo_cfg sc8280xp_usb43dpphy_combo_cfg = {
 
 static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
 	.type			= PHY_TYPE_USB3,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
@@ -1332,12 +1322,11 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
 	.type			= PHY_TYPE_DP,
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v4_dp_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
@@ -1367,7 +1356,6 @@ static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
 	.regs			= qmp_v4_usb3phy_regs_layout,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 
 	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
@@ -2117,7 +2105,7 @@ static int qmp_combo_power_on(struct phy *phy)
 	/* Tx, Rx, and PCS configurations */
 	qmp_combo_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_combo_configure_lane(qphy->tx2, cfg->regs, cfg->tx_tbl,
 					 cfg->tx_tbl_num, 2);
 	}
@@ -2128,7 +2116,7 @@ static int qmp_combo_power_on(struct phy *phy)
 
 	qmp_combo_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_combo_configure_lane(qphy->rx2, cfg->regs, cfg->rx_tbl,
 					 cfg->rx_tbl_num, 2);
 	}
@@ -2725,7 +2713,7 @@ static int qmp_combo_create(struct device *dev, struct device_node *np, int id,
 	if (cfg->pcs_usb_offset)
 		qphy->pcs_usb = qphy->pcs + cfg->pcs_usb_offset;
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
 		if (IS_ERR(qphy->tx2))
 			return PTR_ERR(qphy->tx2);
-- 
2.35.1


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

* [PATCH 15/17] phy: qcom-qmp-ufs: consolidate lane config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (13 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:02   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 16/17] phy: qcom-qmp-usb: " Johan Hovold
                   ` (2 subsequent siblings)
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

For legacy reasons, there are two configuration parameters that describe
the number of lanes a PHY has.

Replace them both with a new field simply named "lanes".

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 31 ++++++++-----------------
 1 file changed, 10 insertions(+), 21 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
index ca9a42250556..d21b977850b3 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
@@ -533,8 +533,7 @@ static const struct qmp_phy_init_tbl sm8350_ufsphy_pcs_tbl[] = {
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* number of lanes provided by phy */
-	int nlanes;
+	int lanes;
 
 	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
 	const struct qmp_phy_init_tbl *serdes_tbl;
@@ -561,9 +560,6 @@ struct qmp_phy_cfg {
 	/* bit offset of PHYSTATUS in QPHY_PCS_STATUS register */
 	unsigned int phy_status;
 
-	/* true, if PHY has secondary tx/rx lanes to be configured */
-	bool is_dual_lane_phy;
-
 	/* true, if PCS block has no separate SW_RESET register */
 	bool no_pcs_sw_reset;
 };
@@ -662,7 +658,7 @@ static const char * const qmp_phy_vreg_l[] = {
 };
 
 static const struct qmp_phy_cfg msm8996_ufs_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= msm8996_ufs_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(msm8996_ufs_serdes_tbl),
@@ -687,7 +683,7 @@ static const struct qmp_phy_cfg msm8996_ufs_cfg = {
 };
 
 static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
-	.nlanes			= 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sdm845_ufsphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sdm845_ufsphy_serdes_tbl),
@@ -707,12 +703,11 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
 	.pwrdn_ctrl		= SW_PWRDN,
 	.phy_status		= PHYSTATUS,
 
-	.is_dual_lane_phy	= true,
 	.no_pcs_sw_reset	= true,
 };
 
 static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm6115_ufsphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm6115_ufsphy_serdes_tbl),
@@ -735,7 +730,7 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
-	.nlanes			= 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8150_ufsphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_ufsphy_serdes_tbl),
@@ -754,12 +749,10 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
 	.start_ctrl		= SERDES_START,
 	.pwrdn_ctrl		= SW_PWRDN,
 	.phy_status		= PHYSTATUS,
-
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
-	.nlanes			= 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_serdes_tbl),
@@ -778,12 +771,10 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
 	.start_ctrl		= SERDES_START,
 	.pwrdn_ctrl		= SW_PWRDN,
 	.phy_status		= PHYSTATUS,
-
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
-	.nlanes			= 2,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_serdes_tbl),
@@ -802,8 +793,6 @@ static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
 	.start_ctrl		= SERDES_START,
 	.pwrdn_ctrl		= SW_PWRDN,
 	.phy_status		= PHYSTATUS,
-
-	.is_dual_lane_phy	= true,
 };
 
 static void qmp_ufs_configure_lane(void __iomem *base,
@@ -956,14 +945,14 @@ static int qmp_ufs_power_on(struct phy *phy)
 	/* Tx, Rx, and PCS configurations */
 	qmp_ufs_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_ufs_configure_lane(qphy->tx2, cfg->regs,
 					cfg->tx_tbl, cfg->tx_tbl_num, 2);
 	}
 
 	qmp_ufs_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_ufs_configure_lane(qphy->rx2, cfg->regs,
 					cfg->rx_tbl, cfg->rx_tbl_num, 2);
 	}
@@ -1122,7 +1111,7 @@ static int qmp_ufs_create(struct device *dev, struct device_node *np, int id,
 	if (IS_ERR(qphy->pcs))
 		return PTR_ERR(qphy->pcs);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
 		if (IS_ERR(qphy->tx2))
 			return PTR_ERR(qphy->tx2);
-- 
2.35.1


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

* [PATCH 16/17] phy: qcom-qmp-usb: consolidate lane config
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (14 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 15/17] phy: qcom-qmp-ufs: " Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:02   ` Dmitry Baryshkov
  2022-09-20  7:38 ` [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag Johan Hovold
  2022-09-24  5:30 ` [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Vinod Koul
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

For legacy reasons, there are two configuration parameters that appear
to describe the number of lanes a PHY has, even if "nlanes" was actually
used for a different purpose.

Replace them both with a new field simply named "lanes".

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 52 ++++++++++---------------
 1 file changed, 20 insertions(+), 32 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
index a34320738f60..f01b3022a10d 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
@@ -1429,8 +1429,7 @@ static const struct qmp_phy_init_tbl sc8280xp_usb3_uniphy_pcs_tbl[] = {
 
 /* struct qmp_phy_cfg - per-PHY initialization config */
 struct qmp_phy_cfg {
-	/* number of lanes provided by phy */
-	int nlanes;
+	int lanes;
 
 	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
 	const struct qmp_phy_init_tbl *serdes_tbl;
@@ -1470,8 +1469,6 @@ struct qmp_phy_cfg {
 
 	/* true, if PHY has a separate DP_COM control block */
 	bool has_phy_dp_com_ctrl;
-	/* true, if PHY has secondary tx/rx lanes to be configured */
-	bool is_dual_lane_phy;
 
 	/* Offset from PCS to PCS_USB region */
 	unsigned int pcs_usb_offset;
@@ -1603,7 +1600,7 @@ static const char * const qmp_phy_vreg_l[] = {
 };
 
 static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= ipq8074_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_usb3_serdes_tbl),
@@ -1627,7 +1624,7 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= msm8996_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(msm8996_usb3_serdes_tbl),
@@ -1651,7 +1648,7 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
 };
 
 static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
@@ -1678,11 +1675,10 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
@@ -1709,11 +1705,10 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sc8280xp_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sc8280xp_usb3_uniphy_serdes_tbl),
@@ -1741,7 +1736,7 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= qmp_v3_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_uniphy_serdes_tbl),
@@ -1769,7 +1764,7 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
-	.nlanes                 = 1,
+	.lanes			= 2,
 
 	.serdes_tbl             = msm8998_usb3_serdes_tbl,
 	.serdes_tbl_num         = ARRAY_SIZE(msm8998_usb3_serdes_tbl),
@@ -1790,12 +1785,10 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
 	.start_ctrl             = SERDES_START | PCS_START,
 	.pwrdn_ctrl             = SW_PWRDN,
 	.phy_status		= PHYSTATUS,
-
-	.is_dual_lane_phy       = true,
 };
 
 static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
@@ -1826,11 +1819,10 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
@@ -1861,7 +1853,7 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
@@ -1891,11 +1883,10 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
@@ -1926,7 +1917,7 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
@@ -1957,7 +1948,7 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
@@ -1988,7 +1979,7 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= sm8150_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
@@ -2018,11 +2009,10 @@ static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
 
 	.has_phy_dp_com_ctrl	= true,
-	.is_dual_lane_phy	= true,
 };
 
 static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 1,
 
 	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
@@ -2053,7 +2043,7 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
 };
 
 static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
-	.nlanes			= 1,
+	.lanes			= 2,
 
 	.serdes_tbl		= qcm2290_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qcm2290_usb3_serdes_tbl),
@@ -2074,8 +2064,6 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
 	.start_ctrl		= SERDES_START | PCS_START,
 	.pwrdn_ctrl		= SW_PWRDN,
 	.phy_status		= PHYSTATUS,
-
-	.is_dual_lane_phy	= true,
 };
 
 static void qmp_usb_configure_lane(void __iomem *base,
@@ -2232,14 +2220,14 @@ static int qmp_usb_power_on(struct phy *phy)
 	/* Tx, Rx, and PCS configurations */
 	qmp_usb_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_usb_configure_lane(qphy->tx2, cfg->regs,
 					cfg->tx_tbl, cfg->tx_tbl_num, 2);
 	}
 
 	qmp_usb_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qmp_usb_configure_lane(qphy->rx2, cfg->regs,
 					cfg->rx_tbl, cfg->rx_tbl_num, 2);
 	}
@@ -2613,7 +2601,7 @@ int qmp_usb_create(struct device *dev, struct device_node *np, int id,
 	if (cfg->pcs_usb_offset)
 		qphy->pcs_usb = qphy->pcs + cfg->pcs_usb_offset;
 
-	if (cfg->is_dual_lane_phy) {
+	if (cfg->lanes >= 2) {
 		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
 		if (IS_ERR(qphy->tx2))
 			return PTR_ERR(qphy->tx2);
-- 
2.35.1


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

* [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (15 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 16/17] phy: qcom-qmp-usb: " Johan Hovold
@ 2022-09-20  7:38 ` Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:02   ` Dmitry Baryshkov
  2022-09-24  5:30 ` [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Vinod Koul
  17 siblings, 2 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20  7:38 UTC (permalink / raw)
  To: Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel, Johan Hovold

Drop the DP_COM control block flag from the configuration data, which is
set for all combo PHYs and hence no longer needed since the QMP driver
split.

Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 63 +++++++----------------
 1 file changed, 18 insertions(+), 45 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 417e0fcf1a9f..ad3b0aa22048 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -876,9 +876,6 @@ struct qmp_phy_cfg {
 	int pwrdn_delay_min;
 	int pwrdn_delay_max;
 
-	/* true, if PHY has a separate DP_COM control block */
-	bool has_phy_dp_com_ctrl;
-
 	/* Offset from PCS to PCS_USB region */
 	unsigned int pcs_usb_offset;
 
@@ -1051,8 +1048,6 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
-
-	.has_phy_dp_com_ctrl	= true,
 };
 
 static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
@@ -1086,8 +1081,6 @@ static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
 	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
 	.regs			= qmp_v3_usb3phy_regs_layout,
 
-	.has_phy_dp_com_ctrl	= true,
-
 	.dp_aux_init = qcom_qmp_v3_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx,
 	.configure_dp_phy = qcom_qmp_v3_phy_configure_dp_phy,
@@ -1126,8 +1119,6 @@ static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
-
-	.has_phy_dp_com_ctrl	= true,
 };
 
 static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
@@ -1166,8 +1157,6 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
-
-	.has_phy_dp_com_ctrl	= true,
 };
 
 static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
@@ -1201,8 +1190,6 @@ static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
 	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
 	.regs			= qmp_v3_usb3phy_regs_layout,
 
-	.has_phy_dp_com_ctrl	= true,
-
 	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
 	.configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy,
@@ -1242,8 +1229,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
-
-	.has_phy_dp_com_ctrl	= true,
 };
 
 static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
@@ -1277,8 +1262,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
 	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
 	.regs			= qmp_v4_usb3phy_regs_layout,
 
-	.has_phy_dp_com_ctrl	= true,
-
 	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
 	.configure_dp_phy = qcom_qmp_v5_phy_configure_dp_phy,
@@ -1320,8 +1303,6 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
 	.has_pwrdn_delay	= true,
 	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
 	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
-
-	.has_phy_dp_com_ctrl	= true,
 };
 
 static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
@@ -1355,8 +1336,6 @@ static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
 	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
 	.regs			= qmp_v4_usb3phy_regs_layout,
 
-	.has_phy_dp_com_ctrl	= true,
-
 	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
 	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
 	.configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy,
@@ -1995,28 +1974,25 @@ static int qmp_combo_com_init(struct qmp_phy *qphy)
 	if (ret)
 		goto err_assert_reset;
 
-	if (cfg->has_phy_dp_com_ctrl) {
-		qphy_setbits(dp_com, QPHY_V3_DP_COM_POWER_DOWN_CTRL,
-			     SW_PWRDN);
-		/* override hardware control for reset of qmp phy */
-		qphy_setbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
-			     SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
-			     SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+	qphy_setbits(dp_com, QPHY_V3_DP_COM_POWER_DOWN_CTRL, SW_PWRDN);
 
-		/* Default type-c orientation, i.e CC1 */
-		qphy_setbits(dp_com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02);
+	/* override hardware control for reset of qmp phy */
+	qphy_setbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+			SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
+			SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
 
-		qphy_setbits(dp_com, QPHY_V3_DP_COM_PHY_MODE_CTRL,
-			     USB3_MODE | DP_MODE);
+	/* Default type-c orientation, i.e CC1 */
+	qphy_setbits(dp_com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02);
 
-		/* bring both QMP USB and QMP DP PHYs PCS block out of reset */
-		qphy_clrbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
-			     SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
-			     SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+	qphy_setbits(dp_com, QPHY_V3_DP_COM_PHY_MODE_CTRL, USB3_MODE | DP_MODE);
 
-		qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
-		qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
-	}
+	/* bring both QMP USB and QMP DP PHYs PCS block out of reset */
+	qphy_clrbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
+			SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
+			SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
+
+	qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
+	qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
 
 	if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL])
 		qphy_setbits(pcs,
@@ -2838,12 +2814,9 @@ static int qmp_combo_probe(struct platform_device *pdev)
 	if (IS_ERR(serdes))
 		return PTR_ERR(serdes);
 
-	/* per PHY dp_com; if PHY has dp_com control block */
-	if (cfg->has_phy_dp_com_ctrl) {
-		qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
-		if (IS_ERR(qmp->dp_com))
-			return PTR_ERR(qmp->dp_com);
-	}
+	qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
+	if (IS_ERR(qmp->dp_com))
+		return PTR_ERR(qmp->dp_com);
 
 	/* Only two serdes for combo PHY */
 	dp_serdes = devm_platform_ioremap_resource(pdev, 2);
-- 
2.35.1


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

* Re: [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config
  2022-09-20  7:38 ` [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config Johan Hovold
@ 2022-09-20 13:50   ` Neil Armstrong
  2022-09-22 14:30   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:50 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> The configuration PHY type is no longer used since the QMP driver split
> so drop it from the configurations.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 14 --------------
>   1 file changed, 14 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 4939edcd8cb1..d25f9215b86f 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1304,8 +1304,6 @@ struct qmp_phy;
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* phy-type - PCIE/UFS/USB */
> -	unsigned int type;
>   	/* number of lanes provided by phy */
>   	int nlanes;
>   
> @@ -1470,7 +1468,6 @@ static const char * const sdm845_pciephy_reset_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
> -	.type			= PHY_TYPE_PCIE,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= ipq8074_pcie_serdes_tbl,
> @@ -1499,7 +1496,6 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
> -	.type			= PHY_TYPE_PCIE,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= ipq8074_pcie_gen3_serdes_tbl,
> @@ -1529,7 +1525,6 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
> -	.type			= PHY_TYPE_PCIE,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= ipq6018_pcie_serdes_tbl,
> @@ -1559,7 +1554,6 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 1,
>   
>   	.serdes_tbl		= sdm845_qmp_pcie_serdes_tbl,
> @@ -1590,7 +1584,6 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 1,
>   
>   	.serdes_tbl		= sdm845_qhp_pcie_serdes_tbl,
> @@ -1619,7 +1612,6 @@ static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 1,
>   
>   	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
> @@ -1658,7 +1650,6 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 2,
>   
>   	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
> @@ -1698,7 +1689,6 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
> -	.type			= PHY_TYPE_PCIE,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= msm8998_pcie_serdes_tbl,
> @@ -1723,7 +1713,6 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 1,
>   
>   	.serdes_tbl		= sc8180x_qmp_pcie_serdes_tbl,
> @@ -1753,7 +1742,6 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 2,
>   
>   	.serdes_tbl		= sdx55_qmp_pcie_serdes_tbl,
> @@ -1785,7 +1773,6 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 1,
>   
>   	.serdes_tbl		= sm8450_qmp_gen3x1_pcie_serdes_tbl,
> @@ -1816,7 +1803,6 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
> -	.type = PHY_TYPE_PCIE,
>   	.nlanes = 2,
>   
>   	.serdes_tbl		= sm8450_qmp_gen4x2_pcie_serdes_tbl,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: drop unused type from config
  2022-09-20  7:38 ` [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
@ 2022-09-20 13:50   ` Neil Armstrong
  2022-09-22 14:31   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:50 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> The configuration PHY type is no longer used since the QMP driver split
> so drop it from the configuration.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 3 ---
>   1 file changed, 3 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index 245f6dc1710e..20a76b1b23a2 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -188,8 +188,6 @@ struct qmp_phy;
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* phy-type - PCIE/UFS/USB */
> -	unsigned int type;
>   	/* number of lanes provided by phy */
>   	int nlanes;
>   
> @@ -323,7 +321,6 @@ static const char * const qmp_phy_vreg_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
> -	.type			= PHY_TYPE_PCIE,
>   	.nlanes			= 3,
>   
>   	.serdes_tbl		= msm8996_pcie_serdes_tbl,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 03/17] phy: qcom-qmp-ufs: drop unused type from config
  2022-09-20  7:38 ` [PATCH 03/17] phy: qcom-qmp-ufs: " Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 14:31   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> The configuration PHY type is no longer used since the QMP driver split
> so drop it from the configuration.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 8 --------
>   1 file changed, 8 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> index 7b335b50b4a1..e5c8d3a4fdaa 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> @@ -535,8 +535,6 @@ struct qmp_phy;
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* phy-type - PCIE/UFS/USB */
> -	unsigned int type;
>   	/* number of lanes provided by phy */
>   	int nlanes;
>   
> @@ -668,7 +666,6 @@ static const char * const qmp_phy_vreg_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg msm8996_ufs_cfg = {
> -	.type			= PHY_TYPE_UFS,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= msm8996_ufs_serdes_tbl,
> @@ -694,7 +691,6 @@ static const struct qmp_phy_cfg msm8996_ufs_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
> -	.type			= PHY_TYPE_UFS,
>   	.nlanes			= 2,
>   
>   	.serdes_tbl		= sdm845_ufsphy_serdes_tbl,
> @@ -720,7 +716,6 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
> -	.type			= PHY_TYPE_UFS,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm6115_ufsphy_serdes_tbl,
> @@ -744,7 +739,6 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
> -	.type			= PHY_TYPE_UFS,
>   	.nlanes			= 2,
>   
>   	.serdes_tbl		= sm8150_ufsphy_serdes_tbl,
> @@ -769,7 +763,6 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
> -	.type			= PHY_TYPE_UFS,
>   	.nlanes			= 2,
>   
>   	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
> @@ -794,7 +787,6 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
> -	.type			= PHY_TYPE_UFS,
>   	.nlanes			= 2,
>   
>   	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 04/17] phy: qcom-qmp-usb: drop unused type from config
  2022-09-20  7:38 ` [PATCH 04/17] phy: qcom-qmp-usb: " Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 14:33   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> The configuration PHY type is no longer needed since the QMP driver
> split so drop it from the configuration and suspend callbacks.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 26 -------------------------
>   1 file changed, 26 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index 93994f1a46e2..03481b6f1c35 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -1431,8 +1431,6 @@ struct qmp_phy;
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* phy-type - PCIE/UFS/USB */
> -	unsigned int type;
>   	/* number of lanes provided by phy */
>   	int nlanes;
>   
> @@ -1609,7 +1607,6 @@ static const char * const qmp_phy_vreg_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= ipq8074_usb3_serdes_tbl,
> @@ -1634,7 +1631,6 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= msm8996_usb3_serdes_tbl,
> @@ -1659,7 +1655,6 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
> @@ -1691,7 +1686,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
> @@ -1723,7 +1717,6 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sc8280xp_usb3_uniphy_serdes_tbl,
> @@ -1752,7 +1745,6 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= qmp_v3_usb3_uniphy_serdes_tbl,
> @@ -1781,7 +1773,6 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
> -	.type                   = PHY_TYPE_USB3,
>   	.nlanes                 = 1,
>   
>   	.serdes_tbl             = msm8998_usb3_serdes_tbl,
> @@ -1808,7 +1799,6 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
> @@ -1844,7 +1834,6 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
> @@ -1876,7 +1865,6 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
> @@ -1911,7 +1899,6 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
> @@ -1943,7 +1930,6 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
> @@ -1975,7 +1961,6 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
> @@ -2007,7 +1992,6 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
> @@ -2042,7 +2026,6 @@ static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
> @@ -2074,7 +2057,6 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
> -	.type			= PHY_TYPE_USB3,
>   	.nlanes			= 1,
>   
>   	.serdes_tbl		= qcm2290_usb3_serdes_tbl,
> @@ -2432,10 +2414,6 @@ static int __maybe_unused qmp_usb_runtime_suspend(struct device *dev)
>   
>   	dev_vdbg(dev, "Suspending QMP phy, mode:%d\n", qphy->mode);
>   
> -	/* Supported only for USB3 PHY and luckily USB3 is the first phy */
> -	if (cfg->type != PHY_TYPE_USB3)
> -		return 0;
> -
>   	if (!qphy->phy->init_count) {
>   		dev_vdbg(dev, "PHY not initialized, bailing out\n");
>   		return 0;
> @@ -2458,10 +2436,6 @@ static int __maybe_unused qmp_usb_runtime_resume(struct device *dev)
>   
>   	dev_vdbg(dev, "Resuming QMP phy, mode:%d\n", qphy->mode);
>   
> -	/* Supported only for USB3 PHY and luckily USB3 is the first phy */
> -	if (cfg->type != PHY_TYPE_USB3)
> -		return 0;
> -
>   	if (!qphy->phy->init_count) {
>   		dev_vdbg(dev, "PHY not initialized, bailing out\n");
>   		return 0;

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers
  2022-09-20  7:38 ` [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Drop the unnecessary PHY init and exit callback wrappers.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 29 ++++--------------------
>   1 file changed, 4 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index d25f9215b86f..525097e3b041 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1877,8 +1877,9 @@ static int qmp_pcie_serdes_init(struct qmp_phy *qphy)
>   	return 0;
>   }
>   
> -static int qmp_pcie_com_init(struct qmp_phy *qphy)
> +static int qmp_pcie_init(struct phy *phy)
>   {
> +	struct qmp_phy *qphy = phy_get_drvdata(phy);
>   	struct qcom_qmp *qmp = qphy->qmp;
>   	const struct qmp_phy_cfg *cfg = qphy->cfg;
>   	void __iomem *pcs = qphy->pcs;
> @@ -1925,8 +1926,9 @@ static int qmp_pcie_com_init(struct qmp_phy *qphy)
>   	return ret;
>   }
>   
> -static int qmp_pcie_com_exit(struct qmp_phy *qphy)
> +static int qmp_pcie_exit(struct phy *phy)
>   {
> +	struct qmp_phy *qphy = phy_get_drvdata(phy);
>   	struct qcom_qmp *qmp = qphy->qmp;
>   	const struct qmp_phy_cfg *cfg = qphy->cfg;
>   
> @@ -1939,20 +1941,6 @@ static int qmp_pcie_com_exit(struct qmp_phy *qphy)
>   	return 0;
>   }
>   
> -static int qmp_pcie_init(struct phy *phy)
> -{
> -	struct qmp_phy *qphy = phy_get_drvdata(phy);
> -	struct qcom_qmp *qmp = qphy->qmp;
> -	int ret;
> -	dev_vdbg(qmp->dev, "Initializing QMP phy\n");
> -
> -	ret = qmp_pcie_com_init(qphy);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> -}
> -
>   static int qmp_pcie_power_on(struct phy *phy)
>   {
>   	struct qmp_phy *qphy = phy_get_drvdata(phy);
> @@ -2060,15 +2048,6 @@ static int qmp_pcie_power_off(struct phy *phy)
>   	return 0;
>   }
>   
> -static int qmp_pcie_exit(struct phy *phy)
> -{
> -	struct qmp_phy *qphy = phy_get_drvdata(phy);
> -
> -	qmp_pcie_com_exit(qphy);
> -
> -	return 0;
> -}
> -
>   static int qmp_pcie_enable(struct phy *phy)
>   {
>   	int ret;


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 06/17] phy: qcom-qmp-usb: drop init and exit wrappers
  2022-09-20  7:38 ` [PATCH 06/17] phy: qcom-qmp-usb: " Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Drop the unnecessary PHY init and exit callback wrappers.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 29 ++++---------------------
>   1 file changed, 4 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index 03481b6f1c35..a42e13905c15 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -2125,8 +2125,9 @@ static int qmp_usb_serdes_init(struct qmp_phy *qphy)
>   	return 0;
>   }
>   
> -static int qmp_usb_com_init(struct qmp_phy *qphy)
> +static int qmp_usb_init(struct phy *phy)
>   {
> +	struct qmp_phy *qphy = phy_get_drvdata(phy);
>   	struct qcom_qmp *qmp = qphy->qmp;
>   	const struct qmp_phy_cfg *cfg = qphy->cfg;
>   	void __iomem *pcs = qphy->pcs;
> @@ -2197,8 +2198,9 @@ static int qmp_usb_com_init(struct qmp_phy *qphy)
>   	return ret;
>   }
>   
> -static int qmp_usb_com_exit(struct qmp_phy *qphy)
> +static int qmp_usb_exit(struct phy *phy)
>   {
> +	struct qmp_phy *qphy = phy_get_drvdata(phy);
>   	struct qcom_qmp *qmp = qphy->qmp;
>   	const struct qmp_phy_cfg *cfg = qphy->cfg;
>   
> @@ -2211,20 +2213,6 @@ static int qmp_usb_com_exit(struct qmp_phy *qphy)
>   	return 0;
>   }
>   
> -static int qmp_usb_init(struct phy *phy)
> -{
> -	struct qmp_phy *qphy = phy_get_drvdata(phy);
> -	struct qcom_qmp *qmp = qphy->qmp;
> -	int ret;
> -	dev_vdbg(qmp->dev, "Initializing QMP phy\n");
> -
> -	ret = qmp_usb_com_init(qphy);
> -	if (ret)
> -		return ret;
> -
> -	return 0;
> -}
> -
>   static int qmp_usb_power_on(struct phy *phy)
>   {
>   	struct qmp_phy *qphy = phy_get_drvdata(phy);
> @@ -2316,15 +2304,6 @@ static int qmp_usb_power_off(struct phy *phy)
>   	return 0;
>   }
>   
> -static int qmp_usb_exit(struct phy *phy)
> -{
> -	struct qmp_phy *qphy = phy_get_drvdata(phy);
> -
> -	qmp_usb_com_exit(qphy);
> -
> -	return 0;
> -}
> -
>   static int qmp_usb_enable(struct phy *phy)
>   {
>   	int ret;


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations
  2022-09-20  7:38 ` [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 14:31   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Only the combo QMP driver needs a forward declaration of struct qmp_phy.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 --
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c         | 2 --
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c          | 2 --
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c          | 2 --
>   4 files changed, 8 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index 20a76b1b23a2..7e755213e9c5 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -184,8 +184,6 @@ static const struct qmp_phy_init_tbl msm8996_pcie_pcs_tbl[] = {
>   	QMP_PHY_INIT_CFG(QPHY_V2_PCS_TXDEEMPH_M3P5DB_V0, 0x0e),
>   };
>   
> -struct qmp_phy;
> -
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
>   	/* number of lanes provided by phy */
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 525097e3b041..666109a11329 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1300,8 +1300,6 @@ static const struct qmp_phy_init_tbl sm8450_qmp_gen4x2_pcie_pcs_misc_tbl[] = {
>   	QMP_PHY_INIT_CFG(QPHY_V5_20_PCS_PCIE_G4_PRE_GAIN, 0x2e),
>   };
>   
> -struct qmp_phy;
> -
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
>   	/* number of lanes provided by phy */
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> index e5c8d3a4fdaa..cc49dec46df4 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> @@ -531,8 +531,6 @@ static const struct qmp_phy_init_tbl sm8350_ufsphy_pcs_tbl[] = {
>   	QMP_PHY_INIT_CFG(QPHY_V5_PCS_UFS_MULTI_LANE_CTRL1, 0x02),
>   };
>   
> -struct qmp_phy;
> -
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
>   	/* number of lanes provided by phy */
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index a42e13905c15..820062a95211 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -1427,8 +1427,6 @@ static const struct qmp_phy_init_tbl sc8280xp_usb3_uniphy_pcs_tbl[] = {
>   	QMP_PHY_INIT_CFG(QPHY_V5_PCS_REFGEN_REQ_CONFIG1, 0x21),
>   };
>   
> -struct qmp_phy;
> -
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
>   	/* number of lanes provided by phy */


Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc
  2022-09-20  7:38 ` [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Drop the removed mode field from the struct qmp_phy kernel doc.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index 7e755213e9c5..e261837aee32 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -238,7 +238,6 @@ struct qmp_phy_cfg {
>    * @index: lane index
>    * @qmp: QMP phy to which this lane belongs
>    * @lane_rst: lane's reset controller
> - * @mode: current PHY mode
>    */
>   struct qmp_phy {
>   	struct phy *phy;

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field
  2022-09-20  7:38 ` [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Drop the unused mode field from struct qmp_phy.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 --
>   1 file changed, 2 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 666109a11329..65825ca41e96 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1374,7 +1374,6 @@ struct qmp_phy_cfg {
>    * @pipe_clk: pipe clock
>    * @index: lane index
>    * @qmp: QMP phy to which this lane belongs
> - * @mode: current PHY mode
>    */
>   struct qmp_phy {
>   	struct phy *phy;
> @@ -1389,7 +1388,6 @@ struct qmp_phy {
>   	struct clk *pipe_clk;
>   	unsigned int index;
>   	struct qcom_qmp *qmp;
> -	enum phy_mode mode;
>   };
>   
>   /**

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field
  2022-09-20  7:38 ` [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:59   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Drop the unused mask_com_pcs_ready field from struct qmp_phy_cfg.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 -
>   1 file changed, 1 deletion(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 65825ca41e96..d22d2cf2fc18 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1342,7 +1342,6 @@ struct qmp_phy_cfg {
>   
>   	unsigned int start_ctrl;
>   	unsigned int pwrdn_ctrl;
> -	unsigned int mask_com_pcs_ready;
>   	/* bit offset of PHYSTATUS in QPHY_PCS_STATUS register */
>   	unsigned int phy_status;
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 11/17] phy: qcom-qmp: drop unused index field
  2022-09-20  7:38 ` [PATCH 11/17] phy: qcom-qmp: drop unused index field Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 17:59   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Only the MSM8996 PCIe QMP driver uses the index field so drop it from
> the other drivers.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 3 ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c  | 3 ---
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c   | 3 ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c   | 3 ---
>   4 files changed, 12 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 41f938126ff1..08e96e383a29 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -906,7 +906,6 @@ struct qmp_phy_combo_cfg {
>    * @pcs_misc: iomapped memory space for lane's pcs_misc
>    * @pcs_usb: iomapped memory space for lane's pcs_usb
>    * @pipe_clk: pipe clock
> - * @index: lane index
>    * @qmp: QMP phy to which this lane belongs
>    * @mode: current PHY mode
>    * @dp_aux_cfg: Display port aux config
> @@ -925,7 +924,6 @@ struct qmp_phy {
>   	void __iomem *pcs_misc;
>   	void __iomem *pcs_usb;
>   	struct clk *pipe_clk;
> -	unsigned int index;
>   	struct qcom_qmp *qmp;
>   	enum phy_mode mode;
>   	unsigned int dp_aux_cfg;
> @@ -2779,7 +2777,6 @@ static int qmp_combo_create(struct device *dev, struct device_node *np, int id,
>   	}
>   
>   	qphy->phy = generic_phy;
> -	qphy->index = id;
>   	qphy->qmp = qmp;
>   	qmp->phys[id] = qphy;
>   	phy_set_drvdata(generic_phy, qphy);
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index d22d2cf2fc18..387abed33727 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1371,7 +1371,6 @@ struct qmp_phy_cfg {
>    * @rx2: iomapped memory space for second lane's rx (in dual lane PHYs)
>    * @pcs_misc: iomapped memory space for lane's pcs_misc
>    * @pipe_clk: pipe clock
> - * @index: lane index
>    * @qmp: QMP phy to which this lane belongs
>    */
>   struct qmp_phy {
> @@ -1385,7 +1384,6 @@ struct qmp_phy {
>   	void __iomem *rx2;
>   	void __iomem *pcs_misc;
>   	struct clk *pipe_clk;
> -	unsigned int index;
>   	struct qcom_qmp *qmp;
>   };
>   
> @@ -2264,7 +2262,6 @@ static int qmp_pcie_create(struct device *dev, struct device_node *np, int id,
>   	}
>   
>   	qphy->phy = generic_phy;
> -	qphy->index = id;
>   	qphy->qmp = qmp;
>   	qmp->phys[id] = qphy;
>   	phy_set_drvdata(generic_phy, qphy);
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> index cc49dec46df4..ca9a42250556 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> @@ -580,7 +580,6 @@ struct qmp_phy_cfg {
>    * @tx2: iomapped memory space for second lane's tx (in dual lane PHYs)
>    * @rx2: iomapped memory space for second lane's rx (in dual lane PHYs)
>    * @pcs_misc: iomapped memory space for lane's pcs_misc
> - * @index: lane index
>    * @qmp: QMP phy to which this lane belongs
>    */
>   struct qmp_phy {
> @@ -593,7 +592,6 @@ struct qmp_phy {
>   	void __iomem *tx2;
>   	void __iomem *rx2;
>   	void __iomem *pcs_misc;
> -	unsigned int index;
>   	struct qcom_qmp *qmp;
>   };
>   
> @@ -1149,7 +1147,6 @@ static int qmp_ufs_create(struct device *dev, struct device_node *np, int id,
>   	}
>   
>   	qphy->phy = generic_phy;
> -	qphy->index = id;
>   	qphy->qmp = qmp;
>   	qmp->phys[id] = qphy;
>   	phy_set_drvdata(generic_phy, qphy);
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index 820062a95211..a34320738f60 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -1491,7 +1491,6 @@ struct qmp_phy_cfg {
>    * @pcs_misc: iomapped memory space for lane's pcs_misc
>    * @pcs_usb: iomapped memory space for lane's pcs_usb
>    * @pipe_clk: pipe clock
> - * @index: lane index
>    * @qmp: QMP phy to which this lane belongs
>    * @mode: current PHY mode
>    */
> @@ -1507,7 +1506,6 @@ struct qmp_phy {
>   	void __iomem *pcs_misc;
>   	void __iomem *pcs_usb;
>   	struct clk *pipe_clk;
> -	unsigned int index;
>   	struct qcom_qmp *qmp;
>   	enum phy_mode mode;
>   };
> @@ -2648,7 +2646,6 @@ int qmp_usb_create(struct device *dev, struct device_node *np, int id,
>   	}
>   
>   	qphy->phy = generic_phy;
> -	qphy->index = id;
>   	qphy->qmp = qmp;
>   	qmp->phys[id] = qphy;
>   	phy_set_drvdata(generic_phy, qphy);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config
  2022-09-20  7:38 ` [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config Johan Hovold
@ 2022-09-20 13:51   ` Neil Armstrong
  2022-09-22 18:06   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:51 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that describe
> the number of lanes a PHY has.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 39 ++++++++++--------------
>   1 file changed, 16 insertions(+), 23 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> index 387abed33727..dde398105f03 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie.c
> @@ -1302,8 +1302,7 @@ static const struct qmp_phy_init_tbl sm8450_qmp_gen4x2_pcie_pcs_misc_tbl[] = {
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* number of lanes provided by phy */
> -	int nlanes;
> +	int lanes;
>   
>   	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
>   	const struct qmp_phy_init_tbl *serdes_tbl;
> @@ -1351,9 +1350,6 @@ struct qmp_phy_cfg {
>   	int pwrdn_delay_min;
>   	int pwrdn_delay_max;
>   
> -	/* true, if PHY has secondary tx/rx lanes to be configured */
> -	bool is_dual_lane_phy;
> -
>   	/* QMP PHY pipe clock interface rate */
>   	unsigned long pipe_clock_rate;
>   };
> @@ -1461,7 +1457,7 @@ static const char * const sdm845_pciephy_reset_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= ipq8074_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_pcie_serdes_tbl),
> @@ -1489,7 +1485,7 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= ipq8074_pcie_gen3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_pcie_gen3_serdes_tbl),
> @@ -1518,7 +1514,7 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= ipq6018_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(ipq6018_pcie_serdes_tbl),
> @@ -1547,7 +1543,7 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
> -	.nlanes = 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sdm845_qmp_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sdm845_qmp_pcie_serdes_tbl),
> @@ -1577,7 +1573,7 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
> -	.nlanes = 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sdm845_qhp_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sdm845_qhp_pcie_serdes_tbl),
> @@ -1605,7 +1601,7 @@ static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
> -	.nlanes = 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8250_qmp_pcie_serdes_tbl),
> @@ -1643,7 +1639,7 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
> -	.nlanes = 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8250_qmp_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8250_qmp_pcie_serdes_tbl),
> @@ -1675,14 +1671,13 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
>   	.pwrdn_ctrl		= SW_PWRDN | REFCLK_DRV_DSBL,
>   	.phy_status		= PHYSTATUS,
>   
> -	.is_dual_lane_phy	= true,
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= 995,		/* us */
>   	.pwrdn_delay_max	= 1005,		/* us */
>   };
>   
>   static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= msm8998_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(msm8998_pcie_serdes_tbl),
> @@ -1706,7 +1701,7 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
> -	.nlanes = 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sc8180x_qmp_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sc8180x_qmp_pcie_serdes_tbl),
> @@ -1735,7 +1730,7 @@ static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
> -	.nlanes = 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sdx55_qmp_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sdx55_qmp_pcie_serdes_tbl),
> @@ -1759,14 +1754,13 @@ static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
>   	.pwrdn_ctrl		= SW_PWRDN,
>   	.phy_status		= PHYSTATUS_4_20,
>   
> -	.is_dual_lane_phy	= true,
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= 995,		/* us */
>   	.pwrdn_delay_max	= 1005,		/* us */
>   };
>   
>   static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
> -	.nlanes = 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8450_qmp_gen3x1_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8450_qmp_gen3x1_pcie_serdes_tbl),
> @@ -1796,7 +1790,7 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
> -	.nlanes = 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8450_qmp_gen4x2_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8450_qmp_gen4x2_pcie_serdes_tbl),
> @@ -1820,7 +1814,6 @@ static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
>   	.pwrdn_ctrl		= SW_PWRDN | REFCLK_DRV_DSBL,
>   	.phy_status		= PHYSTATUS_4_20,
>   
> -	.is_dual_lane_phy	= true,
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= 995,		/* us */
>   	.pwrdn_delay_max	= 1005,		/* us */
> @@ -1959,7 +1952,7 @@ static int qmp_pcie_power_on(struct phy *phy)
>   	qmp_pcie_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
>   	qmp_pcie_configure_lane(tx, cfg->regs, cfg->tx_tbl_sec, cfg->tx_tbl_num_sec, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_pcie_configure_lane(qphy->tx2, cfg->regs, cfg->tx_tbl,
>   					cfg->tx_tbl_num, 2);
>   		qmp_pcie_configure_lane(qphy->tx2, cfg->regs, cfg->tx_tbl_sec,
> @@ -1969,7 +1962,7 @@ static int qmp_pcie_power_on(struct phy *phy)
>   	qmp_pcie_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
>   	qmp_pcie_configure_lane(rx, cfg->regs, cfg->rx_tbl_sec, cfg->rx_tbl_num_sec, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_pcie_configure_lane(qphy->rx2, cfg->regs, cfg->rx_tbl,
>   					cfg->rx_tbl_num, 2);
>   		qmp_pcie_configure_lane(qphy->rx2, cfg->regs, cfg->rx_tbl_sec,
> @@ -2225,7 +2218,7 @@ static int qmp_pcie_create(struct device *dev, struct device_node *np, int id,
>   	if (IS_ERR(qphy->pcs))
>   		return PTR_ERR(qphy->pcs);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
>   		if (IS_ERR(qphy->tx2))
>   			return PTR_ERR(qphy->tx2);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config
  2022-09-20  7:38 ` [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config Johan Hovold
@ 2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:01   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:52 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> The nlanes configuration parameter is really the number of PHYs provided
> by this QMP block on MSM8996. Rename it accordingly.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> index e261837aee32..0f8e739936ab 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c
> @@ -186,8 +186,8 @@ static const struct qmp_phy_init_tbl msm8996_pcie_pcs_tbl[] = {
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* number of lanes provided by phy */
> -	int nlanes;
> +	/* number of PHYs provided by this block */
> +	int num_phys;
>   
>   	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
>   	const struct qmp_phy_init_tbl *serdes_tbl;
> @@ -318,7 +318,7 @@ static const char * const qmp_phy_vreg_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg msm8996_pciephy_cfg = {
> -	.nlanes			= 3,
> +	.num_phys		= 3,
>   
>   	.serdes_tbl		= msm8996_pcie_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(msm8996_pcie_serdes_tbl),
> @@ -861,7 +861,7 @@ static int qmp_pcie_msm8996_probe(struct platform_device *pdev)
>   	if (IS_ERR(serdes))
>   		return PTR_ERR(serdes);
>   
> -	expected_phys = cfg->nlanes;
> +	expected_phys = cfg->num_phys;
>   
>   	mutex_init(&qmp->phy_mutex);
>   

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config
  2022-09-20  7:38 ` [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config Johan Hovold
@ 2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:01   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:52 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that appear
> to describe the number of lanes a PHY has, even if "nlanes" was actually
> used for a different purpose.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 38 ++++++++---------------
>   1 file changed, 13 insertions(+), 25 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 08e96e383a29..417e0fcf1a9f 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -816,8 +816,7 @@ struct qmp_phy;
>   struct qmp_phy_cfg {
>   	/* phy-type - PCIE/UFS/USB */
>   	unsigned int type;
> -	/* number of lanes provided by phy */
> -	int nlanes;
> +	int lanes;
>   
>   	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
>   	const struct qmp_phy_init_tbl *serdes_tbl;
> @@ -879,8 +878,6 @@ struct qmp_phy_cfg {
>   
>   	/* true, if PHY has a separate DP_COM control block */
>   	bool has_phy_dp_com_ctrl;
> -	/* true, if PHY has secondary tx/rx lanes to be configured */
> -	bool is_dual_lane_phy;
>   
>   	/* Offset from PCS to PCS_USB region */
>   	unsigned int pcs_usb_offset;
> @@ -1029,7 +1026,7 @@ static const char * const sc7180_usb3phy_reset_l[] = {
>   
>   static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
>   	.type			= PHY_TYPE_USB3,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
> @@ -1056,12 +1053,11 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
>   	.type			= PHY_TYPE_DP,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v3_dp_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_dp_serdes_tbl),
> @@ -1091,7 +1087,6 @@ static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
>   	.regs			= qmp_v3_usb3phy_regs_layout,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   
>   	.dp_aux_init = qcom_qmp_v3_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx,
> @@ -1106,7 +1101,7 @@ static const struct qmp_phy_combo_cfg sc7180_usb3dpphy_cfg = {
>   
>   static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
>   	.type			= PHY_TYPE_USB3,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
> @@ -1133,7 +1128,6 @@ static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
> @@ -1143,7 +1137,7 @@ static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
>   
>   static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
>   	.type			= PHY_TYPE_USB3,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
> @@ -1174,12 +1168,11 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
>   	.type			= PHY_TYPE_DP,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v4_dp_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
> @@ -1209,7 +1202,6 @@ static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
>   	.regs			= qmp_v3_usb3phy_regs_layout,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   
>   	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
> @@ -1224,7 +1216,7 @@ static const struct qmp_phy_combo_cfg sc8180x_usb3dpphy_cfg = {
>   
>   static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
>   	.type			= PHY_TYPE_USB3,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sc8280xp_usb43dp_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sc8280xp_usb43dp_serdes_tbl),
> @@ -1252,12 +1244,11 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
>   	.type			= PHY_TYPE_DP,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v5_dp_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v5_dp_serdes_tbl),
> @@ -1287,7 +1278,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
>   	.regs			= qmp_v4_usb3phy_regs_layout,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   
>   	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
> @@ -1302,7 +1292,7 @@ static const struct qmp_phy_combo_cfg sc8280xp_usb43dpphy_combo_cfg = {
>   
>   static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
>   	.type			= PHY_TYPE_USB3,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
> @@ -1332,12 +1322,11 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
>   	.type			= PHY_TYPE_DP,
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v4_dp_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v4_dp_serdes_tbl),
> @@ -1367,7 +1356,6 @@ static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
>   	.regs			= qmp_v4_usb3phy_regs_layout,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   
>   	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
> @@ -2117,7 +2105,7 @@ static int qmp_combo_power_on(struct phy *phy)
>   	/* Tx, Rx, and PCS configurations */
>   	qmp_combo_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_combo_configure_lane(qphy->tx2, cfg->regs, cfg->tx_tbl,
>   					 cfg->tx_tbl_num, 2);
>   	}
> @@ -2128,7 +2116,7 @@ static int qmp_combo_power_on(struct phy *phy)
>   
>   	qmp_combo_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_combo_configure_lane(qphy->rx2, cfg->regs, cfg->rx_tbl,
>   					 cfg->rx_tbl_num, 2);
>   	}
> @@ -2725,7 +2713,7 @@ static int qmp_combo_create(struct device *dev, struct device_node *np, int id,
>   	if (cfg->pcs_usb_offset)
>   		qphy->pcs_usb = qphy->pcs + cfg->pcs_usb_offset;
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
>   		if (IS_ERR(qphy->tx2))
>   			return PTR_ERR(qphy->tx2);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 15/17] phy: qcom-qmp-ufs: consolidate lane config
  2022-09-20  7:38 ` [PATCH 15/17] phy: qcom-qmp-ufs: " Johan Hovold
@ 2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:02   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:52 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that describe
> the number of lanes a PHY has.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 31 ++++++++-----------------
>   1 file changed, 10 insertions(+), 21 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> index ca9a42250556..d21b977850b3 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-ufs.c
> @@ -533,8 +533,7 @@ static const struct qmp_phy_init_tbl sm8350_ufsphy_pcs_tbl[] = {
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* number of lanes provided by phy */
> -	int nlanes;
> +	int lanes;
>   
>   	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
>   	const struct qmp_phy_init_tbl *serdes_tbl;
> @@ -561,9 +560,6 @@ struct qmp_phy_cfg {
>   	/* bit offset of PHYSTATUS in QPHY_PCS_STATUS register */
>   	unsigned int phy_status;
>   
> -	/* true, if PHY has secondary tx/rx lanes to be configured */
> -	bool is_dual_lane_phy;
> -
>   	/* true, if PCS block has no separate SW_RESET register */
>   	bool no_pcs_sw_reset;
>   };
> @@ -662,7 +658,7 @@ static const char * const qmp_phy_vreg_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg msm8996_ufs_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= msm8996_ufs_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(msm8996_ufs_serdes_tbl),
> @@ -687,7 +683,7 @@ static const struct qmp_phy_cfg msm8996_ufs_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
> -	.nlanes			= 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sdm845_ufsphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sdm845_ufsphy_serdes_tbl),
> @@ -707,12 +703,11 @@ static const struct qmp_phy_cfg sdm845_ufsphy_cfg = {
>   	.pwrdn_ctrl		= SW_PWRDN,
>   	.phy_status		= PHYSTATUS,
>   
> -	.is_dual_lane_phy	= true,
>   	.no_pcs_sw_reset	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm6115_ufsphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm6115_ufsphy_serdes_tbl),
> @@ -735,7 +730,7 @@ static const struct qmp_phy_cfg sm6115_ufsphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
> -	.nlanes			= 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8150_ufsphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_ufsphy_serdes_tbl),
> @@ -754,12 +749,10 @@ static const struct qmp_phy_cfg sm8150_ufsphy_cfg = {
>   	.start_ctrl		= SERDES_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
>   	.phy_status		= PHYSTATUS,
> -
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
> -	.nlanes			= 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_serdes_tbl),
> @@ -778,12 +771,10 @@ static const struct qmp_phy_cfg sm8350_ufsphy_cfg = {
>   	.start_ctrl		= SERDES_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
>   	.phy_status		= PHYSTATUS,
> -
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
> -	.nlanes			= 2,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8350_ufsphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8350_ufsphy_serdes_tbl),
> @@ -802,8 +793,6 @@ static const struct qmp_phy_cfg sm8450_ufsphy_cfg = {
>   	.start_ctrl		= SERDES_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
>   	.phy_status		= PHYSTATUS,
> -
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static void qmp_ufs_configure_lane(void __iomem *base,
> @@ -956,14 +945,14 @@ static int qmp_ufs_power_on(struct phy *phy)
>   	/* Tx, Rx, and PCS configurations */
>   	qmp_ufs_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_ufs_configure_lane(qphy->tx2, cfg->regs,
>   					cfg->tx_tbl, cfg->tx_tbl_num, 2);
>   	}
>   
>   	qmp_ufs_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_ufs_configure_lane(qphy->rx2, cfg->regs,
>   					cfg->rx_tbl, cfg->rx_tbl_num, 2);
>   	}
> @@ -1122,7 +1111,7 @@ static int qmp_ufs_create(struct device *dev, struct device_node *np, int id,
>   	if (IS_ERR(qphy->pcs))
>   		return PTR_ERR(qphy->pcs);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
>   		if (IS_ERR(qphy->tx2))
>   			return PTR_ERR(qphy->tx2);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 16/17] phy: qcom-qmp-usb: consolidate lane config
  2022-09-20  7:38 ` [PATCH 16/17] phy: qcom-qmp-usb: " Johan Hovold
@ 2022-09-20 13:52   ` Neil Armstrong
  2022-09-22 18:02   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:52 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that appear
> to describe the number of lanes a PHY has, even if "nlanes" was actually
> used for a different purpose.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 52 ++++++++++---------------
>   1 file changed, 20 insertions(+), 32 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> index a34320738f60..f01b3022a10d 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c
> @@ -1429,8 +1429,7 @@ static const struct qmp_phy_init_tbl sc8280xp_usb3_uniphy_pcs_tbl[] = {
>   
>   /* struct qmp_phy_cfg - per-PHY initialization config */
>   struct qmp_phy_cfg {
> -	/* number of lanes provided by phy */
> -	int nlanes;
> +	int lanes;
>   
>   	/* Init sequence for PHY blocks - serdes, tx, rx, pcs */
>   	const struct qmp_phy_init_tbl *serdes_tbl;
> @@ -1470,8 +1469,6 @@ struct qmp_phy_cfg {
>   
>   	/* true, if PHY has a separate DP_COM control block */
>   	bool has_phy_dp_com_ctrl;
> -	/* true, if PHY has secondary tx/rx lanes to be configured */
> -	bool is_dual_lane_phy;
>   
>   	/* Offset from PCS to PCS_USB region */
>   	unsigned int pcs_usb_offset;
> @@ -1603,7 +1600,7 @@ static const char * const qmp_phy_vreg_l[] = {
>   };
>   
>   static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= ipq8074_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(ipq8074_usb3_serdes_tbl),
> @@ -1627,7 +1624,7 @@ static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= msm8996_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(msm8996_usb3_serdes_tbl),
> @@ -1651,7 +1648,7 @@ static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
> @@ -1678,11 +1675,10 @@ static const struct qmp_phy_cfg qmp_v3_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
> @@ -1709,11 +1705,10 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sc8280xp_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sc8280xp_usb3_uniphy_serdes_tbl),
> @@ -1741,7 +1736,7 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= qmp_v3_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_uniphy_serdes_tbl),
> @@ -1769,7 +1764,7 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
> -	.nlanes                 = 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl             = msm8998_usb3_serdes_tbl,
>   	.serdes_tbl_num         = ARRAY_SIZE(msm8998_usb3_serdes_tbl),
> @@ -1790,12 +1785,10 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
>   	.start_ctrl             = SERDES_START | PCS_START,
>   	.pwrdn_ctrl             = SW_PWRDN,
>   	.phy_status		= PHYSTATUS,
> -
> -	.is_dual_lane_phy       = true,
>   };
>   
>   static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
> @@ -1826,11 +1819,10 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
> @@ -1861,7 +1853,7 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
> @@ -1891,11 +1883,10 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
> @@ -1926,7 +1917,7 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
> @@ -1957,7 +1948,7 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
> @@ -1988,7 +1979,7 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= sm8150_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_serdes_tbl),
> @@ -2018,11 +2009,10 @@ static const struct qmp_phy_cfg sm8350_usb3phy_cfg = {
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
>   
>   	.has_phy_dp_com_ctrl	= true,
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 1,
>   
>   	.serdes_tbl		= sm8150_usb3_uniphy_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8150_usb3_uniphy_serdes_tbl),
> @@ -2053,7 +2043,7 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
> -	.nlanes			= 1,
> +	.lanes			= 2,
>   
>   	.serdes_tbl		= qcm2290_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qcm2290_usb3_serdes_tbl),
> @@ -2074,8 +2064,6 @@ static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
>   	.start_ctrl		= SERDES_START | PCS_START,
>   	.pwrdn_ctrl		= SW_PWRDN,
>   	.phy_status		= PHYSTATUS,
> -
> -	.is_dual_lane_phy	= true,
>   };
>   
>   static void qmp_usb_configure_lane(void __iomem *base,
> @@ -2232,14 +2220,14 @@ static int qmp_usb_power_on(struct phy *phy)
>   	/* Tx, Rx, and PCS configurations */
>   	qmp_usb_configure_lane(tx, cfg->regs, cfg->tx_tbl, cfg->tx_tbl_num, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_usb_configure_lane(qphy->tx2, cfg->regs,
>   					cfg->tx_tbl, cfg->tx_tbl_num, 2);
>   	}
>   
>   	qmp_usb_configure_lane(rx, cfg->regs, cfg->rx_tbl, cfg->rx_tbl_num, 1);
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qmp_usb_configure_lane(qphy->rx2, cfg->regs,
>   					cfg->rx_tbl, cfg->rx_tbl_num, 2);
>   	}
> @@ -2613,7 +2601,7 @@ int qmp_usb_create(struct device *dev, struct device_node *np, int id,
>   	if (cfg->pcs_usb_offset)
>   		qphy->pcs_usb = qphy->pcs + cfg->pcs_usb_offset;
>   
> -	if (cfg->is_dual_lane_phy) {
> +	if (cfg->lanes >= 2) {
>   		qphy->tx2 = devm_of_iomap(dev, np, 3, NULL);
>   		if (IS_ERR(qphy->tx2))
>   			return PTR_ERR(qphy->tx2);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag
  2022-09-20  7:38 ` [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag Johan Hovold
@ 2022-09-20 13:52   ` Neil Armstrong
  2022-09-20 14:08     ` Johan Hovold
  2022-09-22 18:02   ` Dmitry Baryshkov
  1 sibling, 1 reply; 55+ messages in thread
From: Neil Armstrong @ 2022-09-20 13:52 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20/09/2022 09:38, Johan Hovold wrote:
> Drop the DP_COM control block flag from the configuration data, which is
> set for all combo PHYs and hence no longer needed since the QMP driver
> split.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 63 +++++++----------------
>   1 file changed, 18 insertions(+), 45 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 417e0fcf1a9f..ad3b0aa22048 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -876,9 +876,6 @@ struct qmp_phy_cfg {
>   	int pwrdn_delay_min;
>   	int pwrdn_delay_max;
>   
> -	/* true, if PHY has a separate DP_COM control block */
> -	bool has_phy_dp_com_ctrl;
> -
>   	/* Offset from PCS to PCS_USB region */
>   	unsigned int pcs_usb_offset;
>   
> @@ -1051,8 +1048,6 @@ static const struct qmp_phy_cfg sc7180_usb3phy_cfg = {
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
> -
> -	.has_phy_dp_com_ctrl	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
> @@ -1086,8 +1081,6 @@ static const struct qmp_phy_cfg sc7180_dpphy_cfg = {
>   	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
>   	.regs			= qmp_v3_usb3phy_regs_layout,
>   
> -	.has_phy_dp_com_ctrl	= true,
> -
>   	.dp_aux_init = qcom_qmp_v3_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v3_phy_configure_dp_tx,
>   	.configure_dp_phy = qcom_qmp_v3_phy_configure_dp_phy,
> @@ -1126,8 +1119,6 @@ static const struct qmp_phy_cfg sdm845_usb3phy_cfg = {
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
> -
> -	.has_phy_dp_com_ctrl	= true,
>   };
>   
>   static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
> @@ -1166,8 +1157,6 @@ static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
> -
> -	.has_phy_dp_com_ctrl	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
> @@ -1201,8 +1190,6 @@ static const struct qmp_phy_cfg sc8180x_dpphy_cfg = {
>   	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
>   	.regs			= qmp_v3_usb3phy_regs_layout,
>   
> -	.has_phy_dp_com_ctrl	= true,
> -
>   	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
>   	.configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy,
> @@ -1242,8 +1229,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_usb_cfg = {
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
> -
> -	.has_phy_dp_com_ctrl	= true,
>   };
>   
>   static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
> @@ -1277,8 +1262,6 @@ static const struct qmp_phy_cfg sc8280xp_usb43dp_dp_cfg = {
>   	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
>   	.regs			= qmp_v4_usb3phy_regs_layout,
>   
> -	.has_phy_dp_com_ctrl	= true,
> -
>   	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
>   	.configure_dp_phy = qcom_qmp_v5_phy_configure_dp_phy,
> @@ -1320,8 +1303,6 @@ static const struct qmp_phy_cfg sm8250_usb3phy_cfg = {
>   	.has_pwrdn_delay	= true,
>   	.pwrdn_delay_min	= POWER_DOWN_DELAY_US_MIN,
>   	.pwrdn_delay_max	= POWER_DOWN_DELAY_US_MAX,
> -
> -	.has_phy_dp_com_ctrl	= true,
>   };
>   
>   static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
> @@ -1355,8 +1336,6 @@ static const struct qmp_phy_cfg sm8250_dpphy_cfg = {
>   	.num_vregs		= ARRAY_SIZE(qmp_phy_vreg_l),
>   	.regs			= qmp_v4_usb3phy_regs_layout,
>   
> -	.has_phy_dp_com_ctrl	= true,
> -
>   	.dp_aux_init = qcom_qmp_v4_phy_dp_aux_init,
>   	.configure_dp_tx = qcom_qmp_v4_phy_configure_dp_tx,
>   	.configure_dp_phy = qcom_qmp_v4_phy_configure_dp_phy,
> @@ -1995,28 +1974,25 @@ static int qmp_combo_com_init(struct qmp_phy *qphy)
>   	if (ret)
>   		goto err_assert_reset;
>   
> -	if (cfg->has_phy_dp_com_ctrl) {
> -		qphy_setbits(dp_com, QPHY_V3_DP_COM_POWER_DOWN_CTRL,
> -			     SW_PWRDN);
> -		/* override hardware control for reset of qmp phy */
> -		qphy_setbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
> -			     SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
> -			     SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
> +	qphy_setbits(dp_com, QPHY_V3_DP_COM_POWER_DOWN_CTRL, SW_PWRDN);
>   
> -		/* Default type-c orientation, i.e CC1 */
> -		qphy_setbits(dp_com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02);
> +	/* override hardware control for reset of qmp phy */
> +	qphy_setbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
> +			SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
> +			SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
>   
> -		qphy_setbits(dp_com, QPHY_V3_DP_COM_PHY_MODE_CTRL,
> -			     USB3_MODE | DP_MODE);
> +	/* Default type-c orientation, i.e CC1 */
> +	qphy_setbits(dp_com, QPHY_V3_DP_COM_TYPEC_CTRL, 0x02);
>   
> -		/* bring both QMP USB and QMP DP PHYs PCS block out of reset */
> -		qphy_clrbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
> -			     SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
> -			     SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
> +	qphy_setbits(dp_com, QPHY_V3_DP_COM_PHY_MODE_CTRL, USB3_MODE | DP_MODE);
>   
> -		qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
> -		qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
> -	}
> +	/* bring both QMP USB and QMP DP PHYs PCS block out of reset */
> +	qphy_clrbits(dp_com, QPHY_V3_DP_COM_RESET_OVRD_CTRL,
> +			SW_DPPHY_RESET_MUX | SW_DPPHY_RESET |
> +			SW_USB3PHY_RESET_MUX | SW_USB3PHY_RESET);
> +
> +	qphy_clrbits(dp_com, QPHY_V3_DP_COM_SWI_CTRL, 0x03);
> +	qphy_clrbits(dp_com, QPHY_V3_DP_COM_SW_RESET, SW_RESET);
>   
>   	if (cfg->regs[QPHY_PCS_POWER_DOWN_CONTROL])
>   		qphy_setbits(pcs,
> @@ -2838,12 +2814,9 @@ static int qmp_combo_probe(struct platform_device *pdev)
>   	if (IS_ERR(serdes))
>   		return PTR_ERR(serdes);
>   
> -	/* per PHY dp_com; if PHY has dp_com control block */
> -	if (cfg->has_phy_dp_com_ctrl) {
> -		qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
> -		if (IS_ERR(qmp->dp_com))
> -			return PTR_ERR(qmp->dp_com);
> -	}
> +	qmp->dp_com = devm_platform_ioremap_resource(pdev, 1);
> +	if (IS_ERR(qmp->dp_com))
> +		return PTR_ERR(qmp->dp_com);
>   
>   	/* Only two serdes for combo PHY */
>   	dp_serdes = devm_platform_ioremap_resource(pdev, 2);

Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

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

* Re: [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag
  2022-09-20 13:52   ` Neil Armstrong
@ 2022-09-20 14:08     ` Johan Hovold
  0 siblings, 0 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-20 14:08 UTC (permalink / raw)
  To: Neil Armstrong
  Cc: Johan Hovold, Vinod Koul, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Kishon Vijay Abraham I, Dmitry Baryshkov,
	linux-arm-msm, linux-phy, linux-kernel

On Tue, Sep 20, 2022 at 03:52:23PM +0200, Neil Armstrong wrote:
> On 20/09/2022 09:38, Johan Hovold wrote:
> > Drop the DP_COM control block flag from the configuration data, which is
> > set for all combo PHYs and hence no longer needed since the QMP driver
> > split.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

> Reviewed-by: Neil Armstrong <neil.armstrong@linaro.org>

Thanks for reviewing, Neil.

Johan

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

* Re: [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config
  2022-09-20  7:38 ` [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config Johan Hovold
  2022-09-20 13:50   ` Neil Armstrong
@ 2022-09-22 14:30   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 14:30 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> The configuration PHY type is no longer used since the QMP driver split
> so drop it from the configurations.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 14 --------------
>   1 file changed, 14 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 03/17] phy: qcom-qmp-ufs: drop unused type from config
  2022-09-20  7:38 ` [PATCH 03/17] phy: qcom-qmp-ufs: " Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 14:31   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 14:31 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> The configuration PHY type is no longer used since the QMP driver split
> so drop it from the configuration.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 8 --------
>   1 file changed, 8 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
-- 
With best wishes
Dmitry


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

* Re: [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations
  2022-09-20  7:38 ` [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 14:31   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 14:31 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Only the combo QMP driver needs a forward declaration of struct qmp_phy.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 2 --
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c         | 2 --
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c          | 2 --
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c          | 2 --
>   4 files changed, 8 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: drop unused type from config
  2022-09-20  7:38 ` [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
  2022-09-20 13:50   ` Neil Armstrong
@ 2022-09-22 14:31   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 14:31 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> The configuration PHY type is no longer used since the QMP driver split
> so drop it from the configuration.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 04/17] phy: qcom-qmp-usb: drop unused type from config
  2022-09-20  7:38 ` [PATCH 04/17] phy: qcom-qmp-usb: " Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 14:33   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 14:33 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> The configuration PHY type is no longer needed since the QMP driver
> split so drop it from the configuration and suspend callbacks.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 26 -------------------------
>   1 file changed, 26 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers
  2022-09-20  7:38 ` [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 17:58 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Drop the unnecessary PHY init and exit callback wrappers.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 29 ++++--------------------
>   1 file changed, 4 insertions(+), 25 deletions(-)
> 

Initially I thought that it might be possible to unify the 
com_init/com_exit functions, however it doesn't seem really possible. 
Let's clean this up.

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 06/17] phy: qcom-qmp-usb: drop init and exit wrappers
  2022-09-20  7:38 ` [PATCH 06/17] phy: qcom-qmp-usb: " Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 17:58 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Drop the unnecessary PHY init and exit callback wrappers.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 29 ++++---------------------
>   1 file changed, 4 insertions(+), 25 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc
  2022-09-20  7:38 ` [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 17:58 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Drop the removed mode field from the struct qmp_phy kernel doc.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field
  2022-09-20  7:38 ` [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 17:58   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 17:58 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Drop the unused mode field from struct qmp_phy.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 2 --
>   1 file changed, 2 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field
  2022-09-20  7:38 ` [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 17:59   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 17:59 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Drop the unused mask_com_pcs_ready field from struct qmp_phy_cfg.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 1 -
>   1 file changed, 1 deletion(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 11/17] phy: qcom-qmp: drop unused index field
  2022-09-20  7:38 ` [PATCH 11/17] phy: qcom-qmp: drop unused index field Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 17:59   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 17:59 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Only the MSM8996 PCIe QMP driver uses the index field so drop it from
> the other drivers.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 3 ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c  | 3 ---
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c   | 3 ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c   | 3 ---
>   4 files changed, 12 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config
  2022-09-20  7:38 ` [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
@ 2022-09-22 18:01   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 18:01 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> The nlanes configuration parameter is really the number of PHYs provided
> by this QMP block on MSM8996. Rename it accordingly.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie-msm8996.c | 8 ++++----
>   1 file changed, 4 insertions(+), 4 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config
  2022-09-20  7:38 ` [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
@ 2022-09-22 18:01   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 18:01 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that appear
> to describe the number of lanes a PHY has, even if "nlanes" was actually
> used for a different purpose.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 38 ++++++++---------------
>   1 file changed, 13 insertions(+), 25 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 15/17] phy: qcom-qmp-ufs: consolidate lane config
  2022-09-20  7:38 ` [PATCH 15/17] phy: qcom-qmp-ufs: " Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
@ 2022-09-22 18:02   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 18:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that describe
> the number of lanes a PHY has.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-ufs.c | 31 ++++++++-----------------
>   1 file changed, 10 insertions(+), 21 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 16/17] phy: qcom-qmp-usb: consolidate lane config
  2022-09-20  7:38 ` [PATCH 16/17] phy: qcom-qmp-usb: " Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
@ 2022-09-22 18:02   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 18:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that appear
> to describe the number of lanes a PHY has, even if "nlanes" was actually
> used for a different purpose.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 52 ++++++++++---------------
>   1 file changed, 20 insertions(+), 32 deletions(-)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag
  2022-09-20  7:38 ` [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag Johan Hovold
  2022-09-20 13:52   ` Neil Armstrong
@ 2022-09-22 18:02   ` Dmitry Baryshkov
  2022-09-23  6:14     ` Johan Hovold
  1 sibling, 1 reply; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 18:02 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> Drop the DP_COM control block flag from the configuration data, which is
> set for all combo PHYs and hence no longer needed since the QMP driver
> split.
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 63 +++++++----------------
>   1 file changed, 18 insertions(+), 45 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config
  2022-09-20  7:38 ` [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config Johan Hovold
  2022-09-20 13:51   ` Neil Armstrong
@ 2022-09-22 18:06   ` Dmitry Baryshkov
  1 sibling, 0 replies; 55+ messages in thread
From: Dmitry Baryshkov @ 2022-09-22 18:06 UTC (permalink / raw)
  To: Johan Hovold, Vinod Koul
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, linux-kernel

On 20/09/2022 10:38, Johan Hovold wrote:
> For legacy reasons, there are two configuration parameters that describe
> the number of lanes a PHY has.
> 
> Replace them both with a new field simply named "lanes".
> 
> Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-pcie.c | 39 ++++++++++--------------
>   1 file changed, 16 insertions(+), 23 deletions(-)

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

-- 
With best wishes
Dmitry


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

* Re: [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag
  2022-09-22 18:02   ` Dmitry Baryshkov
@ 2022-09-23  6:14     ` Johan Hovold
  0 siblings, 0 replies; 55+ messages in thread
From: Johan Hovold @ 2022-09-23  6:14 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Johan Hovold, Vinod Koul, Andy Gross, Bjorn Andersson,
	Konrad Dybcio, Kishon Vijay Abraham I, linux-arm-msm, linux-phy,
	linux-kernel

On Thu, Sep 22, 2022 at 09:02:49PM +0300, Dmitry Baryshkov wrote:
> On 20/09/2022 10:38, Johan Hovold wrote:
> > Drop the DP_COM control block flag from the configuration data, which is
> > set for all combo PHYs and hence no longer needed since the QMP driver
> > split.
> > 
> > Signed-off-by: Johan Hovold <johan+linaro@kernel.org>
> > ---
> >   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 63 +++++++----------------
> >   1 file changed, 18 insertions(+), 45 deletions(-)
> 
> Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>

Thanks for the review, Dmitry.

Johan

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

* Re: [PATCH 00/17] phy: qcom-qmp: config and misc clean ups
  2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
                   ` (16 preceding siblings ...)
  2022-09-20  7:38 ` [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag Johan Hovold
@ 2022-09-24  5:30 ` Vinod Koul
  17 siblings, 0 replies; 55+ messages in thread
From: Vinod Koul @ 2022-09-24  5:30 UTC (permalink / raw)
  To: Johan Hovold
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, Dmitry Baryshkov, linux-arm-msm,
	linux-phy, linux-kernel

On 20-09-22, 09:38, Johan Hovold wrote:
> Here's the next and hopefully last set of QMP driver cleanups for a
> while.
> 
> These patches drops further configuration parameters that are unused or
> redundant since the QMP driver split.
> 
> This notably includes consolidating the lane configuration, which for
> legacy reasons was inconsistent.
> 

Applied, thanks for the cleanup!

-- 
~Vinod

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

end of thread, other threads:[~2022-09-24  5:30 UTC | newest]

Thread overview: 55+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-09-20  7:38 [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Johan Hovold
2022-09-20  7:38 ` [PATCH 01/17] phy: qcom-qmp-pcie: drop unused type from config Johan Hovold
2022-09-20 13:50   ` Neil Armstrong
2022-09-22 14:30   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 02/17] phy: qcom-qmp-pcie-msm8996: " Johan Hovold
2022-09-20 13:50   ` Neil Armstrong
2022-09-22 14:31   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 03/17] phy: qcom-qmp-ufs: " Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 14:31   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 04/17] phy: qcom-qmp-usb: " Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 14:33   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 05/17] phy: qcom-qmp-pcie: drop init and exit wrappers Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 17:58   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 06/17] phy: qcom-qmp-usb: " Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 17:58   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 07/17] phy: qcom-qmp: drop unused forward declarations Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 14:31   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 08/17] phy: qcom-qmp-pcie-msm8996: drop unused kernel doc Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 17:58   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 09/17] phy: qcom-qmp-pcie: drop unused mode field Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 17:58   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 10/17] phy: qcom-qmp-pcie: drop unused config field Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 17:59   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 11/17] phy: qcom-qmp: drop unused index field Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 17:59   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 12/17] phy: qcom-qmp-pcie: consolidate lane config Johan Hovold
2022-09-20 13:51   ` Neil Armstrong
2022-09-22 18:06   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 13/17] phy: qcom-qmp-pcie-msm8996: rename nlanes config Johan Hovold
2022-09-20 13:52   ` Neil Armstrong
2022-09-22 18:01   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 14/17] phy: qcom-qmp-combo: consolidate lane config Johan Hovold
2022-09-20 13:52   ` Neil Armstrong
2022-09-22 18:01   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 15/17] phy: qcom-qmp-ufs: " Johan Hovold
2022-09-20 13:52   ` Neil Armstrong
2022-09-22 18:02   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 16/17] phy: qcom-qmp-usb: " Johan Hovold
2022-09-20 13:52   ` Neil Armstrong
2022-09-22 18:02   ` Dmitry Baryshkov
2022-09-20  7:38 ` [PATCH 17/17] phy: qcom-qmp-combo: drop redundant DP config flag Johan Hovold
2022-09-20 13:52   ` Neil Armstrong
2022-09-20 14:08     ` Johan Hovold
2022-09-22 18:02   ` Dmitry Baryshkov
2022-09-23  6:14     ` Johan Hovold
2022-09-24  5:30 ` [PATCH 00/17] phy: qcom-qmp: config and misc clean ups Vinod Koul

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