linux-phy.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table
@ 2023-03-23 14:47 Dmitry Baryshkov
  2023-03-23 14:47 ` [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6 Dmitry Baryshkov
                   ` (2 more replies)
  0 siblings, 3 replies; 5+ messages in thread
From: Dmitry Baryshkov @ 2023-03-23 14:47 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Kishon Vijay Abraham I
  Cc: linux-arm-msm, linux-phy, Neil Armstrong

SM8350 and SM8450 use qmp_combo_offsets_v3 table, which doesn't have
PCS_USB offset. Add the usb3_pcs_usb entry to program correct registers
while setting up sm8350 and sm8450 USB+DP combo PHYs.

Fixes: 05bd18348b88 ("phy: qcom-qmp-combo: Add config for SM6350")
Cc: Neil Armstrong <neil.armstrong@linaro.org>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index c1483e157af4..3b488d12c933 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -1396,6 +1396,7 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v3 = {
 	.usb3_serdes	= 0x1000,
 	.usb3_pcs_misc	= 0x1a00,
 	.usb3_pcs	= 0x1c00,
+	.usb3_pcs_usb	= 0x1f00,
 	.dp_serdes	= 0x2000,
 	.dp_txa		= 0x2200,
 	.dp_txb		= 0x2600,
-- 
2.30.2


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6
  2023-03-23 14:47 [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Dmitry Baryshkov
@ 2023-03-23 14:47 ` Dmitry Baryshkov
  2023-03-23 14:55   ` Neil Armstrong
  2023-03-23 14:55 ` [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Neil Armstrong
  2023-03-31 13:49 ` Vinod Koul
  2 siblings, 1 reply; 5+ messages in thread
From: Dmitry Baryshkov @ 2023-03-23 14:47 UTC (permalink / raw)
  To: Andy Gross, Bjorn Andersson, Konrad Dybcio, Vinod Koul,
	Kishon Vijay Abraham I
  Cc: linux-arm-msm, linux-phy

The qmp_combo_offsets_v3 table is already used for v3 and v4 PHYs. Reuse
it for v6 too, dropping the separate qmp_combo_offsets_v6.

Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
---
 drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 18 +-----------------
 1 file changed, 1 insertion(+), 17 deletions(-)

diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index 3b488d12c933..6850e04c329b 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -1417,22 +1417,6 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v5 = {
 	.dp_dp_phy	= 0x2200,
 };
 
-static const struct qmp_combo_offsets qmp_combo_offsets_v6 = {
-	.com		= 0x0000,
-	.txa		= 0x1200,
-	.rxa		= 0x1400,
-	.txb		= 0x1600,
-	.rxb		= 0x1800,
-	.usb3_serdes	= 0x1000,
-	.usb3_pcs_misc	= 0x1a00,
-	.usb3_pcs	= 0x1c00,
-	.usb3_pcs_usb	= 0x1f00,
-	.dp_serdes	= 0x2000,
-	.dp_txa		= 0x2200,
-	.dp_txb		= 0x2600,
-	.dp_dp_phy	= 0x2a00,
-};
-
 static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = {
 	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
@@ -1759,7 +1743,7 @@ static const struct qmp_phy_cfg sm8350_usb3dpphy_cfg = {
 };
 
 static const struct qmp_phy_cfg sm8550_usb3dpphy_cfg = {
-	.offsets		= &qmp_combo_offsets_v6,
+	.offsets		= &qmp_combo_offsets_v3,
 
 	.serdes_tbl		= sm8550_usb3_serdes_tbl,
 	.serdes_tbl_num		= ARRAY_SIZE(sm8550_usb3_serdes_tbl),
-- 
2.30.2


-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table
  2023-03-23 14:47 [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Dmitry Baryshkov
  2023-03-23 14:47 ` [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6 Dmitry Baryshkov
@ 2023-03-23 14:55 ` Neil Armstrong
  2023-03-31 13:49 ` Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2023-03-23 14:55 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Vinod Koul, Kishon Vijay Abraham I
  Cc: linux-arm-msm, linux-phy

On 23/03/2023 15:47, Dmitry Baryshkov wrote:
> SM8350 and SM8450 use qmp_combo_offsets_v3 table, which doesn't have
> PCS_USB offset. Add the usb3_pcs_usb entry to program correct registers
> while setting up sm8350 and sm8450 USB+DP combo PHYs.
> 
> Fixes: 05bd18348b88 ("phy: qcom-qmp-combo: Add config for SM6350")
> Cc: Neil Armstrong <neil.armstrong@linaro.org>
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 1 +
>   1 file changed, 1 insertion(+)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index c1483e157af4..3b488d12c933 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -1396,6 +1396,7 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v3 = {
>   	.usb3_serdes	= 0x1000,
>   	.usb3_pcs_misc	= 0x1a00,
>   	.usb3_pcs	= 0x1c00,
> +	.usb3_pcs_usb	= 0x1f00,
>   	.dp_serdes	= 0x2000,
>   	.dp_txa		= 0x2200,
>   	.dp_txb		= 0x2600,

Thanks for the fix, I totally missed the legacy bindings pcs_usb_offset.

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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6
  2023-03-23 14:47 ` [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6 Dmitry Baryshkov
@ 2023-03-23 14:55   ` Neil Armstrong
  0 siblings, 0 replies; 5+ messages in thread
From: Neil Armstrong @ 2023-03-23 14:55 UTC (permalink / raw)
  To: Dmitry Baryshkov, Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Vinod Koul, Kishon Vijay Abraham I
  Cc: linux-arm-msm, linux-phy

On 23/03/2023 15:47, Dmitry Baryshkov wrote:
> The qmp_combo_offsets_v3 table is already used for v3 and v4 PHYs. Reuse
> it for v6 too, dropping the separate qmp_combo_offsets_v6.
> 
> Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
> ---
>   drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 18 +-----------------
>   1 file changed, 1 insertion(+), 17 deletions(-)
> 
> diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> index 3b488d12c933..6850e04c329b 100644
> --- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> +++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
> @@ -1417,22 +1417,6 @@ static const struct qmp_combo_offsets qmp_combo_offsets_v5 = {
>   	.dp_dp_phy	= 0x2200,
>   };
>   
> -static const struct qmp_combo_offsets qmp_combo_offsets_v6 = {
> -	.com		= 0x0000,
> -	.txa		= 0x1200,
> -	.rxa		= 0x1400,
> -	.txb		= 0x1600,
> -	.rxb		= 0x1800,
> -	.usb3_serdes	= 0x1000,
> -	.usb3_pcs_misc	= 0x1a00,
> -	.usb3_pcs	= 0x1c00,
> -	.usb3_pcs_usb	= 0x1f00,
> -	.dp_serdes	= 0x2000,
> -	.dp_txa		= 0x2200,
> -	.dp_txb		= 0x2600,
> -	.dp_dp_phy	= 0x2a00,
> -};
> -
>   static const struct qmp_phy_cfg sc7180_usb3dpphy_cfg = {
>   	.serdes_tbl		= qmp_v3_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
> @@ -1759,7 +1743,7 @@ static const struct qmp_phy_cfg sm8350_usb3dpphy_cfg = {
>   };
>   
>   static const struct qmp_phy_cfg sm8550_usb3dpphy_cfg = {
> -	.offsets		= &qmp_combo_offsets_v6,
> +	.offsets		= &qmp_combo_offsets_v3,
>   
>   	.serdes_tbl		= sm8550_usb3_serdes_tbl,
>   	.serdes_tbl_num		= ARRAY_SIZE(sm8550_usb3_serdes_tbl),

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

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

* Re: [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table
  2023-03-23 14:47 [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Dmitry Baryshkov
  2023-03-23 14:47 ` [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6 Dmitry Baryshkov
  2023-03-23 14:55 ` [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Neil Armstrong
@ 2023-03-31 13:49 ` Vinod Koul
  2 siblings, 0 replies; 5+ messages in thread
From: Vinod Koul @ 2023-03-31 13:49 UTC (permalink / raw)
  To: Dmitry Baryshkov
  Cc: Andy Gross, Bjorn Andersson, Konrad Dybcio,
	Kishon Vijay Abraham I, linux-arm-msm, linux-phy, Neil Armstrong

On 23-03-23, 17:47, Dmitry Baryshkov wrote:
> SM8350 and SM8450 use qmp_combo_offsets_v3 table, which doesn't have
> PCS_USB offset. Add the usb3_pcs_usb entry to program correct registers
> while setting up sm8350 and sm8450 USB+DP combo PHYs.

Applied, thanks

-- 
~Vinod

-- 
linux-phy mailing list
linux-phy@lists.infradead.org
https://lists.infradead.org/mailman/listinfo/linux-phy

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

end of thread, other threads:[~2023-03-31 13:49 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-03-23 14:47 [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Dmitry Baryshkov
2023-03-23 14:47 ` [PATCH 2/2] phy: qcom-qmp-combo: use qmp_combo_offsets_v3 instead of _v6 Dmitry Baryshkov
2023-03-23 14:55   ` Neil Armstrong
2023-03-23 14:55 ` [PATCH 1/2] phy: qcom-qmp-combo: fix v3 offsets table Neil Armstrong
2023-03-31 13:49 ` 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).