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