SPRUI30H November 2015 – May 2024 DRA745 , DRA746 , DRA750 , DRA756
The low-level programming sequence to set up the PCIe PHY subsystem is summarized in the Table 26-56.
Registers prefixed with CM_ are system Clock Manager registers and are described in Power, Reset, and Clock Management.
Registers prefixed with CTRL_ are system Control Module registers and are described in Control Module.
Step | Register/Bit Field/Programming Model | Value |
---|---|---|
Start a software forced wake-up transition on the PCIE clock domain | CM_PCIE_CLKSTCTRL[1:0] CLKTRCTRL | 0x2 |
Start a software forced wake-up transition on the L3INIT clock domain | CM_L3INIT_CLKSTCTRL[1:0] CLKTRCTRL | 0x2 |
Configure the PCIESS1 module to be explicitly enabled | CM_PCIE_PCIESS1_CLKCTRL[1:0] MODULEMODE | 0x2 |
Poll for PCIESS1 module fully functional? | CM_PCIE_PCIESS1_CLKCTRL[17:16] IDLEST | =0x0 |
Optional: Configure the PCIESS2 module to be explicitly enabled | CM_PCIE_PCIESS2_CLKCTRL[1:0] MODULEMODE | 0x2 |
Optional: Poll for PCIESS2 module fully functional? | CM_PCIE_PCIESS2_CLKCTRL[17:16] IDLEST | =0x0 |
Configure the OCP2SCP3 module to be managed automatically by hardware according to clock domain transition | CM_L3INIT_OCP2SCP3_CLKCTRL[1:0] MODULEMODE | 0x1 |
Perform a software reset on OCP2SCP3 | OCP2SCP_SYSCONFIG[1] SOFTRESET | 1 |
Wait until reset is finished? | OCP2SCP_SYSSTATUS[0] RESETDONE | =1 |
Configure the OCP2SCP3 Division Ratio and SYNC values | OCP2SCP_TIMING | 0x8F |
Configure DPLL_PCIE_REF registers to select CLKOUTLDO = 100 MHz. Lock the PLL. | See Section 26.4.4.4.1.6.7, PCIe PHY DPLL Recommended Values. | |
Select the desired direction of the ACSPCIE buffer (connected to the ljcp_clkn/ljcp_clkp pins) | CTRL_CORE_SMA_SW_6[17:16] PCIE_TX_RX_CONTROL | 0x1 (output) 0x2 (input) |
Select the APLL_PCIE 100MHz reference clock source | CM_CLKMODE_APLL_PCIE[7] REFSEL | 0 (DPLL_PCIE) 1 (ACSPCIE) |
Configure APLL_PCIE registers to select CLKVCOLDO = 2.5 GHz and CLKVCOLDO_DIV = 2.5 GHz | See Section 26.4.4.4.2.4, PCIe PHY APLL Clocks Configuration. | |
Request the APLL_PCIE Force Lock mode | CM_CLKMODE_APLL_PCIE[1:0] MODE_SELECT | 0x1 |
Wait for APLL_PCIE Lock | CM_IDLEST_APLL_PCIE[0] ST_APLL_CLK | =1 |
Configure the PCIE PHYs to ×1 or ×2 mode | CTRL_CORE_PCIE_CONTROL[3:2] PCIE_B1C0_MODE_SEL | 0x0 (×1 mode) 0x1 (×2 mode) |
CTRL_CORE_PCIE_CONTROL[0] PCIE_B0_B1_TSYNCEN | 0 (×1 mode) 1 (×2 mode) | |
Enable the CLKVCOLDO clock for the PCIESS1 PHY | CM_PCIE_PCIESS1_CLKCTRL[9] OPTFCLKEN_PCIEPHY_CLK | 1 |
Enable the CLKVCOLDO_DIV clock for the PCIESS1 PHY | CM_PCIE_PCIESS1_CLKCTRL[10] OPTFCLKEN_PCIEPHY_CLK_DIV | 1 |
IF: PCIESS2 is enabled | Software test condition | |
Enable the CLKVCOLDO clock for the PCIESS2 PHY | CM_PCIE_PCIESS2_CLKCTRL[9] OPTFCLKEN_PCIEPHY_CLK | 1 |
Enable the CLKVCOLDO_DIV clock for the PCIESS2 PHY | CM_PCIE_PCIESS2_CLKCTRL[10] OPTFCLKEN_PCIEPHY_CLK_DIV | 1 |
ENDIF | ||
Configure the PCIESS1 Power Control clock frequency to match SYS_CLK1 in MHz | CTRL_CORE_PHY_POWER_PCIESS1[31:22] PCIESS1_PWRCTL_CLKFREQ | 0x14 (20 MHz) |
Power up PCIESS1_PHY_TX and PCIESS1_PHY_RX | CTRL_CORE_PHY_POWER_PCIESS1[21:14] PCIESS1_PWRCTL_CMD | 0x3 |
IF: Either PCIESS1 Second Lane or PCIESS2 is required | Software test condition | |
Configure the PCIESS2 Power Control clock frequency to match SYS_CLK1 in MHz | CTRL_CORE_PHY_POWER_PCIESS2[31:22] PCIESS2_PWRCTL_CLKFREQ | 0x14 (20 MHz) |
Power up PCIESS2_PHY_TX and PCIESS2_PHY_RX | CTRL_CORE_PHY_POWER_PCIESS2[21:14] PCIESS2_PWRCTL_CMD | 0x3 |
ENDIF | ||
Configure the proper Delay Count | CTRL_CORE_PCIE_PCS[23:16] PCIESS_PCS_RC_DELAY_COUNT | 0x96 |
Configure PCIe_PHY_RX SCP Settings | See PCIe_PHY_RX preferred SCP settings in Table 26-57. | |
PHY_TX settings must remain at default values. | No additional tuning in PHY_TX SCP registers is required. |
Register | Preferred Value Setting |
---|---|
PCIEPHYRX_ANA_PROGRAMMABILITY_REG1[31:27] MEM_ANATESTMODE | 0b00001 |
PCIEPHYRX_ANA_PROGRAMMABILITY_REG1[17:14] MEM_ANATESTMODE | 0b1010 |
PCIEPHYRX_DIGITAL_MODES_REG1[23] MEM_CDR_FASTLOCK | 0b1 |
PCIEPHYRX_DIGITAL_MODES_REG1[22:21] MEM_CDR_LBW | 0b11 |
PCIEPHYRX_DIGITAL_MODES_REG1[20:19] MEM_CDR_STEPCNT | 0b00 |
PCIEPHYRX_DIGITAL_MODES_REG1[18:16] MEM_CDR_STL | 0b011 |
PCIEPHYRX_DIGITAL_MODES_REG1[15:13] MEM_CDR_THR | 0b001 |
PCIEPHYRX_DIGITAL_MODES_REG1[12] MEM_CDR_THR_MODE | 0b1 |
PCIEPHYRX_DIGITAL_MODES_REG1[11] MEM_CDR_2NDO_SDM_MODE | 0b0 |
PCIEPHYRX_DIGITAL_MODES_REG1[26] MEM_OVRD_HS_RATE | 0b0 |
PCIEPHYRX_ANA_PROGRAMMABILITY_REG1[6:5] MEM_PLLDIV | 0b00 |
PCIEPHYRX_TRIM_REG4[31:30] MEM_DLL_TRIM_SEL | 0b10 |
PCIEPHYRX_DLL_REG1[31:30] MEM_DLL_PHINT_RATE | 0b11 |
PCIEPHYRX_EQUALIZER_REG1[31:16] MEM_EQLEV | 0b0000 0000 0000 0000 |
PCIEPHYRX_EQUALIZER_REG1[15:11] MEM_EQFTC | 0b11111 |
PCIEPHYRX_EQUALIZER_REG1[10:7] MEM_EQCTL | 0b0001 |
PCIEPHYRX_EQUALIZER_REG1[2] MEM_OVRD_EQLEV | 0b0 |
PCIEPHYRX_EQUALIZER_REG1[1] MEM_OVRD_EQFTC | 0b0 |