enum ice_eth56g_link_spd {
ICE_ETH56G_LNK_SPD_1G,
ICE_ETH56G_LNK_SPD_2_5G,
ICE_ETH56G_LNK_SPD_10G,
ICE_ETH56G_LNK_SPD_25G,
ICE_ETH56G_LNK_SPD_40G,
ICE_ETH56G_LNK_SPD_50G,
ICE_ETH56G_LNK_SPD_50G2,
ICE_ETH56G_LNK_SPD_100G,
ICE_ETH56G_LNK_SPD_100G2,
NUM_ICE_ETH56G_LNK_SPD /* Must be last */
};
/** * struct ice_phy_reg_info_eth56g - ETH56G PHY register parameters * @base_addr: base address for each PHY block * @step: step between PHY lanes * * Characteristic information for the various PHY register parameters in the * ETH56G devices
*/ struct ice_phy_reg_info_eth56g {
u32 base_addr;
u32 step;
};
/** * struct ice_time_ref_info_e82x * @pll_freq: Frequency of PLL that drives timer ticks in Hz * @nominal_incval: increment to generate nanoseconds in GLTSYN_TIME_L * * Characteristic information for the various TIME_REF sources possible in the * E822 devices
*/ struct ice_time_ref_info_e82x {
u64 pll_freq;
u64 nominal_incval;
};
/** * struct ice_vernier_info_e82x * @tx_par_clk: Frequency used to calculate P_REG_PAR_TX_TUS * @rx_par_clk: Frequency used to calculate P_REG_PAR_RX_TUS * @tx_pcs_clk: Frequency used to calculate P_REG_PCS_TX_TUS * @rx_pcs_clk: Frequency used to calculate P_REG_PCS_RX_TUS * @tx_desk_rsgb_par: Frequency used to calculate P_REG_DESK_PAR_TX_TUS * @rx_desk_rsgb_par: Frequency used to calculate P_REG_DESK_PAR_RX_TUS * @tx_desk_rsgb_pcs: Frequency used to calculate P_REG_DESK_PCS_TX_TUS * @rx_desk_rsgb_pcs: Frequency used to calculate P_REG_DESK_PCS_RX_TUS * @tx_fixed_delay: Fixed Tx latency measured in 1/100th nanoseconds * @pmd_adj_divisor: Divisor used to calculate PDM alignment adjustment * @rx_fixed_delay: Fixed Rx latency measured in 1/100th nanoseconds * * Table of constants used during as part of the Vernier calibration of the Tx * and Rx timestamps. This includes frequency values used to compute TUs per * PAR/PCS clock cycle, and static delay values measured during hardware * design. * * Note that some values are not used for all link speeds, and the * P_REG_DESK_PAR* registers may represent different clock markers at * different link speeds, either the deskew marker for multi-lane link speeds * or the Reed Solomon gearbox marker for RS-FEC.
*/ struct ice_vernier_info_e82x {
u32 tx_par_clk;
u32 rx_par_clk;
u32 tx_pcs_clk;
u32 rx_pcs_clk;
u32 tx_desk_rsgb_par;
u32 rx_desk_rsgb_par;
u32 tx_desk_rsgb_pcs;
u32 rx_desk_rsgb_pcs;
u32 tx_fixed_delay;
u32 pmd_adj_divisor;
u32 rx_fixed_delay;
};
#define ICE_ETH56G_MAC_CFG_RX_OFFSET_INT GENMASK(19, 9) #define ICE_ETH56G_MAC_CFG_RX_OFFSET_FRAC GENMASK(8, 0) #define ICE_ETH56G_MAC_CFG_FRAC_W 9 /** * struct ice_eth56g_mac_reg_cfg - MAC config values for specific PTP registers * @tx_mode: Tx timestamp compensation mode * @tx_mk_dly: Tx timestamp marker start strobe delay * @tx_cw_dly: Tx timestamp codeword start strobe delay * @rx_mode: Rx timestamp compensation mode * @rx_mk_dly: Rx timestamp marker start strobe delay * @rx_cw_dly: Rx timestamp codeword start strobe delay * @blks_per_clk: number of blocks transferred per clock cycle * @blktime: block time, fixed point * @mktime: marker time, fixed point * @tx_offset: total Tx offset, fixed point * @rx_offset: total Rx offset, contains value for bitslip/deskew, fixed point * * All fixed point registers except Rx offset are 23 bit unsigned ints with * a 9 bit fractional. * Rx offset is 11 bit unsigned int with a 9 bit fractional.
*/ struct ice_eth56g_mac_reg_cfg { struct {
u8 def;
u8 rs;
} tx_mode;
u8 tx_mk_dly; struct {
u8 def;
u8 onestep;
} tx_cw_dly; struct {
u8 def;
u8 rs;
} rx_mode; struct {
u8 def;
u8 rs;
} rx_mk_dly; struct {
u8 def;
u8 rs;
} rx_cw_dly;
u8 blks_per_clk;
u16 blktime;
u16 mktime; struct {
u32 serdes;
u32 no_fec;
u32 fc;
u32 rs;
u32 sfd;
u32 onestep;
} tx_offset; struct {
u32 serdes;
u32 no_fec;
u32 fc;
u32 rs;
u32 sfd;
u32 bs_ds;
} rx_offset;
};
/* Table of constants related to possible ETH56G PHY resources */ externconststruct ice_phy_reg_info_eth56g eth56g_phy_res[NUM_ETH56G_PHY_RES];
/* Table of constants related to possible TIME_REF sources */ externconststruct ice_time_ref_info_e82x e82x_time_ref[NUM_ICE_TSPLL_FREQ];
/* Table of constants for Vernier calibration on E822 */ externconststruct ice_vernier_info_e82x e822_vernier[NUM_ICE_PTP_LNK_SPD];
/* Increment value to generate nanoseconds in the GLTSYN_TIME_L register for * the E810 devices. Based off of a PLL with an 812.5 MHz frequency.
*/ #define ICE_E810_PLL_FREQ 812500000 #define ICE_PTP_NOMINAL_INCVAL_E810 0x13b13b13bULL #define ICE_E810_E830_SYNC_DELAY 0
/* Device agnostic functions */
u8 ice_get_ptp_src_clock_index(struct ice_hw *hw); bool ice_ptp_lock(struct ice_hw *hw); void ice_ptp_unlock(struct ice_hw *hw); void ice_ptp_src_cmd(struct ice_hw *hw, enum ice_ptp_tmr_cmd cmd); int ice_ptp_init_time(struct ice_hw *hw, u64 time); int ice_ptp_write_incval(struct ice_hw *hw, u64 incval); int ice_ptp_write_incval_locked(struct ice_hw *hw, u64 incval); int ice_ptp_adj_clock(struct ice_hw *hw, s32 adj); int ice_ptp_clear_phy_offset_ready_e82x(struct ice_hw *hw); int ice_read_phy_tstamp(struct ice_hw *hw, u8 block, u8 idx, u64 *tstamp); int ice_clear_phy_tstamp(struct ice_hw *hw, u8 block, u8 idx); void ice_ptp_reset_ts_memory(struct ice_hw *hw); int ice_ptp_init_phc(struct ice_hw *hw); void ice_ptp_init_hw(struct ice_hw *hw); int ice_get_phy_tx_tstamp_ready(struct ice_hw *hw, u8 block, u64 *tstamp_ready); int ice_ptp_one_port_cmd(struct ice_hw *hw, u8 configured_port, enum ice_ptp_tmr_cmd configured_cmd);
/** * ice_e82x_time_ref - Get the current TIME_REF from capabilities * @hw: pointer to the HW structure * * Returns the current TIME_REF from the capabilities structure.
*/
/** * ice_set_e82x_time_ref - Set new TIME_REF * @hw: pointer to the HW structure * @time_ref: new TIME_REF to set * * Update the TIME_REF in the capabilities structure in response to some * change, such as an update to the CGU registers.
*/ staticinlinevoid
ice_set_e82x_time_ref(struct ice_hw *hw, enum ice_tspll_freq time_ref)
{
hw->func_caps.ts_func_info.time_ref = time_ref;
}
/** * ice_get_base_incval - Get base clock increment value * @hw: pointer to the HW struct * * Return: base clock increment value for supported PHYs, 0 otherwise
*/ staticinline u64 ice_get_base_incval(struct ice_hw *hw)
{ switch (hw->mac_type) { case ICE_MAC_E810: case ICE_MAC_E830: return ICE_PTP_NOMINAL_INCVAL_E810; case ICE_MAC_GENERIC: return ice_e82x_nominal_incval(ice_e82x_time_ref(hw)); case ICE_MAC_GENERIC_3K_E825: return ICE_ETH56G_NOMINAL_INCVAL; default: return 0;
}
}
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.