* [PATCH v4 1/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ9650 USB3 PHY [not found] <20261005-phy-v4-0-b04c4123ecb3@oss.qualcomm.com> @ 2026-10-05 6:36 ` Varadarajan Narayanan 2026-10-05 6:36 ` [PATCH v4 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration Varadarajan Narayanan ` (3 subsequent siblings) 4 siblings, 0 replies; 11+ messages in thread From: Varadarajan Narayanan @ 2026-10-05 6:36 UTC (permalink / raw) To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Varadarajan Narayanan, Krzysztof Kozlowski Document the Qualcomm IPQ9650 USB3 QMP PHY compatible. Use a standalone compatible because the IPQ9650 PHY has register configuration data that differs from the currently supported SoCs and should not fall back to an existing definition. Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> --- .../devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml index 01342823e57f..746c5a331f48 100644 --- a/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml +++ b/Documentation/devicetree/bindings/phy/qcom,sc8280xp-qmp-usb3-uni-phy.yaml @@ -23,6 +23,7 @@ properties: - qcom,ipq6018-qmp-usb3-phy - qcom,ipq8074-qmp-usb3-phy - qcom,ipq9574-qmp-usb3-phy + - qcom,ipq9650-qmp-usb3-phy - qcom,msm8996-qmp-usb3-phy - qcom,qcs8300-qmp-usb3-uni-phy - qcom,qdu1000-qmp-usb3-uni-phy @@ -102,6 +103,7 @@ allOf: - qcom,ipq6018-qmp-usb3-phy - qcom,ipq8074-qmp-usb3-phy - qcom,ipq9574-qmp-usb3-phy + - qcom,ipq9650-qmp-usb3-phy - qcom,msm8996-qmp-usb3-phy - qcom,sdx55-qmp-usb3-uni-phy - qcom,sdx65-qmp-usb3-uni-phy -- 2.34.1 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [PATCH v4 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration [not found] <20261005-phy-v4-0-b04c4123ecb3@oss.qualcomm.com> 2026-10-05 6:36 ` [PATCH v4 1/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ9650 USB3 PHY Varadarajan Narayanan @ 2026-10-05 6:36 ` Varadarajan Narayanan 2026-10-05 7:11 ` Dmitry Baryshkov 2026-10-05 6:36 ` [PATCH v4 5/6] phy: qcom: snps-femto-v2: Move PHY init registers to config tables Varadarajan Narayanan ` (2 subsequent siblings) 4 siblings, 1 reply; 11+ messages in thread From: Varadarajan Narayanan @ 2026-10-05 6:36 UTC (permalink / raw) To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Varadarajan Narayanan, Abel Vesa Add the USB3 QMP PHY configuration for IPQ9650, including the SoC-specific init tables and compatible data. IPQ9650 uses settings that do not match any existing supported SoC, so add a dedicated configuration to allow the driver to support it. Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> --- drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 118 ++++++++++++++++++++++++++++++++ 1 file changed, 118 insertions(+) diff --git a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c index b0790bcf0bc8..e772e1fa27cf 100644 --- a/drivers/phy/qualcomm/phy-qcom-qmp-usb.c +++ b/drivers/phy/qualcomm/phy-qcom-qmp-usb.c @@ -400,6 +400,101 @@ static const struct qmp_phy_init_tbl ipq8074_usb3_pcs_tbl[] = { QMP_PHY_INIT_CFG(QPHY_V3_PCS_TXDEEMPH_M3P5DB_V0, 0x0f), }; +static const struct qmp_phy_init_tbl ipq9650_usb3_serdes_tbl[] = { + QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_IVCO, 0x0f), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_EN_CENTER, 0x01), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_PER1, 0x7d), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_PER2, 0x01), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_STEP_SIZE1_MODE0, 0x0a), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SSC_STEP_SIZE2_MODE0, 0x05), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_BUF_ENABLE, 0x0a), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_CMN_IPTRIM, 0x20), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_CP_CTRL_MODE0, 0x06), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_RCTRL_MODE0, 0x16), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_PLL_CCTRL_MODE0, 0x36), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_SYSCLK_EN_SEL, 0x1a), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_BG_TIMER, 0x0b), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP_EN, 0x42), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP1_MODE0, 0xd4), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_LOCK_CMP2_MODE0, 0x14), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_DEC_START_MODE0, 0x68), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START1_MODE0, 0xab), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START2_MODE0, 0xaa), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_DIV_FRAC_START3_MODE0, 0x02), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_TUNE_MAP, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_TUNE1_MODE0, 0x24), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_VCO_TUNE2_MODE0, 0x02), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_HSCLK_SEL, 0x01), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE1_MODE0, 0xa2), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_CMP_CODE2_MODE0, 0x18), + QMP_PHY_INIT_CFG(QSERDES_V4_COM_BIN_VCOCAL_HSCLK_SEL, 0x01), +}; + +static const struct qmp_phy_init_tbl ipq9650_usb3_tx_tbl[] = { + QMP_PHY_INIT_CFG(QSERDES_V4_TX_RES_CODE_LANE_OFFSET_TX, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V4_TX_RES_CODE_LANE_OFFSET_RX, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V4_TX_LANE_MODE_1, 0xb5), + QMP_PHY_INIT_CFG(QSERDES_V4_TX_LANE_MODE_2, 0x02), + QMP_PHY_INIT_CFG(QSERDES_V4_TX_RCV_DETECT_LVL_2, 0x12), + QMP_PHY_INIT_CFG(QSERDES_V4_TX_PI_QEC_CTRL, 0x00), +}; + +static const struct qmp_phy_init_tbl ipq9650_usb3_rx_tbl[] = { + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_FO_GAIN, 0x0a), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_SO_GAIN, 0x06), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_FASTLOCK_FO_GAIN, 0x0f), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_SO_SATURATION_AND_ENABLE, 0x7f), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_FASTLOCK_COUNT_LOW, 0xff), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_FASTLOCK_COUNT_HIGH, 0x0f), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_PI_CONTROLS, 0x99), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_SB2_THRESH1, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_SB2_THRESH2, 0x08), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_SB2_GAIN1, 0x05), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_UCDR_SB2_GAIN2, 0x05), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_VGA_CAL_CNTRL1, 0x54), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_VGA_CAL_CNTRL2, 0x0c), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_GM_CAL, 0x11), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_EQU_ADAPTOR_CNTRL2, 0x0f), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_EQU_ADAPTOR_CNTRL3, 0x4a), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_EQU_ADAPTOR_CNTRL4, 0x0a), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_IDAC_TSETTLE_LOW, 0xc0), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_IDAC_TSETTLE_HIGH, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1, 0x47), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_OFFSET_ADAPTOR_CNTRL2, 0x00), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_SIGDET_CNTRL, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_SIGDET_DEGLITCH_CNTRL, 0x0e), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_MODE_01_LOW, 0xe4), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_MODE_01_HIGH, 0x64), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_MODE_01_HIGH2, 0xf6), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_MODE_01_HIGH3, 0x89), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_RX_MODE_01_HIGH4, 0x35), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_DFE_EN_TIMER, 0x04), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_DFE_CTLE_POST_CAL_OFFSET, 0x38), + QMP_PHY_INIT_CFG(QSERDES_V4_RX_DCC_CTRL1, 0x0c), +}; + +static const struct qmp_phy_init_tbl ipq9650_usb3_pcs_tbl[] = { + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RATE_SLEW_CNTRL1, 0x03), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG1, 0xd0), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG2, 0x07), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG3, 0x20), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_LOCK_DETECT_CONFIG6, 0x13), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_REFGEN_REQ_CONFIG1, 0x21), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RX_SIGDET_LVL, 0xaa), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_PCS_TX_RX_CONFIG, 0x0c), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_FLL_CNTRL2, 0x83), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_FLL_CNTRL1, 0x02), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_FLL_CNT_VAL_L, 0x09), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_FLL_CNT_VAL_H_TOL, 0xa2), + QMP_PHY_INIT_CFG(QPHY_V4_PCS_FLL_MAN_CODE, 0x40), +}; + +static const struct qmp_phy_init_tbl ipq9650_usb3_pcs_usb_tbl[] = { + QMP_PHY_INIT_CFG(QPHY_V4_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8), +}; + static const struct qmp_phy_init_tbl msm8996_usb3_serdes_tbl[] = { QMP_PHY_INIT_CFG(QSERDES_V2_COM_SYSCLK_EN_SEL, 0x14), QMP_PHY_INIT_CFG(QSERDES_V2_COM_BIAS_EN_CLKBUFLR_EN, 0x08), @@ -1596,6 +1691,26 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = { .regs = qmp_v3_usb3phy_regs_layout, }; +static const struct qmp_phy_cfg ipq9650_usb3phy_cfg = { + .offsets = &qmp_usb_offsets_v4, + + .serdes_tbl = ipq9650_usb3_serdes_tbl, + .serdes_tbl_num = ARRAY_SIZE(ipq9650_usb3_serdes_tbl), + .tx_tbl = ipq9650_usb3_tx_tbl, + .tx_tbl_num = ARRAY_SIZE(ipq9650_usb3_tx_tbl), + .rx_tbl = ipq9650_usb3_rx_tbl, + .rx_tbl_num = ARRAY_SIZE(ipq9650_usb3_rx_tbl), + .pcs_tbl = ipq9650_usb3_pcs_tbl, + .pcs_tbl_num = ARRAY_SIZE(ipq9650_usb3_pcs_tbl), + .pcs_usb_tbl = ipq9650_usb3_pcs_usb_tbl, + .pcs_usb_tbl_num = ARRAY_SIZE(ipq9650_usb3_pcs_usb_tbl), + .vreg_list = qmp_phy_vreg_l, + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), + .regs = qmp_v4_usb3phy_regs_layout, + + .has_pwrdn_delay = true, +}; + static const struct qmp_phy_cfg msm8996_usb3phy_cfg = { .offsets = &qmp_usb_offsets_v3_msm8996, @@ -2483,6 +2598,9 @@ static const struct of_device_id qmp_usb_of_match_table[] = { }, { .compatible = "qcom,ipq9574-qmp-usb3-phy", .data = &ipq9574_usb3phy_cfg, + }, { + .compatible = "qcom,ipq9650-qmp-usb3-phy", + .data = &ipq9650_usb3phy_cfg, }, { .compatible = "qcom,msm8996-qmp-usb3-phy", .data = &msm8996_usb3phy_cfg, -- 2.34.1 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v4 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration 2026-10-05 6:36 ` [PATCH v4 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration Varadarajan Narayanan @ 2026-10-05 7:11 ` Dmitry Baryshkov 0 siblings, 0 replies; 11+ messages in thread From: Dmitry Baryshkov @ 2026-10-05 7:11 UTC (permalink / raw) To: Varadarajan Narayanan Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel, Abel Vesa On Mon, Oct 05, 2026 at 12:06:28PM +0530, Varadarajan Narayanan wrote: > Add the USB3 QMP PHY configuration for IPQ9650, including the SoC-specific > init tables and compatible data. > > IPQ9650 uses settings that do not match any existing supported SoC, so add > a dedicated configuration to allow the driver to support it. > > Reviewed-by: Abel Vesa <abel.vesa@oss.qualcomm.com> > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > --- > drivers/phy/qualcomm/phy-qcom-qmp-usb.c | 118 ++++++++++++++++++++++++++++++++ > 1 file changed, 118 insertions(+) > Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> -- With best wishes Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
* [PATCH v4 5/6] phy: qcom: snps-femto-v2: Move PHY init registers to config tables [not found] <20261005-phy-v4-0-b04c4123ecb3@oss.qualcomm.com> 2026-10-05 6:36 ` [PATCH v4 1/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ9650 USB3 PHY Varadarajan Narayanan 2026-10-05 6:36 ` [PATCH v4 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration Varadarajan Narayanan @ 2026-10-05 6:36 ` Varadarajan Narayanan 2026-10-05 7:16 ` Dmitry Baryshkov [not found] ` <20261005-phy-v4-4-b04c4123ecb3@oss.qualcomm.com> [not found] ` <20261005-phy-v4-6-b04c4123ecb3@oss.qualcomm.com> 4 siblings, 1 reply; 11+ messages in thread From: Varadarajan Narayanan @ 2026-10-05 6:36 UTC (permalink / raw) To: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel Cc: linux-arm-msm, linux-phy, devicetree, linux-kernel, Varadarajan Narayanan The driver currently programs the common PHY register sequence directly in qcom_snps_hsphy_init(), with the fixed register writes split around the override parameter handling. This makes it hard to support SoCs that need a different sequence or different values. Move the fixed pre- and post-override register programming into per- compatible configuration tables, and keep the 7 nm override parameters in the same match-data structure. This allows the driver to share the common sequence while adding SoC-specific sequences for future platforms such as IPQ9650. Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> --- drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 124 ++++++++++++++++---------- 1 file changed, 78 insertions(+), 46 deletions(-) diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c index 0ead37c0dcfd..b6bbf2b570c7 100644 --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c @@ -104,6 +104,20 @@ struct phy_override_seq { u8 mask; }; +struct phy_reg_config { + u32 offset; + u32 mask; + u32 val; +}; + +struct phy_config_data { + const struct phy_reg_config *pre_tuning; + const struct override_param_map *override; + const struct phy_reg_config *post_tuning; + const u32 num_pre_tuning; + const u32 num_post_tuning; +}; + #define NUM_HSPHY_TUNING_PARAMS (9) /** @@ -383,13 +397,40 @@ static const struct override_param_map sc7280_snps_7nm_phy[] = { {}, }; +static const struct phy_reg_config hs_5nm_phy_pre_tuning[] = { + { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, UTMI_PHY_CMN_CTRL_OVERRIDE_EN }, + { USB2_PHY_USB_PHY_UTMI_CTRL5, POR, POR }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, FSEL_MASK, 0 }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, PLLBTUNE, PLLBTUNE }, + { USB2_PHY_USB_PHY_REFCLK_CTRL, REFCLK_SEL_MASK, REFCLK_SEL_DEFAULT }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, VBUSVLDEXTSEL0, VBUSVLDEXTSEL0 }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL1, VBUSVLDEXT0, VBUSVLDEXT0 }, +}; + +static const struct phy_reg_config hs_5nm_phy_post_tuning[] = { + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON2, VREGBYPASS, VREGBYPASS }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL2, USB2_SUSPEND_N_SEL | USB2_SUSPEND_N, + USB2_SUSPEND_N_SEL | USB2_SUSPEND_N }, + { USB2_PHY_USB_PHY_UTMI_CTRL0, SLEEPM, SLEEPM }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, SIDDQ, 0 }, + { USB2_PHY_USB_PHY_UTMI_CTRL5, POR, 0 }, + { USB2_PHY_USB_PHY_HS_PHY_CTRL2, USB2_SUSPEND_N_SEL, 0 }, + { USB2_PHY_USB_PHY_CFG0, UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0 }, +}; + static int qcom_snps_hsphy_init(struct phy *phy) { struct qcom_snps_hsphy *hsphy = phy_get_drvdata(phy); + const struct phy_config_data *data; + const struct phy_reg_config *tmp; int ret, i; dev_vdbg(&phy->dev, "%s(): Initializing SNPS HS phy\n", __func__); + data = of_device_get_match_data(hsphy->dev); + if (!data) + return -ENODEV; + ret = regulator_bulk_enable(ARRAY_SIZE(hsphy->vregs), hsphy->vregs); if (ret) return ret; @@ -414,24 +455,8 @@ static int qcom_snps_hsphy_init(struct phy *phy) goto disable_clks; } - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_CFG0, - UTMI_PHY_CMN_CTRL_OVERRIDE_EN, - UTMI_PHY_CMN_CTRL_OVERRIDE_EN); - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_UTMI_CTRL5, - POR, POR); - qcom_snps_hsphy_write_mask(hsphy->base, - USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, - FSEL_MASK, 0); - qcom_snps_hsphy_write_mask(hsphy->base, - USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, - PLLBTUNE, PLLBTUNE); - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_REFCLK_CTRL, - REFCLK_SEL_MASK, REFCLK_SEL_DEFAULT); - qcom_snps_hsphy_write_mask(hsphy->base, - USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1, - VBUSVLDEXTSEL0, VBUSVLDEXTSEL0); - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL1, - VBUSVLDEXT0, VBUSVLDEXT0); + for (tmp = data->pre_tuning, i = 0; i < data->num_pre_tuning; i++, tmp++) + qcom_snps_hsphy_write_mask(hsphy->base, tmp->offset, tmp->mask, tmp->val); for (i = 0; i < ARRAY_SIZE(hsphy->update_seq_cfg); i++) { if (hsphy->update_seq_cfg[i].need_update) @@ -441,28 +466,8 @@ static int qcom_snps_hsphy_init(struct phy *phy) hsphy->update_seq_cfg[i].value); } - qcom_snps_hsphy_write_mask(hsphy->base, - USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON2, - VREGBYPASS, VREGBYPASS); - - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL2, - USB2_SUSPEND_N_SEL | USB2_SUSPEND_N, - USB2_SUSPEND_N_SEL | USB2_SUSPEND_N); - - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_UTMI_CTRL0, - SLEEPM, SLEEPM); - - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, - SIDDQ, 0); - - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_UTMI_CTRL5, - POR, 0); - - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL2, - USB2_SUSPEND_N_SEL, 0); - - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_CFG0, - UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0); + for (tmp = data->post_tuning, i = 0; i < data->num_post_tuning; i++, tmp++) + qcom_snps_hsphy_write_mask(hsphy->base, tmp->offset, tmp->mask, tmp->val); hsphy->phy_initialized = true; @@ -495,14 +500,38 @@ static const struct phy_ops qcom_snps_hsphy_gen_ops = { .owner = THIS_MODULE, }; +static const struct phy_config_data hs_5nm_phy = { + .pre_tuning = hs_5nm_phy_pre_tuning, + .num_pre_tuning = ARRAY_SIZE(hs_5nm_phy_pre_tuning), + .post_tuning = hs_5nm_phy_post_tuning, + .num_post_tuning = ARRAY_SIZE(hs_5nm_phy_post_tuning), +}; + +static const struct phy_config_data hs_7nm_phy = { + .pre_tuning = hs_5nm_phy_pre_tuning, + .num_pre_tuning = ARRAY_SIZE(hs_5nm_phy_pre_tuning), + .override = sc7280_snps_7nm_phy, + .post_tuning = hs_5nm_phy_post_tuning, + .num_post_tuning = ARRAY_SIZE(hs_5nm_phy_post_tuning), +}; + static const struct of_device_id qcom_snps_hsphy_of_match_table[] = { - { .compatible = "qcom,sm8150-usb-hs-phy", }, - { .compatible = "qcom,usb-snps-hs-5nm-phy", }, + { + .compatible = "qcom,sm8150-usb-hs-phy", + .data = &hs_5nm_phy, + }, + { + .compatible = "qcom,usb-snps-hs-5nm-phy", + .data = &hs_5nm_phy, + }, { .compatible = "qcom,usb-snps-hs-7nm-phy", - .data = &sc7280_snps_7nm_phy, + .data = &hs_7nm_phy, + }, + { + .compatible = "qcom,usb-snps-femto-v2-phy", + .data = &hs_5nm_phy, }, - { .compatible = "qcom,usb-snps-femto-v2-phy", }, { } }; MODULE_DEVICE_TABLE(of, qcom_snps_hsphy_of_match_table); @@ -541,11 +570,14 @@ static void qcom_snps_hsphy_read_override_param_seq(struct device *dev) s32 val; int ret, i; struct qcom_snps_hsphy *hsphy; - const struct override_param_map *cfg = of_device_get_match_data(dev); + const struct phy_config_data *data = of_device_get_match_data(dev); + const struct override_param_map *cfg; - if (!cfg) + if (!data || !data->override) return; + cfg = data->override; + hsphy = dev_get_drvdata(dev); for (i = 0; cfg[i].prop_name != NULL; i++) { -- 2.34.1 -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply related [flat|nested] 11+ messages in thread
* Re: [PATCH v4 5/6] phy: qcom: snps-femto-v2: Move PHY init registers to config tables 2026-10-05 6:36 ` [PATCH v4 5/6] phy: qcom: snps-femto-v2: Move PHY init registers to config tables Varadarajan Narayanan @ 2026-10-05 7:16 ` Dmitry Baryshkov 0 siblings, 0 replies; 11+ messages in thread From: Dmitry Baryshkov @ 2026-10-05 7:16 UTC (permalink / raw) To: Varadarajan Narayanan Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On Mon, Oct 05, 2026 at 12:06:30PM +0530, Varadarajan Narayanan wrote: > The driver currently programs the common PHY register sequence directly in > qcom_snps_hsphy_init(), with the fixed register writes split around the > override parameter handling. This makes it hard to support SoCs that need a > different sequence or different values. > > Move the fixed pre- and post-override register programming into per- > compatible configuration tables, and keep the 7 nm override parameters in > the same match-data structure. This allows the driver to share the common > sequence while adding SoC-specific sequences for future platforms such as > IPQ9650. > > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > --- > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 124 ++++++++++++++++---------- > 1 file changed, 78 insertions(+), 46 deletions(-) > > - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_HS_PHY_CTRL1, > - VBUSVLDEXT0, VBUSVLDEXT0); > + for (tmp = data->pre_tuning, i = 0; i < data->num_pre_tuning; i++, tmp++) > + qcom_snps_hsphy_write_mask(hsphy->base, tmp->offset, tmp->mask, tmp->val); for (i = 0; i < data->num_pre_tuning; i++) qcom_snps_hsphy_write_mask(hsphy->base, data->pre_tuning[i].offset, data->pre_tuning[i].mask, data->pre_tuning[i].val); > > for (i = 0; i < ARRAY_SIZE(hsphy->update_seq_cfg); i++) { > if (hsphy->update_seq_cfg[i].need_update) > - qcom_snps_hsphy_write_mask(hsphy->base, USB2_PHY_USB_PHY_CFG0, > - UTMI_PHY_CMN_CTRL_OVERRIDE_EN, 0); > + for (tmp = data->post_tuning, i = 0; i < data->num_post_tuning; i++, tmp++) > + qcom_snps_hsphy_write_mask(hsphy->base, tmp->offset, tmp->mask, tmp->val); And here too. > > hsphy->phy_initialized = true; > -- With best wishes Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20261005-phy-v4-4-b04c4123ecb3@oss.qualcomm.com>]
* Re: [PATCH v4 4/6] phy: qcom: snps-femto-v2: Fix qcom_snps_hsphy_write_mask argument mixup [not found] ` <20261005-phy-v4-4-b04c4123ecb3@oss.qualcomm.com> @ 2026-10-05 7:13 ` Dmitry Baryshkov 0 siblings, 0 replies; 11+ messages in thread From: Dmitry Baryshkov @ 2026-10-05 7:13 UTC (permalink / raw) To: Varadarajan Narayanan Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On Mon, Oct 05, 2026 at 12:06:29PM +0530, Varadarajan Narayanan wrote: > Fix the register bit field mask & value argument mixup while programming Fix the order of ... arguments. With the commti message fixed: Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com> > USB2_PHY_USB_PHY_REFCLK_CTRL in qcom_snps_hsphy_init() and USB2_AUTO_RESUME > in qcom_snps_hsphy_suspend(). > > Fixes: 51e8114f80d07 ("phy: qcom-snps: Add SNPS USB PHY driver for QCOM based SOCs") > Fixes: 0d75f508a9d56 ("phy: qcom-snps: Add runtime suspend and resume handlers") > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > --- > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > -- With best wishes Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20261005-phy-v4-6-b04c4123ecb3@oss.qualcomm.com>]
* Re: [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support [not found] ` <20261005-phy-v4-6-b04c4123ecb3@oss.qualcomm.com> @ 2026-10-05 7:17 ` Dmitry Baryshkov 2026-10-05 10:45 ` Varadarajan Narayanan 0 siblings, 1 reply; 11+ messages in thread From: Dmitry Baryshkov @ 2026-10-05 7:17 UTC (permalink / raw) To: Varadarajan Narayanan Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On Mon, Oct 05, 2026 at 12:06:31PM +0530, Varadarajan Narayanan wrote: > Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650. The PHYs > on this SoC require a dedicated init sequence and override parameters > before they can be enabled. > > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > --- > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 62 +++++++++++++++++++++++++++ > 1 file changed, 62 insertions(+) > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > index b6bbf2b570c7..8957f208bc51 100644 > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > @@ -29,12 +29,15 @@ > > #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50) > #define POR BIT(1) > +#define ATERESET BIT(0) > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54) > #define SIDDQ BIT(2) > #define RETENABLEN BIT(3) > #define FSEL_MASK GENMASK(6, 4) > #define FSEL_DEFAULT (0x3 << 4) > +#define FSEL_24MHZ (0x2 << 4) Use FIELD_PREP, please. > +#define VATESTENB_MASK GENMASK(1, 0) > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1 (0x58) > #define VBUSVLDEXTSEL0 BIT(4) -- With best wishes Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support 2026-10-05 7:17 ` [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support Dmitry Baryshkov @ 2026-10-05 10:45 ` Varadarajan Narayanan 2026-10-05 11:01 ` Dmitry Baryshkov 0 siblings, 1 reply; 11+ messages in thread From: Varadarajan Narayanan @ 2026-10-05 10:45 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On Mon, Oct 05, 2026 at 10:17:32AM +0300, Dmitry Baryshkov wrote: > On Mon, Oct 05, 2026 at 12:06:31PM +0530, Varadarajan Narayanan wrote: > > Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650. The PHYs > > on this SoC require a dedicated init sequence and override parameters > > before they can be enabled. > > > > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > > --- > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 62 +++++++++++++++++++++++++++ > > 1 file changed, 62 insertions(+) > > > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > index b6bbf2b570c7..8957f208bc51 100644 > > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > @@ -29,12 +29,15 @@ > > > > #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50) > > #define POR BIT(1) > > +#define ATERESET BIT(0) > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54) > > #define SIDDQ BIT(2) > > #define RETENABLEN BIT(3) > > #define FSEL_MASK GENMASK(6, 4) > > #define FSEL_DEFAULT (0x3 << 4) > > +#define FSEL_24MHZ (0x2 << 4) > > Use FIELD_PREP, please. Not able to use FIELD_PREP, getting this compilation error. CC drivers/phy/qualcomm/phy-qcom-snps-femto-v2.o drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:449:53: error: statement expression not allowed at file scope 449 | { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, FSEL_MASK, FSEL_24MHZ }, | ^ drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:39:23: note: expanded from macro 'FSEL_24MHZ' 39 | #define FSEL_24MHZ FIELD_PREP(FSEL_MASK, 2) | ^ ./include/linux/bitfield.h:136:2: note: expanded from macro 'FIELD_PREP' 136 | ({ \ | ^ Thanks Varada > > > +#define VATESTENB_MASK GENMASK(1, 0) > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1 (0x58) > > #define VBUSVLDEXTSEL0 BIT(4) > > -- > With best wishes > Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support 2026-10-05 10:45 ` Varadarajan Narayanan @ 2026-10-05 11:01 ` Dmitry Baryshkov 2026-10-05 11:42 ` Varadarajan Narayanan 0 siblings, 1 reply; 11+ messages in thread From: Dmitry Baryshkov @ 2026-10-05 11:01 UTC (permalink / raw) To: Varadarajan Narayanan Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On Mon, Oct 05, 2026 at 04:15:12PM +0530, Varadarajan Narayanan wrote: > On Mon, Oct 05, 2026 at 10:17:32AM +0300, Dmitry Baryshkov wrote: > > On Mon, Oct 05, 2026 at 12:06:31PM +0530, Varadarajan Narayanan wrote: > > > Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650. The PHYs > > > on this SoC require a dedicated init sequence and override parameters > > > before they can be enabled. > > > > > > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > > > --- > > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 62 +++++++++++++++++++++++++++ > > > 1 file changed, 62 insertions(+) > > > > > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > index b6bbf2b570c7..8957f208bc51 100644 > > > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > @@ -29,12 +29,15 @@ > > > > > > #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50) > > > #define POR BIT(1) > > > +#define ATERESET BIT(0) > > > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54) > > > #define SIDDQ BIT(2) > > > #define RETENABLEN BIT(3) > > > #define FSEL_MASK GENMASK(6, 4) > > > #define FSEL_DEFAULT (0x3 << 4) > > > +#define FSEL_24MHZ (0x2 << 4) > > > > Use FIELD_PREP, please. > > Not able to use FIELD_PREP, getting this compilation error. Sorry. Does FIELD_PREP_CONST work? > > CC drivers/phy/qualcomm/phy-qcom-snps-femto-v2.o > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:449:53: error: statement expression not allowed at file scope > 449 | { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, FSEL_MASK, FSEL_24MHZ }, > | ^ > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:39:23: note: expanded from macro 'FSEL_24MHZ' > 39 | #define FSEL_24MHZ FIELD_PREP(FSEL_MASK, 2) > | ^ > ./include/linux/bitfield.h:136:2: note: expanded from macro 'FIELD_PREP' > 136 | ({ \ > | ^ > > Thanks > Varada > > > > > > +#define VATESTENB_MASK GENMASK(1, 0) > > > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1 (0x58) > > > #define VBUSVLDEXTSEL0 BIT(4) > > > > -- > > With best wishes > > Dmitry -- With best wishes Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support 2026-10-05 11:01 ` Dmitry Baryshkov @ 2026-10-05 11:42 ` Varadarajan Narayanan 2026-10-05 13:04 ` Vinod Koul 0 siblings, 1 reply; 11+ messages in thread From: Varadarajan Narayanan @ 2026-10-05 11:42 UTC (permalink / raw) To: Dmitry Baryshkov Cc: Vinod Koul, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On Mon, Oct 05, 2026 at 02:01:48PM +0300, Dmitry Baryshkov wrote: > On Mon, Oct 05, 2026 at 04:15:12PM +0530, Varadarajan Narayanan wrote: > > On Mon, Oct 05, 2026 at 10:17:32AM +0300, Dmitry Baryshkov wrote: > > > On Mon, Oct 05, 2026 at 12:06:31PM +0530, Varadarajan Narayanan wrote: > > > > Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650. The PHYs > > > > on this SoC require a dedicated init sequence and override parameters > > > > before they can be enabled. > > > > > > > > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > > > > --- > > > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 62 +++++++++++++++++++++++++++ > > > > 1 file changed, 62 insertions(+) > > > > > > > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > > index b6bbf2b570c7..8957f208bc51 100644 > > > > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > > @@ -29,12 +29,15 @@ > > > > > > > > #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50) > > > > #define POR BIT(1) > > > > +#define ATERESET BIT(0) > > > > > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54) > > > > #define SIDDQ BIT(2) > > > > #define RETENABLEN BIT(3) > > > > #define FSEL_MASK GENMASK(6, 4) > > > > #define FSEL_DEFAULT (0x3 << 4) > > > > +#define FSEL_24MHZ (0x2 << 4) > > > > > > Use FIELD_PREP, please. > > > > Not able to use FIELD_PREP, getting this compilation error. > > Sorry. Does FIELD_PREP_CONST work? Yes. Will post a new version... Thanks Varada > > > > CC drivers/phy/qualcomm/phy-qcom-snps-femto-v2.o > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:449:53: error: statement expression not allowed at file scope > > 449 | { USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0, FSEL_MASK, FSEL_24MHZ }, > > | ^ > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c:39:23: note: expanded from macro 'FSEL_24MHZ' > > 39 | #define FSEL_24MHZ FIELD_PREP(FSEL_MASK, 2) > > | ^ > > ./include/linux/bitfield.h:136:2: note: expanded from macro 'FIELD_PREP' > > 136 | ({ \ > > | ^ > > > > Thanks > > Varada > > > > > > > > > +#define VATESTENB_MASK GENMASK(1, 0) > > > > > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON1 (0x58) > > > > #define VBUSVLDEXTSEL0 BIT(4) > > > > > > -- > > > With best wishes > > > Dmitry > > -- > With best wishes > Dmitry -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
* Re: [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support 2026-10-05 11:42 ` Varadarajan Narayanan @ 2026-10-05 13:04 ` Vinod Koul 0 siblings, 0 replies; 11+ messages in thread From: Vinod Koul @ 2026-10-05 13:04 UTC (permalink / raw) To: Varadarajan Narayanan Cc: Dmitry Baryshkov, Neil Armstrong, Manivannan Sadhasivam, Rob Herring, Krzysztof Kozlowski, Conor Dooley, Wesley Cheng, Manu Gautam, Stephen Boyd, Philipp Zabel, linux-arm-msm, linux-phy, devicetree, linux-kernel On 05-10-26, 17:12, Varadarajan Narayanan wrote: > On Mon, Oct 05, 2026 at 02:01:48PM +0300, Dmitry Baryshkov wrote: > > On Mon, Oct 05, 2026 at 04:15:12PM +0530, Varadarajan Narayanan wrote: > > > On Mon, Oct 05, 2026 at 10:17:32AM +0300, Dmitry Baryshkov wrote: > > > > On Mon, Oct 05, 2026 at 12:06:31PM +0530, Varadarajan Narayanan wrote: > > > > > Add the 6 nm SNPS femto USB2 PHY configuration needed by IPQ9650. The PHYs > > > > > on this SoC require a dedicated init sequence and override parameters > > > > > before they can be enabled. > > > > > > > > > > Signed-off-by: Varadarajan Narayanan <varadarajan.narayanan@oss.qualcomm.com> > > > > > --- > > > > > drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c | 62 +++++++++++++++++++++++++++ > > > > > 1 file changed, 62 insertions(+) > > > > > > > > > > diff --git a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > > > index b6bbf2b570c7..8957f208bc51 100644 > > > > > --- a/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > > > +++ b/drivers/phy/qualcomm/phy-qcom-snps-femto-v2.c > > > > > @@ -29,12 +29,15 @@ > > > > > > > > > > #define USB2_PHY_USB_PHY_UTMI_CTRL5 (0x50) > > > > > #define POR BIT(1) > > > > > +#define ATERESET BIT(0) > > > > > > > > > > #define USB2_PHY_USB_PHY_HS_PHY_CTRL_COMMON0 (0x54) > > > > > #define SIDDQ BIT(2) > > > > > #define RETENABLEN BIT(3) > > > > > #define FSEL_MASK GENMASK(6, 4) > > > > > #define FSEL_DEFAULT (0x3 << 4) > > > > > +#define FSEL_24MHZ (0x2 << 4) > > > > > > > > Use FIELD_PREP, please. > > > > > > Not able to use FIELD_PREP, getting this compilation error. > > > > Sorry. Does FIELD_PREP_CONST work? > > Yes. Will post a new version... Yes we have const version, there is also GENMASK and friends.. -- ~Vinod -- linux-phy mailing list linux-phy@lists.infradead.org https://lists.infradead.org/mailman/listinfo/linux-phy ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2026-10-05 13:04 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <20261005-phy-v4-0-b04c4123ecb3@oss.qualcomm.com>
2026-10-05 6:36 ` [PATCH v4 1/6] dt-bindings: phy: qcom,qmp-usb: Add IPQ9650 USB3 PHY Varadarajan Narayanan
2026-10-05 6:36 ` [PATCH v4 3/6] phy: qcom: qmp-usb: Add IPQ9650 USB3 PHY configuration Varadarajan Narayanan
2026-10-05 7:11 ` Dmitry Baryshkov
2026-10-05 6:36 ` [PATCH v4 5/6] phy: qcom: snps-femto-v2: Move PHY init registers to config tables Varadarajan Narayanan
2026-10-05 7:16 ` Dmitry Baryshkov
[not found] ` <20261005-phy-v4-4-b04c4123ecb3@oss.qualcomm.com>
2026-10-05 7:13 ` [PATCH v4 4/6] phy: qcom: snps-femto-v2: Fix qcom_snps_hsphy_write_mask argument mixup Dmitry Baryshkov
[not found] ` <20261005-phy-v4-6-b04c4123ecb3@oss.qualcomm.com>
2026-10-05 7:17 ` [PATCH v4 6/6] phy: qcom: snps-femto-v2: Add IPQ9650 support Dmitry Baryshkov
2026-10-05 10:45 ` Varadarajan Narayanan
2026-10-05 11:01 ` Dmitry Baryshkov
2026-10-05 11:42 ` Varadarajan Narayanan
2026-10-05 13:04 ` Vinod Koul
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox