* [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible
@ 2022-11-21 7:53 Luca Weiss
2022-11-21 7:53 ` [PATCH 2/3] phy: qcom-qmp-combo: Add config for SM6350 Luca Weiss
2022-11-21 8:07 ` [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Johan Hovold
0 siblings, 2 replies; 5+ messages in thread
From: Luca Weiss @ 2022-11-21 7:53 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Wesley Cheng, linux-phy, devicetree, linux-kernel
Add the compatible describing the combo phy found on SM6350.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
index 97a7ecafbf85..68aecb638870 100644
--- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
+++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
@@ -18,6 +18,7 @@ properties:
- qcom,sc8180x-qmp-usb3-dp-phy
- qcom,sc8280xp-qmp-usb43dp-phy
- qcom,sdm845-qmp-usb3-dp-phy
+ - qcom,sm6350-qmp-usb3-dp-phy
- qcom,sm8250-qmp-usb3-dp-phy
reg:
items:
--
2.38.1
--
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/3] phy: qcom-qmp-combo: Add config for SM6350
2022-11-21 7:53 [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Luca Weiss
@ 2022-11-21 7:53 ` Luca Weiss
2022-11-21 8:07 ` [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Johan Hovold
1 sibling, 0 replies; 5+ messages in thread
From: Luca Weiss @ 2022-11-21 7:53 UTC (permalink / raw)
To: linux-arm-msm
Cc: ~postmarketos/upstreaming, phone-devel, Luca Weiss, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, linux-phy, linux-kernel
Add the tables and config for the combo phy found on SM6350.
Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
---
drivers/phy/qualcomm/phy-qcom-qmp-combo.c | 98 +++++++++++++++++++++++
1 file changed, 98 insertions(+)
diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
index ba9d761ec49a..c93867da7b1a 100644
--- a/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
+++ b/drivers/phy/qualcomm/phy-qcom-qmp-combo.c
@@ -325,6 +325,66 @@ static const struct qmp_phy_init_tbl qmp_v3_usb3_pcs_tbl[] = {
QMP_PHY_INIT_CFG(QPHY_V3_PCS_RXEQTRAINING_RUN_TIME, 0x13),
};
+static const struct qmp_phy_init_tbl sm6350_usb3_rx_tbl[] = {
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_FASTLOCK_FO_GAIN, 0x0b),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL2, 0x0f),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL3, 0x4e),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQU_ADAPTOR_CNTRL4, 0x18),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1, 0x77),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_OFFSET_ADAPTOR_CNTRL2, 0x80),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_CNTRL, 0x03),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_SIGDET_DEGLITCH_CNTRL, 0x16),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_RX_MODE_00, 0x05),
+ QMP_PHY_INIT_CFG(QSERDES_V3_RX_UCDR_SO_SATURATION_AND_ENABLE, 0x75),
+};
+
+static const struct qmp_phy_init_tbl sm6350_usb3_pcs_tbl[] = {
+ /* FLL settings */
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNTRL2, 0x83),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNT_VAL_L, 0x09),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNT_VAL_H_TOL, 0xa2),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_MAN_CODE, 0x40),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_FLL_CNTRL1, 0x02),
+
+ /* Lock Det settings */
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LOCK_DETECT_CONFIG1, 0xd1),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LOCK_DETECT_CONFIG2, 0x1f),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LOCK_DETECT_CONFIG3, 0x47),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_POWER_STATE_CONFIG2, 0x1b),
+
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RX_SIGDET_LVL, 0xcc),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXMGN_V0, 0x9f),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXMGN_V1, 0x9f),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXMGN_V2, 0xb7),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXMGN_V3, 0x4e),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXMGN_V4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VR_DTCT_DLY_P1U2_H, 0x03),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RCVR_DTCT_DLY_U3_L, 0x40),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RCVR_DTCT_DLY_U3_H, 0x00),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RXEQTRAINING_WAIT_TIME, 0x75),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_LFPS_TX_ECSTART_EQTLOCK, 0x86),
+ QMP_PHY_INIT_CFG(QPHY_V3_PCS_RXEQTRAINING_RUN_TIME, 0x13),
+};
+
static const struct qmp_phy_init_tbl sm8150_usb3_serdes_tbl[] = {
QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_EN_CENTER, 0x01),
QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_PER1, 0x31),
@@ -1126,6 +1186,40 @@ static const struct qmp_phy_combo_cfg sdm845_usb3dpphy_cfg = {
.dp_cfg = &sc7180_dpphy_cfg,
};
+static const struct qmp_phy_cfg sm6350_usb3phy_cfg = {
+ .type = PHY_TYPE_USB3,
+ .lanes = 2,
+
+ .serdes_tbl = qmp_v3_usb3_serdes_tbl,
+ .serdes_tbl_num = ARRAY_SIZE(qmp_v3_usb3_serdes_tbl),
+ .tx_tbl = qmp_v3_usb3_tx_tbl,
+ .tx_tbl_num = ARRAY_SIZE(qmp_v3_usb3_tx_tbl),
+ .rx_tbl = sm6350_usb3_rx_tbl,
+ .rx_tbl_num = ARRAY_SIZE(sm6350_usb3_rx_tbl),
+ .pcs_tbl = sm6350_usb3_pcs_tbl,
+ .pcs_tbl_num = ARRAY_SIZE(sm6350_usb3_pcs_tbl),
+ .clk_list = qmp_v3_phy_clk_l,
+ .num_clks = ARRAY_SIZE(qmp_v3_phy_clk_l),
+ .reset_list = msm8996_usb3phy_reset_l,
+ .num_resets = ARRAY_SIZE(msm8996_usb3phy_reset_l),
+ .vreg_list = qmp_phy_vreg_l,
+ .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l),
+ .regs = qmp_v3_usb3phy_regs_layout,
+
+ .start_ctrl = SERDES_START | PCS_START,
+ .pwrdn_ctrl = SW_PWRDN,
+ .phy_status = PHYSTATUS,
+
+ .has_pwrdn_delay = true,
+ .pwrdn_delay_min = POWER_DOWN_DELAY_US_MIN,
+ .pwrdn_delay_max = POWER_DOWN_DELAY_US_MAX,
+};
+
+static const struct qmp_phy_combo_cfg sm6350_usb3dpphy_cfg = {
+ .usb_cfg = &sm6350_usb3phy_cfg,
+ .dp_cfg = &sc7180_dpphy_cfg,
+};
+
static const struct qmp_phy_cfg sm8150_usb3phy_cfg = {
.type = PHY_TYPE_USB3,
.lanes = 2,
@@ -2753,6 +2847,10 @@ static const struct of_device_id qmp_combo_of_match_table[] = {
.compatible = "qcom,sdm845-qmp-usb3-dp-phy",
.data = &sdm845_usb3dpphy_cfg,
},
+ {
+ .compatible = "qcom,sm6350-qmp-usb3-dp-phy",
+ .data = &sm6350_usb3dpphy_cfg,
+ },
{
.compatible = "qcom,sm8250-qmp-usb3-dp-phy",
.data = &sm8250_usb3dpphy_cfg,
--
2.38.1
--
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/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible
2022-11-21 7:53 [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Luca Weiss
2022-11-21 7:53 ` [PATCH 2/3] phy: qcom-qmp-combo: Add config for SM6350 Luca Weiss
@ 2022-11-21 8:07 ` Johan Hovold
2022-11-22 7:55 ` Luca Weiss
1 sibling, 1 reply; 5+ messages in thread
From: Johan Hovold @ 2022-11-21 8:07 UTC (permalink / raw)
To: Luca Weiss
Cc: linux-arm-msm, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Wesley Cheng, linux-phy, devicetree, linux-kernel
On Mon, Nov 21, 2022 at 08:53:55AM +0100, Luca Weiss wrote:
> Add the compatible describing the combo phy found on SM6350.
>
> Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> ---
> Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> index 97a7ecafbf85..68aecb638870 100644
> --- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> @@ -18,6 +18,7 @@ properties:
> - qcom,sc8180x-qmp-usb3-dp-phy
> - qcom,sc8280xp-qmp-usb43dp-phy
> - qcom,sdm845-qmp-usb3-dp-phy
> + - qcom,sm6350-qmp-usb3-dp-phy
> - qcom,sm8250-qmp-usb3-dp-phy
> reg:
> items:
The current USB3-DP bindings are broken and we should no be adding
further compatibles here. Please consider rebasing on:
https://lore.kernel.org/all/20221115144005.2478-1-johan+linaro@kernel.org/
Johan
--
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/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible
2022-11-21 8:07 ` [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Johan Hovold
@ 2022-11-22 7:55 ` Luca Weiss
2022-11-22 8:10 ` Johan Hovold
0 siblings, 1 reply; 5+ messages in thread
From: Luca Weiss @ 2022-11-22 7:55 UTC (permalink / raw)
To: Johan Hovold
Cc: linux-arm-msm, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Wesley Cheng, linux-phy, devicetree, linux-kernel
Hi Johan,
On Mon Nov 21, 2022 at 9:07 AM CET, Johan Hovold wrote:
> On Mon, Nov 21, 2022 at 08:53:55AM +0100, Luca Weiss wrote:
> > Add the compatible describing the combo phy found on SM6350.
> >
> > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > ---
> > Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> > index 97a7ecafbf85..68aecb638870 100644
> > --- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> > +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> > @@ -18,6 +18,7 @@ properties:
> > - qcom,sc8180x-qmp-usb3-dp-phy
> > - qcom,sc8280xp-qmp-usb43dp-phy
> > - qcom,sdm845-qmp-usb3-dp-phy
> > + - qcom,sm6350-qmp-usb3-dp-phy
> > - qcom,sm8250-qmp-usb3-dp-phy
> > reg:
> > items:
>
> The current USB3-DP bindings are broken and we should no be adding
> further compatibles here. Please consider rebasing on:
>
> https://lore.kernel.org/all/20221115144005.2478-1-johan+linaro@kernel.org/
I'm not quite clear what you want me to do. Just rebase this change on
top of your patchset and resend or something else?
Regards
Luca
>
> Johan
--
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/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible
2022-11-22 7:55 ` Luca Weiss
@ 2022-11-22 8:10 ` Johan Hovold
0 siblings, 0 replies; 5+ messages in thread
From: Johan Hovold @ 2022-11-22 8:10 UTC (permalink / raw)
To: Luca Weiss
Cc: linux-arm-msm, ~postmarketos/upstreaming, phone-devel, Andy Gross,
Bjorn Andersson, Konrad Dybcio, Vinod Koul,
Kishon Vijay Abraham I, Rob Herring, Krzysztof Kozlowski,
Wesley Cheng, linux-phy, devicetree, linux-kernel
On Tue, Nov 22, 2022 at 08:55:31AM +0100, Luca Weiss wrote:
> Hi Johan,
>
> On Mon Nov 21, 2022 at 9:07 AM CET, Johan Hovold wrote:
> > On Mon, Nov 21, 2022 at 08:53:55AM +0100, Luca Weiss wrote:
> > > Add the compatible describing the combo phy found on SM6350.
> > >
> > > Signed-off-by: Luca Weiss <luca.weiss@fairphone.com>
> > > ---
> > > Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml | 1 +
> > > 1 file changed, 1 insertion(+)
> > >
> > > diff --git a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> > > index 97a7ecafbf85..68aecb638870 100644
> > > --- a/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> > > +++ b/Documentation/devicetree/bindings/phy/qcom,qmp-usb3-dp-phy.yaml
> > > @@ -18,6 +18,7 @@ properties:
> > > - qcom,sc8180x-qmp-usb3-dp-phy
> > > - qcom,sc8280xp-qmp-usb43dp-phy
> > > - qcom,sdm845-qmp-usb3-dp-phy
> > > + - qcom,sm6350-qmp-usb3-dp-phy
> > > - qcom,sm8250-qmp-usb3-dp-phy
> > > reg:
> > > items:
> >
> > The current USB3-DP bindings are broken and we should no be adding
> > further compatibles here. Please consider rebasing on:
> >
> > https://lore.kernel.org/all/20221115144005.2478-1-johan+linaro@kernel.org/
>
> I'm not quite clear what you want me to do. Just rebase this change on
> top of your patchset and resend or something else?
Yes, you should rebase this series on top of the above, add
qcom,sm6350-qmp-usb3-dp-phy to the new (sc8280xp) schema, add a
register offset table for QMP v3 to the PHY driver, and update the dts.
Note that the USB/DP configuration structures have been merged (and some
config fields have already been removed in linux-next).
Johan
--
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:[~2022-11-22 8:11 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-11-21 7:53 [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Luca Weiss
2022-11-21 7:53 ` [PATCH 2/3] phy: qcom-qmp-combo: Add config for SM6350 Luca Weiss
2022-11-21 8:07 ` [PATCH 1/3] dt-bindings: phy: qcom,qmp-usb3-dp: Add sm6350 compatible Johan Hovold
2022-11-22 7:55 ` Luca Weiss
2022-11-22 8:10 ` Johan Hovold
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox