/* * Copyright (C) 2011 Realtek Semiconductor Corp. * All Rights Reserved. * * This program is the proprietary software of Realtek Semiconductor * Corporation and/or its licensors, and only be used, duplicated, * modified or distributed under the authorized license from Realtek. * * ANY USE OF THE SOFTWARE OTHER THAN AS AUTHORIZED UNDER * THIS LICENSE OR COPYRIGHT LAW IS PROHIBITED. * * $Revision: 90432 $ * $Date: 2018-07-17 15:25:08 +0800 (Tue, 17 Jul 2018) $ * * Purpose : Definition of GPON Mac API * * Feature : Provide the APIs to access GPON MAC * */ #ifndef __RTK_GPON_H__ #define __RTK_GPON_H__ /* * Include Files */ #include #include /* * GPON MAC Device Version Infomation. Read from ASIC. For Debugging */ typedef struct rtk_gpon_device_ver_s{ uint32 gmac_ver; }rtk_gpon_device_ver_t; /* * GPON MAC Driver Software Version Infomation. Read from GPON Mac Driver Software. For Debugging */ typedef struct rtk_gpon_driver_ver_s{ uint8 release; uint8 load; uint16 build; }rtk_gpon_driver_ver_t; typedef struct rtk_gpon_onu_activation_para_s{ uint32 to1_timer; /* the maximum time for ONU to wait for SN request in O3 state or ranging request in O4 state */ uint32 to2_timer; /* the maximum time for ONU to wait for a POPUP message in O6 state */ }rtk_gpon_onu_activation_para_t; typedef struct rtk_gpon_laser_para_s{ int32 laser_optic_los_en; /* whether the optical LOS input is enabled */ int32 laser_optic_los_polar; /* the optical LOS input polarity */ int32 laser_cdr_los_en; /* whether the CDR LOS input is enabled */ int32 laser_cdr_los_polar; /* the CDR LOS input polarity */ int32 laser_los_filter_en; /* whether LOS filter is enabled, if enabled, the LOS is raised after being stable for more than 1 ms */ uint8 laser_us_on; /* the optical control offset for the laser on */ uint8 laser_us_off; /* the optical control offset for the laser off */ }rtk_gpon_laser_para_t; typedef struct rtk_gpon_ds_physical_para_s { int32 ds_scramble_en; /* whether the D/S frame is scrambled */ int32 ds_fec_bypass; /* whether the D/S FEC is bypass */ uint8 ds_fec_thrd; /* the threshold for continuous FEC indicator before it is taken effect */ }rtk_gpon_ds_physical_para_t; typedef struct rtk_gpon_ds_ploam_para_s{ #if 0 /* rename ploam_crc_check to ploam_drop_crce GPON_MAC_SWIO_v1.1 */ int32 ds_ploam_crc_chk; /* whether the D/S ploam crc is checked */ #endif int32 ds_ploam_onuid_filter; /* whether the D/S ploam is filtered according to onu id */ int32 ds_ploam_broadcast_accpt; /* whether the broadcast D/S ploam is accepted */ int32 ds_ploam_drop_crc_err; /* whether the D/S ploam with CRC error is drop */ }rtk_gpon_ds_ploam_para_t; typedef struct rtk_gpon_ds_bwMap_para_s{ int32 ds_bwmap_crc_chk; /* whether the bwmap crc is checked */ int32 ds_bwmap_onuid_filter; /* whether the bwmap is filtered onu id */ int32 ds_bwmap_plend_mode; /* mode for process received PLENd */ }rtk_gpon_ds_bwMap_para_t; typedef struct rtk_gpon_ds_gem_para_s{ uint8 assemble_timer; /* number of GPON frames for assembly timeout threshold */ }rtk_gpon_ds_gem_para_t; typedef struct rtk_gpon_ds_eth_para_s{ int32 ds_eth_crc_chk; /* whether the D/S Ethernet packet fcs is checked */ #if 0 /* GEM FCB page is removed */ int32 ds_eth_crc_rm; /* whether the D/S Ethernet packet fcs is removed */ #endif uint8 ds_eth_pti_mask; /* the Ethernet flow PTI mask */ uint8 ds_eth_pti_ptn; /* the Ethernet flow PTI pattern to indicate the end of the fragment */ }rtk_gpon_ds_eth_para_t; typedef struct rtk_gpon_ds_omci_para_s{ #if 0 /* GEM FCB page is removed */ int32 ds_omci_crc_chk; /* whether the D/S OMCI crc is checked */ #endif uint8 ds_omci_pti_mask; /* the OMCI PTI mask */ uint8 ds_omci_pti_ptn; /* the OMCI PTI pattern to indicate the end of the fragment */ }rtk_gpon_ds_omci_para_t; typedef struct rtk_gpon_us_physical_para_s{ int32 us_scramble_en; /* whether the U/S burst is scrambled */ int32 us_burst_en_polar; /* the polarity of the burst enable */ int32 small_sstart_en; /* whether enable the process small SSTART(