diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/read_cntrl.H b/src/import/chips/p9/procedures/hwp/memory/lib/phy/read_cntrl.H index 08836fd4fd0..8ea892a3368 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/read_cntrl.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/read_cntrl.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -470,9 +470,9 @@ inline fapi2::ReturnCode reset_vref_config1( const fapi2::Target& i_target ) FAPI_TRY( mss::eff_dram_al(i_target, l_al) ); FAPI_TRY( mss::eff_dram_cl(i_target, l_cl) ); - // PHY databook p 506 - // The recommended setting is (AL + CL + 12). - l_data.insertFromRight(l_al + l_cl + 12); + // Per Ryan King's characterization: + // The recommended setting is (AL + CL + 15). + l_data.insertFromRight(l_al + l_cl + 15); l_data.insertFromRight(0b0100); // From R. King // Note: when initial cal is setup, this register will change to accomodate the diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.H b/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.H index 5d430dbfd4f..03748e5a65f 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/seq.H @@ -289,8 +289,6 @@ fapi_try_exit: return fapi2::current_err; } -// TK read, write RD_WR_DATA - /// /// @brief Setup odt_wr/rd_config /// @tparam T fapi2 Target Type - derived @@ -302,13 +300,26 @@ template< fapi2::TargetType T, typename TT = seqTraits > fapi2::ReturnCode reset_rd_wr_data( const fapi2::Target& i_target ) { // MPR_PATTERN_BIT of 0F0F0F0F pattern - static const uint64_t MPR_PATTERN = 0x5555; + // MPRLOC vs pattern + // MPR0 = 0F0F0F0F - these repeating patterns are for RD CTR, which needs transitions each data beat + // MPR1 = 00000000 - these 0 patterns are for RD VREF, which needs a static low level + // MPR2 = 00000000 - these 0 patterns are for RD VREF, which needs a static low level + // MPR3 = 0F0F0F0F - these repeating patterns are for RD CTR, which needs transitions each data beat + // MPR loc is noted above the data below + // 0011 + constexpr uint64_t MPR01_PATTERN = 0x5500; + // Per Ryan King: Only MPR page 0 locations 0/1 are required + // 2/3 are mirrored for safety but could be changed as needed + // 2233 + constexpr uint64_t MPR23_PATTERN = 0x0055; fapi2::buffer l_data; - l_data.insertFromRight(MPR_PATTERN); - - FAPI_INF("seq_rd_wr 0x%llx", l_data); + l_data.insertFromRight(MPR01_PATTERN); + FAPI_INF("seq_rd_wr0 0x%llx", l_data); FAPI_TRY( mss::putScom(i_target, TT::SEQ_RDWR_DATA0, l_data) ); + + l_data.insertFromRight(MPR23_PATTERN); + FAPI_INF("seq_rd_wr1 0x%llx", l_data); FAPI_TRY( mss::putScom(i_target, TT::SEQ_RDWR_DATA1, l_data) ); fapi_try_exit: diff --git a/src/import/chips/p9/procedures/hwp/memory/lib/phy/write_cntrl.H b/src/import/chips/p9/procedures/hwp/memory/lib/phy/write_cntrl.H index 5991aa0b3f7..390cb101208 100644 --- a/src/import/chips/p9/procedures/hwp/memory/lib/phy/write_cntrl.H +++ b/src/import/chips/p9/procedures/hwp/memory/lib/phy/write_cntrl.H @@ -5,7 +5,7 @@ /* */ /* OpenPOWER HostBoot Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2016 */ +/* Contributors Listed Below - COPYRIGHT 2016,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -338,8 +338,8 @@ inline fapi2::ReturnCode reset_config0( const fapi2::Target& i_target ) l_data.insertFromRight(FW_WR_RD); } - // 63, 0b0, any; # CUSTOM_INIT_WRITE - l_data.clearBit(); + // 63, 0b1, any; # CUSTOM_INIT_WRITE - set to a 1 to get proper values for RD VREF + l_data.setBit(); FAPI_DBG("wc_config0 reset 0x%llx (tWLO_tWLOE: %d)", l_data, mss::twlo_twloe(i_target)); FAPI_TRY( write_config0(i_target, l_data) );