@@ -2294,6 +2294,56 @@ static const char * const sdm845_pciephy_reset_l[] = {
22942294 "phy" ,
22952295};
22962296
2297+ static const struct qmp_pcie_offsets qmp_pcie_offsets_qhp = {
2298+ .serdes = 0 ,
2299+ .pcs = 0x1800 ,
2300+ .tx = 0x0800 ,
2301+ /* no .rx for QHP */
2302+ };
2303+
2304+ static const struct qmp_pcie_offsets qmp_pcie_offsets_v2 = {
2305+ .serdes = 0 ,
2306+ .pcs = 0x0800 ,
2307+ .tx = 0x0200 ,
2308+ .rx = 0x0400 ,
2309+ };
2310+
2311+ static const struct qmp_pcie_offsets qmp_pcie_offsets_v3 = {
2312+ .serdes = 0 ,
2313+ .pcs = 0x0800 ,
2314+ .pcs_misc = 0x0600 ,
2315+ .tx = 0x0200 ,
2316+ .rx = 0x0400 ,
2317+ };
2318+
2319+ static const struct qmp_pcie_offsets qmp_pcie_offsets_v4x1 = {
2320+ .serdes = 0 ,
2321+ .pcs = 0x0800 ,
2322+ .pcs_misc = 0x0c00 ,
2323+ .tx = 0x0200 ,
2324+ .rx = 0x0400 ,
2325+ };
2326+
2327+ static const struct qmp_pcie_offsets qmp_pcie_offsets_v4x2 = {
2328+ .serdes = 0 ,
2329+ .pcs = 0x0a00 ,
2330+ .pcs_misc = 0x0e00 ,
2331+ .tx = 0x0200 ,
2332+ .rx = 0x0400 ,
2333+ .tx2 = 0x0600 ,
2334+ .rx2 = 0x0800 ,
2335+ };
2336+
2337+ static const struct qmp_pcie_offsets qmp_pcie_offsets_v4_20 = {
2338+ .serdes = 0x1000 ,
2339+ .pcs = 0x1200 ,
2340+ .pcs_misc = 0x1600 ,
2341+ .tx = 0x0000 ,
2342+ .rx = 0x0200 ,
2343+ .tx2 = 0x0800 ,
2344+ .rx2 = 0x0a00 ,
2345+ };
2346+
22972347static const struct qmp_pcie_offsets qmp_pcie_offsets_v5 = {
22982348 .serdes = 0 ,
22992349 .pcs = 0x0200 ,
@@ -2338,6 +2388,8 @@ static const struct qmp_pcie_offsets qmp_pcie_offsets_v6_20 = {
23382388static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
23392389 .lanes = 1 ,
23402390
2391+ .offsets = & qmp_pcie_offsets_v2 ,
2392+
23412393 .tbls = {
23422394 .serdes = ipq8074_pcie_serdes_tbl ,
23432395 .serdes_num = ARRAY_SIZE (ipq8074_pcie_serdes_tbl ),
@@ -2361,6 +2413,8 @@ static const struct qmp_phy_cfg ipq8074_pciephy_cfg = {
23612413static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
23622414 .lanes = 1 ,
23632415
2416+ .offsets = & qmp_pcie_offsets_v4x1 ,
2417+
23642418 .tbls = {
23652419 .serdes = ipq8074_pcie_gen3_serdes_tbl ,
23662420 .serdes_num = ARRAY_SIZE (ipq8074_pcie_gen3_serdes_tbl ),
@@ -2388,6 +2442,8 @@ static const struct qmp_phy_cfg ipq8074_pciephy_gen3_cfg = {
23882442static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
23892443 .lanes = 1 ,
23902444
2445+ .offsets = & qmp_pcie_offsets_v4x1 ,
2446+
23912447 .tbls = {
23922448 .serdes = ipq6018_pcie_serdes_tbl ,
23932449 .serdes_num = ARRAY_SIZE (ipq6018_pcie_serdes_tbl ),
@@ -2413,6 +2469,8 @@ static const struct qmp_phy_cfg ipq6018_pciephy_cfg = {
24132469static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
24142470 .lanes = 1 ,
24152471
2472+ .offsets = & qmp_pcie_offsets_v3 ,
2473+
24162474 .tbls = {
24172475 .serdes = sdm845_qmp_pcie_serdes_tbl ,
24182476 .serdes_num = ARRAY_SIZE (sdm845_qmp_pcie_serdes_tbl ),
@@ -2438,6 +2496,8 @@ static const struct qmp_phy_cfg sdm845_qmp_pciephy_cfg = {
24382496static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
24392497 .lanes = 1 ,
24402498
2499+ .offsets = & qmp_pcie_offsets_qhp ,
2500+
24412501 .tbls = {
24422502 .serdes = sdm845_qhp_pcie_serdes_tbl ,
24432503 .serdes_num = ARRAY_SIZE (sdm845_qhp_pcie_serdes_tbl ),
@@ -2459,6 +2519,8 @@ static const struct qmp_phy_cfg sdm845_qhp_pciephy_cfg = {
24592519static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
24602520 .lanes = 1 ,
24612521
2522+ .offsets = & qmp_pcie_offsets_v4x1 ,
2523+
24622524 .tbls = {
24632525 .serdes = sm8250_qmp_pcie_serdes_tbl ,
24642526 .serdes_num = ARRAY_SIZE (sm8250_qmp_pcie_serdes_tbl ),
@@ -2494,6 +2556,8 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x1_pciephy_cfg = {
24942556static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
24952557 .lanes = 2 ,
24962558
2559+ .offsets = & qmp_pcie_offsets_v4x2 ,
2560+
24972561 .tbls = {
24982562 .serdes = sm8250_qmp_pcie_serdes_tbl ,
24992563 .serdes_num = ARRAY_SIZE (sm8250_qmp_pcie_serdes_tbl ),
@@ -2529,6 +2593,8 @@ static const struct qmp_phy_cfg sm8250_qmp_gen3x2_pciephy_cfg = {
25292593static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
25302594 .lanes = 1 ,
25312595
2596+ .offsets = & qmp_pcie_offsets_v3 ,
2597+
25322598 .tbls = {
25332599 .serdes = msm8998_pcie_serdes_tbl ,
25342600 .serdes_num = ARRAY_SIZE (msm8998_pcie_serdes_tbl ),
@@ -2554,6 +2620,8 @@ static const struct qmp_phy_cfg msm8998_pciephy_cfg = {
25542620static const struct qmp_phy_cfg sc8180x_pciephy_cfg = {
25552621 .lanes = 2 ,
25562622
2623+ .offsets = & qmp_pcie_offsets_v4x2 ,
2624+
25572625 .tbls = {
25582626 .serdes = sc8180x_qmp_pcie_serdes_tbl ,
25592627 .serdes_num = ARRAY_SIZE (sc8180x_qmp_pcie_serdes_tbl ),
@@ -2681,6 +2749,8 @@ static const struct qmp_phy_cfg sc8280xp_qmp_gen3x4_pciephy_cfg = {
26812749static const struct qmp_phy_cfg sdx55_qmp_pciephy_cfg = {
26822750 .lanes = 2 ,
26832751
2752+ .offsets = & qmp_pcie_offsets_v4_20 ,
2753+
26842754 .tbls = {
26852755 .serdes = sdx55_qmp_pcie_serdes_tbl ,
26862756 .serdes_num = ARRAY_SIZE (sdx55_qmp_pcie_serdes_tbl ),
@@ -2818,6 +2888,8 @@ static const struct qmp_phy_cfg sdx65_qmp_pciephy_cfg = {
28182888static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
28192889 .lanes = 1 ,
28202890
2891+ .offsets = & qmp_pcie_offsets_v5 ,
2892+
28212893 .tbls = {
28222894 .serdes = sm8450_qmp_gen3_pcie_serdes_tbl ,
28232895 .serdes_num = ARRAY_SIZE (sm8450_qmp_gen3_pcie_serdes_tbl ),
@@ -2851,6 +2923,8 @@ static const struct qmp_phy_cfg sm8450_qmp_gen3x1_pciephy_cfg = {
28512923static const struct qmp_phy_cfg sm8450_qmp_gen4x2_pciephy_cfg = {
28522924 .lanes = 2 ,
28532925
2926+ .offsets = & qmp_pcie_offsets_v5_20 ,
2927+
28542928 .tbls = {
28552929 .serdes = sm8450_qmp_gen4x2_pcie_serdes_tbl ,
28562930 .serdes_num = ARRAY_SIZE (sm8450_qmp_gen4x2_pcie_serdes_tbl ),
0 commit comments