@@ -1280,6 +1280,13 @@ static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
12801280
12811281static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
12821282 .serdes = 0 ,
1283+ .pcs = 0x600 ,
1284+ .tx = 0x200 ,
1285+ .rx = 0x400 ,
1286+ };
1287+
1288+ static const struct qmp_usb_offsets qmp_usb_offsets_v3_qcm2290 = {
1289+ .serdes = 0x0 ,
12831290 .pcs = 0xc00 ,
12841291 .pcs_misc = 0xa00 ,
12851292 .tx = 0x200 ,
@@ -1288,6 +1295,14 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
12881295 .rx2 = 0x800 ,
12891296};
12901297
1298+ static const struct qmp_usb_offsets qmp_usb_offsets_v4 = {
1299+ .serdes = 0 ,
1300+ .pcs = 0x0800 ,
1301+ .pcs_usb = 0x0e00 ,
1302+ .tx = 0x0200 ,
1303+ .rx = 0x0400 ,
1304+ };
1305+
12911306static const struct qmp_usb_offsets qmp_usb_offsets_v5 = {
12921307 .serdes = 0 ,
12931308 .pcs = 0x0200 ,
@@ -1299,6 +1314,8 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v5 = {
12991314static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
13001315 .lanes = 1 ,
13011316
1317+ .offsets = & qmp_usb_offsets_v3 ,
1318+
13021319 .serdes_tbl = ipq8074_usb3_serdes_tbl ,
13031320 .serdes_tbl_num = ARRAY_SIZE (ipq8074_usb3_serdes_tbl ),
13041321 .tx_tbl = msm8996_usb3_tx_tbl ,
@@ -1333,6 +1350,8 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = {
13331350static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
13341351 .lanes = 1 ,
13351352
1353+ .offsets = & qmp_usb_offsets_v3 ,
1354+
13361355 .serdes_tbl = msm8996_usb3_serdes_tbl ,
13371356 .serdes_tbl_num = ARRAY_SIZE (msm8996_usb3_serdes_tbl ),
13381357 .tx_tbl = msm8996_usb3_tx_tbl ,
@@ -1385,6 +1404,8 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
13851404static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
13861405 .lanes = 1 ,
13871406
1407+ .offsets = & qmp_usb_offsets_v3 ,
1408+
13881409 .serdes_tbl = qmp_v3_usb3_uniphy_serdes_tbl ,
13891410 .serdes_tbl_num = ARRAY_SIZE (qmp_v3_usb3_uniphy_serdes_tbl ),
13901411 .tx_tbl = qmp_v3_usb3_uniphy_tx_tbl ,
@@ -1403,6 +1424,8 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
14031424static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
14041425 .lanes = 2 ,
14051426
1427+ .offsets = & qmp_usb_offsets_v3_qcm2290 ,
1428+
14061429 .serdes_tbl = msm8998_usb3_serdes_tbl ,
14071430 .serdes_tbl_num = ARRAY_SIZE (msm8998_usb3_serdes_tbl ),
14081431 .tx_tbl = msm8998_usb3_tx_tbl ,
@@ -1419,6 +1442,8 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
14191442static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
14201443 .lanes = 1 ,
14211444
1445+ .offsets = & qmp_usb_offsets_v4 ,
1446+
14221447 .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
14231448 .serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
14241449 .tx_tbl = sm8150_usb3_uniphy_tx_tbl ,
@@ -1440,6 +1465,8 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
14401465static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
14411466 .lanes = 1 ,
14421467
1468+ .offsets = & qmp_usb_offsets_v4 ,
1469+
14431470 .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
14441471 .serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
14451472 .tx_tbl = sm8250_usb3_uniphy_tx_tbl ,
@@ -1461,6 +1488,8 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
14611488static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
14621489 .lanes = 1 ,
14631490
1491+ .offsets = & qmp_usb_offsets_v4 ,
1492+
14641493 .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
14651494 .serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
14661495 .tx_tbl = sdx55_usb3_uniphy_tx_tbl ,
@@ -1482,6 +1511,8 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
14821511static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
14831512 .lanes = 1 ,
14841513
1514+ .offsets = & qmp_usb_offsets_v5 ,
1515+
14851516 .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
14861517 .serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
14871518 .tx_tbl = sdx65_usb3_uniphy_tx_tbl ,
@@ -1503,6 +1534,8 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
15031534static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
15041535 .lanes = 1 ,
15051536
1537+ .offsets = & qmp_usb_offsets_v5 ,
1538+
15061539 .serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
15071540 .serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
15081541 .tx_tbl = sm8350_usb3_uniphy_tx_tbl ,
@@ -1524,7 +1557,7 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
15241557static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
15251558 .lanes = 2 ,
15261559
1527- .offsets = & qmp_usb_offsets_v3 ,
1560+ .offsets = & qmp_usb_offsets_v3_qcm2290 ,
15281561
15291562 .serdes_tbl = qcm2290_usb3_serdes_tbl ,
15301563 .serdes_tbl_num = ARRAY_SIZE (qcm2290_usb3_serdes_tbl ),
@@ -2078,8 +2111,10 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp)
20782111
20792112 qmp -> serdes = base + offs -> serdes ;
20802113 qmp -> pcs = base + offs -> pcs ;
2081- qmp -> pcs_misc = base + offs -> pcs_misc ;
2082- qmp -> pcs_usb = base + offs -> pcs_usb ;
2114+ if (offs -> pcs_usb )
2115+ qmp -> pcs_usb = base + offs -> pcs_usb ;
2116+ if (offs -> pcs_misc )
2117+ qmp -> pcs_misc = base + offs -> pcs_misc ;
20832118 qmp -> tx = base + offs -> tx ;
20842119 qmp -> rx = base + offs -> rx ;
20852120
0 commit comments