openbcm

Git mirror of https://github.com/Broadcom-Network-Switching-Software/OpenBCM
git clone git://git.finwo.net/mirror/broadcom/openbcm
Log | Files | Refs | README

eagle_cfg_seq.h (7258B)


      1 /*----------------------------------------------------------------------
      2  *  
      3  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      4  * 
      5  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      6  *
      7  * Broadcom Corporation
      8  * Proprietary and Confidential information
      9  * All rights reserved
     10  * This source file is the property of Broadcom Corporation, and
     11  * may not be copied or distributed in any isomorphic form without the
     12  * prior written consent of Broadcom Corporation.
     13  *---------------------------------------------------------------------
     14  * File       : eagle_cfg_seq.h
     15  * Description: c functions implementing Tier1s for TEMod Serdes Driver
     16  *---------------------------------------------------------------------*/
     17 /*
     18  *  $Copyright: (c) 2014 Broadcom Corporation All Rights Reserved.$
     19  * 
     20 */
     21 
     22 
     23 #ifndef EAGLE_CFG_SEQ_H 
     24 #define EAGLE_CFG_SEQ_H
     25 
     26 #include "common/srds_api_err_code.h"
     27 #include "eagle_tsc_enum.h"
     28 
     29 typedef struct {
     30   int8_t pll_pwrdn;
     31   int8_t tx_s_pwrdn;
     32   int8_t rx_s_pwrdn;
     33 } power_status_t;
     34 
     35 typedef struct {
     36   int8_t revid_model;
     37   int8_t revid_process;
     38   int8_t revid_bonding;
     39   int8_t revid_rev_number;
     40   int8_t revid_rev_letter;
     41 } eagle_rev_id0_t;
     42 
     43 
     44 typedef enum {
     45   TX = 0,
     46   Rx
     47 } tx_rx_t;
     48 
     49 typedef struct {
     50   int8_t revid_eee;
     51   int8_t revid_llp;
     52   int8_t revid_pir;
     53   int8_t revid_cl72;
     54   int8_t revid_micro;
     55   int8_t revid_mdio;
     56   int8_t revid_multiplicity;
     57 } eagle_rev_id1_t;
     58 
     59 
     60 typedef enum {
     61     EAGLE_PRBS_POLYNOMIAL_7 = 0,
     62     EAGLE_PRBS_POLYNOMIAL_9,
     63     EAGLE_PRBS_POLYNOMIAL_11,
     64     EAGLE_PRBS_POLYNOMIAL_15,
     65     EAGLE_PRBS_POLYNOMIAL_23,
     66     EAGLE_PRBS_POLYNOMIAL_31,
     67     EAGLE_PRBS_POLYNOMIAL_58,
     68     EAGLE_PRBS_POLYNOMIAL_TYPE_COUNT 
     69 }eagle_prbs_polynomial_type_t;
     70 
     71 #define PATTERN_MAX_SIZE 8
     72 
     73 err_code_t eagle_tsc_identify(const phymod_access_t *pa, eagle_rev_id0_t *rev_id0, eagle_rev_id1_t *rev_id1);
     74 
     75 err_code_t eagle_uc_active_set(const phymod_access_t *pa, uint32_t enable);           /* set microcontroller active or not  */
     76 err_code_t eagle_uc_active_get(const phymod_access_t *pa, uint32_t *enable);          /* get microcontroller active or not  */
     77 err_code_t eagle_uc_reset(const phymod_access_t *pa, uint32_t enable);           /* set dw8501 reset  */
     78 err_code_t eagle_prbs_tx_inv_data_get(const phymod_access_t *pa, uint32_t *inv_data);
     79 err_code_t eagle_prbs_rx_inv_data_get(const phymod_access_t *pa, uint32_t *inv_data);
     80 err_code_t eagle_prbs_tx_poly_get(const phymod_access_t *pa, eagle_prbs_polynomial_type_t *prbs_poly);
     81 err_code_t eagle_prbs_rx_poly_get(const phymod_access_t *pa, eagle_prbs_polynomial_type_t *prbs_poly);
     82 err_code_t eagle_prbs_tx_enable_get(const phymod_access_t *pa, uint32_t *enable);
     83 err_code_t eagle_prbs_rx_enable_get(const phymod_access_t *pa, uint32_t *enable);
     84 err_code_t eagle_pll_mode_set(const phymod_access_t *pa, int pll_mode);   /* PLL divider set */
     85 err_code_t eagle_core_soft_reset_release(const phymod_access_t *pa, uint32_t enable);   /* release the pmd core soft reset */
     86 err_code_t eagle_lane_soft_reset_release(const phymod_access_t *pa, uint32_t enable);   /* release the pmd core soft reset */
     87 err_code_t eagle_pram_firmware_enable(const phymod_access_t *pa, int enable);   /* release the pmd core soft reset */
     88 err_code_t eagle_pmd_force_signal_detect(const phymod_access_t *pa, int enable); /*force the signal detect */   
     89 err_code_t eagle_pmd_loopback_get(const phymod_access_t *pa, uint32_t *enable);   
     90 err_code_t eagle_uc_init(const phymod_access_t *pa);
     91 err_code_t eagle_pram_flop_set(const phymod_access_t *pa, int value);
     92 err_code_t eagle_tsc_ucode_init( const phymod_access_t *pa );
     93 err_code_t eagle_pmd_ln_h_rstb_pkill_override( const phymod_access_t *pa, uint16_t val); 
     94 err_code_t eagle_pmd_cl72_enable_get(const phymod_access_t *pa, uint32_t *enable);
     95 err_code_t eagle_pmd_cl72_receiver_status(const phymod_access_t *pa, uint32_t *status);
     96 err_code_t eagle_tx_pi_control_get( const phymod_access_t *pa,  int16_t *value);
     97    
     98 
     99 err_code_t eagle_tx_rx_polarity_set(const phymod_access_t *pa, uint32_t tx_pol, uint32_t rx_pol);
    100 err_code_t eagle_tx_rx_polarity_get(const phymod_access_t *pa, uint32_t *tx_pol, uint32_t *rx_pol);
    101 err_code_t eagle_force_tx_set_rst (const phymod_access_t *pa, uint32_t rst);
    102 err_code_t eagle_force_tx_get_rst (const phymod_access_t *pa, uint32_t *rst);
    103 err_code_t eagle_force_rx_set_rst (const phymod_access_t *pa, uint32_t rst);
    104 err_code_t eagle_force_rx_get_rst (const phymod_access_t *pa, uint32_t *rst);
    105 err_code_t eagle_pll_mode_get(const phymod_access_t *pa, uint32_t *pll_mode);
    106 err_code_t eagle_osr_mode_set(const phymod_access_t *pa, int osr_mode);
    107 err_code_t eagle_osr_mode_get(const phymod_access_t *pa, int *osr_mode);
    108 err_code_t eagle_tsc_dig_lpbk_get(const phymod_access_t *pa, uint32_t *lpbk);
    109 err_code_t eagle_tsc_rmt_lpbk_get(const phymod_access_t *pa, uint32_t *lpbk);
    110 err_code_t eagle_core_soft_reset(const phymod_access_t *pa);
    111 err_code_t eagle_tsc_pwrdn_set(const phymod_access_t *pa, int tx_rx, int pwrdn);
    112 err_code_t eagle_tsc_pwrdn_get(const phymod_access_t *pa, power_status_t *pwrdn);
    113 err_code_t eagle_pcs_lane_swap_tx(const phymod_access_t *pa, uint32_t tx_lane_map); 
    114 err_code_t eagle_pmd_lane_swap (const phymod_access_t *pa, uint32_t lane_map); 
    115 err_code_t eagle_pmd_lane_swap_tx_get (const phymod_access_t *pa, uint32_t *lane_map); 
    116 err_code_t eagle_lane_hard_soft_reset_release(const phymod_access_t *pa, uint32_t enable); 
    117 err_code_t eagle_clause72_control(const phymod_access_t *pa, uint32_t cl_72_en);          
    118 err_code_t eagle_clause72_control_get(const phymod_access_t *pa, uint32_t *cl_72_en);    
    119 err_code_t eagle_pmd_reset_seq(const phymod_access_t *pa, int pmd_touched);
    120 err_code_t eagle_pll_reset_enable_set (const phymod_access_t *pa, int enable);
    121 err_code_t eagle_tsc_read_pll_range (const phymod_access_t *pa, uint32_t *pll_range);
    122 err_code_t eagle_tsc_signal_detect (const phymod_access_t *pa, uint32_t *signal_detect);
    123 err_code_t eagle_tsc_ladder_setting_to_mV(const phymod_access_t *pa, int8_t y, int16_t* level);
    124 err_code_t eagle_pll_config_get(const phymod_access_t *pa, enum eagle_tsc_pll_enum *pll_mode);
    125 err_code_t eagle_tx_lane_control_set(const phymod_access_t *pa, uint32_t en);
    126 err_code_t eagle_tx_lane_control_get(const phymod_access_t *pa, uint32_t* en);
    127 err_code_t eagle_rx_lane_control_set(const phymod_access_t *pa, uint32_t en);
    128 err_code_t eagle_rx_lane_control_get(const phymod_access_t *pa, uint32_t* en);
    129 err_code_t eagle_tsc_get_vco (const phymod_phy_inf_config_t* config, uint32_t *vco_rate, enum eagle_tsc_pll_enum *new_pll_div, int16_t *new_os_mode);
    130 err_code_t eagle_pmd_tx_disable_pin_dis_set(const phymod_access_t *pa, uint32_t enable);
    131 err_code_t eagle_pmd_tx_disable_pin_dis_get(const phymod_access_t *pa, uint32_t *enable);
    132 err_code_t eagle_tsc_tx_shared_patt_gen_en_get( const phymod_access_t *pa, uint8_t *enable);
    133 err_code_t eagle_tsc_config_shared_tx_pattern_idx_set( const phymod_access_t *pa, const uint32_t *pattern_len);
    134 err_code_t eagle_tsc_config_shared_tx_pattern_idx_get( const phymod_access_t *pa, uint32_t *pattern_len, uint32_t *pattern);
    135 err_code_t eagle_tsc_rx_ppm(const phymod_access_t *pa, int16_t *rx_ppm);
    136 #endif /* PHY_TSC_IBLK_H */