Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

phy: qcom-qmp: Add SA8775P USB3 UNI phy

The SA8775P platform has 5nm USB3 UNI phy attached to the USB0 and USB1
controllers.

Add QMP PHY config, pcs entries and support for the new compatible for
SA8775P platform.

Signed-off-by: Shazad Hussain <quic_shazhuss@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Link: https://lore.kernel.org/r/20230428130824.23803-5-quic_shazhuss@quicinc.com
Signed-off-by: Vinod Koul <vkoul@kernel.org>

authored by

Shazad Hussain and committed by
Vinod Koul
8bd2d6e1 bfd73c85

+45
+45
drivers/phy/qualcomm/phy-qcom-qmp-usb.c
··· 1408 1408 QMP_PHY_INIT_CFG(QPHY_V5_PCS_REFGEN_REQ_CONFIG1, 0x21), 1409 1409 }; 1410 1410 1411 + static const struct qmp_phy_init_tbl sa8775p_usb3_uniphy_pcs_tbl[] = { 1412 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_LOCK_DETECT_CONFIG1, 0xc4), 1413 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_LOCK_DETECT_CONFIG2, 0x89), 1414 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_LOCK_DETECT_CONFIG3, 0x20), 1415 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_LOCK_DETECT_CONFIG6, 0x13), 1416 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_RCVR_DTCT_DLY_P1U2_L, 0xe7), 1417 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_RCVR_DTCT_DLY_P1U2_H, 0x03), 1418 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_RX_SIGDET_LVL, 0xaa), 1419 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_PCS_TX_RX_CONFIG, 0x0c), 1420 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_USB3_RXEQTRAINING_DFE_TIME_S2, 0x07), 1421 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_USB3_LFPS_DET_HIGH_COUNT_VAL, 0xf8), 1422 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_USB3_POWER_STATE_CONFIG1, 0x6f), 1423 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_CDR_RESET_TIME, 0x0a), 1424 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_ALIGN_DETECT_CONFIG1, 0x88), 1425 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_ALIGN_DETECT_CONFIG2, 0x13), 1426 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_EQ_CONFIG1, 0x4b), 1427 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_EQ_CONFIG5, 0x10), 1428 + QMP_PHY_INIT_CFG(QPHY_V5_PCS_REFGEN_REQ_CONFIG1, 0x21), 1429 + }; 1430 + 1411 1431 struct qmp_usb_offsets { 1412 1432 u16 serdes; 1413 1433 u16 pcs; ··· 1647 1627 1648 1628 .has_pwrdn_delay = true, 1649 1629 .has_phy_dp_com_ctrl = true, 1630 + }; 1631 + 1632 + static const struct qmp_phy_cfg sa8775p_usb3_uniphy_cfg = { 1633 + .lanes = 1, 1634 + 1635 + .offsets = &qmp_usb_offsets_v5, 1636 + 1637 + .serdes_tbl = sc8280xp_usb3_uniphy_serdes_tbl, 1638 + .serdes_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_serdes_tbl), 1639 + .tx_tbl = sc8280xp_usb3_uniphy_tx_tbl, 1640 + .tx_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_tx_tbl), 1641 + .rx_tbl = sc8280xp_usb3_uniphy_rx_tbl, 1642 + .rx_tbl_num = ARRAY_SIZE(sc8280xp_usb3_uniphy_rx_tbl), 1643 + .pcs_tbl = sa8775p_usb3_uniphy_pcs_tbl, 1644 + .pcs_tbl_num = ARRAY_SIZE(sa8775p_usb3_uniphy_pcs_tbl), 1645 + .clk_list = qmp_v4_phy_clk_l, 1646 + .num_clks = ARRAY_SIZE(qmp_v4_phy_clk_l), 1647 + .reset_list = qcm2290_usb3phy_reset_l, 1648 + .num_resets = ARRAY_SIZE(qcm2290_usb3phy_reset_l), 1649 + .vreg_list = qmp_phy_vreg_l, 1650 + .num_vregs = ARRAY_SIZE(qmp_phy_vreg_l), 1651 + .regs = qmp_v5_usb3phy_regs_layout, 1650 1652 }; 1651 1653 1652 1654 static const struct qmp_phy_cfg sc7180_usb3phy_cfg = { ··· 2639 2597 }, { 2640 2598 .compatible = "qcom,qcm2290-qmp-usb3-phy", 2641 2599 .data = &qcm2290_usb3phy_cfg, 2600 + }, { 2601 + .compatible = "qcom,sa8775p-qmp-usb3-uni-phy", 2602 + .data = &sa8775p_usb3_uniphy_cfg, 2642 2603 }, { 2643 2604 .compatible = "qcom,sc7180-qmp-usb3-phy", 2644 2605 .data = &sc7180_usb3phy_cfg,