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

dino.h (7634B)


      1 /*
      2  *         
      3  * 
      4  * 
      5  * This license is set out in https://raw.githubusercontent.com/Broadcom-Network-Switching-Software/OpenBCM/master/Legal/LICENSE file.
      6  * 
      7  * Copyright 2007-2019 Broadcom Inc. All rights reserved.
      8  *         
      9  *     
     10  * DO NOT EDIT THIS FILE!
     11  */
     12 
     13 #ifndef _DINO_H__H_
     14 #define _DINO_H__H_
     15 
     16 #include <phymod/phymod_definitions.h>
     17 /*Initialize phymod module*/
     18 int dino_core_identify(const phymod_core_access_t* core, uint32_t core_id, uint32_t* is_identified);
     19 
     20 /*Retrive core information*/
     21 int dino_core_info_get(const phymod_core_access_t* core, phymod_core_info_t* info);
     22 
     23 /*Reset Core*/
     24 int dino_core_reset_set(const phymod_core_access_t* core, phymod_reset_mode_t reset_mode, phymod_reset_direction_t direction);
     25 int dino_core_reset_get(const phymod_core_access_t* core, phymod_reset_mode_t reset_mode, phymod_reset_direction_t* direction);
     26 
     27 /*Retrive firmware information*/
     28 int dino_core_firmware_info_get(const phymod_core_access_t* core, phymod_core_firmware_info_t* fw_info);
     29 
     30 /*Set\get firmware operation mode*/
     31 int dino_phy_firmware_core_config_set(const phymod_phy_access_t* phy, phymod_firmware_core_config_t fw_core_config);
     32 int dino_phy_firmware_core_config_get(const phymod_phy_access_t* phy, phymod_firmware_core_config_t* fw_core_config);
     33 
     34 /*Set\get firmware operation mode*/
     35 int dino_phy_firmware_lane_config_set(const phymod_phy_access_t* phy, phymod_firmware_lane_config_t fw_lane_config);
     36 int dino_phy_firmware_lane_config_get(const phymod_phy_access_t* phy, phymod_firmware_lane_config_t* fw_lane_config);
     37 
     38 /*Start\Stop the sequencer*/
     39 int dino_core_pll_sequencer_restart(const phymod_core_access_t* core, uint32_t flags, phymod_sequencer_operation_t operation);
     40 
     41 /* re-tune rx path*/
     42 int dino_phy_rx_restart(const phymod_phy_access_t* phy);
     43 
     44 /*Set phy polarity*/
     45 int dino_phy_polarity_set(const phymod_phy_access_t* phy, const phymod_polarity_t* polarity);
     46 int dino_phy_polarity_get(const phymod_phy_access_t* phy, phymod_polarity_t* polarity);
     47 
     48 /*Set\Get TX Parameters*/
     49 int dino_phy_tx_set(const phymod_phy_access_t* phy, const phymod_tx_t* tx);
     50 int dino_phy_tx_get(const phymod_phy_access_t* phy, phymod_tx_t* tx);
     51 
     52 /*Request for default TX parameters configuration per media type*/
     53 int dino_phy_media_type_tx_get(const phymod_phy_access_t* phy, phymod_media_typed_t media, phymod_tx_t* tx);
     54 
     55 /*Set\Get RX Parameters*/
     56 int dino_phy_rx_set(const phymod_phy_access_t* phy, const phymod_rx_t* rx);
     57 int dino_phy_rx_get(const phymod_phy_access_t* phy, phymod_rx_t* rx);
     58 
     59 /*PHY Rx adaptation resume*/
     60 int dino_phy_rx_adaptation_resume(const phymod_phy_access_t* phy);
     61 
     62 /*Reset phy*/
     63 int dino_phy_reset_set(const phymod_phy_access_t* phy, const phymod_phy_reset_t* reset);
     64 int dino_phy_reset_get(const phymod_phy_access_t* phy, phymod_phy_reset_t* reset);
     65 
     66 /*Control phy power*/
     67 int dino_phy_power_set(const phymod_phy_access_t* phy, const phymod_phy_power_t* power);
     68 int dino_phy_power_get(const phymod_phy_access_t* phy, phymod_phy_power_t* power);
     69 
     70 /*TX transmission control*/
     71 int dino_phy_tx_lane_control_set(const phymod_phy_access_t* phy, phymod_phy_tx_lane_control_t tx_control);
     72 int dino_phy_tx_lane_control_get(const phymod_phy_access_t* phy, phymod_phy_tx_lane_control_t* tx_control);
     73 
     74 /*Rx control*/
     75 int dino_phy_rx_lane_control_set(const phymod_phy_access_t* phy, phymod_phy_rx_lane_control_t rx_control);
     76 int dino_phy_rx_lane_control_get(const phymod_phy_access_t* phy, phymod_phy_rx_lane_control_t* rx_control);
     77 
     78 /*forced speed FEC control*/
     79 int dino_phy_fec_enable_set(const phymod_phy_access_t* phy, uint32_t enable);
     80 int dino_phy_fec_enable_get(const phymod_phy_access_t* phy, uint32_t* enable);
     81 
     82 /*Set the interface mode, speed and other configuration related to interface.*/
     83 int dino_phy_interface_config_set(const phymod_phy_access_t* phy, uint32_t flags, const phymod_phy_inf_config_t* config);
     84 int dino_phy_interface_config_get(const phymod_phy_access_t* phy, uint32_t flags, phymod_ref_clk_t ref_clock, phymod_phy_inf_config_t* config);
     85 
     86 /*Set\Get CL72*/
     87 int dino_phy_cl72_set(const phymod_phy_access_t* phy, uint32_t cl72_en);
     88 int dino_phy_cl72_get(const phymod_phy_access_t* phy, uint32_t* cl72_en);
     89 
     90 /*Get CL72 status*/
     91 int dino_phy_cl72_status_get(const phymod_phy_access_t* phy, phymod_cl72_status_t* status);
     92 
     93 /*Set\Get autoneg*/
     94 int dino_phy_autoneg_ability_set(const phymod_phy_access_t* phy, const phymod_autoneg_ability_t* an_ability_set_type);
     95 int dino_phy_autoneg_ability_get(const phymod_phy_access_t* phy, phymod_autoneg_ability_t* an_ability_get_type);
     96 
     97 /*Get  remote link autoneg*/
     98 int dino_phy_autoneg_remote_ability_get(const phymod_phy_access_t* phy, phymod_autoneg_ability_t* an_ability_get_type);
     99 
    100 /*Set\Get autoneg*/
    101 int dino_phy_autoneg_set(const phymod_phy_access_t* phy, const phymod_autoneg_control_t* an);
    102 int dino_phy_autoneg_get(const phymod_phy_access_t* phy, phymod_autoneg_control_t* an, uint32_t* an_done);
    103 
    104 /*Core Initialization*/
    105 int dino_core_init(const phymod_core_access_t* core, const phymod_core_init_config_t* init_config, const phymod_core_status_t* core_status);
    106 
    107 /*Phy Initialization*/
    108 int dino_phy_init(const phymod_phy_access_t* phy, const phymod_phy_init_config_t* init_config);
    109 
    110 /*Set\get loopback mode*/
    111 int dino_phy_loopback_set(const phymod_phy_access_t* phy, phymod_loopback_mode_t loopback, uint32_t enable);
    112 int dino_phy_loopback_get(const phymod_phy_access_t* phy, phymod_loopback_mode_t loopback, uint32_t* enable);
    113 
    114 /*Get rx pmd locked indication*/
    115 int dino_phy_rx_pmd_locked_get(const phymod_phy_access_t* phy, uint32_t* rx_pmd_locked);
    116 
    117 /*Get link up status indication*/
    118 int dino_phy_link_status_get(const phymod_phy_access_t* phy, uint32_t* link_status);
    119 
    120 /*Get the serdes status*/
    121 int dino_phy_status_dump(const phymod_phy_access_t* phy);
    122 
    123 /*Read phymod register*/
    124 int dino_phy_reg_read(const phymod_phy_access_t* phy, uint32_t reg_addr, uint32_t* val);
    125 
    126 /*Write phymod register*/
    127 int dino_phy_reg_write(const phymod_phy_access_t* phy, uint32_t reg_addr, uint32_t val);
    128 
    129 /*Read Revision id*/
    130 int dino_phy_rev_id(const phymod_phy_access_t* phy, uint32_t* rev_id);
    131 
    132 /*Get/Set PHY interrupt enable mask*/
    133 int dino_phy_intr_enable_set(const phymod_phy_access_t* phy, uint32_t enable);
    134 int dino_phy_intr_enable_get(const phymod_phy_access_t* phy, uint32_t* enable);
    135 
    136 /*PHY interrupt status get*/
    137 int dino_phy_intr_status_get(const phymod_phy_access_t* phy, uint32_t* intr_status);
    138 
    139 /*Clear PHY interrupt status */
    140 int dino_phy_intr_status_clear(const phymod_phy_access_t* phy, uint32_t intr_clr);
    141 
    142 /*Read data from I2C device attached to PHY*/
    143 int dino_phy_i2c_read(const phymod_phy_access_t* phy, uint32_t flags, uint32_t addr, uint32_t offset, uint32_t size, uint8_t* data);
    144 
    145 /*Write data to I2C device attached to PHY*/
    146 int dino_phy_i2c_write(const phymod_phy_access_t* phy, uint32_t flags, uint32_t addr, uint32_t offset, uint32_t size, const uint8_t* data);
    147 
    148 /*Set/Get the configuration of a PHY GPIO pin*/
    149 int dino_phy_gpio_config_set(const phymod_phy_access_t* phy, int pin_no, phymod_gpio_mode_t gpio_mode);
    150 int dino_phy_gpio_config_get(const phymod_phy_access_t* phy, int pin_no, phymod_gpio_mode_t* gpio_mode);
    151 
    152 /*Set/Get the output/input value of a PHY GPIO pin*/
    153 int dino_phy_gpio_pin_value_set(const phymod_phy_access_t* phy, int pin_no, int value);
    154 int dino_phy_gpio_pin_value_get(const phymod_phy_access_t* phy, int pin_no, int* value);
    155 
    156 /*phy multi data get*/
    157 int dino_phy_multi_get(const phymod_phy_access_t* phy, phymod_multi_data_t* multi_data);
    158 
    159 /* get phy working operation mode*/
    160 int dino_phy_op_mode_get(const phymod_phy_access_t* phy, phymod_operation_mode_t* op_mode);
    161 
    162 #endif /*_DINO_H_*/