@@ -1280,6 +1280,13 @@ static const struct qmp_usb_offsets qmp_usb_offsets_ipq9574 = {
1280
1280
1281
1281
static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
1282
1282
.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 ,
1283
1290
.pcs = 0xc00 ,
1284
1291
.pcs_misc = 0xa00 ,
1285
1292
.tx = 0x200 ,
@@ -1288,6 +1295,14 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v3 = {
1288
1295
.rx2 = 0x800 ,
1289
1296
};
1290
1297
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
+
1291
1306
static const struct qmp_usb_offsets qmp_usb_offsets_v5 = {
1292
1307
.serdes = 0 ,
1293
1308
.pcs = 0x0200 ,
@@ -1299,6 +1314,8 @@ static const struct qmp_usb_offsets qmp_usb_offsets_v5 = {
1299
1314
static const struct qmp_phy_cfg ipq8074_usb3phy_cfg = {
1300
1315
.lanes = 1 ,
1301
1316
1317
+ .offsets = & qmp_usb_offsets_v3 ,
1318
+
1302
1319
.serdes_tbl = ipq8074_usb3_serdes_tbl ,
1303
1320
.serdes_tbl_num = ARRAY_SIZE (ipq8074_usb3_serdes_tbl ),
1304
1321
.tx_tbl = msm8996_usb3_tx_tbl ,
@@ -1333,6 +1350,8 @@ static const struct qmp_phy_cfg ipq9574_usb3phy_cfg = {
1333
1350
static const struct qmp_phy_cfg msm8996_usb3phy_cfg = {
1334
1351
.lanes = 1 ,
1335
1352
1353
+ .offsets = & qmp_usb_offsets_v3 ,
1354
+
1336
1355
.serdes_tbl = msm8996_usb3_serdes_tbl ,
1337
1356
.serdes_tbl_num = ARRAY_SIZE (msm8996_usb3_serdes_tbl ),
1338
1357
.tx_tbl = msm8996_usb3_tx_tbl ,
@@ -1385,6 +1404,8 @@ static const struct qmp_phy_cfg sc8280xp_usb3_uniphy_cfg = {
1385
1404
static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
1386
1405
.lanes = 1 ,
1387
1406
1407
+ .offsets = & qmp_usb_offsets_v3 ,
1408
+
1388
1409
.serdes_tbl = qmp_v3_usb3_uniphy_serdes_tbl ,
1389
1410
.serdes_tbl_num = ARRAY_SIZE (qmp_v3_usb3_uniphy_serdes_tbl ),
1390
1411
.tx_tbl = qmp_v3_usb3_uniphy_tx_tbl ,
@@ -1403,6 +1424,8 @@ static const struct qmp_phy_cfg qmp_v3_usb3_uniphy_cfg = {
1403
1424
static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
1404
1425
.lanes = 2 ,
1405
1426
1427
+ .offsets = & qmp_usb_offsets_v3_qcm2290 ,
1428
+
1406
1429
.serdes_tbl = msm8998_usb3_serdes_tbl ,
1407
1430
.serdes_tbl_num = ARRAY_SIZE (msm8998_usb3_serdes_tbl ),
1408
1431
.tx_tbl = msm8998_usb3_tx_tbl ,
@@ -1419,6 +1442,8 @@ static const struct qmp_phy_cfg msm8998_usb3phy_cfg = {
1419
1442
static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
1420
1443
.lanes = 1 ,
1421
1444
1445
+ .offsets = & qmp_usb_offsets_v4 ,
1446
+
1422
1447
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
1423
1448
.serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
1424
1449
.tx_tbl = sm8150_usb3_uniphy_tx_tbl ,
@@ -1440,6 +1465,8 @@ static const struct qmp_phy_cfg sm8150_usb3_uniphy_cfg = {
1440
1465
static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
1441
1466
.lanes = 1 ,
1442
1467
1468
+ .offsets = & qmp_usb_offsets_v4 ,
1469
+
1443
1470
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
1444
1471
.serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
1445
1472
.tx_tbl = sm8250_usb3_uniphy_tx_tbl ,
@@ -1461,6 +1488,8 @@ static const struct qmp_phy_cfg sm8250_usb3_uniphy_cfg = {
1461
1488
static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
1462
1489
.lanes = 1 ,
1463
1490
1491
+ .offsets = & qmp_usb_offsets_v4 ,
1492
+
1464
1493
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
1465
1494
.serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
1466
1495
.tx_tbl = sdx55_usb3_uniphy_tx_tbl ,
@@ -1482,6 +1511,8 @@ static const struct qmp_phy_cfg sdx55_usb3_uniphy_cfg = {
1482
1511
static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
1483
1512
.lanes = 1 ,
1484
1513
1514
+ .offsets = & qmp_usb_offsets_v5 ,
1515
+
1485
1516
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
1486
1517
.serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
1487
1518
.tx_tbl = sdx65_usb3_uniphy_tx_tbl ,
@@ -1503,6 +1534,8 @@ static const struct qmp_phy_cfg sdx65_usb3_uniphy_cfg = {
1503
1534
static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
1504
1535
.lanes = 1 ,
1505
1536
1537
+ .offsets = & qmp_usb_offsets_v5 ,
1538
+
1506
1539
.serdes_tbl = sm8150_usb3_uniphy_serdes_tbl ,
1507
1540
.serdes_tbl_num = ARRAY_SIZE (sm8150_usb3_uniphy_serdes_tbl ),
1508
1541
.tx_tbl = sm8350_usb3_uniphy_tx_tbl ,
@@ -1524,7 +1557,7 @@ static const struct qmp_phy_cfg sm8350_usb3_uniphy_cfg = {
1524
1557
static const struct qmp_phy_cfg qcm2290_usb3phy_cfg = {
1525
1558
.lanes = 2 ,
1526
1559
1527
- .offsets = & qmp_usb_offsets_v3 ,
1560
+ .offsets = & qmp_usb_offsets_v3_qcm2290 ,
1528
1561
1529
1562
.serdes_tbl = qcm2290_usb3_serdes_tbl ,
1530
1563
.serdes_tbl_num = ARRAY_SIZE (qcm2290_usb3_serdes_tbl ),
@@ -2078,8 +2111,10 @@ static int qmp_usb_parse_dt(struct qmp_usb *qmp)
2078
2111
2079
2112
qmp -> serdes = base + offs -> serdes ;
2080
2113
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 ;
2083
2118
qmp -> tx = base + offs -> tx ;
2084
2119
qmp -> rx = base + offs -> rx ;
2085
2120
0 commit comments