162306a36Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0 */
262306a36Sopenharmony_ci/*
362306a36Sopenharmony_ci * Copyright (c) 2017, The Linux Foundation. All rights reserved.
462306a36Sopenharmony_ci */
562306a36Sopenharmony_ci
662306a36Sopenharmony_ci#ifndef QCOM_PHY_QMP_PCIE_QHP_H_
762306a36Sopenharmony_ci#define QCOM_PHY_QMP_PCIE_QHP_H_
862306a36Sopenharmony_ci
962306a36Sopenharmony_ci/* PCIE GEN3 COM registers */
1062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_EN_CENTER			0x14
1162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_PER1			0x20
1262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_PER2			0x24
1362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_STEP_SIZE1		0x28
1462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_STEP_SIZE2		0x2c
1562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_STEP_SIZE1_MODE1		0x34
1662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SSC_STEP_SIZE2_MODE1		0x38
1762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_BIAS_EN_CKBUFLR_EN		0x54
1862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CLK_ENABLE1			0x58
1962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_LOCK_CMP1_MODE0		0x6c
2062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_LOCK_CMP2_MODE0		0x70
2162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_LOCK_CMP1_MODE1		0x78
2262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_LOCK_CMP2_MODE1		0x7c
2362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_BGV_TRIM			0x98
2462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CP_CTRL_MODE0			0xb4
2562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CP_CTRL_MODE1			0xb8
2662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_PLL_RCTRL_MODE0		0xc0
2762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_PLL_RCTRL_MODE1		0xc4
2862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_PLL_CCTRL_MODE0		0xcc
2962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_PLL_CCTRL_MODE1		0xd0
3062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SYSCLK_EN_SEL			0xdc
3162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_RESTRIM_CTRL2			0xf0
3262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_LOCK_CMP_EN			0xf8
3362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DEC_START_MODE0		0x100
3462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DEC_START_MODE1		0x108
3562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DIV_FRAC_START1_MODE0		0x11c
3662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DIV_FRAC_START2_MODE0		0x120
3762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DIV_FRAC_START3_MODE0		0x124
3862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DIV_FRAC_START1_MODE1		0x128
3962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DIV_FRAC_START2_MODE1		0x12c
4062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_DIV_FRAC_START3_MODE1		0x130
4162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_INTEGLOOP_GAIN0_MODE0		0x150
4262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_INTEGLOOP_GAIN0_MODE1		0x158
4362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_VCO_TUNE_MAP			0x178
4462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_BG_CTRL			0x1c8
4562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CLK_SELECT			0x1cc
4662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_HSCLK_SEL1			0x1d0
4762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CORECLK_DIV			0x1e0
4862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CORE_CLK_EN			0x1e8
4962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CMN_CONFIG			0x1f0
5062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_SVS_MODE_CLK_SEL		0x1fc
5162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CORECLK_DIV_MODE1		0x21c
5262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_CMN_MODE			0x224
5362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_VREGCLK_DIV1			0x228
5462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_COM_VREGCLK_DIV2			0x22c
5562306a36Sopenharmony_ci
5662306a36Sopenharmony_ci/* PCIE GEN3 QHP Lane registers */
5762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DRVR_CTRL0			0xc
5862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DRVR_CTRL1			0x10
5962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DRVR_CTRL2			0x14
6062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DRVR_TAP_EN			0x18
6162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_TX_BAND_MODE			0x60
6262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_LANE_MODE			0x64
6362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_PARALLEL_RATE			0x7c
6462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CML_CTRL_MODE0			0xc0
6562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CML_CTRL_MODE1			0xc4
6662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CML_CTRL_MODE2			0xc8
6762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_PREAMP_CTRL_MODE1		0xd0
6862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_PREAMP_CTRL_MODE2		0xd4
6962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_MIXER_CTRL_MODE0		0xd8
7062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_MIXER_CTRL_MODE1		0xdc
7162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_MIXER_CTRL_MODE2		0xe0
7262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CTLE_THRESH_DFE		0xfc
7362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CGA_THRESH_DFE			0x100
7462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RXENGINE_EN0			0x108
7562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CTLE_TRAIN_TIME		0x114
7662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_CTLE_DFE_OVRLP_TIME		0x118
7762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DFE_REFRESH_TIME		0x11c
7862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DFE_ENABLE_TIME		0x120
7962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_VGA_GAIN			0x124
8062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DFE_GAIN			0x128
8162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_EQ_GAIN			0x130
8262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_OFFSET_GAIN			0x134
8362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_PRE_GAIN			0x138
8462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_VGA_INITVAL			0x13c
8562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_EQ_INTVAL			0x154
8662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_EDAC_INITVAL			0x160
8762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RXEQ_INITB0			0x168
8862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RXEQ_INITB1			0x16c
8962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RCVRDONE_THRESH1		0x178
9062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RXEQ_CTRL			0x180
9162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_FO_GAIN_MODE0		0x184
9262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_FO_GAIN_MODE1		0x188
9362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_FO_GAIN_MODE2		0x18c
9462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_SO_GAIN_MODE0		0x190
9562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_SO_GAIN_MODE1		0x194
9662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_SO_GAIN_MODE2		0x198
9762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_UCDR_SO_CONFIG			0x19c
9862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_BAND			0x1a4
9962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_RCVR_PATH1_MODE0		0x1c0
10062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_RCVR_PATH1_MODE1		0x1c4
10162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_RCVR_PATH1_MODE2		0x1c8
10262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_SIGDET_ENABLES			0x230
10362306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_SIGDET_CNTRL			0x234
10462306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_SIGDET_DEGLITCH_CNTRL		0x238
10562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DCC_GAIN			0x2a4
10662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RSM_START			0x2a8
10762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_EN_SIGNAL			0x2ac
10862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_PSM_RX_EN_CAL			0x2b0
10962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_MISC_CNTRL0			0x2b8
11062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_TS0_TIMER			0x2c0
11162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_DLL_HIGHDATARATE		0x2c4
11262306a36Sopenharmony_ci#define PCIE_GEN3_QHP_L0_RX_RESETCODE_OFFSET		0x2cc
11362306a36Sopenharmony_ci
11462306a36Sopenharmony_ci/* PCIE GEN3 PCS registers */
11562306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_TXMGN_MAIN_V0_M3P5DB		0x2c
11662306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_TXMGN_POST_V0_M3P5DB		0x40
11762306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_TXMGN_MAIN_V0_M6DB		0x54
11862306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_TXMGN_POST_V0_M6DB		0x68
11962306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_POWER_STATE_CONFIG		0x15c
12062306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_POWER_STATE_CONFIG5		0x16c
12162306a36Sopenharmony_ci#define PCIE_GEN3_QHP_PHY_PCS_TX_RX_CONFIG		0x174
12262306a36Sopenharmony_ci
12362306a36Sopenharmony_ci#endif
124