Lines Matching refs:regmap
23 #include <linux/regmap.h>
270 struct regmap *regmap;
271 struct regmap *regmap_common_cdb;
272 struct regmap *regmap_phy_pcs_common_cdb;
273 struct regmap *regmap_phy_pma_common_cdb;
274 struct regmap *regmap_tx_lane_cdb[MAX_NUM_LANES];
275 struct regmap *regmap_rx_lane_cdb[MAX_NUM_LANES];
276 struct regmap *regmap_dptx_phy_reg;
468 static void cdns_torrent_phy_write(struct regmap *regmap, u32 offset, u32 val)
470 regmap_write(regmap, offset, val);
473 static u32 cdns_torrent_phy_read(struct regmap *regmap, u32 offset)
477 regmap_read(regmap, offset, &val);
483 static void cdns_torrent_dp_write(struct regmap *regmap, u32 offset, u32 val)
485 regmap_write(regmap, offset, val);
488 static u32 cdns_torrent_dp_read(struct regmap *regmap, u32 offset)
492 regmap_read(regmap, offset, &val);
569 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
602 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, pll_val);
605 ret = regmap_read_poll_timeout(regmap,
733 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
734 u32 pwr_state = cdns_torrent_dp_read(regmap,
736 u32 pll_clk_en = cdns_torrent_dp_read(regmap,
761 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, pwr_state);
762 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, pll_clk_en);
771 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
774 value = cdns_torrent_dp_read(regmap, PHY_RESET);
780 cdns_torrent_dp_write(regmap, PHY_RESET, value);
783 cdns_torrent_dp_write(regmap, PHY_RESET,
791 cdns_torrent_dp_write(regmap, PHY_RESET, value);
797 cdns_torrent_dp_write(regmap, PHY_RESET, value);
807 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, 0x0001);
935 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
947 cdns_torrent_dp_write(regmap, PHY_AUX_CTRL, 0x0003); /* enable AUX */
963 cdns_torrent_dp_write(regmap, PHY_RESET,
967 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_PLLCLK_EN, 0x0001);
1001 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1003 ret = regmap_read_poll_timeout(regmap, PHY_PMA_CMN_READY, reg,
1034 struct regmap *regmap = cdns_phy->regmap_common_cdb;
1037 cdns_torrent_phy_write(regmap, CMN_SSM_BIAS_TMR, 0x0014);
1038 cdns_torrent_phy_write(regmap, CMN_PLLSM0_PLLPRE_TMR, 0x0027);
1039 cdns_torrent_phy_write(regmap, CMN_PLLSM0_PLLLOCK_TMR, 0x00A1);
1040 cdns_torrent_phy_write(regmap, CMN_PLLSM1_PLLPRE_TMR, 0x0027);
1041 cdns_torrent_phy_write(regmap, CMN_PLLSM1_PLLLOCK_TMR, 0x00A1);
1042 cdns_torrent_phy_write(regmap, CMN_BGCAL_INIT_TMR, 0x0060);
1043 cdns_torrent_phy_write(regmap, CMN_BGCAL_ITER_TMR, 0x0060);
1044 cdns_torrent_phy_write(regmap, CMN_IBCAL_INIT_TMR, 0x0014);
1045 cdns_torrent_phy_write(regmap, CMN_TXPUCAL_INIT_TMR, 0x0018);
1046 cdns_torrent_phy_write(regmap, CMN_TXPUCAL_ITER_TMR, 0x0005);
1047 cdns_torrent_phy_write(regmap, CMN_TXPDCAL_INIT_TMR, 0x0018);
1048 cdns_torrent_phy_write(regmap, CMN_TXPDCAL_ITER_TMR, 0x0005);
1049 cdns_torrent_phy_write(regmap, CMN_RXCAL_INIT_TMR, 0x0240);
1050 cdns_torrent_phy_write(regmap, CMN_RXCAL_ITER_TMR, 0x0005);
1051 cdns_torrent_phy_write(regmap, CMN_SD_CAL_INIT_TMR, 0x0002);
1052 cdns_torrent_phy_write(regmap, CMN_SD_CAL_ITER_TMR, 0x0002);
1053 cdns_torrent_phy_write(regmap, CMN_SD_CAL_REFTIM_START, 0x000B);
1054 cdns_torrent_phy_write(regmap, CMN_SD_CAL_PLLCNT_START, 0x0137);
1057 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509);
1058 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00);
1059 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08);
1060 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004);
1061 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509);
1062 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00);
1063 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08);
1064 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004);
1065 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_INIT_TMR, 0x00C0);
1066 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_ITER_TMR, 0x0004);
1067 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_INIT_TMR, 0x00C0);
1068 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_ITER_TMR, 0x0004);
1069 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_REFTIM_START, 0x0260);
1070 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_TCTRL, 0x0003);
1071 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_REFTIM_START, 0x0260);
1072 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_TCTRL, 0x0003);
1083 struct regmap *regmap = cdns_phy->regmap_common_cdb;
1085 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0001);
1086 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl2_val);
1087 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl3_val);
1088 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0003);
1089 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0001);
1090 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl2_val);
1091 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl3_val);
1092 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0003);
1099 struct regmap *regmap = cdns_phy->regmap_common_cdb;
1106 cdns_torrent_phy_write(regmap,
1108 cdns_torrent_phy_write(regmap,
1110 cdns_torrent_phy_write(regmap,
1112 cdns_torrent_phy_write(regmap,
1114 cdns_torrent_phy_write(regmap,
1116 cdns_torrent_phy_write(regmap,
1118 cdns_torrent_phy_write(regmap,
1120 cdns_torrent_phy_write(regmap,
1122 cdns_torrent_phy_write(regmap,
1124 cdns_torrent_phy_write(regmap,
1134 cdns_torrent_phy_write(regmap,
1136 cdns_torrent_phy_write(regmap,
1138 cdns_torrent_phy_write(regmap,
1140 cdns_torrent_phy_write(regmap,
1142 cdns_torrent_phy_write(regmap,
1144 cdns_torrent_phy_write(regmap,
1146 cdns_torrent_phy_write(regmap,
1148 cdns_torrent_phy_write(regmap,
1150 cdns_torrent_phy_write(regmap,
1152 cdns_torrent_phy_write(regmap,
1161 cdns_torrent_phy_write(regmap,
1163 cdns_torrent_phy_write(regmap,
1165 cdns_torrent_phy_write(regmap,
1167 cdns_torrent_phy_write(regmap,
1169 cdns_torrent_phy_write(regmap,
1171 cdns_torrent_phy_write(regmap,
1173 cdns_torrent_phy_write(regmap,
1175 cdns_torrent_phy_write(regmap,
1177 cdns_torrent_phy_write(regmap,
1179 cdns_torrent_phy_write(regmap,
1187 cdns_torrent_phy_write(regmap,
1189 cdns_torrent_phy_write(regmap,
1191 cdns_torrent_phy_write(regmap,
1193 cdns_torrent_phy_write(regmap,
1195 cdns_torrent_phy_write(regmap,
1197 cdns_torrent_phy_write(regmap,
1199 cdns_torrent_phy_write(regmap,
1201 cdns_torrent_phy_write(regmap,
1203 cdns_torrent_phy_write(regmap,
1205 cdns_torrent_phy_write(regmap,
1214 cdns_torrent_phy_write(regmap,
1216 cdns_torrent_phy_write(regmap,
1218 cdns_torrent_phy_write(regmap,
1220 cdns_torrent_phy_write(regmap,
1223 cdns_torrent_phy_write(regmap,
1225 cdns_torrent_phy_write(regmap,
1228 cdns_torrent_phy_write(regmap,
1230 cdns_torrent_phy_write(regmap,
1232 cdns_torrent_phy_write(regmap,
1234 cdns_torrent_phy_write(regmap,
1236 cdns_torrent_phy_write(regmap,
1238 cdns_torrent_phy_write(regmap,
1240 cdns_torrent_phy_write(regmap,
1242 cdns_torrent_phy_write(regmap,
1244 cdns_torrent_phy_write(regmap,
1246 cdns_torrent_phy_write(regmap,
1250 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_REFCNT_START, 0x0099);
1251 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_START, 0x0099);
1252 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_REFCNT_START, 0x0099);
1253 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_START, 0x0099);
1259 struct regmap *regmap = cdns_phy->regmap_common_cdb;
1262 cdns_torrent_phy_write(regmap, CMN_SSM_BIAS_TMR, 0x0019);
1263 cdns_torrent_phy_write(regmap, CMN_PLLSM0_PLLPRE_TMR, 0x0032);
1264 cdns_torrent_phy_write(regmap, CMN_PLLSM0_PLLLOCK_TMR, 0x00D1);
1265 cdns_torrent_phy_write(regmap, CMN_PLLSM1_PLLPRE_TMR, 0x0032);
1266 cdns_torrent_phy_write(regmap, CMN_PLLSM1_PLLLOCK_TMR, 0x00D1);
1267 cdns_torrent_phy_write(regmap, CMN_BGCAL_INIT_TMR, 0x007D);
1268 cdns_torrent_phy_write(regmap, CMN_BGCAL_ITER_TMR, 0x007D);
1269 cdns_torrent_phy_write(regmap, CMN_IBCAL_INIT_TMR, 0x0019);
1270 cdns_torrent_phy_write(regmap, CMN_TXPUCAL_INIT_TMR, 0x001E);
1271 cdns_torrent_phy_write(regmap, CMN_TXPUCAL_ITER_TMR, 0x0006);
1272 cdns_torrent_phy_write(regmap, CMN_TXPDCAL_INIT_TMR, 0x001E);
1273 cdns_torrent_phy_write(regmap, CMN_TXPDCAL_ITER_TMR, 0x0006);
1274 cdns_torrent_phy_write(regmap, CMN_RXCAL_INIT_TMR, 0x02EE);
1275 cdns_torrent_phy_write(regmap, CMN_RXCAL_ITER_TMR, 0x0006);
1276 cdns_torrent_phy_write(regmap, CMN_SD_CAL_INIT_TMR, 0x0002);
1277 cdns_torrent_phy_write(regmap, CMN_SD_CAL_ITER_TMR, 0x0002);
1278 cdns_torrent_phy_write(regmap, CMN_SD_CAL_REFTIM_START, 0x000E);
1279 cdns_torrent_phy_write(regmap, CMN_SD_CAL_PLLCNT_START, 0x012B);
1282 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_PADJ_M0, 0x0509);
1283 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CP_IADJ_M0, 0x0F00);
1284 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_FILT_PADJ_M0, 0x0F08);
1285 cdns_torrent_phy_write(regmap, CMN_PLL0_DSM_DIAG_M0, 0x0004);
1286 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_PADJ_M0, 0x0509);
1287 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CP_IADJ_M0, 0x0F00);
1288 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_FILT_PADJ_M0, 0x0F08);
1289 cdns_torrent_phy_write(regmap, CMN_PLL1_DSM_DIAG_M0, 0x0004);
1290 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_INIT_TMR, 0x00FA);
1291 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_ITER_TMR, 0x0004);
1292 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_INIT_TMR, 0x00FA);
1293 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_ITER_TMR, 0x0004);
1294 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_REFTIM_START, 0x0317);
1295 cdns_torrent_phy_write(regmap, CMN_PLL0_VCOCAL_TCTRL, 0x0003);
1296 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_REFTIM_START, 0x0317);
1297 cdns_torrent_phy_write(regmap, CMN_PLL1_VCOCAL_TCTRL, 0x0003);
1307 struct regmap *regmap = cdns_phy->regmap_common_cdb;
1309 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0001);
1310 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, ctrl2_val);
1311 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x007F);
1312 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0003);
1313 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0001);
1314 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, ctrl2_val);
1315 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x007F);
1316 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0003);
1323 struct regmap *regmap = cdns_phy->regmap_common_cdb;
1330 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x01B0);
1331 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000);
1332 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
1333 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0120);
1334 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x01B0);
1335 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000);
1336 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
1337 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0120);
1345 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0184);
1346 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0xCCCD);
1347 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
1348 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x0104);
1349 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0184);
1350 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0xCCCD);
1351 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
1352 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x0104);
1359 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0159);
1360 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x999A);
1361 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
1362 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00E7);
1363 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0159);
1364 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x999A);
1365 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
1366 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00E7);
1372 cdns_torrent_phy_write(regmap, CMN_PLL0_INTDIV_M0, 0x0144);
1373 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVL_M0, 0x0000);
1374 cdns_torrent_phy_write(regmap, CMN_PLL0_FRACDIVH_M0, 0x0002);
1375 cdns_torrent_phy_write(regmap, CMN_PLL0_HIGH_THR_M0, 0x00D8);
1376 cdns_torrent_phy_write(regmap, CMN_PLL1_INTDIV_M0, 0x0144);
1377 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVL_M0, 0x0000);
1378 cdns_torrent_phy_write(regmap, CMN_PLL1_FRACDIVH_M0, 0x0002);
1379 cdns_torrent_phy_write(regmap, CMN_PLL1_HIGH_THR_M0, 0x00D8);
1385 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL0_CTRL_M0, 0x0002);
1386 cdns_torrent_phy_write(regmap, CMN_PDIAG_PLL1_CTRL_M0, 0x0002);
1389 cdns_torrent_phy_write(regmap,
1391 cdns_torrent_phy_write(regmap,
1393 cdns_torrent_phy_write(regmap,
1395 cdns_torrent_phy_write(regmap,
1398 cdns_torrent_phy_write(regmap,
1400 cdns_torrent_phy_write(regmap,
1403 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL1_M0, 0x0002);
1404 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL2_M0, 0x0000);
1405 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL3_M0, 0x0000);
1406 cdns_torrent_phy_write(regmap, CMN_PLL0_SS_CTRL4_M0, 0x0000);
1407 cdns_torrent_phy_write(regmap,
1409 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL1_M0, 0x0002);
1410 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL2_M0, 0x0000);
1411 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL3_M0, 0x0000);
1412 cdns_torrent_phy_write(regmap, CMN_PLL1_SS_CTRL4_M0, 0x0000);
1413 cdns_torrent_phy_write(regmap,
1417 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_REFCNT_START, 0x00C7);
1418 cdns_torrent_phy_write(regmap, CMN_PLL0_LOCK_PLLCNT_START, 0x00C7);
1419 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_REFCNT_START, 0x00C7);
1420 cdns_torrent_phy_write(regmap, CMN_PLL1_LOCK_PLLCNT_START, 0x00C7);
1523 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1564 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, value);
1566 ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_POWER_STATE_ACK,
1569 cdns_torrent_dp_write(regmap, PHY_PMA_XCVR_POWER_STATE_REQ, 0x00000000);
1579 struct regmap *regmap = cdns_phy->regmap_dptx_phy_reg;
1585 ret = regmap_read_poll_timeout(regmap, PHY_PMA_XCVR_PLLCLK_EN_ACK,
1657 static struct regmap *cdns_regmap_init(struct device *dev, void __iomem *base,
1679 struct regmap *regmap;
1681 regmap = cdns_phy->regmap_dptx_phy_reg;
1682 field = devm_regmap_field_alloc(dev, regmap, phy_reset_ctrl);
1696 struct regmap *regmap;
1698 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
1699 field = devm_regmap_field_alloc(dev, regmap, phy_pll_cfg);
1706 regmap = cdns_phy->regmap_phy_pma_common_cdb;
1707 field = devm_regmap_field_alloc(dev, regmap, phy_pma_cmn_ctrl_1);
1714 regmap = cdns_phy->regmap_phy_pma_common_cdb;
1715 field = devm_regmap_field_alloc(dev, regmap, phy_pma_cmn_ctrl_2);
1722 regmap = cdns_phy->regmap_phy_pma_common_cdb;
1723 field = devm_regmap_field_alloc(dev, regmap, phy_pma_pll_raw_ctrl);
1737 struct regmap *regmap;
1744 regmap = cdns_regmap_init(dev, base, block_offset,
1747 if (IS_ERR(regmap)) {
1748 dev_err(dev, "Failed to init DPTX PHY regmap\n");
1749 return PTR_ERR(regmap);
1751 cdns_phy->regmap_dptx_phy_reg = regmap;
1761 struct regmap *regmap;
1771 regmap = cdns_regmap_init(dev, sd_base, block_offset,
1774 if (IS_ERR(regmap)) {
1775 dev_err(dev, "Failed to init tx lane CDB regmap\n");
1776 return PTR_ERR(regmap);
1778 cdns_phy->regmap_tx_lane_cdb[i] = regmap;
1782 regmap = cdns_regmap_init(dev, sd_base, block_offset,
1785 if (IS_ERR(regmap)) {
1786 dev_err(dev, "Failed to init rx lane CDB regmap\n");
1787 return PTR_ERR(regmap);
1789 cdns_phy->regmap_rx_lane_cdb[i] = regmap;
1793 regmap = cdns_regmap_init(dev, sd_base, block_offset,
1796 if (IS_ERR(regmap)) {
1797 dev_err(dev, "Failed to init common CDB regmap\n");
1798 return PTR_ERR(regmap);
1800 cdns_phy->regmap_common_cdb = regmap;
1803 regmap = cdns_regmap_init(dev, sd_base, block_offset,
1806 if (IS_ERR(regmap)) {
1807 dev_err(dev, "Failed to init PHY PCS common CDB regmap\n");
1808 return PTR_ERR(regmap);
1810 cdns_phy->regmap_phy_pcs_common_cdb = regmap;
1813 regmap = cdns_regmap_init(dev, sd_base, block_offset,
1816 if (IS_ERR(regmap)) {
1817 dev_err(dev, "Failed to init PHY PMA common CDB regmap\n");
1818 return PTR_ERR(regmap);
1820 cdns_phy->regmap_phy_pma_common_cdb = regmap;
1836 struct regmap *regmap;
1858 regmap = cdns_phy->regmap_common_cdb;
1867 regmap_write(regmap, reg_pairs[i].off,
1876 regmap = cdns_phy->regmap_tx_lane_cdb[i + inst->mlane];
1878 regmap_write(regmap, reg_pairs[j].off,
1888 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
1890 regmap_write(regmap, reg_pairs[i].off,
1899 regmap = cdns_phy->regmap_common_cdb;
1901 regmap_write(regmap, reg_pairs[i].off,
1911 regmap = cdns_phy->regmap_tx_lane_cdb[i + inst->mlane];
1913 regmap_write(regmap, reg_pairs[j].off,
1924 regmap = cdns_phy->regmap_rx_lane_cdb[i + inst->mlane];
1926 regmap_write(regmap, reg_pairs[j].off,
1945 struct regmap *regmap;
1989 regmap = cdns_phy->regmap_common_cdb;
1999 regmap_write(regmap, reg_pairs[i].off,
2008 regmap = cdns_phy->regmap_tx_lane_cdb[i + mlane];
2010 regmap_write(regmap, reg_pairs[j].off,
2020 regmap = cdns_phy->regmap_phy_pcs_common_cdb;
2022 regmap_write(regmap, reg_pairs[i].off,
2031 regmap = cdns_phy->regmap_common_cdb;
2033 regmap_write(regmap, reg_pairs[i].off,
2043 regmap = cdns_phy->regmap_tx_lane_cdb[i + mlane];
2045 regmap_write(regmap, reg_pairs[j].off,
2056 regmap = cdns_phy->regmap_rx_lane_cdb[i + mlane];
2058 regmap_write(regmap, reg_pairs[j].off,