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

phy8806x_cfg_seq.h (6528B)


      1 /*----------------------------------------------------------------------
      2  *  
      3  *
      4  * Broadcom Corporation
      5  * Proprietary and Confidential information
      6  * All rights reserved
      7  * This source file is the property of Broadcom Corporation, and
      8  * may not be copied or distributed in any isomorphic form without the
      9  * prior written consent of Broadcom Corporation.
     10  *---------------------------------------------------------------------
     11  * File       : phy8806x_cfg_seq.h
     12  * Description: c functions implementing Tier1s for TEMod Serdes Driver
     13  *---------------------------------------------------------------------*/
     14 /*
     15  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
     16  * 
     17  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
     18  * 
     19 */
     20 
     21 
     22 #ifndef PHY8806X_CFG_SEQ_H 
     23 #define PHY8806X_CFG_SEQ_H
     24 
     25 #include "phy8806x_tsc_common_err_code.h"
     26 #include "phy8806x_tsc_enum.h"
     27 
     28 typedef struct {
     29   int8_t pll_pwrdn;
     30   int8_t tx_s_pwrdn;
     31   int8_t rx_s_pwrdn;
     32 } power_status_t;
     33 
     34 typedef struct {
     35   int8_t revid_model;
     36   int8_t revid_process;
     37   int8_t revid_bonding;
     38   int8_t revid_rev_number;
     39   int8_t revid_rev_letter;
     40 } phy8806x_rev_id0_t;
     41 
     42 typedef struct {
     43   int8_t revid_eee;
     44   int8_t revid_llp; 
     45   int8_t revid_pir; 
     46   int8_t revid_cl72; 
     47   int8_t revid_micro; 
     48   int8_t revid_mdio; 
     49   int8_t revid_multiplicity;
     50 } phy8806x_rev_id1_t;
     51 
     52 typedef enum {
     53   TX = 0,
     54   Rx
     55 } tx_rx_t;
     56 
     57 typedef enum {
     58     PHY8806X_PRBS_POLYNOMIAL_7 = 0,
     59     PHY8806X_PRBS_POLYNOMIAL_9,
     60     PHY8806X_PRBS_POLYNOMIAL_11,
     61     PHY8806X_PRBS_POLYNOMIAL_15,
     62     PHY8806X_PRBS_POLYNOMIAL_23,
     63     PHY8806X_PRBS_POLYNOMIAL_31,
     64     PHY8806X_PRBS_POLYNOMIAL_58,
     65     PHY8806X_PRBS_POLYNOMIAL_TYPE_COUNT 
     66 }phy8806x_prbs_polynomial_type_t;
     67 
     68 extern err_code_t _phy8806x_pmd_mwr_reg_byte( const phymod_access_t *pa, uint16_t addr, uint16_t mask, uint8_t lsb, uint8_t val);
     69 extern uint8_t _phy8806x_pmd_rde_field_byte( const phymod_access_t *pa, uint16_t addr, uint8_t shift_left, uint8_t shift_right, err_code_t *err_code_p);
     70 extern uint16_t _phy8806x_pmd_rde_field( const phymod_access_t *pa, uint16_t addr, uint8_t shift_left, uint8_t shift_right, err_code_t *err_code_p);
     71 
     72 err_code_t phy8806x_tx_rx_polarity_set(const phymod_access_t *pa, uint32_t tx_pol, uint32_t rx_pol);
     73 err_code_t phy8806x_tx_rx_polarity_get(const phymod_access_t *pa, uint32_t *tx_pol, uint32_t *rx_pol);
     74 err_code_t phy8806x_uc_active_set(const phymod_access_t *pa, uint32_t enable);
     75 err_code_t phy8806x_uc_active_get(const phymod_access_t *pa, uint32_t *enable);
     76 /* int phy8806x_uc_reset(const phymod_access_t *pa, uint32_t enable); */
     77 err_code_t phy8806x_prbs_tx_inv_data_get(const phymod_access_t *pa, uint32_t *inv_data);
     78 err_code_t phy8806x_prbs_rx_inv_data_get(const phymod_access_t *pa, uint32_t *inv_data);
     79 err_code_t phy8806x_prbs_tx_poly_get(const phymod_access_t *pa, phy8806x_prbs_polynomial_type_t *prbs_poly);
     80 err_code_t phy8806x_prbs_rx_poly_get(const phymod_access_t *pa, phy8806x_prbs_polynomial_type_t *prbs_poly);
     81 err_code_t phy8806x_prbs_tx_enable_get(const phymod_access_t *pa, uint32_t *enable);
     82 err_code_t phy8806x_prbs_rx_enable_get(const phymod_access_t *pa, uint32_t *enable);
     83 err_code_t phy8806x_pmd_force_signal_detect(const phymod_access_t *pa, uint32_t enable);
     84 err_code_t phy8806x_pll_mode_set(const phymod_access_t *pa, int pll_mode);
     85 err_code_t phy8806x_pll_mode_get(const phymod_access_t *pa, uint32_t *pll_mode);
     86 err_code_t phy8806x_osr_mode_set(const phymod_access_t *pa, int osr_mode);
     87 err_code_t phy8806x_osr_mode_get(const phymod_access_t *pa, int *osr_mode);
     88 err_code_t phy8806x_tsc_dig_lpbk_get(const phymod_access_t *pa, uint32_t *lpbk);
     89 err_code_t phy8806x_tsc_rmt_lpbk_get(const phymod_access_t *pa, uint32_t *lpbk);
     90 err_code_t phy8806x_core_soft_reset(const phymod_access_t *pa);
     91 err_code_t phy8806x_core_soft_reset_release(const phymod_access_t *pa, uint32_t enable);
     92 err_code_t phy8806x_core_soft_reset_read(const phymod_access_t *pa, uint32_t *enable);
     93 err_code_t phy8806x_lane_soft_reset_read(const phymod_access_t *pa, uint32_t *enable);
     94 err_code_t phy8806x_tsc_pwrdn_set(const phymod_access_t *pa, int tx_rx, int pwrdn);
     95 err_code_t phy8806x_tsc_pwrdn_get(const phymod_access_t *pa, power_status_t *pwrdn);
     96 err_code_t phy8806x_pmd_lane_swap (const phymod_access_t *pa, uint32_t lane_map);
     97 err_code_t phy8806x_pmd_lane_swap_tx_get(const phymod_access_t *pa, uint32_t *lane_map);
     98 err_code_t phy8806x_pmd_loopback_get(const phymod_access_t *pa, uint32_t *enable);   
     99 err_code_t phy8806x_tsc_identify(const phymod_access_t *pa, phy8806x_rev_id0_t *rev_id0, phy8806x_rev_id1_t *rev_id1);
    100 err_code_t phy8806x_pmd_ln_h_rstb_pkill_override( const phymod_access_t *pa, uint16_t val); 
    101 err_code_t phy8806x_lane_soft_reset_release(const phymod_access_t *pa, uint32_t enable);   /* pmd core soft reset */
    102 err_code_t phy8806x_lane_soft_reset_release_get(const phymod_access_t *pa, uint32_t *enable);
    103 err_code_t phy8806x_lane_hard_soft_reset_release(const phymod_access_t *pa, uint32_t enable);
    104 err_code_t phy8806x_clause72_control(const phymod_access_t *pc, uint32_t cl_72_en);        /* CLAUSE_72_CONTROL */
    105 err_code_t phy8806x_clause72_control_get(const phymod_access_t *pc, uint32_t *cl_72_en);   /* CLAUSE_72_CONTROL */
    106 err_code_t phy8806x_pmd_cl72_receiver_status(const phymod_access_t *pa, uint32_t *status); 
    107 err_code_t phy8806x_tsc_ucode_init( const phymod_access_t *pa );
    108 err_code_t phy8806x_pram_firmware_enable(const phymod_access_t *pa, int enable, int wait);  
    109 err_code_t phy8806x_pmd_reset_seq(const phymod_access_t *pa, int pmd_touched);
    110 err_code_t phy8806x_pll_reset_enable_set(const phymod_access_t *pa, int enable);
    111 err_code_t phy8806x_tsc_read_pll_range(const phymod_access_t *pa, uint32_t *pll_range);
    112 err_code_t phy8806x_tsc_signal_detect (const phymod_access_t *pa, uint32_t *signal_detect);
    113 err_code_t phy8806x_force_tx_set_rst (const phymod_access_t *pa, uint32_t rst);
    114 err_code_t phy8806x_force_tx_get_rst (const phymod_access_t *pa, uint32_t *rst);
    115 err_code_t phy8806x_force_rx_set_rst (const phymod_access_t *pa, uint32_t rst);
    116 err_code_t phy8806x_force_rx_get_rst (const phymod_access_t *pa, uint32_t *rst);
    117 err_code_t phy8806x_tsc_ladder_setting_to_mV(const phymod_access_t *pa, int8_t y, int16_t* level);
    118 err_code_t phy8806x_electrical_idle_set(const phymod_access_t *pa, uint32_t en);
    119 err_code_t phy8806x_tsc_get_vco (const phymod_phy_inf_config_t* config, uint32_t *vco_rate, uint32_t *new_pll_div, int16_t *new_os_mode);
    120 
    121 #endif /* PHY_TSC_IBLK_H */