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_HSIO_H_ 962306a36Sopenharmony_ci#define _MSCC_OCELOT_HSIO_H_ 1062306a36Sopenharmony_ci 1162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0 0x0000 1262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1 0x0004 1362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2 0x0008 1462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3 0x000c 1562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG4 0x0010 1662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG5 0x0014 1762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6 0x0018 1862306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0 0x001c 1962306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1 0x0020 2062306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0 0x0024 2162306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG1 0x0028 2262306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG2 0x002c 2362306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0 0x0030 2462306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT1 0x0034 2562306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0 0x0038 2662306a36Sopenharmony_ci#define HSIO_RCOMP_STATUS 0x003c 2762306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG 0x0040 2862306a36Sopenharmony_ci#define HSIO_SYNC_ETH_PLL_CFG 0x0048 2962306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG 0x004c 3062306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG 0x0050 3162306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG 0x0054 3262306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG 0x0058 3362306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG 0x005c 3462306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG 0x0060 3562306a36Sopenharmony_ci#define HSIO_S1G_PLL_STATUS 0x0064 3662306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0 0x0068 3762306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1 0x006c 3862306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2 0x0070 3962306a36Sopenharmony_ci#define HSIO_S1G_TP_CFG 0x0074 4062306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG 0x0078 4162306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG 0x007c 4262306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS 0x0080 4362306a36Sopenharmony_ci#define HSIO_S1G_MISC_STATUS 0x0084 4462306a36Sopenharmony_ci#define HSIO_MCB_S1G_ADDR_CFG 0x0088 4562306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG 0x008c 4662306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0 0x0090 4762306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1 0x0094 4862306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2 0x0098 4962306a36Sopenharmony_ci#define HSIO_S6G_TP_CFG0 0x009c 5062306a36Sopenharmony_ci#define HSIO_S6G_TP_CFG1 0x00a0 5162306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG 0x00a4 5262306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG 0x00a8 5362306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG 0x00ac 5462306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS 0x00b0 5562306a36Sopenharmony_ci#define HSIO_S6G_ERR_CNT 0x00b4 5662306a36Sopenharmony_ci#define HSIO_S6G_MISC_STATUS 0x00b8 5762306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG 0x00bc 5862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG 0x00c0 5962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1 0x00c4 6062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2 0x00c8 6162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3 0x00cc 6262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4 0x00d0 6362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5 0x00d4 6462306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG 0x00d8 6562306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG1 0x00dc 6662306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG 0x00e0 6762306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG 0x00e4 6862306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG 0x00e8 6962306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG 0x00ec 7062306a36Sopenharmony_ci#define HSIO_S6G_GP_CFG 0x00f0 7162306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0 0x00f4 7262306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1 0x00f8 7362306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_STATUS 0x00fc 7462306a36Sopenharmony_ci#define HSIO_S6G_PLL_STATUS 0x0100 7562306a36Sopenharmony_ci#define HSIO_S6G_REVID 0x0104 7662306a36Sopenharmony_ci#define HSIO_MCB_S6G_ADDR_CFG 0x0108 7762306a36Sopenharmony_ci#define HSIO_HW_CFG 0x010c 7862306a36Sopenharmony_ci#define HSIO_HW_QSGMII_CFG 0x0110 7962306a36Sopenharmony_ci#define HSIO_HW_QSGMII_STAT 0x0114 8062306a36Sopenharmony_ci#define HSIO_CLK_CFG 0x0118 8162306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL 0x011c 8262306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CFG 0x0120 8362306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_STAT 0x0124 8462306a36Sopenharmony_ci 8562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_ROT BIT(31) 8662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_LANE BIT(30) 8762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_CLKTREE BIT(29) 8862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_DIV4 BIT(28) 8962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_LOCK_FINE BIT(27) 9062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_SELBGV820(x) (((x) << 23) & GENMASK(26, 23)) 9162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_SELBGV820_M GENMASK(26, 23) 9262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_SELBGV820_X(x) (((x) & GENMASK(26, 23)) >> 23) 9362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_LOOP_BW_RES(x) (((x) << 18) & GENMASK(22, 18)) 9462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_LOOP_BW_RES_M GENMASK(22, 18) 9562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_LOOP_BW_RES_X(x) (((x) & GENMASK(22, 18)) >> 18) 9662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_SELCPI(x) (((x) << 16) & GENMASK(17, 16)) 9762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_SELCPI_M GENMASK(17, 16) 9862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_SELCPI_X(x) (((x) & GENMASK(17, 16)) >> 16) 9962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_VCO_CONTRH BIT(15) 10062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_CP1 BIT(14) 10162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_VCO_BUF BIT(13) 10262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_ENA_BIAS BIT(12) 10362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_CPU_CLK_DIV(x) (((x) << 6) & GENMASK(11, 6)) 10462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_CPU_CLK_DIV_M GENMASK(11, 6) 10562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_CPU_CLK_DIV_X(x) (((x) & GENMASK(11, 6)) >> 6) 10662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_CORE_CLK_DIV(x) ((x) & GENMASK(5, 0)) 10762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG0_CORE_CLK_DIV_M GENMASK(5, 0) 10862306a36Sopenharmony_ci 10962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_ENA_DIRECT BIT(18) 11062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_ROT_SPEED BIT(17) 11162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_ROT_DIR BIT(16) 11262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_READBACK_DATA_SEL BIT(15) 11362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_RC_ENABLE BIT(14) 11462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_RC_CTRL_DATA(x) (((x) << 6) & GENMASK(13, 6)) 11562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_RC_CTRL_DATA_M GENMASK(13, 6) 11662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_RC_CTRL_DATA_X(x) (((x) & GENMASK(13, 6)) >> 6) 11762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_QUARTER_RATE BIT(5) 11862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_PWD_TX BIT(4) 11962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_PWD_RX BIT(3) 12062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_OUT_OF_RANGE_RECAL_ENA BIT(2) 12162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_HALF_RATE BIT(1) 12262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG1_FORCE_SET_ENA BIT(0) 12362306a36Sopenharmony_ci 12462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_TEST_MODE BIT(30) 12562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_PFD_IN_FLIP BIT(29) 12662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_VCO_NREF_TESTOUT BIT(28) 12762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_FBTESTOUT BIT(27) 12862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_RCPLL BIT(26) 12962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_CP2 BIT(25) 13062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_CLK_BYPASS1 BIT(24) 13162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_AMPC_SEL(x) (((x) << 16) & GENMASK(23, 16)) 13262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_AMPC_SEL_M GENMASK(23, 16) 13362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_AMPC_SEL_X(x) (((x) & GENMASK(23, 16)) >> 16) 13462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_CLK_BYPASS BIT(15) 13562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_PWD_AMPCTRL_N BIT(14) 13662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_AMPCTRL BIT(13) 13762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_AMP_CTRL_FORCE BIT(12) 13862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_FRC_FSM_POR BIT(11) 13962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_DISABLE_FSM_POR BIT(10) 14062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_GAIN_TEST(x) (((x) << 5) & GENMASK(9, 5)) 14162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_GAIN_TEST_M GENMASK(9, 5) 14262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_GAIN_TEST_X(x) (((x) & GENMASK(9, 5)) >> 5) 14362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_EN_RESET_OVERRUN BIT(4) 14462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_EN_RESET_LIM_DET BIT(3) 14562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_EN_RESET_FRQ_DET BIT(2) 14662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_DISABLE_FSM BIT(1) 14762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG2_ENA_GAIN_TEST BIT(0) 14862306a36Sopenharmony_ci 14962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_TEST_ANA_OUT_SEL(x) (((x) << 22) & GENMASK(23, 22)) 15062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_TEST_ANA_OUT_SEL_M GENMASK(23, 22) 15162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_TEST_ANA_OUT_SEL_X(x) (((x) & GENMASK(23, 22)) >> 22) 15262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_TESTOUT_SEL(x) (((x) << 19) & GENMASK(21, 19)) 15362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_TESTOUT_SEL_M GENMASK(21, 19) 15462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_TESTOUT_SEL_X(x) (((x) & GENMASK(21, 19)) >> 19) 15562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_ENA_ANA_TEST_OUT BIT(18) 15662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_ENA_TEST_OUT BIT(17) 15762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_SEL_FBDCLK BIT(16) 15862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_SEL_CML_CMOS_PFD BIT(15) 15962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_RST_FB_N BIT(14) 16062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FORCE_VCO_CONTRH BIT(13) 16162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FORCE_LO BIT(12) 16262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FORCE_HI BIT(11) 16362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FORCE_ENA BIT(10) 16462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FORCE_CP BIT(9) 16562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FBDIVSEL_TST_ENA BIT(8) 16662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FBDIVSEL(x) ((x) & GENMASK(7, 0)) 16762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG3_FBDIVSEL_M GENMASK(7, 0) 16862306a36Sopenharmony_ci 16962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG4_IB_BIAS_CTRL(x) (((x) << 16) & GENMASK(23, 16)) 17062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG4_IB_BIAS_CTRL_M GENMASK(23, 16) 17162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG4_IB_BIAS_CTRL_X(x) (((x) & GENMASK(23, 16)) >> 16) 17262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG4_IB_CTRL(x) ((x) & GENMASK(15, 0)) 17362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG4_IB_CTRL_M GENMASK(15, 0) 17462306a36Sopenharmony_ci 17562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG5_OB_BIAS_CTRL(x) (((x) << 16) & GENMASK(23, 16)) 17662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG5_OB_BIAS_CTRL_M GENMASK(23, 16) 17762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG5_OB_BIAS_CTRL_X(x) (((x) & GENMASK(23, 16)) >> 16) 17862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG5_OB_CTRL(x) ((x) & GENMASK(15, 0)) 17962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG5_OB_CTRL_M GENMASK(15, 0) 18062306a36Sopenharmony_ci 18162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_REFCLK_SEL_SRC BIT(23) 18262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_REFCLK_SEL(x) (((x) << 20) & GENMASK(22, 20)) 18362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_REFCLK_SEL_M GENMASK(22, 20) 18462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_REFCLK_SEL_X(x) (((x) & GENMASK(22, 20)) >> 20) 18562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_REFCLK_SRC BIT(19) 18662306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_POR_DEL_SEL(x) (((x) << 16) & GENMASK(17, 16)) 18762306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_POR_DEL_SEL_M GENMASK(17, 16) 18862306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_POR_DEL_SEL_X(x) (((x) & GENMASK(17, 16)) >> 16) 18962306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_DIV125REF_SEL(x) (((x) << 8) & GENMASK(15, 8)) 19062306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_DIV125REF_SEL_M GENMASK(15, 8) 19162306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_DIV125REF_SEL_X(x) (((x) & GENMASK(15, 8)) >> 8) 19262306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_ENA_REFCLKC2 BIT(7) 19362306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_ENA_FBCLKC2 BIT(6) 19462306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_DDR_CLK_DIV(x) ((x) & GENMASK(5, 0)) 19562306a36Sopenharmony_ci#define HSIO_PLL5G_CFG6_DDR_CLK_DIV_M GENMASK(5, 0) 19662306a36Sopenharmony_ci 19762306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_RANGE_LIM BIT(12) 19862306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_OUT_OF_RANGE_ERR BIT(11) 19962306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_CALIBRATION_ERR BIT(10) 20062306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_CALIBRATION_DONE BIT(9) 20162306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_READBACK_DATA(x) (((x) << 1) & GENMASK(8, 1)) 20262306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_READBACK_DATA_M GENMASK(8, 1) 20362306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_READBACK_DATA_X(x) (((x) & GENMASK(8, 1)) >> 1) 20462306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS0_LOCK_STATUS BIT(0) 20562306a36Sopenharmony_ci 20662306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_SIG_DEL(x) (((x) << 21) & GENMASK(28, 21)) 20762306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_SIG_DEL_M GENMASK(28, 21) 20862306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_SIG_DEL_X(x) (((x) & GENMASK(28, 21)) >> 21) 20962306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_GAIN_STAT(x) (((x) << 16) & GENMASK(20, 16)) 21062306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_GAIN_STAT_M GENMASK(20, 16) 21162306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_GAIN_STAT_X(x) (((x) & GENMASK(20, 16)) >> 16) 21262306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FBCNT_DIF(x) (((x) << 4) & GENMASK(13, 4)) 21362306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FBCNT_DIF_M GENMASK(13, 4) 21462306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FBCNT_DIF_X(x) (((x) & GENMASK(13, 4)) >> 4) 21562306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FSM_STAT(x) (((x) << 1) & GENMASK(3, 1)) 21662306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FSM_STAT_M GENMASK(3, 1) 21762306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FSM_STAT_X(x) (((x) & GENMASK(3, 1)) >> 1) 21862306a36Sopenharmony_ci#define HSIO_PLL5G_STATUS1_FSM_LOCK BIT(0) 21962306a36Sopenharmony_ci 22062306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_START_BIST BIT(31) 22162306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_MEAS_MODE BIT(30) 22262306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_REPEAT(x) (((x) << 20) & GENMASK(23, 20)) 22362306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_REPEAT_M GENMASK(23, 20) 22462306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_REPEAT_X(x) (((x) & GENMASK(23, 20)) >> 20) 22562306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_UNCERT(x) (((x) << 16) & GENMASK(19, 16)) 22662306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_UNCERT_M GENMASK(19, 16) 22762306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_LOCK_UNCERT_X(x) (((x) & GENMASK(19, 16)) >> 16) 22862306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_DIV_FACTOR_PRE(x) ((x) & GENMASK(15, 0)) 22962306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_CFG0_PLLB_DIV_FACTOR_PRE_M GENMASK(15, 0) 23062306a36Sopenharmony_ci 23162306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0_PLLB_FSM_STAT(x) (((x) << 4) & GENMASK(7, 4)) 23262306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0_PLLB_FSM_STAT_M GENMASK(7, 4) 23362306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0_PLLB_FSM_STAT_X(x) (((x) & GENMASK(7, 4)) >> 4) 23462306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0_PLLB_BUSY BIT(2) 23562306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0_PLLB_DONE_N BIT(1) 23662306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT0_PLLB_FAIL BIT(0) 23762306a36Sopenharmony_ci 23862306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_OUT(x) (((x) << 16) & GENMASK(31, 16)) 23962306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_OUT_M GENMASK(31, 16) 24062306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_OUT_X(x) (((x) & GENMASK(31, 16)) >> 16) 24162306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_REF_DIFF(x) ((x) & GENMASK(15, 0)) 24262306a36Sopenharmony_ci#define HSIO_PLL5G_BIST_STAT1_PLLB_CNT_REF_DIFF_M GENMASK(15, 0) 24362306a36Sopenharmony_ci 24462306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_PWD_ENA BIT(13) 24562306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_RUN_CAL BIT(12) 24662306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_SPEED_SEL(x) (((x) << 10) & GENMASK(11, 10)) 24762306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_SPEED_SEL_M GENMASK(11, 10) 24862306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_SPEED_SEL_X(x) (((x) & GENMASK(11, 10)) >> 10) 24962306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_MODE_SEL(x) (((x) << 8) & GENMASK(9, 8)) 25062306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_MODE_SEL_M GENMASK(9, 8) 25162306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_MODE_SEL_X(x) (((x) & GENMASK(9, 8)) >> 8) 25262306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_FORCE_ENA BIT(4) 25362306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_RCOMP_VAL(x) ((x) & GENMASK(3, 0)) 25462306a36Sopenharmony_ci#define HSIO_RCOMP_CFG0_RCOMP_VAL_M GENMASK(3, 0) 25562306a36Sopenharmony_ci 25662306a36Sopenharmony_ci#define HSIO_RCOMP_STATUS_BUSY BIT(12) 25762306a36Sopenharmony_ci#define HSIO_RCOMP_STATUS_DELTA_ALERT BIT(7) 25862306a36Sopenharmony_ci#define HSIO_RCOMP_STATUS_RCOMP(x) ((x) & GENMASK(3, 0)) 25962306a36Sopenharmony_ci#define HSIO_RCOMP_STATUS_RCOMP_M GENMASK(3, 0) 26062306a36Sopenharmony_ci 26162306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_RSZ 0x4 26262306a36Sopenharmony_ci 26362306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_SRC(x) (((x) << 4) & GENMASK(7, 4)) 26462306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_SRC_M GENMASK(7, 4) 26562306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_SRC_X(x) (((x) & GENMASK(7, 4)) >> 4) 26662306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_DIV(x) (((x) << 1) & GENMASK(3, 1)) 26762306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_DIV_M GENMASK(3, 1) 26862306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_SEL_RECO_CLK_DIV_X(x) (((x) & GENMASK(3, 1)) >> 1) 26962306a36Sopenharmony_ci#define HSIO_SYNC_ETH_CFG_RECO_CLK_ENA BIT(0) 27062306a36Sopenharmony_ci 27162306a36Sopenharmony_ci#define HSIO_SYNC_ETH_PLL_CFG_PLL_AUTO_SQUELCH_ENA BIT(0) 27262306a36Sopenharmony_ci 27362306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_PHS_CTRL(x) (((x) << 13) & GENMASK(16, 13)) 27462306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_PHS_CTRL_M GENMASK(16, 13) 27562306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_PHS_CTRL_X(x) (((x) & GENMASK(16, 13)) >> 13) 27662306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_CPMD_SEL(x) (((x) << 11) & GENMASK(12, 11)) 27762306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_CPMD_SEL_M GENMASK(12, 11) 27862306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_CPMD_SEL_X(x) (((x) & GENMASK(12, 11)) >> 11) 27962306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_MBTR_CTRL(x) (((x) << 8) & GENMASK(10, 8)) 28062306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_MBTR_CTRL_M GENMASK(10, 8) 28162306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_MBTR_CTRL_X(x) (((x) & GENMASK(10, 8)) >> 8) 28262306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_BW_ANA(x) (((x) << 5) & GENMASK(7, 5)) 28362306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_BW_ANA_M GENMASK(7, 5) 28462306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_BW_ANA_X(x) (((x) & GENMASK(7, 5)) >> 5) 28562306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_SWAP_ANA BIT(4) 28662306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_BW_HYST(x) (((x) << 1) & GENMASK(3, 1)) 28762306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_BW_HYST_M GENMASK(3, 1) 28862306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_BW_HYST_X(x) (((x) & GENMASK(3, 1)) >> 1) 28962306a36Sopenharmony_ci#define HSIO_S1G_DES_CFG_DES_SWAP_HYST BIT(0) 29062306a36Sopenharmony_ci 29162306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_FX100_ENA BIT(27) 29262306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_ACJTAG_HYST(x) (((x) << 24) & GENMASK(26, 24)) 29362306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_ACJTAG_HYST_M GENMASK(26, 24) 29462306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_ACJTAG_HYST_X(x) (((x) & GENMASK(26, 24)) >> 24) 29562306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_DET_LEV(x) (((x) << 19) & GENMASK(21, 19)) 29662306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_DET_LEV_M GENMASK(21, 19) 29762306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_DET_LEV_X(x) (((x) & GENMASK(21, 19)) >> 19) 29862306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_HYST_LEV BIT(14) 29962306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_ENA_CMV_TERM BIT(13) 30062306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_ENA_DC_COUPLING BIT(12) 30162306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_ENA_DETLEV BIT(11) 30262306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_ENA_HYST BIT(10) 30362306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_ENA_OFFSET_COMP BIT(9) 30462306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_EQ_GAIN(x) (((x) << 6) & GENMASK(8, 6)) 30562306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_EQ_GAIN_M GENMASK(8, 6) 30662306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_EQ_GAIN_X(x) (((x) & GENMASK(8, 6)) >> 6) 30762306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_SEL_CORNER_FREQ(x) (((x) << 4) & GENMASK(5, 4)) 30862306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_SEL_CORNER_FREQ_M GENMASK(5, 4) 30962306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_SEL_CORNER_FREQ_X(x) (((x) & GENMASK(5, 4)) >> 4) 31062306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_RESISTOR_CTRL(x) ((x) & GENMASK(3, 0)) 31162306a36Sopenharmony_ci#define HSIO_S1G_IB_CFG_IB_RESISTOR_CTRL_M GENMASK(3, 0) 31262306a36Sopenharmony_ci 31362306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_SLP(x) (((x) << 17) & GENMASK(18, 17)) 31462306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_SLP_M GENMASK(18, 17) 31562306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_SLP_X(x) (((x) & GENMASK(18, 17)) >> 17) 31662306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_AMP_CTRL(x) (((x) << 13) & GENMASK(16, 13)) 31762306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_AMP_CTRL_M GENMASK(16, 13) 31862306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_AMP_CTRL_X(x) (((x) & GENMASK(16, 13)) >> 13) 31962306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_CMM_BIAS_CTRL(x) (((x) << 10) & GENMASK(12, 10)) 32062306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_CMM_BIAS_CTRL_M GENMASK(12, 10) 32162306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_CMM_BIAS_CTRL_X(x) (((x) & GENMASK(12, 10)) >> 10) 32262306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_DIS_VCM_CTRL BIT(9) 32362306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_EN_MEAS_VREG BIT(8) 32462306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_VCM_CTRL(x) (((x) << 4) & GENMASK(7, 4)) 32562306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_VCM_CTRL_M GENMASK(7, 4) 32662306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_VCM_CTRL_X(x) (((x) & GENMASK(7, 4)) >> 4) 32762306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_RESISTOR_CTRL(x) ((x) & GENMASK(3, 0)) 32862306a36Sopenharmony_ci#define HSIO_S1G_OB_CFG_OB_RESISTOR_CTRL_M GENMASK(3, 0) 32962306a36Sopenharmony_ci 33062306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_IDLE BIT(9) 33162306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_DEEMPH BIT(8) 33262306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_CPMD_SEL BIT(7) 33362306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_SWAP_CPMD BIT(6) 33462306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_ALISEL(x) (((x) << 4) & GENMASK(5, 4)) 33562306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_ALISEL_M GENMASK(5, 4) 33662306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_ALISEL_X(x) (((x) & GENMASK(5, 4)) >> 4) 33762306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_ENHYS BIT(3) 33862306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_BIG_WIN BIT(2) 33962306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_EN_WIN BIT(1) 34062306a36Sopenharmony_ci#define HSIO_S1G_SER_CFG_SER_ENALI BIT(0) 34162306a36Sopenharmony_ci 34262306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_SYS_RST BIT(31) 34362306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_SE_AUTO_SQUELCH_ENA BIT(21) 34462306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_ENA_LANE BIT(18) 34562306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_PWD_RX BIT(17) 34662306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_PWD_TX BIT(16) 34762306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_LANE_CTRL(x) (((x) << 13) & GENMASK(15, 13)) 34862306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_LANE_CTRL_M GENMASK(15, 13) 34962306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_LANE_CTRL_X(x) (((x) & GENMASK(15, 13)) >> 13) 35062306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_ENA_DIRECT BIT(12) 35162306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_ENA_ELOOP BIT(11) 35262306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_ENA_FLOOP BIT(10) 35362306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_ENA_ILOOP BIT(9) 35462306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_ENA_PLOOP BIT(8) 35562306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_HRATE BIT(7) 35662306a36Sopenharmony_ci#define HSIO_S1G_COMMON_CFG_IF_MODE BIT(0) 35762306a36Sopenharmony_ci 35862306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_ENA_FB_DIV2 BIT(22) 35962306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_ENA_RC_DIV2 BIT(21) 36062306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_FSM_CTRL_DATA(x) (((x) << 8) & GENMASK(15, 8)) 36162306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_FSM_CTRL_DATA_M GENMASK(15, 8) 36262306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_FSM_CTRL_DATA_X(x) (((x) & GENMASK(15, 8)) >> 8) 36362306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_FSM_ENA BIT(7) 36462306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_FSM_FORCE_SET_ENA BIT(6) 36562306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_FSM_OOR_RECAL_ENA BIT(5) 36662306a36Sopenharmony_ci#define HSIO_S1G_PLL_CFG_PLL_RB_DATA_SEL BIT(3) 36762306a36Sopenharmony_ci 36862306a36Sopenharmony_ci#define HSIO_S1G_PLL_STATUS_PLL_CAL_NOT_DONE BIT(12) 36962306a36Sopenharmony_ci#define HSIO_S1G_PLL_STATUS_PLL_CAL_ERR BIT(11) 37062306a36Sopenharmony_ci#define HSIO_S1G_PLL_STATUS_PLL_OUT_OF_RANGE_ERR BIT(10) 37162306a36Sopenharmony_ci#define HSIO_S1G_PLL_STATUS_PLL_RB_DATA(x) ((x) & GENMASK(7, 0)) 37262306a36Sopenharmony_ci#define HSIO_S1G_PLL_STATUS_PLL_RB_DATA_M GENMASK(7, 0) 37362306a36Sopenharmony_ci 37462306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_LAZYBIT BIT(31) 37562306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_INV_DIS BIT(23) 37662306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_PRBS_SEL(x) (((x) << 20) & GENMASK(21, 20)) 37762306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_PRBS_SEL_M GENMASK(21, 20) 37862306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_PRBS_SEL_X(x) (((x) & GENMASK(21, 20)) >> 20) 37962306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_TEST_MODE(x) (((x) << 16) & GENMASK(18, 16)) 38062306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_TEST_MODE_M GENMASK(18, 16) 38162306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_TEST_MODE_X(x) (((x) & GENMASK(18, 16)) >> 16) 38262306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_RX_PHS_CORR_DIS BIT(4) 38362306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_RX_PDSENS_ENA BIT(3) 38462306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_RX_DFT_ENA BIT(2) 38562306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG0_TX_DFT_ENA BIT(0) 38662306a36Sopenharmony_ci 38762306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8)) 38862306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_JITTER_AMPL_M GENMASK(17, 8) 38962306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8) 39062306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4)) 39162306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_STEP_FREQ_M GENMASK(7, 4) 39262306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4) 39362306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_JI_ENA BIT(3) 39462306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_WAVEFORM_SEL BIT(2) 39562306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_FREQOFF_DIR BIT(1) 39662306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG1_TX_FREQOFF_ENA BIT(0) 39762306a36Sopenharmony_ci 39862306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8)) 39962306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_JITTER_AMPL_M GENMASK(17, 8) 40062306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8) 40162306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4)) 40262306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_STEP_FREQ_M GENMASK(7, 4) 40362306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4) 40462306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_JI_ENA BIT(3) 40562306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_WAVEFORM_SEL BIT(2) 40662306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_FREQOFF_DIR BIT(1) 40762306a36Sopenharmony_ci#define HSIO_S1G_DFT_CFG2_RX_FREQOFF_ENA BIT(0) 40862306a36Sopenharmony_ci 40962306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_ENA BIT(20) 41062306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH(x) (((x) << 16) & GENMASK(17, 16)) 41162306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_M GENMASK(17, 16) 41262306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_X(x) (((x) & GENMASK(17, 16)) >> 16) 41362306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_HIGH(x) (((x) << 8) & GENMASK(15, 8)) 41462306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_M GENMASK(15, 8) 41562306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_X(x) (((x) & GENMASK(15, 8)) >> 8) 41662306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_LOW(x) ((x) & GENMASK(7, 0)) 41762306a36Sopenharmony_ci#define HSIO_S1G_RC_PLL_BIST_CFG_PLL_BIST_LOW_M GENMASK(7, 0) 41862306a36Sopenharmony_ci 41962306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_DES_100FX_KICK_MODE(x) (((x) << 11) & GENMASK(12, 11)) 42062306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_DES_100FX_KICK_MODE_M GENMASK(12, 11) 42162306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_DES_100FX_KICK_MODE_X(x) (((x) & GENMASK(12, 11)) >> 11) 42262306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_DES_100FX_CPMD_SWAP BIT(10) 42362306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_DES_100FX_CPMD_MODE BIT(9) 42462306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_DES_100FX_CPMD_ENA BIT(8) 42562306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_RX_LPI_MODE_ENA BIT(5) 42662306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_TX_LPI_MODE_ENA BIT(4) 42762306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_RX_DATA_INV_ENA BIT(3) 42862306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_TX_DATA_INV_ENA BIT(2) 42962306a36Sopenharmony_ci#define HSIO_S1G_MISC_CFG_LANE_RST BIT(0) 43062306a36Sopenharmony_ci 43162306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_PLL_BIST_NOT_DONE BIT(7) 43262306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_PLL_BIST_FAILED BIT(6) 43362306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_PLL_BIST_TIMEOUT_ERR BIT(5) 43462306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_BIST_ACTIVE BIT(3) 43562306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_BIST_NOSYNC BIT(2) 43662306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_BIST_COMPLETE_N BIT(1) 43762306a36Sopenharmony_ci#define HSIO_S1G_DFT_STATUS_BIST_ERROR BIT(0) 43862306a36Sopenharmony_ci 43962306a36Sopenharmony_ci#define HSIO_S1G_MISC_STATUS_DES_100FX_PHASE_SEL BIT(0) 44062306a36Sopenharmony_ci 44162306a36Sopenharmony_ci#define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_WR_ONE_SHOT BIT(31) 44262306a36Sopenharmony_ci#define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_RD_ONE_SHOT BIT(30) 44362306a36Sopenharmony_ci#define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_ADDR(x) ((x) & GENMASK(8, 0)) 44462306a36Sopenharmony_ci#define HSIO_MCB_S1G_ADDR_CFG_SERDES1G_ADDR_M GENMASK(8, 0) 44562306a36Sopenharmony_ci 44662306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_GP(x) (((x) << 16) & GENMASK(18, 16)) 44762306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_GP_M GENMASK(18, 16) 44862306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_GP_X(x) (((x) & GENMASK(18, 16)) >> 16) 44962306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_TX_BIT_DOUBLING_MODE_ENA BIT(7) 45062306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_SIGDET_TESTMODE BIT(6) 45162306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_SIGDET_AST(x) (((x) << 3) & GENMASK(5, 3)) 45262306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_SIGDET_AST_M GENMASK(5, 3) 45362306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_SIGDET_AST_X(x) (((x) & GENMASK(5, 3)) >> 3) 45462306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_SIGDET_DST(x) ((x) & GENMASK(2, 0)) 45562306a36Sopenharmony_ci#define HSIO_S6G_DIG_CFG_SIGDET_DST_M GENMASK(2, 0) 45662306a36Sopenharmony_ci 45762306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_LAZYBIT BIT(31) 45862306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_INV_DIS BIT(23) 45962306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_PRBS_SEL(x) (((x) << 20) & GENMASK(21, 20)) 46062306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_PRBS_SEL_M GENMASK(21, 20) 46162306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_PRBS_SEL_X(x) (((x) & GENMASK(21, 20)) >> 20) 46262306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_TEST_MODE(x) (((x) << 16) & GENMASK(18, 16)) 46362306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_TEST_MODE_M GENMASK(18, 16) 46462306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_TEST_MODE_X(x) (((x) & GENMASK(18, 16)) >> 16) 46562306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_RX_PHS_CORR_DIS BIT(4) 46662306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_RX_PDSENS_ENA BIT(3) 46762306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_RX_DFT_ENA BIT(2) 46862306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG0_TX_DFT_ENA BIT(0) 46962306a36Sopenharmony_ci 47062306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8)) 47162306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_JITTER_AMPL_M GENMASK(17, 8) 47262306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8) 47362306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4)) 47462306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_STEP_FREQ_M GENMASK(7, 4) 47562306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4) 47662306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_JI_ENA BIT(3) 47762306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_WAVEFORM_SEL BIT(2) 47862306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_FREQOFF_DIR BIT(1) 47962306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG1_TX_FREQOFF_ENA BIT(0) 48062306a36Sopenharmony_ci 48162306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_JITTER_AMPL(x) (((x) << 8) & GENMASK(17, 8)) 48262306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_JITTER_AMPL_M GENMASK(17, 8) 48362306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_JITTER_AMPL_X(x) (((x) & GENMASK(17, 8)) >> 8) 48462306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_STEP_FREQ(x) (((x) << 4) & GENMASK(7, 4)) 48562306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_STEP_FREQ_M GENMASK(7, 4) 48662306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_STEP_FREQ_X(x) (((x) & GENMASK(7, 4)) >> 4) 48762306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_JI_ENA BIT(3) 48862306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_WAVEFORM_SEL BIT(2) 48962306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_FREQOFF_DIR BIT(1) 49062306a36Sopenharmony_ci#define HSIO_S6G_DFT_CFG2_RX_FREQOFF_ENA BIT(0) 49162306a36Sopenharmony_ci 49262306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_ENA BIT(20) 49362306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH(x) (((x) << 16) & GENMASK(19, 16)) 49462306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_M GENMASK(19, 16) 49562306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_FBS_HIGH_X(x) (((x) & GENMASK(19, 16)) >> 16) 49662306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_HIGH(x) (((x) << 8) & GENMASK(15, 8)) 49762306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_M GENMASK(15, 8) 49862306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_HIGH_X(x) (((x) & GENMASK(15, 8)) >> 8) 49962306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_LOW(x) ((x) & GENMASK(7, 0)) 50062306a36Sopenharmony_ci#define HSIO_S6G_RC_PLL_BIST_CFG_PLL_BIST_LOW_M GENMASK(7, 0) 50162306a36Sopenharmony_ci 50262306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_SEL_RECO_CLK(x) (((x) << 13) & GENMASK(14, 13)) 50362306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_SEL_RECO_CLK_M GENMASK(14, 13) 50462306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_SEL_RECO_CLK_X(x) (((x) & GENMASK(14, 13)) >> 13) 50562306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_DES_100FX_KICK_MODE(x) (((x) << 11) & GENMASK(12, 11)) 50662306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_DES_100FX_KICK_MODE_M GENMASK(12, 11) 50762306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_DES_100FX_KICK_MODE_X(x) (((x) & GENMASK(12, 11)) >> 11) 50862306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_DES_100FX_CPMD_SWAP BIT(10) 50962306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_DES_100FX_CPMD_MODE BIT(9) 51062306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_DES_100FX_CPMD_ENA BIT(8) 51162306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_RX_BUS_FLIP_ENA BIT(7) 51262306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_TX_BUS_FLIP_ENA BIT(6) 51362306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_RX_LPI_MODE_ENA BIT(5) 51462306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_TX_LPI_MODE_ENA BIT(4) 51562306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_RX_DATA_INV_ENA BIT(3) 51662306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_TX_DATA_INV_ENA BIT(2) 51762306a36Sopenharmony_ci#define HSIO_S6G_MISC_CFG_LANE_RST BIT(0) 51862306a36Sopenharmony_ci 51962306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST0(x) (((x) << 23) & GENMASK(28, 23)) 52062306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST0_M GENMASK(28, 23) 52162306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST0_X(x) (((x) & GENMASK(28, 23)) >> 23) 52262306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST1(x) (((x) << 18) & GENMASK(22, 18)) 52362306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST1_M GENMASK(22, 18) 52462306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_POST1_X(x) (((x) & GENMASK(22, 18)) >> 18) 52562306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_PREC(x) (((x) << 13) & GENMASK(17, 13)) 52662306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_PREC_M GENMASK(17, 13) 52762306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_PREC_X(x) (((x) & GENMASK(17, 13)) >> 13) 52862306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_ENA_CAS(x) (((x) << 6) & GENMASK(8, 6)) 52962306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_ENA_CAS_M GENMASK(8, 6) 53062306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_ENA_CAS_X(x) (((x) & GENMASK(8, 6)) >> 6) 53162306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_LEV(x) ((x) & GENMASK(5, 0)) 53262306a36Sopenharmony_ci#define HSIO_S6G_OB_ANEG_CFG_AN_OB_LEV_M GENMASK(5, 0) 53362306a36Sopenharmony_ci 53462306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_PRBS_SYNC_STAT BIT(8) 53562306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_PLL_BIST_NOT_DONE BIT(7) 53662306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_PLL_BIST_FAILED BIT(6) 53762306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_PLL_BIST_TIMEOUT_ERR BIT(5) 53862306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_BIST_ACTIVE BIT(3) 53962306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_BIST_NOSYNC BIT(2) 54062306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_BIST_COMPLETE_N BIT(1) 54162306a36Sopenharmony_ci#define HSIO_S6G_DFT_STATUS_BIST_ERROR BIT(0) 54262306a36Sopenharmony_ci 54362306a36Sopenharmony_ci#define HSIO_S6G_MISC_STATUS_DES_100FX_PHASE_SEL BIT(0) 54462306a36Sopenharmony_ci 54562306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_PHS_CTRL(x) (((x) << 13) & GENMASK(16, 13)) 54662306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_PHS_CTRL_M GENMASK(16, 13) 54762306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_PHS_CTRL_X(x) (((x) & GENMASK(16, 13)) >> 13) 54862306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_MBTR_CTRL(x) (((x) << 10) & GENMASK(12, 10)) 54962306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_MBTR_CTRL_M GENMASK(12, 10) 55062306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_MBTR_CTRL_X(x) (((x) & GENMASK(12, 10)) >> 10) 55162306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_CPMD_SEL(x) (((x) << 8) & GENMASK(9, 8)) 55262306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_CPMD_SEL_M GENMASK(9, 8) 55362306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_CPMD_SEL_X(x) (((x) & GENMASK(9, 8)) >> 8) 55462306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_BW_HYST(x) (((x) << 5) & GENMASK(7, 5)) 55562306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_BW_HYST_M GENMASK(7, 5) 55662306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_BW_HYST_X(x) (((x) & GENMASK(7, 5)) >> 5) 55762306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_SWAP_HYST BIT(4) 55862306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_BW_ANA(x) (((x) << 1) & GENMASK(3, 1)) 55962306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_BW_ANA_M GENMASK(3, 1) 56062306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_BW_ANA_X(x) (((x) & GENMASK(3, 1)) >> 1) 56162306a36Sopenharmony_ci#define HSIO_S6G_DES_CFG_DES_SWAP_ANA BIT(0) 56262306a36Sopenharmony_ci 56362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SOFSI(x) (((x) << 29) & GENMASK(30, 29)) 56462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SOFSI_M GENMASK(30, 29) 56562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SOFSI_X(x) (((x) & GENMASK(30, 29)) >> 29) 56662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_VBULK_SEL BIT(28) 56762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_RTRM_ADJ(x) (((x) << 24) & GENMASK(27, 24)) 56862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_RTRM_ADJ_M GENMASK(27, 24) 56962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_RTRM_ADJ_X(x) (((x) & GENMASK(27, 24)) >> 24) 57062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_ICML_ADJ(x) (((x) << 20) & GENMASK(23, 20)) 57162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_ICML_ADJ_M GENMASK(23, 20) 57262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_ICML_ADJ_X(x) (((x) & GENMASK(23, 20)) >> 20) 57362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_TERM_MODE_SEL(x) (((x) << 18) & GENMASK(19, 18)) 57462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_TERM_MODE_SEL_M GENMASK(19, 18) 57562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_TERM_MODE_SEL_X(x) (((x) & GENMASK(19, 18)) >> 18) 57662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SIG_DET_CLK_SEL(x) (((x) << 15) & GENMASK(17, 15)) 57762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SIG_DET_CLK_SEL_M GENMASK(17, 15) 57862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SIG_DET_CLK_SEL_X(x) (((x) & GENMASK(17, 15)) >> 15) 57962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_HP(x) (((x) << 13) & GENMASK(14, 13)) 58062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_HP_M GENMASK(14, 13) 58162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_HP_X(x) (((x) & GENMASK(14, 13)) >> 13) 58262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_MID(x) (((x) << 11) & GENMASK(12, 11)) 58362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_MID_M GENMASK(12, 11) 58462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_MID_X(x) (((x) & GENMASK(12, 11)) >> 11) 58562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_LP(x) (((x) << 9) & GENMASK(10, 9)) 58662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_LP_M GENMASK(10, 9) 58762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_LP_X(x) (((x) & GENMASK(10, 9)) >> 9) 58862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_OFFSET(x) (((x) << 7) & GENMASK(8, 7)) 58962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_OFFSET_M GENMASK(8, 7) 59062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_PAT_SEL_OFFSET_X(x) (((x) & GENMASK(8, 7)) >> 7) 59162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_ANA_TEST_ENA BIT(6) 59262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SIG_DET_ENA BIT(5) 59362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_CONCUR BIT(4) 59462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_CAL_ENA BIT(3) 59562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_SAM_ENA BIT(2) 59662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_EQZ_ENA BIT(1) 59762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG_IB_REG_ENA BIT(0) 59862306a36Sopenharmony_ci 59962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_TJTAG(x) (((x) << 17) & GENMASK(21, 17)) 60062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_TJTAG_M GENMASK(21, 17) 60162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_TJTAG_X(x) (((x) & GENMASK(21, 17)) >> 17) 60262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_TSDET(x) (((x) << 12) & GENMASK(16, 12)) 60362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_TSDET_M GENMASK(16, 12) 60462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_TSDET_X(x) (((x) & GENMASK(16, 12)) >> 12) 60562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_SCALY(x) (((x) << 8) & GENMASK(11, 8)) 60662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_SCALY_M GENMASK(11, 8) 60762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_SCALY_X(x) (((x) & GENMASK(11, 8)) >> 8) 60862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FILT_HP BIT(7) 60962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FILT_MID BIT(6) 61062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FILT_LP BIT(5) 61162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FILT_OFFSET BIT(4) 61262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FRC_HP BIT(3) 61362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FRC_MID BIT(2) 61462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FRC_LP BIT(1) 61562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG1_IB_FRC_OFFSET BIT(0) 61662306a36Sopenharmony_ci 61762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TINFV(x) (((x) << 27) & GENMASK(29, 27)) 61862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TINFV_M GENMASK(29, 27) 61962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TINFV_X(x) (((x) & GENMASK(29, 27)) >> 27) 62062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OINFI(x) (((x) << 22) & GENMASK(26, 22)) 62162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OINFI_M GENMASK(26, 22) 62262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OINFI_X(x) (((x) & GENMASK(26, 22)) >> 22) 62362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TAUX(x) (((x) << 19) & GENMASK(21, 19)) 62462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TAUX_M GENMASK(21, 19) 62562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TAUX_X(x) (((x) & GENMASK(21, 19)) >> 19) 62662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OINFS(x) (((x) << 16) & GENMASK(18, 16)) 62762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OINFS_M GENMASK(18, 16) 62862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OINFS_X(x) (((x) & GENMASK(18, 16)) >> 16) 62962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OCALS(x) (((x) << 10) & GENMASK(15, 10)) 63062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OCALS_M GENMASK(15, 10) 63162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_OCALS_X(x) (((x) & GENMASK(15, 10)) >> 10) 63262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TCALV(x) (((x) << 5) & GENMASK(9, 5)) 63362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TCALV_M GENMASK(9, 5) 63462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_TCALV_X(x) (((x) & GENMASK(9, 5)) >> 5) 63562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_UMAX(x) (((x) << 3) & GENMASK(4, 3)) 63662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_UMAX_M GENMASK(4, 3) 63762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_UMAX_X(x) (((x) & GENMASK(4, 3)) >> 3) 63862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_UREG(x) ((x) & GENMASK(2, 0)) 63962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG2_IB_UREG_M GENMASK(2, 0) 64062306a36Sopenharmony_ci 64162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_HP(x) (((x) << 18) & GENMASK(23, 18)) 64262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_HP_M GENMASK(23, 18) 64362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_HP_X(x) (((x) & GENMASK(23, 18)) >> 18) 64462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_MID(x) (((x) << 12) & GENMASK(17, 12)) 64562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_MID_M GENMASK(17, 12) 64662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_MID_X(x) (((x) & GENMASK(17, 12)) >> 12) 64762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_LP(x) (((x) << 6) & GENMASK(11, 6)) 64862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_LP_M GENMASK(11, 6) 64962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_LP_X(x) (((x) & GENMASK(11, 6)) >> 6) 65062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_OFFSET(x) ((x) & GENMASK(5, 0)) 65162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG3_IB_INI_OFFSET_M GENMASK(5, 0) 65262306a36Sopenharmony_ci 65362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_HP(x) (((x) << 18) & GENMASK(23, 18)) 65462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_HP_M GENMASK(23, 18) 65562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_HP_X(x) (((x) & GENMASK(23, 18)) >> 18) 65662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_MID(x) (((x) << 12) & GENMASK(17, 12)) 65762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_MID_M GENMASK(17, 12) 65862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_MID_X(x) (((x) & GENMASK(17, 12)) >> 12) 65962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_LP(x) (((x) << 6) & GENMASK(11, 6)) 66062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_LP_M GENMASK(11, 6) 66162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_LP_X(x) (((x) & GENMASK(11, 6)) >> 6) 66262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_OFFSET(x) ((x) & GENMASK(5, 0)) 66362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG4_IB_MAX_OFFSET_M GENMASK(5, 0) 66462306a36Sopenharmony_ci 66562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_HP(x) (((x) << 18) & GENMASK(23, 18)) 66662306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_HP_M GENMASK(23, 18) 66762306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_HP_X(x) (((x) & GENMASK(23, 18)) >> 18) 66862306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_MID(x) (((x) << 12) & GENMASK(17, 12)) 66962306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_MID_M GENMASK(17, 12) 67062306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_MID_X(x) (((x) & GENMASK(17, 12)) >> 12) 67162306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_LP(x) (((x) << 6) & GENMASK(11, 6)) 67262306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_LP_M GENMASK(11, 6) 67362306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_LP_X(x) (((x) & GENMASK(11, 6)) >> 6) 67462306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_OFFSET(x) ((x) & GENMASK(5, 0)) 67562306a36Sopenharmony_ci#define HSIO_S6G_IB_CFG5_IB_MIN_OFFSET_M GENMASK(5, 0) 67662306a36Sopenharmony_ci 67762306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_IDLE BIT(31) 67862306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_ENA1V_MODE BIT(30) 67962306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POL BIT(29) 68062306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POST0(x) (((x) << 23) & GENMASK(28, 23)) 68162306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POST0_M GENMASK(28, 23) 68262306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POST0_X(x) (((x) & GENMASK(28, 23)) >> 23) 68362306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_PREC(x) (((x) << 18) & GENMASK(22, 18)) 68462306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_PREC_M GENMASK(22, 18) 68562306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_PREC_X(x) (((x) & GENMASK(22, 18)) >> 18) 68662306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_R_ADJ_MUX BIT(17) 68762306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_R_ADJ_PDR BIT(16) 68862306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POST1(x) (((x) << 11) & GENMASK(15, 11)) 68962306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POST1_M GENMASK(15, 11) 69062306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_POST1_X(x) (((x) & GENMASK(15, 11)) >> 11) 69162306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_R_COR BIT(10) 69262306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_SEL_RCTRL BIT(9) 69362306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_SR_H BIT(8) 69462306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_SR(x) (((x) << 4) & GENMASK(7, 4)) 69562306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_SR_M GENMASK(7, 4) 69662306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_SR_X(x) (((x) & GENMASK(7, 4)) >> 4) 69762306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_RESISTOR_CTRL(x) ((x) & GENMASK(3, 0)) 69862306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG_OB_RESISTOR_CTRL_M GENMASK(3, 0) 69962306a36Sopenharmony_ci 70062306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG1_OB_ENA_CAS(x) (((x) << 6) & GENMASK(8, 6)) 70162306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG1_OB_ENA_CAS_M GENMASK(8, 6) 70262306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG1_OB_ENA_CAS_X(x) (((x) & GENMASK(8, 6)) >> 6) 70362306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG1_OB_LEV(x) ((x) & GENMASK(5, 0)) 70462306a36Sopenharmony_ci#define HSIO_S6G_OB_CFG1_OB_LEV_M GENMASK(5, 0) 70562306a36Sopenharmony_ci 70662306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_4TAP_ENA BIT(8) 70762306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_CPMD_SEL BIT(7) 70862306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_SWAP_CPMD BIT(6) 70962306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_ALISEL(x) (((x) << 4) & GENMASK(5, 4)) 71062306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_ALISEL_M GENMASK(5, 4) 71162306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_ALISEL_X(x) (((x) & GENMASK(5, 4)) >> 4) 71262306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_ENHYS BIT(3) 71362306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_BIG_WIN BIT(2) 71462306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_EN_WIN BIT(1) 71562306a36Sopenharmony_ci#define HSIO_S6G_SER_CFG_SER_ENALI BIT(0) 71662306a36Sopenharmony_ci 71762306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_SYS_RST BIT(17) 71862306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_SE_DIV2_ENA BIT(16) 71962306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_SE_AUTO_SQUELCH_ENA BIT(15) 72062306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_ENA_LANE BIT(14) 72162306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_PWD_RX BIT(13) 72262306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_PWD_TX BIT(12) 72362306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_LANE_CTRL(x) (((x) << 9) & GENMASK(11, 9)) 72462306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_LANE_CTRL_M GENMASK(11, 9) 72562306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_LANE_CTRL_X(x) (((x) & GENMASK(11, 9)) >> 9) 72662306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_ENA_DIRECT BIT(8) 72762306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_ENA_ELOOP BIT(7) 72862306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_ENA_FLOOP BIT(6) 72962306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_ENA_ILOOP BIT(5) 73062306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_ENA_PLOOP BIT(4) 73162306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_HRATE BIT(3) 73262306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_QRATE BIT(2) 73362306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_IF_MODE(x) ((x) & GENMASK(1, 0)) 73462306a36Sopenharmony_ci#define HSIO_S6G_COMMON_CFG_IF_MODE_M GENMASK(1, 0) 73562306a36Sopenharmony_ci 73662306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_ENA_OFFS(x) (((x) << 16) & GENMASK(17, 16)) 73762306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_ENA_OFFS_M GENMASK(17, 16) 73862306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_ENA_OFFS_X(x) (((x) & GENMASK(17, 16)) >> 16) 73962306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_DIV4 BIT(15) 74062306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_ENA_ROT BIT(14) 74162306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_FSM_CTRL_DATA(x) (((x) << 6) & GENMASK(13, 6)) 74262306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_FSM_CTRL_DATA_M GENMASK(13, 6) 74362306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_FSM_CTRL_DATA_X(x) (((x) & GENMASK(13, 6)) >> 6) 74462306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_FSM_ENA BIT(5) 74562306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_FSM_FORCE_SET_ENA BIT(4) 74662306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_FSM_OOR_RECAL_ENA BIT(3) 74762306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_RB_DATA_SEL BIT(2) 74862306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_ROT_DIR BIT(1) 74962306a36Sopenharmony_ci#define HSIO_S6G_PLL_CFG_PLL_ROT_FRQ BIT(0) 75062306a36Sopenharmony_ci 75162306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG_ACJTAG_INIT_DATA_N BIT(5) 75262306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG_ACJTAG_INIT_DATA_P BIT(4) 75362306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG_ACJTAG_INIT_CLK BIT(3) 75462306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG_OB_DIRECT BIT(2) 75562306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG_ACJTAG_ENA BIT(1) 75662306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_CFG_JTAG_CTRL_ENA BIT(0) 75762306a36Sopenharmony_ci 75862306a36Sopenharmony_ci#define HSIO_S6G_GP_CFG_GP_MSB(x) (((x) << 16) & GENMASK(31, 16)) 75962306a36Sopenharmony_ci#define HSIO_S6G_GP_CFG_GP_MSB_M GENMASK(31, 16) 76062306a36Sopenharmony_ci#define HSIO_S6G_GP_CFG_GP_MSB_X(x) (((x) & GENMASK(31, 16)) >> 16) 76162306a36Sopenharmony_ci#define HSIO_S6G_GP_CFG_GP_LSB(x) ((x) & GENMASK(15, 0)) 76262306a36Sopenharmony_ci#define HSIO_S6G_GP_CFG_GP_LSB_M GENMASK(15, 0) 76362306a36Sopenharmony_ci 76462306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_CAL_DONE BIT(8) 76562306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_HP_GAIN_ACT BIT(7) 76662306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_MID_GAIN_ACT BIT(6) 76762306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_LP_GAIN_ACT BIT(5) 76862306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_OFFSET_ACT BIT(4) 76962306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_OFFSET_VLD BIT(3) 77062306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_OFFSET_ERR BIT(2) 77162306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_OFFSDIR BIT(1) 77262306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS0_IB_SIG_DET BIT(0) 77362306a36Sopenharmony_ci 77462306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_HP_GAIN_STAT(x) (((x) << 18) & GENMASK(23, 18)) 77562306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_HP_GAIN_STAT_M GENMASK(23, 18) 77662306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_HP_GAIN_STAT_X(x) (((x) & GENMASK(23, 18)) >> 18) 77762306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_MID_GAIN_STAT(x) (((x) << 12) & GENMASK(17, 12)) 77862306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_MID_GAIN_STAT_M GENMASK(17, 12) 77962306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_MID_GAIN_STAT_X(x) (((x) & GENMASK(17, 12)) >> 12) 78062306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_LP_GAIN_STAT(x) (((x) << 6) & GENMASK(11, 6)) 78162306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_LP_GAIN_STAT_M GENMASK(11, 6) 78262306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_LP_GAIN_STAT_X(x) (((x) & GENMASK(11, 6)) >> 6) 78362306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_OFFSET_STAT(x) ((x) & GENMASK(5, 0)) 78462306a36Sopenharmony_ci#define HSIO_S6G_IB_STATUS1_IB_OFFSET_STAT_M GENMASK(5, 0) 78562306a36Sopenharmony_ci 78662306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_STATUS_ACJTAG_CAPT_DATA_N BIT(2) 78762306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_STATUS_ACJTAG_CAPT_DATA_P BIT(1) 78862306a36Sopenharmony_ci#define HSIO_S6G_ACJTAG_STATUS_IB_DIRECT BIT(0) 78962306a36Sopenharmony_ci 79062306a36Sopenharmony_ci#define HSIO_S6G_PLL_STATUS_PLL_CAL_NOT_DONE BIT(10) 79162306a36Sopenharmony_ci#define HSIO_S6G_PLL_STATUS_PLL_CAL_ERR BIT(9) 79262306a36Sopenharmony_ci#define HSIO_S6G_PLL_STATUS_PLL_OUT_OF_RANGE_ERR BIT(8) 79362306a36Sopenharmony_ci#define HSIO_S6G_PLL_STATUS_PLL_RB_DATA(x) ((x) & GENMASK(7, 0)) 79462306a36Sopenharmony_ci#define HSIO_S6G_PLL_STATUS_PLL_RB_DATA_M GENMASK(7, 0) 79562306a36Sopenharmony_ci 79662306a36Sopenharmony_ci#define HSIO_S6G_REVID_SERDES_REV(x) (((x) << 26) & GENMASK(31, 26)) 79762306a36Sopenharmony_ci#define HSIO_S6G_REVID_SERDES_REV_M GENMASK(31, 26) 79862306a36Sopenharmony_ci#define HSIO_S6G_REVID_SERDES_REV_X(x) (((x) & GENMASK(31, 26)) >> 26) 79962306a36Sopenharmony_ci#define HSIO_S6G_REVID_RCPLL_REV(x) (((x) << 21) & GENMASK(25, 21)) 80062306a36Sopenharmony_ci#define HSIO_S6G_REVID_RCPLL_REV_M GENMASK(25, 21) 80162306a36Sopenharmony_ci#define HSIO_S6G_REVID_RCPLL_REV_X(x) (((x) & GENMASK(25, 21)) >> 21) 80262306a36Sopenharmony_ci#define HSIO_S6G_REVID_SER_REV(x) (((x) << 16) & GENMASK(20, 16)) 80362306a36Sopenharmony_ci#define HSIO_S6G_REVID_SER_REV_M GENMASK(20, 16) 80462306a36Sopenharmony_ci#define HSIO_S6G_REVID_SER_REV_X(x) (((x) & GENMASK(20, 16)) >> 16) 80562306a36Sopenharmony_ci#define HSIO_S6G_REVID_DES_REV(x) (((x) << 10) & GENMASK(15, 10)) 80662306a36Sopenharmony_ci#define HSIO_S6G_REVID_DES_REV_M GENMASK(15, 10) 80762306a36Sopenharmony_ci#define HSIO_S6G_REVID_DES_REV_X(x) (((x) & GENMASK(15, 10)) >> 10) 80862306a36Sopenharmony_ci#define HSIO_S6G_REVID_OB_REV(x) (((x) << 5) & GENMASK(9, 5)) 80962306a36Sopenharmony_ci#define HSIO_S6G_REVID_OB_REV_M GENMASK(9, 5) 81062306a36Sopenharmony_ci#define HSIO_S6G_REVID_OB_REV_X(x) (((x) & GENMASK(9, 5)) >> 5) 81162306a36Sopenharmony_ci#define HSIO_S6G_REVID_IB_REV(x) ((x) & GENMASK(4, 0)) 81262306a36Sopenharmony_ci#define HSIO_S6G_REVID_IB_REV_M GENMASK(4, 0) 81362306a36Sopenharmony_ci 81462306a36Sopenharmony_ci#define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_WR_ONE_SHOT BIT(31) 81562306a36Sopenharmony_ci#define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_RD_ONE_SHOT BIT(30) 81662306a36Sopenharmony_ci#define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_ADDR(x) ((x) & GENMASK(24, 0)) 81762306a36Sopenharmony_ci#define HSIO_MCB_S6G_ADDR_CFG_SERDES6G_ADDR_M GENMASK(24, 0) 81862306a36Sopenharmony_ci 81962306a36Sopenharmony_ci#define HSIO_HW_CFG_DEV2G5_10_MODE BIT(6) 82062306a36Sopenharmony_ci#define HSIO_HW_CFG_DEV1G_9_MODE BIT(5) 82162306a36Sopenharmony_ci#define HSIO_HW_CFG_DEV1G_6_MODE BIT(4) 82262306a36Sopenharmony_ci#define HSIO_HW_CFG_DEV1G_5_MODE BIT(3) 82362306a36Sopenharmony_ci#define HSIO_HW_CFG_DEV1G_4_MODE BIT(2) 82462306a36Sopenharmony_ci#define HSIO_HW_CFG_PCIE_ENA BIT(1) 82562306a36Sopenharmony_ci#define HSIO_HW_CFG_QSGMII_ENA BIT(0) 82662306a36Sopenharmony_ci 82762306a36Sopenharmony_ci#define HSIO_HW_QSGMII_CFG_SHYST_DIS BIT(3) 82862306a36Sopenharmony_ci#define HSIO_HW_QSGMII_CFG_E_DET_ENA BIT(2) 82962306a36Sopenharmony_ci#define HSIO_HW_QSGMII_CFG_USE_I1_ENA BIT(1) 83062306a36Sopenharmony_ci#define HSIO_HW_QSGMII_CFG_FLIP_LANES BIT(0) 83162306a36Sopenharmony_ci 83262306a36Sopenharmony_ci#define HSIO_HW_QSGMII_STAT_DELAY_VAR_X200PS(x) (((x) << 1) & GENMASK(6, 1)) 83362306a36Sopenharmony_ci#define HSIO_HW_QSGMII_STAT_DELAY_VAR_X200PS_M GENMASK(6, 1) 83462306a36Sopenharmony_ci#define HSIO_HW_QSGMII_STAT_DELAY_VAR_X200PS_X(x) (((x) & GENMASK(6, 1)) >> 1) 83562306a36Sopenharmony_ci#define HSIO_HW_QSGMII_STAT_SYNC BIT(0) 83662306a36Sopenharmony_ci 83762306a36Sopenharmony_ci#define HSIO_CLK_CFG_CLKDIV_PHY(x) (((x) << 1) & GENMASK(8, 1)) 83862306a36Sopenharmony_ci#define HSIO_CLK_CFG_CLKDIV_PHY_M GENMASK(8, 1) 83962306a36Sopenharmony_ci#define HSIO_CLK_CFG_CLKDIV_PHY_X(x) (((x) & GENMASK(8, 1)) >> 1) 84062306a36Sopenharmony_ci#define HSIO_CLK_CFG_CLKDIV_PHY_DIS BIT(0) 84162306a36Sopenharmony_ci 84262306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL_FORCE_TEMP_RD BIT(5) 84362306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL_FORCE_RUN BIT(4) 84462306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL_FORCE_NO_RST BIT(3) 84562306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL_FORCE_POWER_UP BIT(2) 84662306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL_FORCE_CLK BIT(1) 84762306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CTRL_SAMPLE_ENA BIT(0) 84862306a36Sopenharmony_ci 84962306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CFG_RUN_WID(x) (((x) << 8) & GENMASK(15, 8)) 85062306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CFG_RUN_WID_M GENMASK(15, 8) 85162306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CFG_RUN_WID_X(x) (((x) & GENMASK(15, 8)) >> 8) 85262306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CFG_SAMPLE_PER(x) ((x) & GENMASK(7, 0)) 85362306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_CFG_SAMPLE_PER_M GENMASK(7, 0) 85462306a36Sopenharmony_ci 85562306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_STAT_TEMP_VALID BIT(8) 85662306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_STAT_TEMP(x) ((x) & GENMASK(7, 0)) 85762306a36Sopenharmony_ci#define HSIO_TEMP_SENSOR_STAT_TEMP_M GENMASK(7, 0) 85862306a36Sopenharmony_ci 85962306a36Sopenharmony_ci#endif 860