1 /*******************************************************************************
2 Copyright (C) 2015 Annapurna Labs Ltd.
4 This file may be licensed under the terms of the Annapurna Labs Commercial
7 Alternatively, this file can be distributed under the terms of the GNU General
8 Public License V2 as published by the Free Software Foundation and can be
9 found at http://www.gnu.org/licenses/gpl-2.0.html
11 Alternatively, redistribution and use in source and binary forms, with or
12 without modification, are permitted provided that the following conditions are
15 * Redistributions of source code must retain the above copyright notice,
16 this list of conditions and the following disclaimer.
18 * Redistributions in binary form must reproduce the above copyright
19 notice, this list of conditions and the following disclaimer in
20 the documentation and/or other materials provided with the
23 THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
24 ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
25 WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
26 DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
27 ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
28 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
30 ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
31 (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
32 SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
34 *******************************************************************************/
37 * @defgroup group_serdes_api API
38 * SerDes HAL driver API
39 * @ingroup group_serdes SerDes
42 * @file al_hal_serdes_interface.h
44 * @brief Header file for the SerDes HAL driver
48 #ifndef __AL_HAL_SERDES_INTERFACE_H__
49 #define __AL_HAL_SERDES_INTERFACE_H__
51 #include "al_hal_common.h"
64 enum al_serdes_reg_page {
65 /* Relevant to Serdes hssp and 25g */
66 AL_SRDS_REG_PAGE_0_LANE_0 = 0,
67 AL_SRDS_REG_PAGE_1_LANE_1,
68 /* Relevant to Serdes hssp only */
69 AL_SRDS_REG_PAGE_2_LANE_2,
70 AL_SRDS_REG_PAGE_3_LANE_3,
71 /* Relevant to Serdes hssp and 25g */
72 AL_SRDS_REG_PAGE_4_COMMON,
73 /* Relevant to Serdes hssp only */
74 AL_SRDS_REG_PAGE_0123_LANES_0123 = 7,
75 /* Relevant to Serdes 25g only */
79 /* Relevant to Serdes hssp only */
80 enum al_serdes_reg_type {
81 AL_SRDS_REG_TYPE_PMA = 0,
86 AL_SRDS_LANE_0 = AL_SRDS_REG_PAGE_0_LANE_0,
87 AL_SRDS_LANE_1 = AL_SRDS_REG_PAGE_1_LANE_1,
88 AL_SRDS_LANE_2 = AL_SRDS_REG_PAGE_2_LANE_2,
89 AL_SRDS_LANE_3 = AL_SRDS_REG_PAGE_3_LANE_3,
92 AL_SRDS_LANES_0123 = AL_SRDS_REG_PAGE_0123_LANES_0123,
95 /** Serdes loopback mode */
96 enum al_serdes_lb_mode {
101 * Transmits the untimed, partial equalized RX signal out the transmit
103 * No clock used (untimed)
105 AL_SRDS_LB_MODE_PMA_IO_UN_TIMED_RX_TO_TX,
108 * Loops back the TX serializer output into the CDR.
109 * CDR recovered bit clock used (without attenuation)
111 AL_SRDS_LB_MODE_PMA_INTERNALLY_BUFFERED_SERIAL_TX_TO_RX,
114 * Loops back the TX driver IO signal to the RX IO pins
115 * CDR recovered bit clock used (only through IO)
117 AL_SRDS_LB_MODE_PMA_SERIAL_TX_IO_TO_RX_IO,
120 * Parallel loopback from the PMA receive lane data ports, to the
121 * transmit lane data ports
122 * CDR recovered bit clock used
124 AL_SRDS_LB_MODE_PMA_PARALLEL_RX_TO_TX,
126 /** Loops received data after elastic buffer to transmit path */
127 AL_SRDS_LB_MODE_PCS_PIPE,
129 /** Loops TX data (to PMA) to RX path (instead of PMA data) */
130 AL_SRDS_LB_MODE_PCS_NEAR_END,
132 /** Loops receive data prior to interface block to transmit path */
133 AL_SRDS_LB_MODE_PCS_FAR_END,
136 enum al_serdes_clk_freq {
138 AL_SRDS_CLK_FREQ_100_MHZ,
139 AL_SRDS_CLK_FREQ_125_MHZ,
140 AL_SRDS_CLK_FREQ_156_MHZ,
143 enum al_serdes_clk_src {
144 AL_SRDS_CLK_SRC_LOGIC_0,
145 AL_SRDS_CLK_SRC_REF_PINS,
147 AL_SRDS_CLK_SRC_R2L_PLL,
151 /** Serdes BIST pattern */
152 enum al_serdes_bist_pattern {
153 AL_SRDS_BIST_PATTERN_USER,
154 AL_SRDS_BIST_PATTERN_PRBS7,
155 AL_SRDS_BIST_PATTERN_PRBS23,
156 AL_SRDS_BIST_PATTERN_PRBS31,
157 AL_SRDS_BIST_PATTERN_CLK1010,
160 /** SerDes group rate */
161 enum al_serdes_rate {
168 /** SerDes power mode */
178 * Tx de-emphasis parameters
180 enum al_serdes_tx_deemph_param {
181 AL_SERDES_TX_DEEMP_C_ZERO, /*< c(0) */
182 AL_SERDES_TX_DEEMP_C_PLUS, /*< c(1) */
183 AL_SERDES_TX_DEEMP_C_MINUS, /*< c(-1) */
186 struct al_serdes_adv_tx_params {
188 * select the input values location.
189 * When set to true the values will be taken from the internal registers
190 * that will be override with the next following parameters.
191 * When set to false the values will be taken from external pins (the
192 * other parameters in this case is not needed)
196 * Transmit Amplitude control signal. Used to define the full-scale
197 * maximum swing of the driver.
198 * 000 - Not Supported
199 * 001 - 952mVdiff-pkpk
200 * 010 - 1024mVdiff-pkpk
201 * 011 - 1094mVdiff-pkpk
202 * 100 - 1163mVdiff-pkpk
203 * 101 - 1227mVdiff-pkpk
204 * 110 - 1283mVdiff-pkpk
205 * 111 - 1331mVdiff-pkpk
208 /* Defines the total number of driver units allocated in the driver */
209 uint8_t total_driver_units;
210 /* Defines the total number of driver units allocated to the
211 * first post-cursor (C+1) tap. */
213 /* Defines the total number of driver units allocated to the
214 * second post-cursor (C+2) tap. */
216 /* Defines the total number of driver units allocated to the
217 * first pre-cursor (C-1) tap. */
219 /* TX driver Slew Rate control:
228 struct al_serdes_adv_rx_params {
230 * select the input values location.
231 * When set to true the values will be taken from the internal registers
232 * that will be override with the next following parameters.
233 * When set to false the values will be taken based in the equalization
234 * results (the other parameters in this case is not needed)
237 /* RX agc high frequency dc gain:
248 /* DFE post-shaping tap 3dB frequency
258 uint8_t dfe_3db_freq;
259 /* DFE post-shaping tap gain
260 * 0: no pulse shaping tap
270 /* DFE first tap gain control
272 * -4'b0001: +10mVpeak
274 * -4'b0110: +55mVpeak
275 * -4'b0111: +64mVpeak
277 * -4'b1001: -10mVpeak
279 * -4'b1110: -55mVpeak
280 * -4'b1111: -64mVpeak
282 uint8_t dfe_first_tap_ctrl;
283 /* DFE second tap gain control
287 * -4'b0110: +46mVpeak
288 * -4'b0111: +53mVpeak
292 * -4'b1110: -46mVpeak
293 * -4'b1111: -53mVpeak
295 uint8_t dfe_secound_tap_ctrl;
296 /* DFE third tap gain control
300 * -4'b0110: +38mVpeak
301 * -4'b0111: +44mVpeak
305 * -4'b1110: -38mVpeak
306 * -4'b1111: -44mVpeak
308 uint8_t dfe_third_tap_ctrl;
309 /* DFE fourth tap gain control
313 * -4'b0110: +29mVpeak
314 * -4'b0111: +33mVpeak
318 * -4'b1110: -29mVpeak
319 * -4'b1111: -33mVpeak
321 uint8_t dfe_fourth_tap_ctrl;
322 /* Low frequency agc gain (att) select
323 * -3'b000: Disconnected
332 uint8_t low_freq_agc_gain;
333 /* Provides a RX Equalizer pre-hint, prior to beginning
334 * adaptive equalization */
335 uint8_t precal_code_sel;
336 /* High frequency agc boost control
338 * Max d31: Boost ~20dB
340 uint8_t high_freq_agc_boost;
343 struct al_serdes_25g_adv_rx_params {
344 /* ATT (PLE Flat-Band Gain) */
346 /* APG (CTLE's Flat-Band Gain) */
348 /* LFG (Low-Freq Gain) */
350 /* HFG (High-Freq Gain) */
352 /* MBG (MidBand-Freq-knob Gain) */
354 /* MBF (MidBand-Freq-knob Frequency position Gain) */
356 /* DFE Tap1 even#0 Value */
357 int8_t dfe_first_tap_even0_ctrl;
358 /* DFE Tap1 even#1 Value */
359 int8_t dfe_first_tap_even1_ctrl;
360 /* DFE Tap1 odd#0 Value */
361 int8_t dfe_first_tap_odd0_ctrl;
362 /* DFE Tap1 odd#1 Value */
363 int8_t dfe_first_tap_odd1_ctrl;
365 int8_t dfe_second_tap_ctrl;
367 int8_t dfe_third_tap_ctrl;
369 int8_t dfe_fourth_tap_ctrl;
371 int8_t dfe_fifth_tap_ctrl;
374 struct al_serdes_25g_tx_diag_info {
375 uint8_t regulated_supply;
378 uint8_t calp_multiplied_by_2;
379 uint8_t caln_multiplied_by_2;
382 struct al_serdes_25g_rx_diag_info {
385 int8_t leq_gainstage_offset;
386 int8_t leq_eq1_offset;
387 int8_t leq_eq2_offset;
388 int8_t leq_eq3_offset;
389 int8_t leq_eq4_offset;
390 int8_t leq_eq5_offset;
391 int8_t summer_even_offset;
392 int8_t summer_odd_offset;
393 int8_t vscan_even_offset;
394 int8_t vscan_odd_offset;
395 int8_t data_slicer_even0_offset;
396 int8_t data_slicer_even1_offset;
397 int8_t data_slicer_odd0_offset;
398 int8_t data_slicer_odd1_offset;
399 int8_t edge_slicer_even_offset;
400 int8_t edge_slicer_odd_offset;
401 int8_t eye_slicer_even_offset;
402 int8_t eye_slicer_odd_offset;
406 uint8_t cdr_vco_dosc;
409 uint8_t ple_resistance;
410 uint8_t rx_term_mode;
412 uint8_t rx_term_cal_code;
413 uint8_t rx_sheet_res_cal_code;
419 struct al_serdes_sris_params {
420 /* Controls the frequency accuracy threshold (ppm) for lock detection CDR */
421 uint16_t ppm_drift_count;
422 /* Controls the frequency accuracy threshold (ppm) for lock detection in the CDR */
423 uint16_t ppm_drift_max;
424 /* Controls the frequency accuracy threshold (ppm) for lock detection in PLL */
425 uint16_t synth_ppm_drift_max;
426 /* Elastic buffer full threshold for PCIE modes: GEN1/GEN2 */
428 /* Elastic buffer full threshold for PCIE modes: GEN3 */
429 uint8_t full_pcie_g3;
430 /* Elastic buffer midpoint threshold.
431 * Sets the depth of the buffer while in PCIE mode, GEN1/GEN2
433 uint8_t rd_threshold_d2r1;
434 /* Elastic buffer midpoint threshold.
435 * Sets the depth of the buffer while in PCIE mode, GEN3
437 uint8_t rd_threshold_pcie_g3;
440 /** SerDes PCIe Rate - values are important for proper behavior */
441 enum al_serdes_pcie_rate {
442 AL_SRDS_PCIE_RATE_GEN1 = 0,
443 AL_SRDS_PCIE_RATE_GEN2,
444 AL_SRDS_PCIE_RATE_GEN3,
447 struct al_serdes_grp_obj {
448 void __iomem *regs_base;
451 * get the type of the serdes.
452 * Must be implemented for all SerDes unit.
454 * @return the serdes type.
456 enum al_serdes_type (*type_get)(void);
459 * Reads a SERDES internal register
461 * @param obj The object context
462 * @param page The SERDES register page within the group
463 * @param type The SERDES register type (PMA /PCS)
464 * @param offset The SERDES register offset (0 - 4095)
465 * @param data The read data
467 * @return 0 if no error found.
469 int (*reg_read)(struct al_serdes_grp_obj *, enum al_serdes_reg_page,
470 enum al_serdes_reg_type, uint16_t, uint8_t *);
473 * Writes a SERDES internal register
475 * @param obj The object context
476 * @param page The SERDES register page within the group
477 * @param type The SERDES register type (PMA /PCS)
478 * @param offset The SERDES register offset (0 - 4095)
479 * @param data The data to write
481 * @return 0 if no error found.
483 int (*reg_write)(struct al_serdes_grp_obj *, enum al_serdes_reg_page,
484 enum al_serdes_reg_type, uint16_t, uint8_t);
487 * Enable BIST required overrides
489 * @param obj The object context
490 * @param grp The SERDES group
491 * @param rate The required speed rate
493 void (*bist_overrides_enable)(struct al_serdes_grp_obj *, enum al_serdes_rate);
495 * Disable BIST required overrides
497 * @param obj The object context
498 * @param grp The SERDES group
499 * @param rate The required speed rate
501 void (*bist_overrides_disable)(struct al_serdes_grp_obj *);
505 * @param obj The object context
506 * @param grp The SERDES group
507 * @param rate The Rx required rate
509 void (*rx_rate_change)(struct al_serdes_grp_obj *, enum al_serdes_rate);
511 * SERDES lane Rx rate change software flow enable
513 * @param obj The object context
514 * @param lane The SERDES lane within the group
516 void (*rx_rate_change_sw_flow_en)(struct al_serdes_grp_obj *, enum al_serdes_lane);
518 * SERDES lane Rx rate change software flow disable
520 * @param obj The object context
521 * @param lane The SERDES lane within the group
523 void (*rx_rate_change_sw_flow_dis)(struct al_serdes_grp_obj *, enum al_serdes_lane);
525 * PCIe lane rate override check
527 * @param obj The object context
528 * @param grp The SERDES group
529 * @param lane The SERDES lane within the group
531 * @returns AL_TRUE if the override is enabled
533 al_bool (*pcie_rate_override_is_enabled)(struct al_serdes_grp_obj *, enum al_serdes_lane);
535 * PCIe lane rate override control
537 * @param obj The object context
538 * @param lane The SERDES lane within the group
539 * @param en Enable/disable
541 void (*pcie_rate_override_enable_set)(struct al_serdes_grp_obj *, enum al_serdes_lane,
546 * @param obj The object context
547 * @param lane The SERDES lane within the group
549 enum al_serdes_pcie_rate (*pcie_rate_get)(struct al_serdes_grp_obj *, enum al_serdes_lane);
553 * @param obj The object context
554 * @param lane The SERDES lane within the group
555 * @param rate The required rate
557 void (*pcie_rate_set)(struct al_serdes_grp_obj *, enum al_serdes_lane,
558 enum al_serdes_pcie_rate rate);
560 * SERDES group power mode control
562 * @param obj The object context
563 * @param grp The SERDES group
564 * @param pm The required power mode
566 void (*group_pm_set)(struct al_serdes_grp_obj *, enum al_serdes_pm);
568 * SERDES lane power mode control
570 * @param obj The object context
571 * @param grp The SERDES group
572 * @param lane The SERDES lane within the group
573 * @param rx_pm The required RX power mode
574 * @param tx_pm The required TX power mode
576 void (*lane_pm_set)(struct al_serdes_grp_obj *, enum al_serdes_lane,
577 enum al_serdes_pm, enum al_serdes_pm);
580 * SERDES group PMA hard reset
581 * Controls Serdes group PMA hard reset
583 * @param obj The object context
584 * @param grp The SERDES group
585 * @param enable Enable/disable hard reset
587 void (*pma_hard_reset_group)(struct al_serdes_grp_obj *, al_bool);
589 * SERDES lane PMA hard reset
590 * Controls Serdes lane PMA hard reset
592 * @param obj The object context
593 * @param lane The SERDES lane within the group
594 * @param enable Enable/disable hard reset
596 void (*pma_hard_reset_lane)(struct al_serdes_grp_obj *, enum al_serdes_lane, al_bool);
598 * Configure SERDES loopback
599 * Controls the loopback
601 * @param obj The object context
602 * @param lane The SERDES lane within the group
603 * @param mode The requested loopback mode
605 void (*loopback_control)(struct al_serdes_grp_obj *, enum al_serdes_lane,
606 enum al_serdes_lb_mode);
608 * SERDES BIST pattern selection
609 * Selects the BIST pattern to be used
611 * @param obj The object context
612 * @param pattern The pattern to set
613 * @param user_data The pattern user data (when pattern == AL_SRDS_BIST_PATTERN_USER)
614 * 80 bits (8 bytes array)
616 void (*bist_pattern_select)(struct al_serdes_grp_obj *,
617 enum al_serdes_bist_pattern, uint8_t *);
619 * SERDES BIST TX Enable
620 * Enables/disables TX BIST per lane
622 * @param obj The object context
623 * @param lane The SERDES lane within the group
624 * @param enable Enable or disable TX BIST
626 void (*bist_tx_enable)(struct al_serdes_grp_obj *, enum al_serdes_lane, al_bool);
628 * SERDES BIST TX single bit error injection
629 * Injects single bit error during a TX BIST
631 * @param obj The object context
633 void (*bist_tx_err_inject)(struct al_serdes_grp_obj *);
635 * SERDES BIST RX Enable
636 * Enables/disables RX BIST per lane
638 * @param obj The object context
639 * @param lane The SERDES lane within the group
640 * @param enable Enable or disable TX BIST
642 void (*bist_rx_enable)(struct al_serdes_grp_obj *, enum al_serdes_lane, al_bool);
644 * SERDES BIST RX status
645 * Checks the RX BIST status for a specific SERDES lane
647 * @param obj The object context
648 * @param lane The SERDES lane within the group
649 * @param is_locked An indication whether RX BIST is locked
650 * @param err_cnt_overflow An indication whether error count overflow occured
651 * @param err_cnt Current bit error count
653 void (*bist_rx_status)(struct al_serdes_grp_obj *, enum al_serdes_lane, al_bool *,
654 al_bool *, uint32_t *);
657 * Set the tx de-emphasis to preset values
659 * @param obj The object context
660 * @param lane The SERDES lane within the group
663 void (*tx_deemph_preset)(struct al_serdes_grp_obj *, enum al_serdes_lane);
665 * Increase tx de-emphasis param.
667 * @param obj The object context
668 * @param lane The SERDES lane within the group
669 * @param param which tx de-emphasis to change
671 * @return false in case max is reached. true otherwise.
673 al_bool (*tx_deemph_inc)(struct al_serdes_grp_obj *, enum al_serdes_lane,
674 enum al_serdes_tx_deemph_param);
676 * Decrease tx de-emphasis param.
678 * @param obj The object context
679 * @param lane The SERDES lane within the group
680 * @param param which tx de-emphasis to change
682 * @return false in case min is reached. true otherwise.
684 al_bool (*tx_deemph_dec)(struct al_serdes_grp_obj *, enum al_serdes_lane,
685 enum al_serdes_tx_deemph_param);
687 * run Rx eye measurement.
689 * @param obj The object context
690 * @param lane The SERDES lane within the group
691 * @param timeout timeout in uSec
692 * @param value Rx eye measurement value
693 * (0 - completely closed eye, 0xffff - completely open eye).
695 * @return 0 if no error found.
697 int (*eye_measure_run)(struct al_serdes_grp_obj *, enum al_serdes_lane,
698 uint32_t, unsigned int *);
700 * Eye diagram single sampling
702 * @param obj The object context
703 * @param lane The SERDES lane within the group
704 * @param x Sampling X position (0 - 63 --> -1.00 UI ... 1.00 UI)
705 * @param y Sampling Y position (0 - 62 --> 500mV ... -500mV)
706 * @param timeout timeout in uSec
707 * @param value Eye diagram sample value (BER - 0x0000 - 0xffff)
709 * @return 0 if no error found.
711 int (*eye_diag_sample)(struct al_serdes_grp_obj *, enum al_serdes_lane,
712 unsigned int, int, unsigned int, unsigned int *);
715 * Eye diagram full run
717 * @param obj The object context
718 * @param lane The SERDES lane within the group
719 * @param x_start Sampling from X position
720 * @param x_stop Sampling to X position
721 * @param x_step jump in x_step
722 * @param y_start Sampling from Y position
723 * @param y_stop Sampling to Y position
724 * @param y_step jump in y_step
725 * @param num_bits_per_sample How many bits to check
726 * @param buf array of results
727 * @param buf_size array size - must be equal to
728 * (((y_stop - y_start) / y_step) + 1) *
729 * (((x_stop - x_start) / x_step) + 1)
731 * @return 0 if no error found.
733 int (*eye_diag_run)(struct al_serdes_grp_obj *, enum al_serdes_lane,
734 int, int, unsigned int, int, int, unsigned int, uint64_t, uint64_t *,
737 * Check if signal is detected
739 * @param obj The object context
740 * @param lane The SERDES lane within the group
742 * @return true if signal is detected. false otherwise.
744 al_bool (*signal_is_detected)(struct al_serdes_grp_obj *, enum al_serdes_lane);
747 * Check if CDR is locked
749 * @param obj The object context
750 * @param lane The SERDES lane within the group
752 * @return true if cdr is locked. false otherwise.
754 al_bool (*cdr_is_locked)(struct al_serdes_grp_obj *, enum al_serdes_lane);
757 * Check if rx is valid for this lane
759 * @param obj The object context
760 * @param lane The SERDES lane within the group
762 * @return true if rx is valid. false otherwise.
764 al_bool (*rx_valid)(struct al_serdes_grp_obj *, enum al_serdes_lane);
767 * configure tx advanced parameters
769 * @param obj The object context
770 * @param lane The SERDES lane within the group
771 * @param params pointer to the tx parameters
773 void (*tx_advanced_params_set)(struct al_serdes_grp_obj *, enum al_serdes_lane, void *);
775 * read tx advanced parameters
777 * @param obj The object context
778 * @param lane The SERDES lane within the group
779 * @param params pointer to the tx parameters
781 void (*tx_advanced_params_get)(struct al_serdes_grp_obj *, enum al_serdes_lane, void *);
783 * configure rx advanced parameters
785 * @param obj The object context
786 * @param lane The SERDES lane within the group
787 * @param params pointer to the rx parameters
789 void (*rx_advanced_params_set)(struct al_serdes_grp_obj *, enum al_serdes_lane, void *);
791 * read rx advanced parameters
793 * @param obj The object context
794 * @param lane The SERDES lane within the group
795 * @param params pointer to the rx parameters
797 void (*rx_advanced_params_get)(struct al_serdes_grp_obj *, enum al_serdes_lane, void *);
799 * Switch entire SerDes group to SGMII mode based on 156.25 Mhz reference clock
801 * @param obj The object context
804 void (*mode_set_sgmii)(struct al_serdes_grp_obj *);
806 * Switch entire SerDes group to KR mode based on 156.25 Mhz reference clock
808 * @param obj The object context
811 void (*mode_set_kr)(struct al_serdes_grp_obj *);
813 * performs SerDes HW equalization test and update equalization parameters
815 * @param obj the object context
816 * @param lane The SERDES lane within the group
818 int (*rx_equalization)(struct al_serdes_grp_obj *, enum al_serdes_lane);
820 * performs Rx equalization and compute the width and height of the eye
822 * @param obj the object context
823 * @param lane The SERDES lane within the group
824 * @param width the output width of the eye
825 * @param height the output height of the eye
827 int (*calc_eye_size)(struct al_serdes_grp_obj *, enum al_serdes_lane, int *, int *);
829 * SRIS: Separate Refclk Independent SSC (Spread Spectrum Clocking)
830 * Currently available only for PCIe interfaces.
831 * When working with local Refclk, same SRIS configuration in both serdes sides
832 * (EP and RC in PCIe interface) is required.
834 * performs SRIS configuration according to params
836 * @param obj the object context
837 * @param params the SRIS parameters
839 void (*sris_config)(struct al_serdes_grp_obj *, void *);
841 * set SERDES dcgain parameter
843 * @param obj the object context
844 * @param dcgain dcgain value to set
846 void (*dcgain_set)(struct al_serdes_grp_obj *, uint8_t);
848 * read tx diagnostics info
850 * @param obj The object context
851 * @param lane The SERDES lane within the group
852 * @param params pointer to the tx diagnostics info structure
854 void (*tx_diag_info_get)(struct al_serdes_grp_obj *, enum al_serdes_lane, void*);
856 * read rx diagnostics info
858 * @param obj The object context
859 * @param lane The SERDES lane within the group
860 * @param params pointer to the rx diagnostics info structure
862 void (*rx_diag_info_get)(struct al_serdes_grp_obj *, enum al_serdes_lane, void*);
872 #endif /* __AL_HAL_SERDES_INTERFACE_H__ */
874 /** @} end of SERDES group */