162306a36Sopenharmony_ci/* SPDX-License-Identifier: (GPL-2.0 OR MIT) */ 262306a36Sopenharmony_ci/* 362306a36Sopenharmony_ci * Microsemi Ocelot Switch driver 462306a36Sopenharmony_ci * 562306a36Sopenharmony_ci * Copyright (c) 2017 Microsemi Corporation 662306a36Sopenharmony_ci */ 762306a36Sopenharmony_ci 862306a36Sopenharmony_ci#ifndef _MSCC_OCELOT_DEV_H_ 962306a36Sopenharmony_ci#define _MSCC_OCELOT_DEV_H_ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define DEV_CLOCK_CFG_MAC_TX_RST BIT(7) 1262306a36Sopenharmony_ci#define DEV_CLOCK_CFG_MAC_RX_RST BIT(6) 1362306a36Sopenharmony_ci#define DEV_CLOCK_CFG_PCS_TX_RST BIT(5) 1462306a36Sopenharmony_ci#define DEV_CLOCK_CFG_PCS_RX_RST BIT(4) 1562306a36Sopenharmony_ci#define DEV_CLOCK_CFG_PORT_RST BIT(3) 1662306a36Sopenharmony_ci#define DEV_CLOCK_CFG_PHY_RST BIT(2) 1762306a36Sopenharmony_ci#define DEV_CLOCK_CFG_LINK_SPEED(x) ((x) & GENMASK(1, 0)) 1862306a36Sopenharmony_ci#define DEV_CLOCK_CFG_LINK_SPEED_M GENMASK(1, 0) 1962306a36Sopenharmony_ci 2062306a36Sopenharmony_ci#define DEV_PORT_MISC_FWD_ERROR_ENA BIT(4) 2162306a36Sopenharmony_ci#define DEV_PORT_MISC_FWD_PAUSE_ENA BIT(3) 2262306a36Sopenharmony_ci#define DEV_PORT_MISC_FWD_CTRL_ENA BIT(2) 2362306a36Sopenharmony_ci#define DEV_PORT_MISC_DEV_LOOP_ENA BIT(1) 2462306a36Sopenharmony_ci#define DEV_PORT_MISC_HDX_FAST_DIS BIT(0) 2562306a36Sopenharmony_ci 2662306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_ENA BIT(22) 2762306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_AGE(x) (((x) << 15) & GENMASK(21, 15)) 2862306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_AGE_M GENMASK(21, 15) 2962306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_AGE_X(x) (((x) & GENMASK(21, 15)) >> 15) 3062306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_WAKEUP(x) (((x) << 8) & GENMASK(14, 8)) 3162306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_WAKEUP_M GENMASK(14, 8) 3262306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_WAKEUP_X(x) (((x) & GENMASK(14, 8)) >> 8) 3362306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_HOLDOFF(x) (((x) << 1) & GENMASK(7, 1)) 3462306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_HOLDOFF_M GENMASK(7, 1) 3562306a36Sopenharmony_ci#define DEV_EEE_CFG_EEE_TIMER_HOLDOFF_X(x) (((x) & GENMASK(7, 1)) >> 1) 3662306a36Sopenharmony_ci#define DEV_EEE_CFG_PORT_LPI BIT(0) 3762306a36Sopenharmony_ci 3862306a36Sopenharmony_ci#define DEV_PTP_PREDICT_CFG_PTP_PHY_PREDICT_CFG(x) (((x) << 4) & GENMASK(11, 4)) 3962306a36Sopenharmony_ci#define DEV_PTP_PREDICT_CFG_PTP_PHY_PREDICT_CFG_M GENMASK(11, 4) 4062306a36Sopenharmony_ci#define DEV_PTP_PREDICT_CFG_PTP_PHY_PREDICT_CFG_X(x) (((x) & GENMASK(11, 4)) >> 4) 4162306a36Sopenharmony_ci#define DEV_PTP_PREDICT_CFG_PTP_PHASE_PREDICT_CFG(x) ((x) & GENMASK(3, 0)) 4262306a36Sopenharmony_ci#define DEV_PTP_PREDICT_CFG_PTP_PHASE_PREDICT_CFG_M GENMASK(3, 0) 4362306a36Sopenharmony_ci 4462306a36Sopenharmony_ci#define DEV_MAC_ENA_CFG_RX_ENA BIT(4) 4562306a36Sopenharmony_ci#define DEV_MAC_ENA_CFG_TX_ENA BIT(0) 4662306a36Sopenharmony_ci 4762306a36Sopenharmony_ci#define DEV_MAC_MODE_CFG_FC_WORD_SYNC_ENA BIT(8) 4862306a36Sopenharmony_ci#define DEV_MAC_MODE_CFG_GIGA_MODE_ENA BIT(4) 4962306a36Sopenharmony_ci#define DEV_MAC_MODE_CFG_FDX_ENA BIT(0) 5062306a36Sopenharmony_ci 5162306a36Sopenharmony_ci#define DEV_MAC_TAGS_CFG_TAG_ID(x) (((x) << 16) & GENMASK(31, 16)) 5262306a36Sopenharmony_ci#define DEV_MAC_TAGS_CFG_TAG_ID_M GENMASK(31, 16) 5362306a36Sopenharmony_ci#define DEV_MAC_TAGS_CFG_TAG_ID_X(x) (((x) & GENMASK(31, 16)) >> 16) 5462306a36Sopenharmony_ci#define DEV_MAC_TAGS_CFG_VLAN_LEN_AWR_ENA BIT(2) 5562306a36Sopenharmony_ci#define DEV_MAC_TAGS_CFG_VLAN_DBL_AWR_ENA BIT(1) 5662306a36Sopenharmony_ci#define DEV_MAC_TAGS_CFG_VLAN_AWR_ENA BIT(0) 5762306a36Sopenharmony_ci 5862306a36Sopenharmony_ci#define DEV_MAC_ADV_CHK_CFG_LEN_DROP_ENA BIT(0) 5962306a36Sopenharmony_ci 6062306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_RESTORE_OLD_IPG_CHECK BIT(17) 6162306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_REDUCED_TX_IFG BIT(16) 6262306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_TX_IFG(x) (((x) << 8) & GENMASK(12, 8)) 6362306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_TX_IFG_M GENMASK(12, 8) 6462306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_TX_IFG_X(x) (((x) & GENMASK(12, 8)) >> 8) 6562306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_RX_IFG2(x) (((x) << 4) & GENMASK(7, 4)) 6662306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_RX_IFG2_M GENMASK(7, 4) 6762306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_RX_IFG2_X(x) (((x) & GENMASK(7, 4)) >> 4) 6862306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_RX_IFG1(x) ((x) & GENMASK(3, 0)) 6962306a36Sopenharmony_ci#define DEV_MAC_IFG_CFG_RX_IFG1_M GENMASK(3, 0) 7062306a36Sopenharmony_ci 7162306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_BYPASS_COL_SYNC BIT(26) 7262306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_OB_ENA BIT(25) 7362306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_WEXC_DIS BIT(24) 7462306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_SEED(x) (((x) << 16) & GENMASK(23, 16)) 7562306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_SEED_M GENMASK(23, 16) 7662306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_SEED_X(x) (((x) & GENMASK(23, 16)) >> 16) 7762306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_SEED_LOAD BIT(12) 7862306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_RETRY_AFTER_EXC_COL_ENA BIT(8) 7962306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_LATE_COL_POS(x) ((x) & GENMASK(6, 0)) 8062306a36Sopenharmony_ci#define DEV_MAC_HDX_CFG_LATE_COL_POS_M GENMASK(6, 0) 8162306a36Sopenharmony_ci 8262306a36Sopenharmony_ci#define DEV_MAC_DBG_CFG_TBI_MODE BIT(4) 8362306a36Sopenharmony_ci#define DEV_MAC_DBG_CFG_IFG_CRS_EXT_CHK_ENA BIT(0) 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#define DEV_MAC_STICKY_RX_IPG_SHRINK_STICKY BIT(9) 8662306a36Sopenharmony_ci#define DEV_MAC_STICKY_RX_PREAM_SHRINK_STICKY BIT(8) 8762306a36Sopenharmony_ci#define DEV_MAC_STICKY_RX_CARRIER_EXT_STICKY BIT(7) 8862306a36Sopenharmony_ci#define DEV_MAC_STICKY_RX_CARRIER_EXT_ERR_STICKY BIT(6) 8962306a36Sopenharmony_ci#define DEV_MAC_STICKY_RX_JUNK_STICKY BIT(5) 9062306a36Sopenharmony_ci#define DEV_MAC_STICKY_TX_RETRANSMIT_STICKY BIT(4) 9162306a36Sopenharmony_ci#define DEV_MAC_STICKY_TX_JAM_STICKY BIT(3) 9262306a36Sopenharmony_ci#define DEV_MAC_STICKY_TX_FIFO_OFLW_STICKY BIT(2) 9362306a36Sopenharmony_ci#define DEV_MAC_STICKY_TX_FRM_LEN_OVR_STICKY BIT(1) 9462306a36Sopenharmony_ci#define DEV_MAC_STICKY_TX_ABORT_STICKY BIT(0) 9562306a36Sopenharmony_ci 9662306a36Sopenharmony_ci#define DEV_MM_CONFIG_ENABLE_CONFIG_MM_RX_ENA BIT(0) 9762306a36Sopenharmony_ci#define DEV_MM_CONFIG_ENABLE_CONFIG_MM_TX_ENA BIT(4) 9862306a36Sopenharmony_ci#define DEV_MM_CONFIG_ENABLE_CONFIG_KEEP_S_AFTER_D BIT(8) 9962306a36Sopenharmony_ci 10062306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_PRM_VERIFY_DIS BIT(0) 10162306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_PRM_VERIFY_TIME(x) (((x) << 4) & GENMASK(11, 4)) 10262306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_PRM_VERIFY_TIME_M GENMASK(11, 4) 10362306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_PRM_VERIFY_TIME_X(x) (((x) & GENMASK(11, 4)) >> 4) 10462306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_VERIF_TIMER_UNITS(x) (((x) << 12) & GENMASK(13, 12)) 10562306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_VERIF_TIMER_UNITS_M GENMASK(13, 12) 10662306a36Sopenharmony_ci#define DEV_MM_CONFIG_VERIF_CONFIG_VERIF_TIMER_UNITS_X(x) (((x) & GENMASK(13, 12)) >> 12) 10762306a36Sopenharmony_ci 10862306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_PRMPT_ACTIVE_STATUS BIT(0) 10962306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_PRMPT_ACTIVE_STICKY BIT(4) 11062306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_PRMPT_VERIFY_STATE(x) (((x) << 8) & GENMASK(10, 8)) 11162306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_PRMPT_VERIFY_STATE_M GENMASK(10, 8) 11262306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_PRMPT_VERIFY_STATE_X(x) (((x) & GENMASK(10, 8)) >> 8) 11362306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_UNEXP_RX_PFRM_STICKY BIT(12) 11462306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_UNEXP_TX_PFRM_STICKY BIT(16) 11562306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_MM_RX_FRAME_STATUS BIT(20) 11662306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_MM_TX_FRAME_STATUS BIT(24) 11762306a36Sopenharmony_ci#define DEV_MM_STAT_MM_STATUS_MM_TX_PRMPT_STATUS BIT(28) 11862306a36Sopenharmony_ci 11962306a36Sopenharmony_ci#define PCS1G_CFG_LINK_STATUS_TYPE BIT(4) 12062306a36Sopenharmony_ci#define PCS1G_CFG_AN_LINK_CTRL_ENA BIT(1) 12162306a36Sopenharmony_ci#define PCS1G_CFG_PCS_ENA BIT(0) 12262306a36Sopenharmony_ci 12362306a36Sopenharmony_ci#define PCS1G_MODE_CFG_UNIDIR_MODE_ENA BIT(4) 12462306a36Sopenharmony_ci#define PCS1G_MODE_CFG_SGMII_MODE_ENA BIT(0) 12562306a36Sopenharmony_ci 12662306a36Sopenharmony_ci#define PCS1G_SD_CFG_SD_SEL BIT(8) 12762306a36Sopenharmony_ci#define PCS1G_SD_CFG_SD_POL BIT(4) 12862306a36Sopenharmony_ci#define PCS1G_SD_CFG_SD_ENA BIT(0) 12962306a36Sopenharmony_ci 13062306a36Sopenharmony_ci#define PCS1G_ANEG_CFG_ADV_ABILITY(x) (((x) << 16) & GENMASK(31, 16)) 13162306a36Sopenharmony_ci#define PCS1G_ANEG_CFG_ADV_ABILITY_M GENMASK(31, 16) 13262306a36Sopenharmony_ci#define PCS1G_ANEG_CFG_ADV_ABILITY_X(x) (((x) & GENMASK(31, 16)) >> 16) 13362306a36Sopenharmony_ci#define PCS1G_ANEG_CFG_SW_RESOLVE_ENA BIT(8) 13462306a36Sopenharmony_ci#define PCS1G_ANEG_CFG_ANEG_RESTART_ONE_SHOT BIT(1) 13562306a36Sopenharmony_ci#define PCS1G_ANEG_CFG_ANEG_ENA BIT(0) 13662306a36Sopenharmony_ci 13762306a36Sopenharmony_ci#define PCS1G_ANEG_NP_CFG_NP_TX(x) (((x) << 16) & GENMASK(31, 16)) 13862306a36Sopenharmony_ci#define PCS1G_ANEG_NP_CFG_NP_TX_M GENMASK(31, 16) 13962306a36Sopenharmony_ci#define PCS1G_ANEG_NP_CFG_NP_TX_X(x) (((x) & GENMASK(31, 16)) >> 16) 14062306a36Sopenharmony_ci#define PCS1G_ANEG_NP_CFG_NP_LOADED_ONE_SHOT BIT(0) 14162306a36Sopenharmony_ci 14262306a36Sopenharmony_ci#define PCS1G_LB_CFG_RA_ENA BIT(4) 14362306a36Sopenharmony_ci#define PCS1G_LB_CFG_GMII_PHY_LB_ENA BIT(1) 14462306a36Sopenharmony_ci#define PCS1G_LB_CFG_TBI_HOST_LB_ENA BIT(0) 14562306a36Sopenharmony_ci 14662306a36Sopenharmony_ci#define PCS1G_DBG_CFG_UDLT BIT(0) 14762306a36Sopenharmony_ci 14862306a36Sopenharmony_ci#define PCS1G_CDET_CFG_CDET_ENA BIT(0) 14962306a36Sopenharmony_ci 15062306a36Sopenharmony_ci#define PCS1G_ANEG_STATUS_LP_ADV_ABILITY(x) (((x) << 16) & GENMASK(31, 16)) 15162306a36Sopenharmony_ci#define PCS1G_ANEG_STATUS_LP_ADV_ABILITY_M GENMASK(31, 16) 15262306a36Sopenharmony_ci#define PCS1G_ANEG_STATUS_LP_ADV_ABILITY_X(x) (((x) & GENMASK(31, 16)) >> 16) 15362306a36Sopenharmony_ci#define PCS1G_ANEG_STATUS_PR BIT(4) 15462306a36Sopenharmony_ci#define PCS1G_ANEG_STATUS_PAGE_RX_STICKY BIT(3) 15562306a36Sopenharmony_ci#define PCS1G_ANEG_STATUS_ANEG_COMPLETE BIT(0) 15662306a36Sopenharmony_ci 15762306a36Sopenharmony_ci#define PCS1G_LINK_STATUS_DELAY_VAR(x) (((x) << 12) & GENMASK(15, 12)) 15862306a36Sopenharmony_ci#define PCS1G_LINK_STATUS_DELAY_VAR_M GENMASK(15, 12) 15962306a36Sopenharmony_ci#define PCS1G_LINK_STATUS_DELAY_VAR_X(x) (((x) & GENMASK(15, 12)) >> 12) 16062306a36Sopenharmony_ci#define PCS1G_LINK_STATUS_SIGNAL_DETECT BIT(8) 16162306a36Sopenharmony_ci#define PCS1G_LINK_STATUS_LINK_STATUS BIT(4) 16262306a36Sopenharmony_ci#define PCS1G_LINK_STATUS_SYNC_STATUS BIT(0) 16362306a36Sopenharmony_ci 16462306a36Sopenharmony_ci#define PCS1G_STICKY_LINK_DOWN_STICKY BIT(4) 16562306a36Sopenharmony_ci#define PCS1G_STICKY_OUT_OF_SYNC_STICKY BIT(0) 16662306a36Sopenharmony_ci 16762306a36Sopenharmony_ci#define PCS1G_LPI_CFG_QSGMII_MS_SEL BIT(20) 16862306a36Sopenharmony_ci#define PCS1G_LPI_CFG_RX_LPI_OUT_DIS BIT(17) 16962306a36Sopenharmony_ci#define PCS1G_LPI_CFG_LPI_TESTMODE BIT(16) 17062306a36Sopenharmony_ci#define PCS1G_LPI_CFG_LPI_RX_WTIM(x) (((x) << 4) & GENMASK(5, 4)) 17162306a36Sopenharmony_ci#define PCS1G_LPI_CFG_LPI_RX_WTIM_M GENMASK(5, 4) 17262306a36Sopenharmony_ci#define PCS1G_LPI_CFG_LPI_RX_WTIM_X(x) (((x) & GENMASK(5, 4)) >> 4) 17362306a36Sopenharmony_ci#define PCS1G_LPI_CFG_TX_ASSERT_LPIDLE BIT(0) 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_RX_LPI_FAIL BIT(16) 17662306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_RX_LPI_EVENT_STICKY BIT(12) 17762306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_RX_QUIET BIT(9) 17862306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_RX_LPI_MODE BIT(8) 17962306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_TX_LPI_EVENT_STICKY BIT(4) 18062306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_TX_QUIET BIT(1) 18162306a36Sopenharmony_ci#define PCS1G_LPI_STATUS_TX_LPI_MODE BIT(0) 18262306a36Sopenharmony_ci 18362306a36Sopenharmony_ci#define PCS1G_TSTPAT_STATUS_JTP_ERR_CNT(x) (((x) << 8) & GENMASK(15, 8)) 18462306a36Sopenharmony_ci#define PCS1G_TSTPAT_STATUS_JTP_ERR_CNT_M GENMASK(15, 8) 18562306a36Sopenharmony_ci#define PCS1G_TSTPAT_STATUS_JTP_ERR_CNT_X(x) (((x) & GENMASK(15, 8)) >> 8) 18662306a36Sopenharmony_ci#define PCS1G_TSTPAT_STATUS_JTP_ERR BIT(4) 18762306a36Sopenharmony_ci#define PCS1G_TSTPAT_STATUS_JTP_LOCK BIT(0) 18862306a36Sopenharmony_ci 18962306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SD_SEL BIT(26) 19062306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SD_POL BIT(25) 19162306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SD_ENA BIT(24) 19262306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_LOOPBACK_ENA BIT(20) 19362306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SWAP_MII_ENA BIT(16) 19462306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_RXBITSEL(x) (((x) << 12) & GENMASK(15, 12)) 19562306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_RXBITSEL_M GENMASK(15, 12) 19662306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_RXBITSEL_X(x) (((x) & GENMASK(15, 12)) >> 12) 19762306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SIGDET_CFG(x) (((x) << 9) & GENMASK(10, 9)) 19862306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SIGDET_CFG_M GENMASK(10, 9) 19962306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_SIGDET_CFG_X(x) (((x) & GENMASK(10, 9)) >> 9) 20062306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_LINKHYST_TM_ENA BIT(8) 20162306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_LINKHYSTTIMER(x) (((x) << 4) & GENMASK(7, 4)) 20262306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_LINKHYSTTIMER_M GENMASK(7, 4) 20362306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_LINKHYSTTIMER_X(x) (((x) & GENMASK(7, 4)) >> 4) 20462306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_UNIDIR_MODE_ENA BIT(3) 20562306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_FEFCHK_ENA BIT(2) 20662306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_FEFGEN_ENA BIT(1) 20762306a36Sopenharmony_ci#define DEV_PCS_FX100_CFG_PCS_ENA BIT(0) 20862306a36Sopenharmony_ci 20962306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_EDGE_POS_PTP(x) (((x) << 8) & GENMASK(11, 8)) 21062306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_EDGE_POS_PTP_M GENMASK(11, 8) 21162306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_EDGE_POS_PTP_X(x) (((x) & GENMASK(11, 8)) >> 8) 21262306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_PCS_ERROR_STICKY BIT(7) 21362306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_FEF_FOUND_STICKY BIT(6) 21462306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_SSD_ERROR_STICKY BIT(5) 21562306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_SYNC_LOST_STICKY BIT(4) 21662306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_FEF_STATUS BIT(2) 21762306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_SIGNAL_DETECT BIT(1) 21862306a36Sopenharmony_ci#define DEV_PCS_FX100_STATUS_SYNC_STATUS BIT(0) 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_ci#endif 221