tqmod_cfg_seq.h (3473B)
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 : tqmod_cfg_seq.h 15 * Description: c functions implementing Tier1s for TEMod Serdes Driver 16 *---------------------------------------------------------------------*/ 17 18 #ifndef TQMOD_CFG_SEQ_H 19 #define TQMOD_CFG_SEQ_H 20 #include "../../tsce/tier1/temod_enum_defines.h" 21 #include "../../tsce/tier1/temod.h" 22 typedef enum { 23 TQMOD_TX_LANE_RESET = 0, 24 TQMOD_TX_LANE_TRAFFIC_ENABLE = 1, 25 TQMOD_TX_LANE_TRAFFIC_DISABLE = 2, 26 TQMOD_TX_LANE_RESET_TRAFFIC_ENABLE = 3, 27 TQMOD_TX_LANE_RESET_TRAFFIC_DISABLE = 4, 28 TQMOD_TX_LANE_TYPE_COUNT 29 }txq_lane_disable_type_t; 30 31 typedef struct tqmod_an_control_s { 32 temod_an_mode_type_t an_type; 33 uint16_t enable; 34 an_property_enable an_property_type; 35 } tqmod_an_control_t; 36 37 38 int tqmod_set_spd_intf(const phymod_access_t *pa, int speed); /* SET_SPD_INTF */ 39 int tqmod_init_pmd_qsgmii(const phymod_access_t *pa, int pmd_active, int uc_active); /* INIT_PMD */ 40 int tqmod_init_pcs_ilkn(const phymod_access_t *pa); /* INIT_PCS */ 41 42 typedef struct tqmod_an_adv_ability_s{ 43 temod_an_pause_t an_pause; 44 temod_cl37_sgmii_speed_t cl37_sgmii_speed; 45 }tqmod_an_adv_ability_t; 46 47 48 typedef struct tqmod_an_ability_s { 49 tqmod_an_adv_ability_t cl37_adv; /*includes cl37 and cl37-bam related (fec, cl72) */ 50 } tqmod_an_ability_t; 51 52 53 /*link status*/ 54 int tqmod_get_pcs_link_status(const phymod_access_t* pa, uint32_t *link); 55 56 /* get_speed*/ 57 int tqmod_speed_id_get(const phymod_access_t *pa, int *speed_id); 58 59 /* lane_enable*/ 60 int tqmod_lane_enable_set(const phymod_access_t *pa, int enable); 61 62 /* set osmode*/ 63 int tqmod_pmd_osmode_set(const phymod_access_t *pa, int os_mode); 64 65 /* set autoneg*/ 66 int tqmod_autoneg_set(const phymod_access_t *pa, int *an_en); 67 68 /* pmd_per_lane reset*/ 69 int tqmod_pmd_x4_reset(const phymod_access_t *pa); 70 71 int tqmod_rx_lane_control_set(const phymod_access_t *pa, int enable); 72 int tqmod_rx_lane_control_get(const phymod_access_t *pa, int *enable); 73 74 int tqmod_tx_lane_control(const phymod_access_t *pa, int enable); 75 76 int tqmod_tx_squelch_set(PHYMOD_ST *pc, int enable); 77 int tqmod_tx_squelch_get(PHYMOD_ST *pc, int *val); 78 79 int tqmod_rx_squelch_set(PHYMOD_ST *pc, int enable); 80 int tqmod_rx_squelch_get(PHYMOD_ST *pc, int *val); 81 82 int tqmod_tx_rx_polarity_get (const phymod_access_t *pa, uint32_t* txp, uint32_t* rxp); 83 84 int tqmod_tx_rx_polarity_set (const phymod_access_t *pa, uint32_t txp, uint32_t rxp); 85 86 int tqmod_tx_lane_control_set(const phymod_access_t *pa, txq_lane_disable_type_t tx_dis_type); 87 int tqmod_tx_lane_control_get(PHYMOD_ST* pa, int *reset, int *enable); 88 89 90 int tqmod_txfir_tx_disable_set(const phymod_access_t *pa); 91 92 int tqmod_eee_control_set(PHYMOD_ST* pc, int enable); 93 94 int tqmod_pcs_lane_swap (PHYMOD_ST* pc, int pcs_swap); 95 96 int tqmod_pcs_lane_swap_get (PHYMOD_ST* pc, uint32_t *pcs_swap); 97 98 #endif /* TQMOD_CFG_SEQ_H */