@@ -805,6 +805,58 @@ static const struct qmp_phy_init_tbl qcs615_pcie_pcs_tbl[] = {
805
805
QMP_PHY_INIT_CFG (QPHY_V2_PCS_TXDEEMPH_M3P5DB_V0 , 0xe ),
806
806
};
807
807
808
+ static const struct qmp_phy_init_tbl qcs8300_qmp_gen4x2_pcie_rx_alt_tbl [] = {
809
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_UCDR_PI_CONTROLS , 0x16 ),
810
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_DFE_CTLE_POST_CAL_OFFSET , 0x38 ),
811
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B0 , 0x9b ),
812
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B1 , 0xb0 ),
813
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B2 , 0xd2 ),
814
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B3 , 0xf0 ),
815
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B4 , 0x42 ),
816
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B5 , 0x00 ),
817
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE_0_1_B6 , 0x20 ),
818
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B0 , 0x9b ),
819
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B1 , 0xfb ),
820
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B2 , 0xd2 ),
821
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B3 , 0xec ),
822
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B4 , 0x43 ),
823
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B5 , 0xdd ),
824
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE2_B6 , 0x0d ),
825
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B0 , 0xf3 ),
826
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B1 , 0xf8 ),
827
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B2 , 0xec ),
828
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B3 , 0xd6 ),
829
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B4 , 0x83 ),
830
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B5 , 0xf5 ),
831
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MODE_RATE3_B6 , 0x5e ),
832
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_PHPRE_CTRL , 0x20 ),
833
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_AUX_DATA_THRESH_BIN_RATE_0_1 , 0x3f ),
834
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_AUX_DATA_THRESH_BIN_RATE_2_3 , 0x37 ),
835
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_DFE_3 , 0x00 ),
836
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH1_RATE3 , 0x1f ),
837
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH2_RATE3 , 0x1f ),
838
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH3_RATE3 , 0x1f ),
839
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH4_RATE3 , 0x1f ),
840
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH5_RATE3 , 0x1f ),
841
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH6_RATE3 , 0x1f ),
842
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH1_RATE210 , 0x1f ),
843
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH2_RATE210 , 0x1f ),
844
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_MARG_COARSE_THRESH3_RATE210 , 0x1f ),
845
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_Q_PI_INTRINSIC_BIAS_RATE32 , 0x09 ),
846
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_UCDR_FO_GAIN_RATE2 , 0x0c ),
847
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_UCDR_FO_GAIN_RATE3 , 0x08 ),
848
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_UCDR_SO_GAIN_RATE3 , 0x04 ),
849
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_VGA_CAL_CNTRL1 , 0x04 ),
850
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_VGA_CAL_MAN_VAL , 0x08 ),
851
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_EQU_ADAPTOR_CNTRL4 , 0x0b ),
852
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_EQ_OFFSET_ADAPTOR_CNTRL1 , 0x7c ),
853
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_RX_IDAC_SAOFFSET , 0x10 ),
854
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_DFE_DAC_ENABLE1 , 0x00 ),
855
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_GM_CAL , 0x05 ),
856
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_TX_ADAPT_POST_THRESH1 , 0x00 ),
857
+ QMP_PHY_INIT_CFG (QSERDES_V5_20_RX_TX_ADAPT_POST_THRESH2 , 0x1f ),
858
+ };
859
+
808
860
static const struct qmp_phy_init_tbl sdm845_qmp_pcie_serdes_tbl [] = {
809
861
QMP_PHY_INIT_CFG (QSERDES_V3_COM_BIAS_EN_CLKBUFLR_EN , 0x14 ),
810
862
QMP_PHY_INIT_CFG (QSERDES_V3_COM_CLK_SELECT , 0x30 ),
@@ -3336,6 +3388,40 @@ static const struct qmp_phy_cfg qcs615_pciephy_cfg = {
3336
3388
.phy_status = PHYSTATUS ,
3337
3389
};
3338
3390
3391
+ static const struct qmp_phy_cfg qcs8300_qmp_gen4x2_pciephy_cfg = {
3392
+ .lanes = 2 ,
3393
+ .offsets = & qmp_pcie_offsets_v5_20 ,
3394
+
3395
+ .tbls = {
3396
+ .serdes = sa8775p_qmp_gen4x2_pcie_serdes_alt_tbl ,
3397
+ .serdes_num = ARRAY_SIZE (sa8775p_qmp_gen4x2_pcie_serdes_alt_tbl ),
3398
+ .tx = sa8775p_qmp_gen4_pcie_tx_tbl ,
3399
+ .tx_num = ARRAY_SIZE (sa8775p_qmp_gen4_pcie_tx_tbl ),
3400
+ .rx = qcs8300_qmp_gen4x2_pcie_rx_alt_tbl ,
3401
+ .rx_num = ARRAY_SIZE (qcs8300_qmp_gen4x2_pcie_rx_alt_tbl ),
3402
+ .pcs = sa8775p_qmp_gen4x2_pcie_pcs_alt_tbl ,
3403
+ .pcs_num = ARRAY_SIZE (sa8775p_qmp_gen4x2_pcie_pcs_alt_tbl ),
3404
+ .pcs_misc = sa8775p_qmp_gen4_pcie_pcs_misc_tbl ,
3405
+ .pcs_misc_num = ARRAY_SIZE (sa8775p_qmp_gen4_pcie_pcs_misc_tbl ),
3406
+ },
3407
+
3408
+ .tbls_rc = & (const struct qmp_phy_cfg_tbls ) {
3409
+ .serdes = sa8775p_qmp_gen4x2_pcie_rc_serdes_alt_tbl ,
3410
+ .serdes_num = ARRAY_SIZE (sa8775p_qmp_gen4x2_pcie_rc_serdes_alt_tbl ),
3411
+ .pcs_misc = sa8775p_qmp_gen4_pcie_rc_pcs_misc_tbl ,
3412
+ .pcs_misc_num = ARRAY_SIZE (sa8775p_qmp_gen4_pcie_rc_pcs_misc_tbl ),
3413
+ },
3414
+
3415
+ .reset_list = sdm845_pciephy_reset_l ,
3416
+ .num_resets = ARRAY_SIZE (sdm845_pciephy_reset_l ),
3417
+ .vreg_list = qmp_phy_vreg_l ,
3418
+ .num_vregs = ARRAY_SIZE (qmp_phy_vreg_l ),
3419
+ .regs = pciephy_v5_regs_layout ,
3420
+
3421
+ .pwrdn_ctrl = SW_PWRDN | REFCLK_DRV_DSBL ,
3422
+ .phy_status = PHYSTATUS_4_20 ,
3423
+ };
3424
+
3339
3425
static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
3340
3426
.lanes = 1 ,
3341
3427
@@ -4891,6 +4977,9 @@ static const struct of_device_id qmp_pcie_of_match_table[] = {
4891
4977
}, {
4892
4978
.compatible = "qcom,qcs615-qmp-gen3x1-pcie-phy" ,
4893
4979
.data = & qcs615_pciephy_cfg ,
4980
+ }, {
4981
+ .compatible = "qcom,qcs8300-qmp-gen4x2-pcie-phy" ,
4982
+ .data = & qcs8300_qmp_gen4x2_pciephy_cfg ,
4894
4983
}, {
4895
4984
.compatible = "qcom,sa8775p-qmp-gen4x2-pcie-phy" ,
4896
4985
.data = & sa8775p_qmp_gen4x2_pciephy_cfg ,
0 commit comments