Lines Matching +full:2 +full:- +full:lane

1 // SPDX-License-Identifier: GPL-2.0-or-later
3 * AppliedMicro X-Gene Multi-purpose PHY driver
10 * The APM X-Gene PHY consists of two PLL clock macro's (CMU) and lanes.
19 * -----------------
20 * | Internal | |------|
21 * | Ref PLL CMU |----| | ------------- ---------
22 * ------------ ---- | MUX |-----|PHY PLL CMU|----| Serdes|
23 * | | | | ---------
24 * External Clock ------| | -------------
25 * |------|
48 /* Max 2 lanes per a PHY unit */
49 #define MAX_LANE 2
168 (((dst) & ~0x00000004) | (((u32) (src) << 2) & 0x00000004))
189 (((dst) & ~0x00000004) | (((u32) (src) << 2) & 0x00000004))
206 (((dst) & ~0x0000001c) | (((u32) (src) << 2) & 0x0000001c))
267 /* PHY lane CSR accessing from SDS indirectly */
348 (((dst) & ~0x00000004) | (((u32) (src) << 2) & 0x00000004))
447 (((dst) & ~0x0000007c) | (((u32) (src) << 2) & 0x0000007c))
456 (((dst) & ~0x00000004) | (((u32) (src) << 2) & 0x00000004))
465 (((dst) & ~0x0000000c) | (((u32) (src) << 2) & 0x0000000c))
488 (((dst) & ~0x00000004) | (((u32) (src) << 2) & 0x00000004))
506 CLK_INT_SING = 2, /* Internal single ended */
512 MODE_PCIE = 2,
519 u32 speed[MAX_LANE]; /* Index for override parameter per lane */
525 u32 txprecursor_cn1[MAX_LANE*3]; /* Tx emphasis taps 1st pre-cursor */
526 u32 txprecursor_cn2[MAX_LANE*3]; /* Tx emphasis taps 2nd pre-cursor */
527 u32 txpostcursor_cp1[MAX_LANE*3]; /* Tx emphasis taps post-cursor */
547 MODULE_PARM_DESC(preA3Chip, "Enable pre-A3 chip support (1=enable 0=disable)");
596 void __iomem *sds_base = ctx->sds_base; in cmu_wr()
607 pr_debug("CMU WR addr 0x%X value 0x%08X <-> 0x%08X\n", reg, data, val); in cmu_wr()
613 void __iomem *sds_base = ctx->sds_base; in cmu_rd()
657 static void serdes_wr(struct xgene_phy_ctx *ctx, int lane, u32 reg, u32 data) in serdes_wr() argument
659 void __iomem *sds_base = ctx->sds_base; in serdes_wr()
663 reg += lane * SERDES_LANE_STRIDE; in serdes_wr()
668 pr_debug("SERDES WR addr 0x%X value 0x%08X <-> 0x%08X\n", reg, data, in serdes_wr()
672 static void serdes_rd(struct xgene_phy_ctx *ctx, int lane, u32 reg, u32 *data) in serdes_rd() argument
674 void __iomem *sds_base = ctx->sds_base; in serdes_rd()
677 reg += lane * SERDES_LANE_STRIDE; in serdes_rd()
683 static void serdes_clrbits(struct xgene_phy_ctx *ctx, int lane, u32 reg, in serdes_clrbits() argument
688 serdes_rd(ctx, lane, reg, &val); in serdes_clrbits()
690 serdes_wr(ctx, lane, reg, val); in serdes_clrbits()
693 static void serdes_setbits(struct xgene_phy_ctx *ctx, int lane, u32 reg, in serdes_setbits() argument
698 serdes_rd(ctx, lane, reg, &val); in serdes_setbits()
700 serdes_wr(ctx, lane, reg, val); in serdes_setbits()
727 dev_dbg(ctx->dev, "Set external reference clock\n"); in xgene_phy_cfg_cmu_clk_type()
737 dev_dbg(ctx->dev, "Set internal reference clock\n"); in xgene_phy_cfg_cmu_clk_type()
752 dev_dbg(ctx->dev, in xgene_phy_cfg_cmu_clk_type()
855 /* Configure lane for 20-bits */ in xgene_phy_sata_cfg_cmu_core()
943 int lane; in xgene_phy_sata_cfg_lanes() local
945 for (lane = 0; lane < MAX_LANE; lane++) { in xgene_phy_sata_cfg_lanes()
946 serdes_wr(ctx, lane, RXTX_REG147, 0x6); in xgene_phy_sata_cfg_lanes()
949 serdes_rd(ctx, lane, RXTX_REG0, &val); in xgene_phy_sata_cfg_lanes()
953 serdes_wr(ctx, lane, RXTX_REG0, val); in xgene_phy_sata_cfg_lanes()
956 serdes_rd(ctx, lane, RXTX_REG1, &val); in xgene_phy_sata_cfg_lanes()
959 ctx->sata_param.txboostgain[lane * 3 + in xgene_phy_sata_cfg_lanes()
960 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
961 serdes_wr(ctx, lane, RXTX_REG1, val); in xgene_phy_sata_cfg_lanes()
965 serdes_rd(ctx, lane, RXTX_REG2, &val); in xgene_phy_sata_cfg_lanes()
969 serdes_wr(ctx, lane, RXTX_REG2, val); in xgene_phy_sata_cfg_lanes()
971 /* Configure Tx for 20-bits */ in xgene_phy_sata_cfg_lanes()
972 serdes_rd(ctx, lane, RXTX_REG4, &val); in xgene_phy_sata_cfg_lanes()
974 serdes_wr(ctx, lane, RXTX_REG4, val); in xgene_phy_sata_cfg_lanes()
977 serdes_rd(ctx, lane, RXTX_REG1, &val); in xgene_phy_sata_cfg_lanes()
980 serdes_wr(ctx, lane, RXTX_REG1, val); in xgene_phy_sata_cfg_lanes()
983 /* Set pre-emphasis first 1 and 2, and post-emphasis values */ in xgene_phy_sata_cfg_lanes()
984 serdes_rd(ctx, lane, RXTX_REG5, &val); in xgene_phy_sata_cfg_lanes()
986 ctx->sata_param.txprecursor_cn1[lane * 3 + in xgene_phy_sata_cfg_lanes()
987 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
989 ctx->sata_param.txpostcursor_cp1[lane * 3 + in xgene_phy_sata_cfg_lanes()
990 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
992 ctx->sata_param.txprecursor_cn2[lane * 3 + in xgene_phy_sata_cfg_lanes()
993 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
994 serdes_wr(ctx, lane, RXTX_REG5, val); in xgene_phy_sata_cfg_lanes()
997 serdes_rd(ctx, lane, RXTX_REG6, &val); in xgene_phy_sata_cfg_lanes()
999 ctx->sata_param.txamplitude[lane * 3 + in xgene_phy_sata_cfg_lanes()
1000 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
1005 serdes_wr(ctx, lane, RXTX_REG6, val); in xgene_phy_sata_cfg_lanes()
1007 /* Configure Rx for 20-bits */ in xgene_phy_sata_cfg_lanes()
1008 serdes_rd(ctx, lane, RXTX_REG7, &val); in xgene_phy_sata_cfg_lanes()
1011 serdes_wr(ctx, lane, RXTX_REG7, val); in xgene_phy_sata_cfg_lanes()
1014 serdes_rd(ctx, lane, RXTX_REG8, &val); in xgene_phy_sata_cfg_lanes()
1020 serdes_wr(ctx, lane, RXTX_REG8, val); in xgene_phy_sata_cfg_lanes()
1023 serdes_rd(ctx, lane, RXTX_REG11, &val); in xgene_phy_sata_cfg_lanes()
1025 serdes_wr(ctx, lane, RXTX_REG11, val); in xgene_phy_sata_cfg_lanes()
1028 serdes_rd(ctx, lane, RXTX_REG12, &val); in xgene_phy_sata_cfg_lanes()
1032 serdes_wr(ctx, lane, RXTX_REG12, val); in xgene_phy_sata_cfg_lanes()
1035 serdes_rd(ctx, lane, RXTX_REG26, &val); in xgene_phy_sata_cfg_lanes()
1038 serdes_wr(ctx, lane, RXTX_REG26, val); in xgene_phy_sata_cfg_lanes()
1040 serdes_wr(ctx, lane, RXTX_REG28, 0x0); in xgene_phy_sata_cfg_lanes()
1043 serdes_wr(ctx, lane, RXTX_REG31, 0x0); in xgene_phy_sata_cfg_lanes()
1045 /* Set Eye Monitor counter width to 12-bit */ in xgene_phy_sata_cfg_lanes()
1046 serdes_rd(ctx, lane, RXTX_REG61, &val); in xgene_phy_sata_cfg_lanes()
1050 serdes_wr(ctx, lane, RXTX_REG61, val); in xgene_phy_sata_cfg_lanes()
1052 serdes_rd(ctx, lane, RXTX_REG62, &val); in xgene_phy_sata_cfg_lanes()
1054 serdes_wr(ctx, lane, RXTX_REG62, val); in xgene_phy_sata_cfg_lanes()
1058 reg = RXTX_REG81 + i * 2; in xgene_phy_sata_cfg_lanes()
1059 serdes_rd(ctx, lane, reg, &val); in xgene_phy_sata_cfg_lanes()
1063 serdes_wr(ctx, lane, reg, val); in xgene_phy_sata_cfg_lanes()
1068 reg = RXTX_REG96 + i * 2; in xgene_phy_sata_cfg_lanes()
1069 serdes_rd(ctx, lane, reg, &val); in xgene_phy_sata_cfg_lanes()
1073 serdes_wr(ctx, lane, reg, val); in xgene_phy_sata_cfg_lanes()
1078 reg = RXTX_REG99 + i * 2; in xgene_phy_sata_cfg_lanes()
1079 serdes_rd(ctx, lane, reg, &val); in xgene_phy_sata_cfg_lanes()
1083 serdes_wr(ctx, lane, reg, val); in xgene_phy_sata_cfg_lanes()
1086 serdes_rd(ctx, lane, RXTX_REG102, &val); in xgene_phy_sata_cfg_lanes()
1088 serdes_wr(ctx, lane, RXTX_REG102, val); in xgene_phy_sata_cfg_lanes()
1090 serdes_wr(ctx, lane, RXTX_REG114, 0xffe0); in xgene_phy_sata_cfg_lanes()
1092 serdes_rd(ctx, lane, RXTX_REG125, &val); in xgene_phy_sata_cfg_lanes()
1094 ctx->sata_param.txeyedirection[lane * 3 + in xgene_phy_sata_cfg_lanes()
1095 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
1097 ctx->sata_param.txeyetuning[lane * 3 + in xgene_phy_sata_cfg_lanes()
1098 ctx->sata_param.speed[lane]]); in xgene_phy_sata_cfg_lanes()
1100 serdes_wr(ctx, lane, RXTX_REG125, val); in xgene_phy_sata_cfg_lanes()
1102 serdes_rd(ctx, lane, RXTX_REG127, &val); in xgene_phy_sata_cfg_lanes()
1104 serdes_wr(ctx, lane, RXTX_REG127, val); in xgene_phy_sata_cfg_lanes()
1106 serdes_rd(ctx, lane, RXTX_REG128, &val); in xgene_phy_sata_cfg_lanes()
1108 serdes_wr(ctx, lane, RXTX_REG128, val); in xgene_phy_sata_cfg_lanes()
1110 serdes_rd(ctx, lane, RXTX_REG145, &val); in xgene_phy_sata_cfg_lanes()
1120 serdes_wr(ctx, lane, RXTX_REG145, val); in xgene_phy_sata_cfg_lanes()
1127 reg = RXTX_REG148 + i * 2; in xgene_phy_sata_cfg_lanes()
1128 serdes_wr(ctx, lane, reg, 0xFFFF); in xgene_phy_sata_cfg_lanes()
1137 void __iomem *csr_serdes = ctx->sds_base; in xgene_phy_cal_rdy_chk()
1186 * The serial transmit pins, TXP/TXN, have Pull-UP and Pull-DOWN in xgene_phy_cal_rdy_chk()
1216 } while (--loop > 0); in xgene_phy_cal_rdy_chk()
1219 dev_dbg(ctx->dev, "PLL calibration %s\n", in xgene_phy_cal_rdy_chk()
1222 dev_err(ctx->dev, in xgene_phy_cal_rdy_chk()
1224 return -1; in xgene_phy_cal_rdy_chk()
1226 dev_dbg(ctx->dev, "PLL calibration successful\n"); in xgene_phy_cal_rdy_chk()
1229 dev_dbg(ctx->dev, "PHY Tx is %sready\n", val & 0x300 ? "" : "not "); in xgene_phy_cal_rdy_chk()
1239 dev_dbg(ctx->dev, "Reset VCO and re-start again\n"); in xgene_phy_pdwn_force_vco()
1254 void __iomem *sds_base = ctx->sds_base; in xgene_phy_hw_init_sata()
1259 dev_dbg(ctx->dev, "Reset PHY\n"); in xgene_phy_hw_init_sata()
1263 /* Release PHY lane from reset (active high) */ in xgene_phy_hw_init_sata()
1273 ctx->sata_param.txspeed[ctx->sata_param.speed[0]]); in xgene_phy_hw_init_sata()
1276 dev_dbg(ctx->dev, "Set the customer pin mode to SATA\n"); in xgene_phy_hw_init_sata()
1294 /* Set Rx/Tx 20-bit */ in xgene_phy_hw_init_sata()
1307 } while (--i > 0); in xgene_phy_hw_init_sata()
1310 dev_err(ctx->dev, "PLL calibration failed\n"); in xgene_phy_hw_init_sata()
1321 dev_dbg(ctx->dev, "PHY init clk type %d\n", clk_type); in xgene_phy_hw_initialize()
1323 if (ctx->mode == MODE_SATA) { in xgene_phy_hw_initialize()
1328 dev_err(ctx->dev, "Un-supported customer pin mode %d\n", in xgene_phy_hw_initialize()
1329 ctx->mode); in xgene_phy_hw_initialize()
1330 return -ENODEV; in xgene_phy_hw_initialize()
1339 * Calibrate the receiver signal path offset in two steps - summar and
1342 static void xgene_phy_force_lat_summer_cal(struct xgene_phy_ctx *ctx, int lane) in xgene_phy_force_lat_summer_cal() argument
1370 serdes_setbits(ctx, lane, RXTX_REG127, in xgene_phy_force_lat_summer_cal()
1377 serdes_clrbits(ctx, lane, RXTX_REG127, in xgene_phy_force_lat_summer_cal()
1386 serdes_setbits(ctx, lane, RXTX_REG127, in xgene_phy_force_lat_summer_cal()
1393 serdes_clrbits(ctx, lane, RXTX_REG127, in xgene_phy_force_lat_summer_cal()
1396 /* Configure the PHY lane for calibration */ in xgene_phy_force_lat_summer_cal()
1397 serdes_wr(ctx, lane, RXTX_REG28, 0x7); in xgene_phy_force_lat_summer_cal()
1398 serdes_wr(ctx, lane, RXTX_REG31, 0x7e00); in xgene_phy_force_lat_summer_cal()
1399 serdes_clrbits(ctx, lane, RXTX_REG4, in xgene_phy_force_lat_summer_cal()
1401 serdes_clrbits(ctx, lane, RXTX_REG7, in xgene_phy_force_lat_summer_cal()
1404 serdes_wr(ctx, lane, serdes_reg[i].reg, in xgene_phy_force_lat_summer_cal()
1408 static void xgene_phy_reset_rxd(struct xgene_phy_ctx *ctx, int lane) in xgene_phy_reset_rxd() argument
1411 serdes_clrbits(ctx, lane, RXTX_REG7, RXTX_REG7_RESETB_RXD_MASK); in xgene_phy_reset_rxd()
1414 serdes_setbits(ctx, lane, RXTX_REG7, RXTX_REG7_RESETB_RXD_MASK); in xgene_phy_reset_rxd()
1419 return (accum + (samples / 2)) / samples; in xgene_phy_get_avg()
1422 static void xgene_phy_gen_avg_val(struct xgene_phy_ctx *ctx, int lane) in xgene_phy_gen_avg_val() argument
1436 dev_dbg(ctx->dev, "Generating avg calibration value for lane %d\n", in xgene_phy_gen_avg_val()
1437 lane); in xgene_phy_gen_avg_val()
1439 /* Enable RX Hi-Z termination */ in xgene_phy_gen_avg_val()
1440 serdes_setbits(ctx, lane, RXTX_REG12, in xgene_phy_gen_avg_val()
1443 serdes_wr(ctx, lane, RXTX_REG28, 0x0000); in xgene_phy_gen_avg_val()
1445 serdes_wr(ctx, lane, RXTX_REG31, 0x0000); in xgene_phy_gen_avg_val()
1449 * Calibrate the receiver signal path offset in two steps - summar in xgene_phy_gen_avg_val()
1456 xgene_phy_force_lat_summer_cal(ctx, lane); in xgene_phy_gen_avg_val()
1458 serdes_rd(ctx, lane, RXTX_REG21, &val); in xgene_phy_gen_avg_val()
1463 serdes_rd(ctx, lane, RXTX_REG22, &val); in xgene_phy_gen_avg_val()
1468 serdes_rd(ctx, lane, RXTX_REG23, &val); in xgene_phy_gen_avg_val()
1472 serdes_rd(ctx, lane, RXTX_REG24, &val); in xgene_phy_gen_avg_val()
1476 serdes_rd(ctx, lane, RXTX_REG121, &val); in xgene_phy_gen_avg_val()
1492 dev_dbg(ctx->dev, "Iteration %d:\n", avg_loop); in xgene_phy_gen_avg_val()
1493 dev_dbg(ctx->dev, "DO 0x%x XO 0x%x EO 0x%x SO 0x%x\n", in xgene_phy_gen_avg_val()
1496 dev_dbg(ctx->dev, "DE 0x%x XE 0x%x EE 0x%x SE 0x%x\n", in xgene_phy_gen_avg_val()
1499 dev_dbg(ctx->dev, "SUM 0x%x\n", sum_cal_itr); in xgene_phy_gen_avg_val()
1502 dev_err(ctx->dev, in xgene_phy_gen_avg_val()
1506 xgene_phy_reset_rxd(ctx, lane); in xgene_phy_gen_avg_val()
1510 serdes_rd(ctx, lane, RXTX_REG127, &val); in xgene_phy_gen_avg_val()
1515 serdes_wr(ctx, lane, RXTX_REG127, val); in xgene_phy_gen_avg_val()
1517 serdes_rd(ctx, lane, RXTX_REG128, &val); in xgene_phy_gen_avg_val()
1522 serdes_wr(ctx, lane, RXTX_REG128, val); in xgene_phy_gen_avg_val()
1524 serdes_rd(ctx, lane, RXTX_REG129, &val); in xgene_phy_gen_avg_val()
1529 serdes_wr(ctx, lane, RXTX_REG129, val); in xgene_phy_gen_avg_val()
1531 serdes_rd(ctx, lane, RXTX_REG130, &val); in xgene_phy_gen_avg_val()
1536 serdes_wr(ctx, lane, RXTX_REG130, val); in xgene_phy_gen_avg_val()
1539 serdes_rd(ctx, lane, RXTX_REG14, &val); in xgene_phy_gen_avg_val()
1542 serdes_wr(ctx, lane, RXTX_REG14, val); in xgene_phy_gen_avg_val()
1544 dev_dbg(ctx->dev, "Average Value:\n"); in xgene_phy_gen_avg_val()
1545 dev_dbg(ctx->dev, "DO 0x%x XO 0x%x EO 0x%x SO 0x%x\n", in xgene_phy_gen_avg_val()
1550 dev_dbg(ctx->dev, "DE 0x%x XE 0x%x EE 0x%x SE 0x%x\n", in xgene_phy_gen_avg_val()
1555 dev_dbg(ctx->dev, "SUM 0x%x\n", in xgene_phy_gen_avg_val()
1558 serdes_rd(ctx, lane, RXTX_REG14, &val); in xgene_phy_gen_avg_val()
1560 serdes_wr(ctx, lane, RXTX_REG14, val); in xgene_phy_gen_avg_val()
1561 dev_dbg(ctx->dev, "Enable Manual Summer calibration\n"); in xgene_phy_gen_avg_val()
1563 serdes_rd(ctx, lane, RXTX_REG127, &val); in xgene_phy_gen_avg_val()
1565 dev_dbg(ctx->dev, "Enable Manual Latch calibration\n"); in xgene_phy_gen_avg_val()
1566 serdes_wr(ctx, lane, RXTX_REG127, val); in xgene_phy_gen_avg_val()
1568 /* Disable RX Hi-Z termination */ in xgene_phy_gen_avg_val()
1569 serdes_rd(ctx, lane, RXTX_REG12, &val); in xgene_phy_gen_avg_val()
1571 serdes_wr(ctx, lane, RXTX_REG12, val); in xgene_phy_gen_avg_val()
1573 serdes_wr(ctx, lane, RXTX_REG28, 0x0007); in xgene_phy_gen_avg_val()
1575 serdes_wr(ctx, lane, RXTX_REG31, 0x7e00); in xgene_phy_gen_avg_val()
1586 dev_err(ctx->dev, "PHY initialize failed %d\n", rc); in xgene_phy_hw_init()
1591 if (!IS_ERR(ctx->clk)) { in xgene_phy_hw_init()
1593 clk_prepare_enable(ctx->clk); in xgene_phy_hw_init()
1594 clk_disable_unprepare(ctx->clk); in xgene_phy_hw_init()
1595 clk_prepare_enable(ctx->clk); in xgene_phy_hw_init()
1602 dev_dbg(ctx->dev, "PHY initialized\n"); in xgene_phy_hw_init()
1616 if (args->args_count <= 0) in xgene_phy_xlate()
1617 return ERR_PTR(-EINVAL); in xgene_phy_xlate()
1618 if (args->args[0] >= MODE_MAX) in xgene_phy_xlate()
1619 return ERR_PTR(-EINVAL); in xgene_phy_xlate()
1621 ctx->mode = args->args[0]; in xgene_phy_xlate()
1622 return ctx->phy; in xgene_phy_xlate()
1632 if (!of_property_read_u32_array(pdev->dev.of_node, name, buffer, in xgene_phy_get_param()
1658 ctx = devm_kzalloc(&pdev->dev, sizeof(*ctx), GFP_KERNEL); in xgene_phy_probe()
1660 return -ENOMEM; in xgene_phy_probe()
1662 ctx->dev = &pdev->dev; in xgene_phy_probe()
1665 ctx->sds_base = devm_ioremap_resource(&pdev->dev, res); in xgene_phy_probe()
1666 if (IS_ERR(ctx->sds_base)) in xgene_phy_probe()
1667 return PTR_ERR(ctx->sds_base); in xgene_phy_probe()
1670 ctx->clk = clk_get(&pdev->dev, NULL); in xgene_phy_probe()
1673 xgene_phy_get_param(pdev, "apm,tx-eye-tuning", in xgene_phy_probe()
1674 ctx->sata_param.txeyetuning, 6, default_txeye_tuning, 1); in xgene_phy_probe()
1675 xgene_phy_get_param(pdev, "apm,tx-eye-direction", in xgene_phy_probe()
1676 ctx->sata_param.txeyedirection, 6, default_txeye_direction, 1); in xgene_phy_probe()
1677 xgene_phy_get_param(pdev, "apm,tx-boost-gain", in xgene_phy_probe()
1678 ctx->sata_param.txboostgain, 6, default_txboost_gain, 1); in xgene_phy_probe()
1679 xgene_phy_get_param(pdev, "apm,tx-amplitude", in xgene_phy_probe()
1680 ctx->sata_param.txamplitude, 6, default_txamp, 13300); in xgene_phy_probe()
1681 xgene_phy_get_param(pdev, "apm,tx-pre-cursor1", in xgene_phy_probe()
1682 ctx->sata_param.txprecursor_cn1, 6, default_txcn1, 18200); in xgene_phy_probe()
1683 xgene_phy_get_param(pdev, "apm,tx-pre-cursor2", in xgene_phy_probe()
1684 ctx->sata_param.txprecursor_cn2, 6, default_txcn2, 18200); in xgene_phy_probe()
1685 xgene_phy_get_param(pdev, "apm,tx-post-cursor", in xgene_phy_probe()
1686 ctx->sata_param.txpostcursor_cp1, 6, default_txcp1, 18200); in xgene_phy_probe()
1687 xgene_phy_get_param(pdev, "apm,tx-speed", in xgene_phy_probe()
1688 ctx->sata_param.txspeed, 3, default_spd, 1); in xgene_phy_probe()
1690 ctx->sata_param.speed[i] = 2; /* Default to Gen3 */ in xgene_phy_probe()
1694 ctx->phy = devm_phy_create(ctx->dev, NULL, &xgene_phy_ops); in xgene_phy_probe()
1695 if (IS_ERR(ctx->phy)) { in xgene_phy_probe()
1696 dev_dbg(&pdev->dev, "Failed to create PHY\n"); in xgene_phy_probe()
1697 return PTR_ERR(ctx->phy); in xgene_phy_probe()
1699 phy_set_drvdata(ctx->phy, ctx); in xgene_phy_probe()
1701 phy_provider = devm_of_phy_provider_register(ctx->dev, xgene_phy_xlate); in xgene_phy_probe()
1706 {.compatible = "apm,xgene-phy",},
1714 .name = "xgene-phy",
1720 MODULE_DESCRIPTION("APM X-Gene Multi-Purpose PHY driver");